diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 4d46d17..d8ecaea 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -26,6 +26,7 @@ export default { common: { edit: 'Edit', delete: 'Delete', + clear: 'Clear', copy: 'Copy', copyQA: 'CopyQA', newChat: 'New Chat', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index aa4698a..607a2c9 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -26,6 +26,7 @@ export default { common: { edit: '编辑', delete: '删除', + clear: '清理', copy: '复制', copyQA: '复制QA', newChat: '新建聊天', diff --git a/src/views/siderbar/List.vue b/src/views/siderbar/List.vue index c4dd1ff..8fbc366 100644 --- a/src/views/siderbar/List.vue +++ b/src/views/siderbar/List.vue @@ -75,6 +75,10 @@ }); } + async function clearSelect(id: number) { + await chatStore.clearCache(id); + } + const contextMenuTheme = computed(() => { return appStore.theme === 'dark' ? 'mac dark' : 'mac'; }); @@ -98,6 +102,13 @@ }), onClick: () => editSelect(id), }, + { + label: t('common.clear'), + icon: h('i', { + class: 'fa-solid fa-broom', + }), + onClick: () => clearSelect(id), + }, ], zIndex: 60, minWidth: 100,