From 1f7e5b8b7df5b05268b7968adf1cf5ce51467c95 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Sun, 29 Jun 2025 22:26:18 +0800 Subject: [PATCH 01/20] update --- .../components/main-panel/tool/tool-executor.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/renderer/src/components/main-panel/tool/tool-executor.vue b/renderer/src/components/main-panel/tool/tool-executor.vue index 53e5793..0086b0f 100644 --- a/renderer/src/components/main-panel/tool/tool-executor.vue +++ b/renderer/src/components/main-panel/tool/tool-executor.vue @@ -143,14 +143,16 @@ const generateMockData = async () => { }); // 生成mock数据 - const mockData = await JSONSchemaFaker.resolve(currentTool.value.inputSchema as any); + // TODO: as any ? + const mockData = await JSONSchemaFaker.resolve(currentTool.value.inputSchema as any) as any; - console.log(mockData); - - // 更新表单数据 - // Object.keys(mockData).forEach(key => { - // tabStorage.formData[key] = mockData[key]; - // }); + // 将 mock 数据绑定到表单 + Object.keys(mockData).forEach(key => { + tabStorage.formData[key] = mockData[key]; + }); + + // 如果需要刷新表单校验,可以加上 + formRef.value?.clearValidate?.(); }; async function handleExecute() { From 47d5d6474a9f9496889666e30ba1f14d2453b1ec Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Sun, 29 Jun 2025 22:30:52 +0800 Subject: [PATCH 02/20] finish mook --- .../src/components/k-input-object/index.vue | 38 ++++++++++--------- .../main-panel/tool/tool-executor.vue | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/renderer/src/components/k-input-object/index.vue b/renderer/src/components/k-input-object/index.vue index b745a92..ae916e5 100644 --- a/renderer/src/components/k-input-object/index.vue +++ b/renderer/src/components/k-input-object/index.vue @@ -163,24 +163,26 @@ function getDefaultValue(property: any): string { } } -// 修改 watch 逻辑 -// watch( -// () => props.modelValue, -// (newVal) => { -// const currentParsed = tryParse(inputValue.value) -// if (!isDeepEqual(currentParsed, newVal)) { -// const newContent = JSON.stringify(newVal, null, 2) -// editorView.value?.dispatch({ -// changes: { -// from: 0, -// to: editorView.value.state.doc.length, -// insert: newContent -// } -// }) -// } -// }, -// { deep: true } -// ) +watch( + () => props.modelValue, + (newVal) => { + // 当前编辑器内容 + const currentContent = editorView.value?.state.doc.toString() ?? ''; + const newContent = JSON.stringify(newVal ?? {}, null, 2); + + if (currentContent !== newContent && editorView.value) { + editorView.value.dispatch({ + changes: { + from: 0, + to: editorView.value.state.doc.length, + insert: newContent + } + }); + } + }, + { deep: true } +); + // 辅助函数:尝试解析 JSON const tryParse = (value: string): any => { diff --git a/renderer/src/components/main-panel/tool/tool-executor.vue b/renderer/src/components/main-panel/tool/tool-executor.vue index 0086b0f..082c814 100644 --- a/renderer/src/components/main-panel/tool/tool-executor.vue +++ b/renderer/src/components/main-panel/tool/tool-executor.vue @@ -52,7 +52,6 @@ import { getDefaultValue, normaliseJavascriptType } from '@/hook/mcp'; import KInputObject from '@/components/k-input-object/index.vue'; import { mcpClientAdapter } from '@/views/connect/core'; import { JSONSchemaFaker } from 'json-schema-faker'; -import { faker } from '@faker-js/faker'; defineComponent({ name: 'tool-executor' }); @@ -149,6 +148,7 @@ const generateMockData = async () => { // 将 mock 数据绑定到表单 Object.keys(mockData).forEach(key => { tabStorage.formData[key] = mockData[key]; + console.log(mockData[key]); }); // 如果需要刷新表单校验,可以加上 From 1ce5b3a60ac7fcda1b984398cbc9abdd95e41085 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Sun, 29 Jun 2025 22:44:53 +0800 Subject: [PATCH 03/20] modify page layout in prompt, resource and tool --- .../main-panel/prompt/prompt-templates.vue | 43 ++++++---- .../resource/resource-list-templates.vue | 78 +++++++++++-------- .../main-panel/resource/resource-list.vue | 48 ++++++++---- .../components/main-panel/tool/tool-list.vue | 38 ++++++--- 4 files changed, 137 insertions(+), 70 deletions(-) diff --git a/renderer/src/components/main-panel/prompt/prompt-templates.vue b/renderer/src/components/main-panel/prompt/prompt-templates.vue index ff14a7c..dc4567b 100644 --- a/renderer/src/components/main-panel/prompt/prompt-templates.vue +++ b/renderer/src/components/main-panel/prompt/prompt-templates.vue @@ -8,23 +8,27 @@ prompts/list - -
- +
- {{ template.name }} - {{ template.description || '' }} + {{ template.name }} + {{ template.description || '' }}
+
+
+ + No prompts found. +
+
@@ -126,8 +130,8 @@ onMounted(async () => { user-select: none; cursor: pointer; display: flex; - align-items: center; - justify-content: space-between; + flex-direction: column; + align-items: flex-start; transition: var(--animation-3s); } @@ -141,19 +145,30 @@ onMounted(async () => { transition: var(--animation-3s); } -.prompt-template-container>.item>span:first-child { - max-width: 200px; +.prompt-title { + font-weight: bold; + max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.prompt-template-container>.item>span:last-child { +.prompt-description { opacity: 0.6; font-size: 12.5px; - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 250px; + overflow: visible; + text-overflow: unset; + white-space: normal; + word-break: break-all; +} + +.empty-description { + display: flex; + align-items: center; + justify-content: center; + color: var(--el-text-color-placeholder, #bbb); + font-size: 15px; + min-height: 40px; } \ No newline at end of file diff --git a/renderer/src/components/main-panel/resource/resource-list-templates.vue b/renderer/src/components/main-panel/resource/resource-list-templates.vue index 2c6fd72..207dcdc 100644 --- a/renderer/src/components/main-panel/resource/resource-list-templates.vue +++ b/renderer/src/components/main-panel/resource/resource-list-templates.vue @@ -12,19 +12,22 @@
- +
- {{ template.name }} - {{ template.description || '' }} + {{ template.name }} + {{ template.description || '' }}
- empty +
+ + No resource templates found. +
@@ -137,41 +140,52 @@ h3.resource-template .iconfont.icon-restart:hover { width: 175px; } -.resource-template-container>.item { - margin: 3px; - padding: 5px 10px; - border-radius: .3em; - user-select: none; - cursor: pointer; - display: flex; - align-items: center; - justify-content: space-between; - transition: var(--animation-3s); +.resource-template-container > .item { + margin: 3px; + padding: 5px 10px; + border-radius: .3em; + user-select: none; + cursor: pointer; + display: flex; + flex-direction: column; + align-items: flex-start; + transition: var(--animation-3s); } -.resource-template-container>.item:hover { - background-color: var(--main-light-color); - transition: var(--animation-3s); +.resource-template-container > .item:hover { + background-color: var(--main-light-color); + transition: var(--animation-3s); } -.resource-template-container>.item.active { - background-color: var(--main-light-color); - transition: var(--animation-3s); +.resource-template-container > .item.active { + background-color: var(--main-light-color); + transition: var(--animation-3s); } -.resource-template-container>.item>span:first-child { - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; +.resource-title { + font-weight: bold; + max-width: 250px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } -.resource-template-container>.item>span:last-child { - opacity: 0.6; - font-size: 12.5px; - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; +.resource-description { + opacity: 0.6; + font-size: 12.5px; + max-width: 250px; + overflow: visible; + text-overflow: unset; + white-space: normal; + word-break: break-all; +} + +.empty-description { + display: flex; + align-items: center; + justify-content: center; + color: var(--el-text-color-placeholder, #bbb); + font-size: 15px; + min-height: 40px; } \ No newline at end of file diff --git a/renderer/src/components/main-panel/resource/resource-list.vue b/renderer/src/components/main-panel/resource/resource-list.vue index 08c5607..4d5be81 100644 --- a/renderer/src/components/main-panel/resource/resource-list.vue +++ b/renderer/src/components/main-panel/resource/resource-list.vue @@ -12,17 +12,23 @@
- +
- {{ resource.name }} - {{ resource.mimeType }} + {{ resource.name }} + {{ resource.mimeType }}
+
+
+ + No resources found. +
+
@@ -139,41 +145,53 @@ h3.resource-template .iconfont.icon-restart:hover { width: 175px; } -.resource-template-container>.item { +.resource-template-container > .item { margin: 3px; padding: 5px 10px; border-radius: .3em; user-select: none; cursor: pointer; display: flex; - align-items: center; - justify-content: space-between; + flex-direction: column; + align-items: flex-start; transition: var(--animation-3s); } -.resource-template-container>.item:hover { +.resource-template-container > .item:hover { background-color: var(--main-light-color); transition: var(--animation-3s); } -.resource-template-container>.item.active { +.resource-template-container > .item.active { background-color: var(--main-light-color); transition: var(--animation-3s); } -.resource-template-container>.item>span:first-child { - max-width: 200px; +.resource-title { + font-weight: bold; + max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.resource-template-container>.item>span:last-child { +.resource-description { opacity: 0.6; font-size: 12.5px; - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 250px; + /* Remove ellipsis and allow full text wrap */ + overflow: visible; + text-overflow: unset; + white-space: normal; + word-break: break-all; +} + +.empty-description { + display: flex; + align-items: center; + justify-content: center; + color: var(--el-text-color-placeholder, #bbb); + font-size: 15px; + min-height: 40px; } \ No newline at end of file diff --git a/renderer/src/components/main-panel/tool/tool-list.vue b/renderer/src/components/main-panel/tool/tool-list.vue index 9eed698..b89d383 100644 --- a/renderer/src/components/main-panel/tool/tool-list.vue +++ b/renderer/src/components/main-panel/tool/tool-list.vue @@ -8,23 +8,34 @@ tools/list - + {{ client.name }} - +
-
-
- {{ tool.name }} -
- {{ tool.description || '' }} +
+ +
+
+ {{ tool.name }} +
+ {{ tool.description || '' }} +
+
+
+
+
+ + No tools found. +
@@ -106,7 +117,7 @@ onMounted(async () => { width: 175px; } -.tool-list-container > .item { +.tool-list-container>.item { margin: 3px; padding: 5px 10px; border-radius: .3em; @@ -158,4 +169,13 @@ onMounted(async () => { opacity: 0.6; font-size: 12.5px; } + +.empty-description { + display: flex; + align-items: center; + justify-content: center; + color: var(--el-text-color-placeholder, #bbb); + font-size: 15px; + min-height: 40px; +} \ No newline at end of file From 34a60014551b9aac8ac4f1806c2560c15f039069 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Mon, 30 Jun 2025 20:25:16 +0800 Subject: [PATCH 04/20] support ai-mook --- .../main-panel/chat/chat-box/chat.ts | 2 +- .../chat/chat-box/options/setting.vue | 7 +- .../main-panel/chat/core/task-loop.ts | 25 ++++ .../main-panel/tool/tool-executor.vue | 141 +++++++++++++++--- .../main-panel/tool/tool-logger.vue | 27 +++- renderer/src/i18n/ar.json | 3 +- renderer/src/i18n/de.json | 3 +- renderer/src/i18n/en.json | 3 +- renderer/src/i18n/fr.json | 3 +- renderer/src/i18n/ja.json | 3 +- renderer/src/i18n/ko.json | 3 +- renderer/src/i18n/ru.json | 3 +- renderer/src/i18n/zh-cn.json | 3 +- renderer/src/i18n/zh-tw.json | 3 +- 14 files changed, 192 insertions(+), 37 deletions(-) diff --git a/renderer/src/components/main-panel/chat/chat-box/chat.ts b/renderer/src/components/main-panel/chat/chat-box/chat.ts index d407ba0..3b66e8d 100644 --- a/renderer/src/components/main-panel/chat/chat-box/chat.ts +++ b/renderer/src/components/main-panel/chat/chat-box/chat.ts @@ -58,7 +58,7 @@ export interface EnableToolItem { } export interface ChatSetting { - modelIndex: number + modelIndex?: number systemPrompt: string enableTools: EnableToolItem[] temperature: number diff --git a/renderer/src/components/main-panel/chat/chat-box/options/setting.vue b/renderer/src/components/main-panel/chat/chat-box/options/setting.vue index f7d03d6..71a5fbd 100644 --- a/renderer/src/components/main-panel/chat/chat-box/options/setting.vue +++ b/renderer/src/components/main-panel/chat/chat-box/options/setting.vue @@ -162,16 +162,15 @@ provide('tabStorage', tabStorage); color: var(--el-text-color-secondary); } -.tools-dialog-container .el-switch__core { +.el-switch__core { border: 1px solid var(--main-color) !important; } - -.tools-dialog-container .el-switch .el-switch__action { +.el-switch .el-switch__action { background-color: var(--main-color); } -.tools-dialog-container .el-switch.is-checked .el-switch__action { +.el-switch.is-checked .el-switch__action { background-color: var(--sidebar); } diff --git a/renderer/src/components/main-panel/chat/core/task-loop.ts b/renderer/src/components/main-panel/chat/core/task-loop.ts index fe1627c..00f58da 100644 --- a/renderer/src/components/main-panel/chat/core/task-loop.ts +++ b/renderer/src/components/main-panel/chat/core/task-loop.ts @@ -48,6 +48,7 @@ export class TaskLoop { private bridge: MessageBridge; private streamingContent: Ref; private streamingToolCalls: Ref; + private aborted = false; private currentChatId = ''; private onError: (error: IErrorMssage) => void = (msg) => { }; @@ -318,6 +319,7 @@ export class TaskLoop { }); this.streamingContent.value = ''; this.streamingToolCalls.value = []; + this.aborted = true; } /** @@ -545,6 +547,7 @@ export class TaskLoop { maxEpochs = 50, verbose = 0 } = this.taskOptions || {}; + this.aborted = false; for (let i = 0; i < maxEpochs; ++i) { @@ -570,6 +573,12 @@ export class TaskLoop { // 发送请求 const doConverationResult = await this.doConversation(chatData, toolcallIndexAdapter); + // 如果在调用过程中出发了 abort,则直接中断 + if (this.aborted) { + this.aborted = false; + break; + } + // 如果存在需要调度的工具 if (this.streamingToolCalls.value.length > 0) { @@ -597,8 +606,19 @@ export class TaskLoop { // ready to call tools toolCall = this.consumeToolCalls(toolCall); + + if (this.aborted) { + this.aborted = false; + break; + } + let toolCallResult = await handleToolCalls(toolCall); + if (this.aborted) { + this.aborted = false; + break; + } + // hook : finish call tools toolCallResult = this.consumeToolCalleds(toolCallResult); @@ -656,6 +676,11 @@ export class TaskLoop { } } + if (this.aborted) { + this.aborted = false; + break; + } + } else if (this.streamingContent.value) { tabStorage.messages.push({ role: 'assistant', diff --git a/renderer/src/components/main-panel/tool/tool-executor.vue b/renderer/src/components/main-panel/tool/tool-executor.vue index 082c814..624eb46 100644 --- a/renderer/src/components/main-panel/tool/tool-executor.vue +++ b/renderer/src/components/main-panel/tool/tool-executor.vue @@ -33,9 +33,36 @@ {{ t('reset') }} - + {{ 'mook' }} + + + + +
+ {{ t('edit-ai-mook-prompt') }} +
+ +
+ + XML +
+
+ {{ t('cancel') }} + + {{ t('confirm') }} + +
+
@@ -44,7 +71,7 @@ \ No newline at end of file diff --git a/renderer/src/i18n/ar.json b/renderer/src/i18n/ar.json index bac8a4f..99412c3 100644 --- a/renderer/src/i18n/ar.json +++ b/renderer/src/i18n/ar.json @@ -183,5 +183,6 @@ "export": "تصدير", "export-filename": "اسم ملف التصدير", "how-to-use": "كيفية الاستخدام؟", - "is-required": "هو حقل مطلوب" + "is-required": "هو حقل مطلوب", + "edit-ai-mook-prompt": "تحرير إشارات AI Mook" } \ No newline at end of file diff --git a/renderer/src/i18n/de.json b/renderer/src/i18n/de.json index 8f07aec..5ebcdaa 100644 --- a/renderer/src/i18n/de.json +++ b/renderer/src/i18n/de.json @@ -183,5 +183,6 @@ "export": "Exportieren", "export-filename": "Exportdateiname", "how-to-use": "Wie benutzt man?", - "is-required": "ist ein Pflichtfeld" + "is-required": "ist ein Pflichtfeld", + "edit-ai-mook-prompt": "AI Mook-Prompts bearbeiten" } \ No newline at end of file diff --git a/renderer/src/i18n/en.json b/renderer/src/i18n/en.json index 1f4137b..9decfc6 100644 --- a/renderer/src/i18n/en.json +++ b/renderer/src/i18n/en.json @@ -183,5 +183,6 @@ "export": "Export", "export-filename": "Export filename", "how-to-use": "How to use?", - "is-required": "is a required field" + "is-required": "is a required field", + "edit-ai-mook-prompt": "Edit AI Mook prompts" } \ No newline at end of file diff --git a/renderer/src/i18n/fr.json b/renderer/src/i18n/fr.json index 6354408..bad801d 100644 --- a/renderer/src/i18n/fr.json +++ b/renderer/src/i18n/fr.json @@ -183,5 +183,6 @@ "export": "Exporter", "export-filename": "Nom du fichier d'exportation", "how-to-use": "Comment utiliser ?", - "is-required": "est un champ obligatoire" + "is-required": "est un champ obligatoire", + "edit-ai-mook-prompt": "Modifier les invites AI Mook" } \ No newline at end of file diff --git a/renderer/src/i18n/ja.json b/renderer/src/i18n/ja.json index 2410143..9ffeafa 100644 --- a/renderer/src/i18n/ja.json +++ b/renderer/src/i18n/ja.json @@ -183,5 +183,6 @@ "export": "エクスポート", "export-filename": "エクスポートファイル名", "how-to-use": "使用方法", - "is-required": "は必須フィールドです" + "is-required": "は必須フィールドです", + "edit-ai-mook-prompt": "AI Mookプロンプトを編集" } \ No newline at end of file diff --git a/renderer/src/i18n/ko.json b/renderer/src/i18n/ko.json index 90e49fc..348c653 100644 --- a/renderer/src/i18n/ko.json +++ b/renderer/src/i18n/ko.json @@ -183,5 +183,6 @@ "export": "내보내기", "export-filename": "내보내기 파일 이름", "how-to-use": "사용 방법?", - "is-required": "는 필수 필드입니다" + "is-required": "는 필수 필드입니다", + "edit-ai-mook-prompt": "AI Mook 프롬프트 편집" } \ No newline at end of file diff --git a/renderer/src/i18n/ru.json b/renderer/src/i18n/ru.json index 88298dd..3016027 100644 --- a/renderer/src/i18n/ru.json +++ b/renderer/src/i18n/ru.json @@ -183,5 +183,6 @@ "export": "Экспорт", "export-filename": "Имя файла экспорта", "how-to-use": "Как использовать?", - "is-required": "является обязательным полем" + "is-required": "является обязательным полем", + "edit-ai-mook-prompt": "Редактировать подсказки AI Mook" } \ No newline at end of file diff --git a/renderer/src/i18n/zh-cn.json b/renderer/src/i18n/zh-cn.json index d3f7d2d..10ea2be 100644 --- a/renderer/src/i18n/zh-cn.json +++ b/renderer/src/i18n/zh-cn.json @@ -183,5 +183,6 @@ "export": "导出", "export-filename": "导出文件名", "how-to-use": "如何使用?", - "is-required": "是必填字段" + "is-required": "是必填字段", + "edit-ai-mook-prompt": "编辑 AI Mook 提示词" } \ No newline at end of file diff --git a/renderer/src/i18n/zh-tw.json b/renderer/src/i18n/zh-tw.json index df5dbfd..c5f4abd 100644 --- a/renderer/src/i18n/zh-tw.json +++ b/renderer/src/i18n/zh-tw.json @@ -183,5 +183,6 @@ "export": "導出", "export-filename": "導出文件名", "how-to-use": "如何使用?", - "is-required": "是必填欄位" + "is-required": "是必填欄位", + "edit-ai-mook-prompt": "編輯AI Mook提示詞" } \ No newline at end of file From c8a7ac76b94a0e67c385a60a19c5ff71a6ddd1ed Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Mon, 30 Jun 2025 20:28:35 +0800 Subject: [PATCH 05/20] support ai-mook --- renderer/src/components/main-panel/tool/tool-executor.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderer/src/components/main-panel/tool/tool-executor.vue b/renderer/src/components/main-panel/tool/tool-executor.vue index 624eb46..aabff67 100644 --- a/renderer/src/components/main-panel/tool/tool-executor.vue +++ b/renderer/src/components/main-panel/tool/tool-executor.vue @@ -42,7 +42,7 @@
@@ -201,6 +201,8 @@ const generateAIMockData = async (prompt?: string) => { let aiMockJson: any = undefined; loop.registerOnToolCall(toolCall => { + console.log(toolCall); + if (toolCall.function?.name === currentTool.value?.name) { try { const toolArgs = JSON.parse(toolCall.function?.arguments || '{}'); From d3e01376f085770003ce82d147b2ced206acc9d5 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Mon, 30 Jun 2025 20:54:03 +0800 Subject: [PATCH 06/20] support ai-mook --- .vscodeignore | 3 ++- CHANGELOG.md | 5 +++++ package.json | 4 ++-- .../main-panel/chat/chat-box/options/export.vue | 7 ++++--- renderer/src/hook/util.ts | 12 ++++++++++++ renderer/src/views/about/index.vue | 13 +++---------- src/webview/webview.service.ts | 6 ++++++ 7 files changed, 34 insertions(+), 16 deletions(-) diff --git a/.vscodeignore b/.vscodeignore index 6ce090a..7e61a44 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -27,4 +27,5 @@ software/** .turbo .github webpack -.openmcp \ No newline at end of file +.openmcp +.vscode \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a4484d6..ad99945 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [main] 0.1.9 +- 增加 mook 功能:可以利用随机种子或者AI生成来自动化填充测试 tool 的表单数据 +- 修复 issue #44: 完成链接跳转的平台适配 +- 修复 issue #36: 完成非文件夹打开下的成功启动 + ## [main] 0.1.8 - 增加 STDIO 下的热更新,现在用户修改 mcp 代码,openmcp 会自动完成一切相关功能的热更新,无需用户手动重启。 - 完成 mcpconfig.json 的导出功能,导出的 配置文件 可以通过 openmcp-sdk 框架完成低代码 agent 部署;也可以直接载入 Claude Desktop 等等 MCP 客户端中,实现 MCP 的快速部署和使用。 diff --git a/package.json b/package.json index 031ed17..b5a84d5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "openmcp", "displayName": "OpenMCP", "description": "An all in one MCP Client/TestTool", - "version": "0.1.8", + "version": "0.1.9", "publisher": "kirigaya", "private": true, "author": { @@ -224,7 +224,7 @@ "setup": "yarn install && yarn prepare:ocr", "serve": "turbo serve", "build": "turbo build && tsc -p ./ && node esbuild.config.js", - "build:plugin": "yarn build && tsc && vsce package", + "build:plugin": "yarn build && tsc && vsce package --allow-package-all-secrets", "vscode:prepublish": "node esbuild.config.js", "compile": "tsc -p ./", "watch": "tsc -watch -p ./", diff --git a/renderer/src/components/main-panel/chat/chat-box/options/export.vue b/renderer/src/components/main-panel/chat/chat-box/options/export.vue index 9b1568c..612ef95 100644 --- a/renderer/src/components/main-panel/chat/chat-box/options/export.vue +++ b/renderer/src/components/main-panel/chat/chat-box/options/export.vue @@ -56,6 +56,7 @@ import { llmManager, llms } from '@/views/setting/llm'; import { mcpClientAdapter } from '@/views/connect/core'; import { ElMessage } from 'element-plus'; import { useMessageBridge } from '@/api/message-bridge'; +import { gotoWebsite } from '@/hook/util'; const { t, locale } = useI18n(); @@ -166,11 +167,11 @@ const exportCode = async () => { const gotoHowtoUse = () => { if (locale.value === 'zh') { - window.open('https://kirigaya.cn/openmcp/zh/sdk-tutorial/#%E4%BD%BF%E7%94%A8'); + gotoWebsite('https://kirigaya.cn/openmcp/zh/sdk-tutorial/#%E4%BD%BF%E7%94%A8'); } else if (locale.value === 'ja') { - window.open('https://kirigaya.cn/openmcp/ja/sdk-tutorial/#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95'); + gotoWebsite('https://kirigaya.cn/openmcp/ja/sdk-tutorial/#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95'); } else { - window.open('https://kirigaya.cn/openmcp/sdk-tutorial/#usage'); + gotoWebsite('https://kirigaya.cn/openmcp/sdk-tutorial/#usage'); } } diff --git a/renderer/src/hook/util.ts b/renderer/src/hook/util.ts index 9c48476..3b4ec69 100644 --- a/renderer/src/hook/util.ts +++ b/renderer/src/hook/util.ts @@ -91,3 +91,15 @@ export function getImageBlobUrlByBase64(base64String: string, mimeType: string, } return blobUrl; } + +export function gotoWebsite(url: string) { + const platform = getPlatform(); + const bridge = useMessageBridge(); + if (platform === 'vscode') { + // For VSCode, use the webview API to open external links + bridge.commandRequest('vscode/openExternal', { url }); + } else if (platform === 'web') { + // For web, use the standard window.open method + window.open(url, '_blank'); + } +} \ No newline at end of file diff --git a/renderer/src/views/about/index.vue b/renderer/src/views/about/index.vue index 2f49467..8510fab 100644 --- a/renderer/src/views/about/index.vue +++ b/renderer/src/views/about/index.vue @@ -27,7 +27,7 @@
+ @click="gotoWebsite('https://qm.qq.com/cgi-bin/qm/qr?k=C6ZUTZvfqWoI12lWe7L93cWa1hUsuVT0&jump_from=webapi&authKey=McW6B1ogTPjPDrCyGttS890tMZGQ1KB3QLuG4aqVNRaYp4vlTSgf2c6dMcNjMuBD')"> {{ t('join-discussion') }} @@ -42,24 +42,17 @@ \ No newline at end of file + \ No newline at end of file diff --git a/renderer/src/components/main-panel/chat/chat-box/rich-textarea.vue b/renderer/src/components/main-panel/chat/chat-box/rich-textarea.vue index 67aa96e..8bc27af 100644 --- a/renderer/src/components/main-panel/chat/chat-box/rich-textarea.vue +++ b/renderer/src/components/main-panel/chat/chat-box/rich-textarea.vue @@ -234,6 +234,7 @@ function handleCompositionEnd() { .rich-editor { min-height: 100px; outline: none; + white-space: pre-wrap; } .rich-editor:empty::before { diff --git a/renderer/src/components/main-panel/index.vue b/renderer/src/components/main-panel/index.vue index 2159e51..3b04cf1 100644 --- a/renderer/src/components/main-panel/index.vue +++ b/renderer/src/components/main-panel/index.vue @@ -121,6 +121,11 @@ function setActiveTab(index: number) { position: relative; } +.tabs-container .tab:active { + transform: scale(1.05); + transition: var(--animation-3s); +} + .tabs-container .tab > span:first-child { display: flex; align-items: center; diff --git a/renderer/src/components/main-panel/resource/resouce-reader.vue b/renderer/src/components/main-panel/resource/resouce-reader.vue index 02fe0ef..23c2677 100644 --- a/renderer/src/components/main-panel/resource/resouce-reader.vue +++ b/renderer/src/components/main-panel/resource/resouce-reader.vue @@ -115,7 +115,7 @@ const formRules = computed(() => { currentResource.value?.params.forEach(param => { rules[param] = [ { - message: `${param} 是必填字段`, + message: `${param} ` + t('is-required'), trigger: 'blur' } ] diff --git a/renderer/src/components/main-panel/tool/auto-detector.vue b/renderer/src/components/main-panel/tool/auto-detector.vue new file mode 100644 index 0000000..ab4d910 --- /dev/null +++ b/renderer/src/components/main-panel/tool/auto-detector.vue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/renderer/src/components/main-panel/tool/diagram.vue b/renderer/src/components/main-panel/tool/diagram.vue new file mode 100644 index 0000000..db2b7ae --- /dev/null +++ b/renderer/src/components/main-panel/tool/diagram.vue @@ -0,0 +1,210 @@ + + + + + \ No newline at end of file diff --git a/renderer/src/components/main-panel/tool/index.vue b/renderer/src/components/main-panel/tool/index.vue index 4fb3390..9025e05 100644 --- a/renderer/src/components/main-panel/tool/index.vue +++ b/renderer/src/components/main-panel/tool/index.vue @@ -1,5 +1,6 @@ \ No newline at end of file diff --git a/resources/changelog/index.html b/resources/changelog/index.html new file mode 100644 index 0000000..6632dbd --- /dev/null +++ b/resources/changelog/index.html @@ -0,0 +1,2215 @@ + + + + + + + + Vue (Official) + + + + + +
+ + + + + + + + + + + + +
+
+ +

📣 What's New in 3.0.0

+
+
    +
  • 🚀 Significantly improved Hybrid Mode stability
  • +
  • ✨ Introduced several new DX enhancement features
  • +
  • 🌍 Expanded support for additional localizations
  • +
  • 🎨 UI tweaks: removed all Vue-related status bar items
  • +
  • 🐛 Squashed numerous bugs throughout the extension
  • +
+
+ ⚠️ Deprecation Notice: Dropping Vue 2 Support in v3.1 + (Discussion #5395) +
+ +
+ + + + + + Full Release Notes + +
+ Released: July 2025 + + v3.0.0 +
+
+
+ +

🎥 Learn More Features

+

Discover advanced capabilities of the extension:

+
+ + + +
+ + + +

✨ Core Features

+
+
+
🧩
+

Template Intelligence

+

Smart completions for directives, components and props in Vue templates with type inference

+
+
+
🔍
+

Type Checking

+

Full TypeScript support with type inference across SFCs and reactive type checking

+
+
+
🎨
+

Syntax Highlighting

+

Comprehensive syntax highlighting for Single File Components and template expressions

+
+
+ +

💎 Premium Features

+
+
+
🧩
+

Interpolation Highlight 🌟

+

Enhanced highlighting for template interpolations and expressions

+
+
+
🧩
+

Focus Mode 🌟🌟

+

Isolate and focus on specific SFC blocks during development

+
+
+
🧩
+

Reactivity Visualization 🌟🌟🌟🌟

+

Visualize Vue's reactivity system in component scripts

+
+
+
🚧
+

More Features Coming Soon

+
+
+ +
+ +

Support the development and unlock these features:

+ + + + + + GitHub Sponsors + + + + + + + 爱发电 (afdian) + + + +
+ +

📚 Resources

+ + +

🔧 Troubleshooting

+
+ Why are some features not working? +
+

Make sure you have:

+
    +
  • The latest version of the extension installed
  • +
  • Vue 3.x in your project dependencies
  • +
  • TSDK 5.3 or later
  • +
  • Try disabling other extensions to rule out conflicts
  • +
+
+
+
+ Where to report issues? +
+

Please report any problems on our GitHub Issues page with: +

+
    +
  • Detailed reproduction steps
  • +
  • Screenshots or screencasts if applicable
  • +
  • Your project setup information
  • +
+
+
+ +

❤️ Thanks to Our Sponsors

+
+

This project is made possible thanks to our generous sponsors:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

+ Become a sponsor to support Vue + tooling development +

+
+ + + + + \ No newline at end of file From dcabd47a20636097e5d9b9e252b096fbf0d9f649 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Thu, 3 Jul 2025 13:48:58 +0800 Subject: [PATCH 15/20] support self-check --- .../main-panel/tool/auto-detector.vue | 12 +- .../components/main-panel/tool/diagram.vue | 154 +++++++++--------- renderer/src/i18n/ar.json | 3 +- renderer/src/i18n/de.json | 3 +- renderer/src/i18n/en.json | 3 +- renderer/src/i18n/fr.json | 3 +- renderer/src/i18n/ja.json | 3 +- renderer/src/i18n/ko.json | 3 +- renderer/src/i18n/ru.json | 3 +- renderer/src/i18n/zh-cn.json | 3 +- renderer/src/i18n/zh-tw.json | 3 +- 11 files changed, 104 insertions(+), 89 deletions(-) diff --git a/renderer/src/components/main-panel/tool/auto-detector.vue b/renderer/src/components/main-panel/tool/auto-detector.vue index 818af2f..d751a97 100644 --- a/renderer/src/components/main-panel/tool/auto-detector.vue +++ b/renderer/src/components/main-panel/tool/auto-detector.vue @@ -1,15 +1,15 @@