From f8149ce383ce3166e593eda8d939d417bfa5e960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Wed, 19 Feb 2025 10:26:02 +0800 Subject: [PATCH] update --- web/package-lock.json | 11 +- web/src/lang/en_us.js | 53 ++++++++ web/src/lang/zh_cn.js | 52 +++++++- web/src/lang/zh_tw.js | 53 ++++++++ web/src/pages/Edit/components/AiChat.vue | 67 ++++++++-- .../pages/Edit/components/AiConfigDialog.vue | 66 +++++++--- web/src/pages/Edit/components/AiCreate.vue | 122 +++++++++++------- 7 files changed, 347 insertions(+), 77 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index dee9559d..d60cc78c 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -15699,7 +15699,8 @@ "node_modules/viewerjs": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.11.6.tgz", - "integrity": "sha512-TlhdSp2oEOLFXvEp4psKaeTjR5zBjTRcM/sHUN8PkV1UWuY8HKC8n7GaVdW5Xqnwdr/F1OmzLik1QwDjI4w/nw==" + "integrity": "sha512-TlhdSp2oEOLFXvEp4psKaeTjR5zBjTRcM/sHUN8PkV1UWuY8HKC8n7GaVdW5Xqnwdr/F1OmzLik1QwDjI4w/nw==", + "peer": true }, "node_modules/vm-browserify": { "version": "1.1.2", @@ -19257,7 +19258,6 @@ "integrity": "sha512-VCNRiAt2P/bLo09rYt3DLe6xXUMlhJwrvU18Ddd/lYJgC7s8+wvhgYs+MTx4OiAXdu58drGwSBO9SPx7C6J82Q==", "dev": true, "requires": { - "@babel/core": "^7.11.0", "@babel/helper-compilation-targets": "^7.9.6", "@babel/helper-module-imports": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3", @@ -19270,7 +19270,6 @@ "@vue/babel-plugin-jsx": "^1.0.3", "@vue/babel-preset-jsx": "^1.2.4", "babel-plugin-dynamic-import-node": "^2.3.3", - "core-js": "^3.6.5", "core-js-compat": "^3.6.5", "semver": "^6.1.0" } @@ -29566,8 +29565,7 @@ "resolved": "https://registry.npmjs.org/v-viewer/-/v-viewer-1.7.4.tgz", "integrity": "sha512-K3PQ8utnVXXBCa5IRXRAhk/m83fNIsK77gTSXqAmPJe8eDTaSY1nifAOWPUmQDjzuCxYfa14UjGftHR9MFV70Q==", "requires": { - "lodash-es": "^4.17.21", - "viewerjs": "^1.11.6" + "lodash-es": "^4.17.21" } }, "v8-compile-cache": { @@ -29632,7 +29630,8 @@ "viewerjs": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.11.6.tgz", - "integrity": "sha512-TlhdSp2oEOLFXvEp4psKaeTjR5zBjTRcM/sHUN8PkV1UWuY8HKC8n7GaVdW5Xqnwdr/F1OmzLik1QwDjI4w/nw==" + "integrity": "sha512-TlhdSp2oEOLFXvEp4psKaeTjR5zBjTRcM/sHUN8PkV1UWuY8HKC8n7GaVdW5Xqnwdr/F1OmzLik1QwDjI4w/nw==", + "peer": true }, "vm-browserify": { "version": "1.1.2", diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js index 6d856a22..f78b2dd8 100644 --- a/web/src/lang/en_us.js +++ b/web/src/lang/en_us.js @@ -422,5 +422,58 @@ export default { nodeTagStyle: { placeholder: 'Please enter the tag content', delete: 'Delete this tag' + }, + ai: { + chatTitle: 'AI dialogue', + clearRecords: 'Clear records', + connectFailedTitle: 'Client connection failure prompt', + connectFailedTip: 'Client connection failed, please check:', + connectFailedCheckTip1: + '1. Have you installed the mind mapping client? If not, please click here to install:', + connectFailedCheckTip2: '2. If the client is installed, please confirm if the client is opened.', + connectFailedCheckTip3: + 'If it has already been installed and started, you can try closing and restarting it.', + connectFailedCheckTip4: 'After completing the above steps, you can click on:', + baiduNetdisk: 'Baidu Netdisk', + createMindMapTitle: 'One click generation of mind maps', + createTip: + 'Please enter a theme, and AI will generate a mind map based on your theme, such as: Hangzhou weekend travel plan.', + importantTip: 'Important note: One click generation will overwrite existing data. It is recommended to export the current data first.', + wantModifyAiConfigTip: 'Do you want to modify the AI configuration? Please click on:', + modifyAIConfiguration: 'Modify AI configuration', + chatInputPlaceholder: 'Enter to send, Shift+Enter to wrap.', + send: 'Send', + stopGenerating: 'Stop generating', + generationFailed: 'Generation failed', + aiGenerationSuccess: 'AI generation completed', + stoppedGenerating: 'Stopped generating', + AIConfiguration: 'AI configuration', + VolcanoArkLargeModelConfiguration: 'Volcano Ark Large Model Configuration:', + configTip: 'At present, only the Volcano Ark model is supported, and you need to obtain the key yourself. For detailed operation steps, please refer to:', + course: 'Course', + inferenceAccessPoint: 'Inference access point', + mindMappingClientConfiguration: 'Mind mapping client configuration:', + port: 'Port', + cancel: 'Cancel', + confirm: 'Confirm', + close: 'Close', + configSaveSuccessTip: 'Configuration saved successfully', + apiValidateTip: 'Please enter the interface', + keyValidateTip: 'Please enter the API Key', + modelValidateTip: 'Please enter the inference access point', + portValidateTip: 'Please enter the port', + methodValidateTip: 'Please select the request method', + noInputTip: 'Please enter the content', + connectSuccessful: 'Connection successful', + connectFailed: 'connection failed', + connectionDetection: 'Connection detection', + configurationMissing: 'Configuration missing', + aiCreateMsgPrefix: 'Help me write one【', + aiCreateMsgPostfix: + '】. It needs to be returned in Markdown format and can only use two syntax: Markdown title and unordered list. It can support multiple layers of nesting. Just return the content.', + aiCreatePartMsgPrefix: 'I have a theme for【', + aiCreatePartMsgCenter: '】Can you help me continue writing one of the contents of the mind map【', + aiCreatePartMsgPostfix: + '】The subordinate content of the node needs to be returned in Markdown format and can only use two syntax: Markdown title and unordered list. It can support multi-level nesting. Just return the content.' } } diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index 9262cb13..03763ab3 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -416,6 +416,56 @@ export default { delete: '删除此标签' }, ai: { - chatTitle: 'AI对话' + chatTitle: 'AI对话', + clearRecords: '清空记录', + connectFailedTitle: '客户端连接失败提示', + connectFailedTip: '客户端连接失败,请检查:', + connectFailedCheckTip1: + '1.是否安装了思绪思维导图客户端,如果没有请点此安装:', + connectFailedCheckTip2: '2.如果安装了客户端,请确认是否打开了客户端。', + connectFailedCheckTip3: + '3.如果已经安装并启动了,那么可以尝试关闭然后重新启动。', + connectFailedCheckTip4: '完成以上步骤后可点击:', + baiduNetdisk: '百度网盘', + createMindMapTitle: '一键生成思维导图', + createTip: + '请输入一个主题,AI会根据你的主题生成思维导图,如:杭州周末出游计划。', + importantTip: '重要提示:一键生成会覆盖现有数据,建议先导出当前数据。', + wantModifyAiConfigTip: '想要修改AI配置?请点击:', + modifyAIConfiguration: '修改AI配置', + chatInputPlaceholder: 'Enter 发送,Shift + Enter 换行。', + send: '发送', + stopGenerating: '停止生成', + generationFailed: '生成失败', + aiGenerationSuccess: 'AI生成完成', + stoppedGenerating: '已停止生成', + AIConfiguration: 'AI配置', + VolcanoArkLargeModelConfiguration: '火山方舟大模型配置:', + configTip: '目前仅支持火山方舟大模型,需要自行去获取key,详细操作步骤见:', + course: '教程', + inferenceAccessPoint: '推理接入点', + mindMappingClientConfiguration: '思绪思维导图客户端配置:', + port: '端口', + cancel: '取消', + confirm: '确认', + close: '关闭', + configSaveSuccessTip: '配置保存成功', + apiValidateTip: '请输入接口', + keyValidateTip: '请输入API Key', + modelValidateTip: '请输入推理接入点', + portValidateTip: '请输入端口', + methodValidateTip: '请选择请求方式', + noInputTip: '请输入内容', + connectSuccessful: '连接成功', + connectFailed: '连接失败', + connectionDetection: '连接检测', + configurationMissing: '配置缺失', + aiCreateMsgPrefix: '帮我写一个【', + aiCreateMsgPostfix: + '】,需要以Markdown格式返回,并且只能使用Markdown的标题和无序列表两种语法,可以支持多层嵌套。只需返回内容即可。', + aiCreatePartMsgPrefix: '我有一个主题为【', + aiCreatePartMsgCenter: '】的思维导图,帮我续写其中一个内容为【', + aiCreatePartMsgPostfix: + '】的节点的下级内容,需要以Markdown格式返回,并且只能使用Markdown的标题和无序列表两种语法,可以支持多层嵌套。只需返回内容即可。' } } diff --git a/web/src/lang/zh_tw.js b/web/src/lang/zh_tw.js index 2bb41eb2..e1b3cac5 100644 --- a/web/src/lang/zh_tw.js +++ b/web/src/lang/zh_tw.js @@ -413,5 +413,58 @@ export default { nodeTagStyle: { placeholder: '請輸入標籤內容', delete: '刪除此標籤' + }, + ai: { + chatTitle: 'AI對話', + clearRecords: '清空記錄', + connectFailedTitle: '客戶端連接失敗提示', + connectFailedTip: '客戶端連接失敗,請檢查:', + connectFailedCheckTip1: + '1.是否安裝了思緒思維導圖客戶端,如果沒有請點此安裝:', + connectFailedCheckTip2: '2.如果安裝了客戶端,請確認是否打開了客戶端。', + connectFailedCheckTip3: + '3.如果已經安裝並啓動了,那麽可以嘗試關閉然後重新啓動。', + connectFailedCheckTip4: '完成以上步驟後可點擊:', + baiduNetdisk: '百度網盤', + createMindMapTitle: '一鍵生成思維導圖', + createTip: + '請輸入一個主題,AI會根據你的主題生成思維導圖,如:杭州周末出遊計劃。', + importantTip: '重要提示:一鍵生成會覆蓋現有數據,建議先導出當前數據。', + wantModifyAiConfigTip: '想要修改AI配置?請點擊:', + modifyAIConfiguration: '修改AI配置', + chatInputPlaceholder: 'Enter 發送,Shift Enter 換行。', + send: '發送', + stopGenerating: '停止生成', + generationFailed: '生成失敗', + aiGenerationSuccess: 'AI生成完成', + stoppedGenerating: '已停止生成', + AIConfiguration: 'AI配置', + VolcanoArkLargeModelConfiguration: '火山方舟大模型配置:', + configTip: '目前僅支持火山方舟大模型,需要自行去獲取key,詳細操作步驟見:', + course: '教程', + inferenceAccessPoint: '推理接入點', + mindMappingClientConfiguration: '思緒思維導圖客戶端配置:', + port: '端口', + cancel: '取消', + confirm: '確認', + close: '關閉', + configSaveSuccessTip: '配置保存成功', + apiValidateTip: '請輸入接口', + keyValidateTip: '請輸入API Key', + modelValidateTip: '請輸入推理接入點', + portValidateTip: '請輸入端口', + methodValidateTip: '請選擇請求方式', + noInputTip: '請輸入內容', + connectSuccessful: '連接成功', + connectFailed: '連接失敗', + connectionDetection: '連接檢測', + configurationMissing: '配置缺失', + aiCreateMsgPrefix: '幫我寫一個【', + aiCreateMsgPostfix: + '】,需要以Markdown格式返回,並且只能使用Markdown的標題和無序列表兩種語法,可以支持多層嵌套。只需返回內容即可。', + aiCreatePartMsgPrefix: '我有一個主題爲【', + aiCreatePartMsgCenter: '】的思維導圖,幫我續寫其中一個內容爲【', + aiCreatePartMsgPostfix: + '】的節點的下級內容,需要以Markdown格式返回,並且只能使用Markdown的標題和無序列表兩種語法,可以支持多層嵌套。只需返回內容即可。' } } diff --git a/web/src/pages/Edit/components/AiChat.vue b/web/src/pages/Edit/components/AiChat.vue index 69266b8c..fa4aa0b5 100644 --- a/web/src/pages/Edit/components/AiChat.vue +++ b/web/src/pages/Edit/components/AiChat.vue @@ -2,7 +2,14 @@
- 清空记录 + + + {{ $t('ai.clearRecords') }} + + + + {{ $t('ai.modifyAIConfiguration') }} +
- 发送 + {{ $t('ai.send') }} + + + + {{ $t('ai.stopGenerating') }} +
@@ -43,7 +59,7 @@