diff --git a/ui/src/layout/layout-header/avatar/ResetPassword.vue b/ui/src/layout/layout-header/avatar/ResetPassword.vue index 1f8d37407..e6734c3d6 100644 --- a/ui/src/layout/layout-header/avatar/ResetPassword.vue +++ b/ui/src/layout/layout-header/avatar/ResetPassword.vue @@ -2,6 +2,9 @@ @@ -53,12 +56,12 @@ import { useRouter } from 'vue-router' import { t } from '@/locales' const props = defineProps<{ - emitConfirm?: boolean; // 在父级调接口 + emitConfirm?: boolean // 在父级调接口 }>() const emit = defineEmits<{ - (e: 'confirm', value: ResetCurrentUserPasswordRequest): void; -}>(); + (e: 'confirm', value: ResetCurrentUserPasswordRequest): void +}>() const router = useRouter() const { login } = useStore() @@ -141,13 +144,13 @@ const open = () => { } const resetPassword = () => { resetPasswordFormRef1.value?.validate().then(() => { - if(props.emitConfirm) { + if (props.emitConfirm) { emit('confirm', resetPasswordForm.value) } else { return UserApi.resetCurrentPassword(resetPasswordForm.value).then(() => { - login.logout() - router.push({ name: 'login' }) - }) + login.logout() + router.push({ name: 'login' }) + }) } }) } diff --git a/ui/src/locales/lang/en-US/ai-chat.ts b/ui/src/locales/lang/en-US/ai-chat.ts index 8fe995287..d045e1f3d 100644 --- a/ui/src/locales/lang/en-US/ai-chat.ts +++ b/ui/src/locales/lang/en-US/ai-chat.ts @@ -4,6 +4,7 @@ export default { confirmModification: 'Confirm modification', noHistory: 'No Chat History', createChat: 'New Chat', + clearChat: 'Clear Chat', history: 'Chat History', only20history: 'Showing only the last 20 chats', question_count: 'Questions', @@ -15,7 +16,7 @@ export default { passwordValidator: { title: 'Enter Password to Access', errorMessage1: 'Password cannot be empty', - errorMessage2: 'Incorrect password' + errorMessage2: 'Incorrect password', }, operation: { play: 'Play', @@ -32,8 +33,10 @@ export default { tip: { error500Message: 'Sorry, the service is currently under maintenance. Please try again later!', errorIdentifyMessage: 'Unable to verify user identity', - errorLimitMessage: 'Sorry, you have reached the maximum number of questions. Please try again tomorrow!', - answerMessage: 'Sorry, no relevant content found. Please rephrase your question or provide more details.', + errorLimitMessage: + 'Sorry, you have reached the maximum number of questions. Please try again tomorrow!', + answerMessage: + 'Sorry, no relevant content found. Please rephrase your question or provide more details.', stopAnswer: 'Response Stopped', answerLoading: 'Generating Response...', recorderTip: `

This feature requires microphone access. Browsers block recording on insecure pages. Solutions:
@@ -46,12 +49,12 @@ export default { requiredMessage: 'Please fill in all required fields', inputParamMessage1: 'Please specify a parameter in the URL', inputParamMessage2: 'value', - prologueMessage: 'Sorry, the service is currently under maintenance. Please try again later!' + prologueMessage: 'Sorry, the service is currently under maintenance. Please try again later!', }, inputPlaceholder: { speaking: 'Speaking...', recorderLoading: 'Transcribing...', - default: 'Type your question' + default: 'Type your question', }, uploadFile: { label: 'Upload File', @@ -63,7 +66,7 @@ export default { limitMessage2: 'files', sizeLimit: 'Each file must not exceed', imageMessage: 'Please process the image content', - errorMessage: 'Upload Failed' + errorMessage: 'Upload Failed', }, executionDetails: { title: 'Execution Details', @@ -82,18 +85,18 @@ export default { rerankerResult: 'Re-ranking Results', paragraph: 'Segment', noSubmit: 'No submission from user', - errMessage: 'Error Log' + errMessage: 'Error Log', }, KnowledgeSource: { title: 'Knowledge Source', referenceParagraph: 'Cited Segment', consume: 'Tokens', - consumeTime: 'Runtime' + consumeTime: 'Runtime', }, paragraphSource: { title: 'Knowledge Quote', question: 'User Question', - optimizationQuestion: 'Optimized Question' + optimizationQuestion: 'Optimized Question', }, editTitle: 'Edit Title', } diff --git a/ui/src/locales/lang/zh-CN/ai-chat.ts b/ui/src/locales/lang/zh-CN/ai-chat.ts index 0fb7d4b57..3149503a3 100644 --- a/ui/src/locales/lang/zh-CN/ai-chat.ts +++ b/ui/src/locales/lang/zh-CN/ai-chat.ts @@ -4,6 +4,7 @@ export default { confirmModification: '确认修改', noHistory: '暂无历史记录', createChat: '新建对话', + clearChat: '清空对话', history: '历史记录', only20history: '仅显示最近 20 条对话', question_count: '条提问', diff --git a/ui/src/locales/lang/zh-Hant/ai-chat.ts b/ui/src/locales/lang/zh-Hant/ai-chat.ts index 50d92612b..165bc54d0 100644 --- a/ui/src/locales/lang/zh-Hant/ai-chat.ts +++ b/ui/src/locales/lang/zh-Hant/ai-chat.ts @@ -4,6 +4,7 @@ export default { confirmModification: '確認修改', noHistory: '暫無歷史記錄', createChat: '新建對話', + clearChat: '清空對話', history: '歷史記錄', only20history: '僅顯示最近 20 條對話', question_count: '條提問', @@ -15,7 +16,7 @@ export default { passwordValidator: { title: '請輸入密碼打開連結', errorMessage1: '密碼不能為空', - errorMessage2: '密碼錯誤' + errorMessage2: '密碼錯誤', }, operation: { play: '點擊播放', @@ -46,12 +47,12 @@ export default { requiredMessage: '請填寫所有必填欄位', inputParamMessage1: '請在 URL 中填寫參數', inputParamMessage2: '的值', - prologueMessage: '抱歉,當前正在維護,無法提供服務,請稍後再試!' + prologueMessage: '抱歉,當前正在維護,無法提供服務,請稍後再試!', }, inputPlaceholder: { speaking: '說話中', recorderLoading: '轉文字中', - default: '請輸入問題' + default: '請輸入問題', }, uploadFile: { label: '上傳文件', @@ -63,7 +64,7 @@ export default { limitMessage2: '個文件', sizeLimit: '單個文件大小不能超過', imageMessage: '請解析圖片內容', - errorMessage: '上傳失敗' + errorMessage: '上傳失敗', }, executionDetails: { title: '執行詳細', @@ -82,18 +83,18 @@ export default { rerankerResult: '重排結果', paragraph: '段落', noSubmit: '用戶未提交', - errMessage: '錯誤日誌' + errMessage: '錯誤日誌', }, KnowledgeSource: { title: '知識來源', referenceParagraph: '引用段落', consume: '消耗tokens', - consumeTime: '耗時' + consumeTime: '耗時', }, paragraphSource: { title: '知識庫引用', question: '用戶問題', - optimizationQuestion: '優化後問題' + optimizationQuestion: '優化後問題', }, editTitle: '編輯標題', } diff --git a/ui/src/stores/modules/chat-log.ts b/ui/src/stores/modules/chat-log.ts index 66661df1f..ed1c11a7c 100644 --- a/ui/src/stores/modules/chat-log.ts +++ b/ui/src/stores/modules/chat-log.ts @@ -36,42 +36,6 @@ const useChatLogStore = defineStore('chatLog',{ }) }) }, - async asyncGetChatLogClient(id: string, page: pageRequest, loading?: Ref) { - return new Promise((resolve, reject) => { - // chatLogApi - // .getChatLogClient(id, page, loading) - // .then((data) => { - // resolve(data) - // }) - // .catch((error) => { - // reject(error) - // }) - }) - }, - async asyncDelChatClientLog(id: string, chatId: string, loading?: Ref) { - return new Promise((resolve, reject) => { - // chatLogApi - // .delChatClientLog(id, chatId, loading) - // .then((data) => { - // resolve(data) - // }) - // .catch((error) => { - // reject(error) - // }) - }) - }, - async asyncPutChatClientLog(id: string, chatId: string, data: any, loading?: Ref) { - return new Promise((resolve, reject) => { - // chatLogApi - // .putChatClientLog(id, chatId, data, loading) - // .then((data) => { - // resolve(data) - // }) - // .catch((error) => { - // reject(error) - // }) - }) - } } }) diff --git a/ui/src/views/chat/history-component/EditTitleDialog.vue b/ui/src/views/chat/component/EditTitleDialog.vue similarity index 100% rename from ui/src/views/chat/history-component/EditTitleDialog.vue rename to ui/src/views/chat/component/EditTitleDialog.vue diff --git a/ui/src/views/chat/history-component/index.vue b/ui/src/views/chat/component/HistoryPanel.vue similarity index 83% rename from ui/src/views/chat/history-component/index.vue rename to ui/src/views/chat/component/HistoryPanel.vue index 255a0f85d..c581d9a2e 100644 --- a/ui/src/views/chat/history-component/index.vue +++ b/ui/src/views/chat/component/HistoryPanel.vue @@ -34,11 +34,14 @@

{{ $t('chat.history') }} - - - - - + + + + + + + +
@@ -55,7 +58,7 @@ >