From 386f618c83e8361714d43b76a2c497812ca65761 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Tue, 7 Apr 2026 11:50:43 +0800 Subject: [PATCH] fix: improve run_python output readability in dark mode --- .../src/components/chat/actions/ToolAction.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/static/src/components/chat/actions/ToolAction.vue b/static/src/components/chat/actions/ToolAction.vue index 7caaee7..5f36480 100644 --- a/static/src/components/chat/actions/ToolAction.vue +++ b/static/src/components/chat/actions/ToolAction.vue @@ -927,6 +927,22 @@ function renderEasterEgg(result: any, args: any): string { word-wrap: break-word; } +/* 暗色模式:run_python 代码/输出统一白字,去除任何描边/阴影观感 */ +:root[data-theme='dark'] .code-block pre, +:root[data-theme='dark'] .output-block pre { + color: #ffffff !important; + background: rgba(255, 255, 255, 0.04); + border-color: rgba(255, 255, 255, 0.12); + text-shadow: none !important; +} + +:root[data-theme='dark'] .code-block pre code, +:root[data-theme='dark'] .output-block pre code { + color: #ffffff !important; + text-shadow: none !important; + -webkit-text-fill-color: #ffffff; +} + .output-block { margin-top: 12px; }