From 5845f852f167b6f51cb6dd6646b388fcfec258d7 Mon Sep 17 00:00:00 2001 From: orenzhang Date: Thu, 13 Feb 2025 22:09:51 +0800 Subject: [PATCH] refactor(chat): show sync status on history button --- src/components/ChatInput.vue | 5 +++++ src/views/Chat.vue | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/ChatInput.vue b/src/components/ChatInput.vue index 0339304..1e57320 100644 --- a/src/components/ChatInput.vue +++ b/src/components/ChatInput.vue @@ -30,6 +30,10 @@ const props = defineProps({ type: String, default: '', }, + historySync: { + type: Boolean, + default: false, + }, }); // emits @@ -551,6 +555,7 @@ defineExpose({reGenerate, promptForm}); @click="showHistory" class="chat-input-left-button" id="history-message-button" + :style="{backgroundColor: historySync ? 'rgb(var(--green-3))' : '', color: historySync ? 'white': ''}" > diff --git a/src/views/Chat.vue b/src/views/Chat.vue index 518926f..65988ef 100644 --- a/src/views/Chat.vue +++ b/src/views/Chat.vue @@ -317,6 +317,7 @@ const setPromptForm = (data) => promptForm.value = data; :local-messages="localMessages" :chat-loading="chatLoading" :system-define="systemDefine" + :history-sync="historySync" @add-message="addMessage" @set-chat-loading="setChatLoading" @save-message="saveMessage" @@ -355,7 +356,7 @@ const setPromptForm = (data) => promptForm.value = data; {{ $t('StartNewChat') }}