From 75191f1144b045d626d1f57b69c754b103633d72 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Mon, 21 Apr 2025 12:28:07 +0800 Subject: [PATCH] update mvp --- README.md | 22 ++++--- renderer/src/App.vue | 7 ++- renderer/src/views/setting/api.vue | 1 - service/tabs.image_crawler.json | 90 +++++++++++++++++++++++++---- service/tabs.锦恢的 MCP Server.json | 20 +------ 5 files changed, 99 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 26278c6..be55d77 100644 --- a/README.md +++ b/README.md @@ -34,14 +34,20 @@ ## TODO -- [x] 完成最基本的各类基础设施 -- [x] chat 模式下支持进行成本分析 -- [ ] 支持同时调试多个 MCP Server -- [x] 支持通过大模型进行在线验证 -- [ ] 支持 completion/complete 协议字段 -- [x] 支持 对用户对应服务器的调试工作内容进行保存 -- [ ] 高危操作权限确认 -- [ ] 对于连接的 mcp server 进行热更新 +## 需求规划 + +| 所在模块 | 需求内容 | 功能优先级 | 当前状态 | 修复优先级 | +|---------|---------|--------|---------|-----------| +| `all` | 完成最基本的各类基础设施 | MVP | 100% | `Done` | +| `render` | chat 模式下支持进行成本分析 | MVP | 100% | `Done` | +| `ext` | 支持基本的 MCP 项目管理 | MVP | 0% | `P0` | +| `service` | 支持自定义大模型接入 | MVP | 0% | `P0` | +| `all` | 支持同时调试多个 MCP Server | MVP | 0% | `P1` | +| `all` | 支持通过大模型进行在线验证 | MVP | 100% | `Done` | +| `all` | 支持 completion/complete 协议字段 | MVP | 0% | `P1` | +| `all` | 支持对用户对应服务器的调试工作内容进行保存 | MVP | 100% | `Done` | +| `render` | 高危操作权限确认 | MVP | 0% | `P1` | +| `service` | 对于连接的 mcp server 进行热更新 | MVP | 0% | `P1` | ## Dev diff --git a/renderer/src/App.vue b/renderer/src/App.vue index 5b69939..d732fa2 100644 --- a/renderer/src/App.vue +++ b/renderer/src/App.vue @@ -29,7 +29,7 @@ bridge.addCommandListener('hello', data => { function initDebug() { - connectionArgs.commandString = 'uv run mcp run ../servers/main.py'; + connectionArgs.commandString = 'uv run mcp run ../servers/bing-picture.py'; connectionMethods.current = 'STDIO'; setTimeout(async () => { @@ -93,4 +93,9 @@ onMounted(() => { display: flex; justify-content: center; } + +.message-text img { + max-width: 98%; +} + diff --git a/renderer/src/views/setting/api.vue b/renderer/src/views/setting/api.vue index bdc4b30..246b73b 100644 --- a/renderer/src/views/setting/api.vue +++ b/renderer/src/views/setting/api.vue @@ -15,7 +15,6 @@
- {{ option.name }}
diff --git a/service/tabs.image_crawler.json b/service/tabs.image_crawler.json index 3253330..19f0041 100644 --- a/service/tabs.image_crawler.json +++ b/service/tabs.image_crawler.json @@ -1,5 +1,5 @@ { - "currentIndex": 1, + "currentIndex": 0, "tabs": [ { "name": "交互测试", @@ -7,7 +7,82 @@ "type": "blank", "componentIndex": 3, "storage": { - "messages": [], + "messages": [ + { + "role": "user", + "content": "请帮我找几张明日方舟 m3 的图片", + "extraInfo": { + "created": 1745169263803, + "serverName": "deepseek" + } + }, + { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "id": "call_0_bdf947d9-41d9-4244-b145-55e5dc4f1bdd", + "index": 0, + "type": "function", + "function": { + "name": "image_crawler", + "arguments": "{\"key_word\":\"明日方舟 m3\",\"image_num\":5}" + } + } + ], + "extraInfo": { + "created": 1745169269404, + "serverName": "deepseek", + "usage": { + "prompt_tokens": 224, + "completion_tokens": 33, + "total_tokens": 257, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 224 + } + } + }, + { + "role": "tool", + "tool_call_id": "call_0_bdf947d9-41d9-4244-b145-55e5dc4f1bdd", + "content": "[{\"type\":\"text\",\"text\":\"[ImageResult(url='https://embed.pixiv.net/decorate.php?illust_id=128971880', title='', source='bing'), ImageResult(url='https://embed.pixiv.net/artwork.php?illust_id=128973165', title='', source='bing'), ImageResult(url='https://embed.pixiv.net/artwork.php?illust_id=128981472', title='', source='bing'), ImageResult(url='https://embed.pixiv.net/decorate.php?illust_id=128933348', title='', source='bing'), ImageResult(url='https://embed.pixiv.net/artwork.php?illust_id=128952894', title='', source='bing')]\"}]", + "extraInfo": { + "created": 1745169270649, + "serverName": "deepseek", + "usage": { + "prompt_tokens": 224, + "completion_tokens": 33, + "total_tokens": 257, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 224 + } + } + }, + { + "role": "assistant", + "content": "以下是一些关于“明日方舟 m3”的图片:\n\n1. ![Image](https://embed.pixiv.net/decorate.php?illust_id=128971880)\n2. ![Image](https://embed.pixiv.net/artwork.php?illust_id=128973165)\n3. ![Image](https://embed.pixiv.net/artwork.php?illust_id=128981472)\n4. ![Image](https://embed.pixiv.net/decorate.php?illust_id=128933348)\n5. ![Image](https://embed.pixiv.net/artwork.php?illust_id=128952894)\n\n如果需要更多图片或其他帮助,请告诉我!", + "extraInfo": { + "created": 1745169280218, + "serverName": "deepseek", + "usage": { + "prompt_tokens": 420, + "completion_tokens": 142, + "total_tokens": 562, + "prompt_tokens_details": { + "cached_tokens": 192 + }, + "prompt_cache_hit_tokens": 192, + "prompt_cache_miss_tokens": 228 + } + } + } + ], "settings": { "modelIndex": 0, "enableTools": [ @@ -20,18 +95,9 @@ "enableWebSearch": false, "temperature": 0.7, "contextLength": 10, - "systemPrompt": "你是一个聪明的机器人,我现在会询问你一些问题,这些问题可能会调用我给你的工具,如果用户的输入的问题内包含的参数不足以发起一次工具调用,那么你应该提醒用户缺失的参数。" + "systemPrompt": "你是一个聪明的机器人,我现在会询问你一些问题,这些问题可能会调用我给你的工具,如果用户的输入的问题内包含的参数不足以发起一次工具调用,那么你应该提醒用户缺失的参数。对于图片,请按照 ![]() 进行渲染,而不是将这个返回到 ``` 的 code 中。" } } - }, - { - "name": "工具", - "icon": "icon-tool", - "type": "blank", - "componentIndex": 2, - "storage": { - "currentToolName": "image_crawler" - } } ] } \ No newline at end of file diff --git a/service/tabs.锦恢的 MCP Server.json b/service/tabs.锦恢的 MCP Server.json index d5357c6..d5e71b1 100644 --- a/service/tabs.锦恢的 MCP Server.json +++ b/service/tabs.锦恢的 MCP Server.json @@ -1,5 +1,5 @@ { - "currentIndex": 2, + "currentIndex": 0, "tabs": [ { "name": "交互测试", @@ -43,24 +43,6 @@ "systemPrompt": "" } } - }, - { - "name": "工具", - "icon": "icon-tool", - "type": "blank", - "componentIndex": 2, - "storage": { - "currentToolName": "add" - } - }, - { - "name": "资源", - "icon": "icon-file", - "type": "blank", - "componentIndex": 0, - "storage": { - "currentResourceName": "greeting" - } } ] } \ No newline at end of file