diff --git a/dashboard/src/views/ConversationPage.vue b/dashboard/src/views/ConversationPage.vue index a1b853f3f..d6ec28100 100644 --- a/dashboard/src/views/ConversationPage.vue +++ b/dashboard/src/views/ConversationPage.vue @@ -187,7 +187,7 @@ -
+
mdi-chat-remove @@ -195,7 +195,7 @@
- +
@@ -320,6 +320,7 @@ import { debounce } from 'lodash'; import { VueMonacoEditor } from '@guolao/vue-monaco-editor'; import MarkdownIt from 'markdown-it'; import { useCommonStore } from '@/stores/common'; +import { useCustomizerStore } from '@/stores/customizer'; import { useI18n, useModuleI18n } from '@/i18n/composables'; import MessageList from '@/components/chat/MessageList.vue'; @@ -341,11 +342,13 @@ export default { setup() { const { t, locale } = useI18n(); const { tm } = useModuleI18n('features/conversation'); + const customizerStore = useCustomizerStore(); return { t, tm, - locale + locale, + customizerStore }; }, @@ -485,6 +488,12 @@ export default { }; }, + // 检测是否为暗色模式 + isDark() { + console.log('isDark', this.customizerStore.uiTheme); + return this.customizerStore.uiTheme === 'PurpleThemeDark'; + }, + // 将对话历史转换为 MessageList 组件期望的格式 formattedMessages() { return this.conversationHistory.map(msg => { @@ -987,6 +996,11 @@ export default { background-color: #f9f9f9; } +/* 暗色模式下的聊天消息容器 */ +.v-theme--dark .conversation-messages-container { + background-color: #1e1e1e; +} + /* 对话详情卡片 */ .conversation-detail-card { max-height: 90vh;