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 @@