From db95697c0044a7d00c961d5cfb01b91f6195be79 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Thu, 26 Mar 2026 05:44:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=AB=98=E4=BA=AE=E6=94=AF=E6=8C=81=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=AF=AD=E8=A8=80=E6=98=A0=E5=B0=84=E5=92=8C?= =?UTF-8?q?=20HTML=20=E9=A2=84=E8=A7=88=E7=B1=BB=E5=9E=8B=E5=88=A4?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/assets/css/code-highlight.less | 7 ++ web/src/assets/css/main.css | 1 + web/src/components/AgentPanel.vue | 139 ++++++++++++++++++++++++- web/src/utils/file_preview.js | 49 +++++++++ 4 files changed, 194 insertions(+), 2 deletions(-) create mode 100644 web/src/assets/css/code-highlight.less diff --git a/web/src/assets/css/code-highlight.less b/web/src/assets/css/code-highlight.less new file mode 100644 index 00000000..3401bf84 --- /dev/null +++ b/web/src/assets/css/code-highlight.less @@ -0,0 +1,7 @@ +.hljs-theme-light { + @import (less) '../../../node_modules/highlight.js/styles/github.css'; +} + +.hljs-theme-dark { + @import (less) '../../../node_modules/highlight.js/styles/github-dark.css'; +} diff --git a/web/src/assets/css/main.css b/web/src/assets/css/main.css index e05e3d9c..f76890b7 100644 --- a/web/src/assets/css/main.css +++ b/web/src/assets/css/main.css @@ -4,6 +4,7 @@ @import './shorts.css'; @import './dashboard.css'; @import './markdown-preview.less'; +@import './code-highlight.less'; :root { --header-height: 45px; diff --git a/web/src/components/AgentPanel.vue b/web/src/components/AgentPanel.vue index 214f1771..9ec73f03 100644 --- a/web/src/components/AgentPanel.vue +++ b/web/src/components/AgentPanel.vue @@ -123,6 +123,24 @@ {{ currentFilePath }}