From 69b9c06a58bd393093ae35be8573a60239446304 Mon Sep 17 00:00:00 2001 From: Bob Du Date: Fri, 16 Jan 2026 11:00:36 +0800 Subject: [PATCH 1/4] feat: refine mobile context toggles Signed-off-by: Bob Du --- components.d.ts | 14 +++++ src/locales/en-US.json | 2 +- src/locales/ja-JP.json | 4 +- src/views/chat/components/Header/index.vue | 39 +------------ src/views/chat/index.vue | 66 ++++++++++++++++------ 5 files changed, 66 insertions(+), 59 deletions(-) diff --git a/components.d.ts b/components.d.ts index 2fe34834..cec17d42 100644 --- a/components.d.ts +++ b/components.d.ts @@ -12,16 +12,21 @@ export {} declare module 'vue' { export interface GlobalComponents { IconIcOutlineChat: typeof import('~icons/ic/outline-chat')['default'] + IconIcOutlineChatBubbleOutline: typeof import('~icons/ic/outline-chat-bubble-outline')['default'] + IconIcOutlineHistory: typeof import('~icons/ic/outline-history')['default'] IconMageBoxUpload: typeof import('~icons/mage/box-upload')['default'] IconMdiFormatVerticalAlignBottom: typeof import('~icons/mdi/format-vertical-align-bottom')['default'] IconMdiFormatVerticalAlignTop: typeof import('~icons/mdi/format-vertical-align-top')['default'] IconMdiGift: typeof import('~icons/mdi/gift')['default'] + IconMdiHistory: typeof import('~icons/mdi/history')['default'] IconMdiLightbulbOutline: typeof import('~icons/mdi/lightbulb-outline')['default'] IconMdiReorderHorizontal: typeof import('~icons/mdi/reorder-horizontal')['default'] IconMdiWeb: typeof import('~icons/mdi/web')['default'] IconRiAddFill: typeof import('~icons/ri/add-fill')['default'] IconRiAlignJustify: typeof import('~icons/ri/align-justify')['default'] IconRiAlignRight: typeof import('~icons/ri/align-right')['default'] + IconRiArchiveLine: typeof import('~icons/ri/archive-line')['default'] + IconRiArchiveStackLine: typeof import('~icons/ri/archive-stack-line')['default'] IconRiArrowDownSLine: typeof import('~icons/ri/arrow-down-s-line')['default'] IconRiBarChartBoxLine: typeof import('~icons/ri/bar-chart-box-line')['default'] IconRiBubbleChartFill: typeof import('~icons/ri/bubble-chart-fill')['default'] @@ -38,25 +43,34 @@ declare module 'vue' { IconRiDownloadLine: typeof import('~icons/ri/download-line')['default'] IconRiEditLine: typeof import('~icons/ri/edit-line')['default'] IconRiEqualizerLine: typeof import('~icons/ri/equalizer-line')['default'] + IconRiFileHistoryLine: typeof import('~icons/ri/file-history-line')['default'] IconRiFileUserLine: typeof import('~icons/ri/file-user-line')['default'] + IconRiFilter2Line: typeof import('~icons/ri/filter2-line')['default'] + IconRiFilterLine: typeof import('~icons/ri/filter-line')['default'] + IconRiHistoryLine: typeof import('~icons/ri/history-line')['default'] IconRiImageEditLine: typeof import('~icons/ri/image-edit-line')['default'] IconRiInboxLine: typeof import('~icons/ri/inbox-line')['default'] IconRiKey2Line: typeof import('~icons/ri/key2-line')['default'] IconRiLink: typeof import('~icons/ri/link')['default'] IconRiListSettingsLine: typeof import('~icons/ri/list-settings-line')['default'] + IconRiListView: typeof import('~icons/ri/list-view')['default'] IconRiMailLine: typeof import('~icons/ri/mail-line')['default'] IconRiMessage3Line: typeof import('~icons/ri/message3-line')['default'] IconRiMore2Fill: typeof import('~icons/ri/more2-fill')['default'] + IconRiPagesLine: typeof import('~icons/ri/pages-line')['default'] IconRiQuestionAnswerLine: typeof import('~icons/ri/question-answer-line')['default'] IconRiRestartLine: typeof import('~icons/ri/restart-line')['default'] IconRiSaveLine: typeof import('~icons/ri/save-line')['default'] IconRiSendPlaneFill: typeof import('~icons/ri/send-plane-fill')['default'] IconRiSettings4Line: typeof import('~icons/ri/settings4-line')['default'] IconRiSettingsLine: typeof import('~icons/ri/settings-line')['default'] + IconRiStackLine: typeof import('~icons/ri/stack-line')['default'] IconRiStopCircleLine: typeof import('~icons/ri/stop-circle-line')['default'] IconRiStore2Line: typeof import('~icons/ri/store2-line')['default'] + IconRiTimelineView: typeof import('~icons/ri/timeline-view')['default'] IconRiUpload2Fill: typeof import('~icons/ri/upload2-fill')['default'] IconRiUser5Line: typeof import('~icons/ri/user5-line')['default'] + IconRiWindowLine: typeof import('~icons/ri/window-line')['default'] IconUilExit: typeof import('~icons/uil/exit')['default'] NAutoComplete: typeof import('naive-ui')['NAutoComplete'] NAvatar: typeof import('naive-ui')['NAvatar'] diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 57402f4f..8e59d0dc 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -68,7 +68,7 @@ "clickTurnOffThink": "Click to disable deep thinking for this chat.", "thinkHelp": "After enabling deep thinking, the model will use more computational resources and take longer time to simulate more complex thinking chains for logical reasoning.\nSuitable for complex tasks or high-requirement scenarios, such as mathematical derivations and project planning.\nDaily simple queries do not need to be enabled.", "showOnContext": "Include context", - "showOffContext": "Not include context", + "showOffContext": "Exclude context", "maxContextCount": "Maximum number of messages included in the context window", "searchEnabled": "Search enabled", "searchDisabled": "Search disabled", diff --git a/src/locales/ja-JP.json b/src/locales/ja-JP.json index 55f62d08..1397154e 100644 --- a/src/locales/ja-JP.json +++ b/src/locales/ja-JP.json @@ -67,8 +67,8 @@ "clickTurnOnThink": "クリックしてこのチャットで深い思考を有効にします。", "clickTurnOffThink": "クリックしてこのチャットで深い思考を無効にします。", "thinkHelp": "深い思考を有効にすると、モデルはより多くの計算資源を使い、複雑な思考連鎖をより長い時間かけてシミュレートします。\n数式導出やプロジェクト計画など、複雑なタスクや高い要件のシナリオに適しています。\n日常的な簡単な問い合わせには不要です。", - "showOnContext": "コンテキストを含める", - "showOffContext": "コンテキストを含めない", + "showOnContext": "コンテキスト含む", + "showOffContext": "コンテキスト除外", "maxContextCount": "コンテキストウィンドウに含める最大メッセージ数", "searchEnabled": "検索有効", "searchDisabled": "検索無効", diff --git a/src/views/chat/components/Header/index.vue b/src/views/chat/components/Header/index.vue index 6d2beac8..e23a1a68 100644 --- a/src/views/chat/components/Header/index.vue +++ b/src/views/chat/components/Header/index.vue @@ -7,21 +7,14 @@ defineProps() const emit = defineEmits() -const { t } = useI18n() - interface Props { usingContext?: boolean showPrompt: boolean - searchEnabled?: boolean - thinkEnabled?: boolean } interface Emit { (ev: 'export'): void - (ev: 'toggleUsingContext'): void (ev: 'toggleShowPrompt'): void - (ev: 'toggleSearchEnabled'): void - (ev: 'toggleThinkEnabled'): void } const appStore = useAppStore() @@ -44,18 +37,6 @@ function handleExport() { emit('export') } -function toggleUsingContext() { - emit('toggleUsingContext') -} - -function toggleSearchEnabled() { - emit('toggleSearchEnabled') -} - -function toggleThinkEnabled() { - emit('toggleThinkEnabled') -} - function handleShowPrompt() { emit('toggleShowPrompt') } @@ -83,28 +64,10 @@ function handleShowPrompt() {
- + - - - - - {{ usingContext ? t('chat.showOnContext') : t('chat.showOffContext') }} - - - - - - {{ searchEnabled ? t('chat.searchEnabled') : t('chat.searchDisabled') }} - - - - - - {{ thinkEnabled ? t('chat.thinkEnabled') : t('chat.thinkDisabled') }} - diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 1cf291ce..f87ab879 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -1300,14 +1300,9 @@ onUnmounted(() => {
@@ -1386,6 +1381,41 @@ onUnmounted(() => {
+
+ + + + {{ currentChatRoom?.searchEnabled ? t('chat.searchEnabled') : t('chat.searchDisabled') }} + + + + + + {{ currentChatRoom?.thinkEnabled ? t('chat.thinkEnabled') : t('chat.thinkDisabled') }} + + + + + + {{ currentChatRoom?.usingContext ? t('chat.showOnContext') : t('chat.showOffContext') }} + + +
{ v-if="!isMobile" :tooltip="currentChatRoom?.searchEnabled ? t('chat.clickTurnOffSearch') : t('chat.clickTurnOnSearch')" :tooltip-help="t('chat.searchHelp')" - :class="{ 'text-[#4b9e5f]': currentChatRoom?.searchEnabled, 'text-[#a8071a]': !currentChatRoom?.searchEnabled }" + :class="{ 'text-[#2f9e44]': currentChatRoom?.searchEnabled, 'text-[#c92a2a]': !currentChatRoom?.searchEnabled }" @click="handleToggleSearchEnabled" > - - - {{ currentChatRoom?.searchEnabled ? t('chat.searchEnabled') : t('chat.searchDisabled') }} + + + {{ currentChatRoom?.searchEnabled ? t('chat.searchEnabled') : t('chat.searchDisabled') }} - - - {{ currentChatRoom?.thinkEnabled ? t('chat.thinkEnabled') : t('chat.thinkDisabled') }} + + + {{ currentChatRoom?.thinkEnabled ? t('chat.thinkEnabled') : t('chat.thinkDisabled') }} - - - {{ currentChatRoom?.usingContext ? t('chat.showOnContext') : t('chat.showOffContext') }} + + + {{ currentChatRoom?.usingContext ? t('chat.showOnContext') : t('chat.showOffContext') }} Date: Fri, 16 Jan 2026 11:21:09 +0800 Subject: [PATCH 2/4] style: refine sidebar user area Signed-off-by: Bob Du --- src/components/common/UserAvatar/index.vue | 22 ++++++++++++---------- src/views/chat/layout/sider/Footer.vue | 8 ++++---- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/components/common/UserAvatar/index.vue b/src/components/common/UserAvatar/index.vue index 85dd6a6a..fb5e2ead 100644 --- a/src/components/common/UserAvatar/index.vue +++ b/src/components/common/UserAvatar/index.vue @@ -26,27 +26,29 @@ onMounted(async () => {