diff --git a/CHANGELOG.md b/CHANGELOG.md index 69081fa..cdb0392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## [main] 0.0.4 - 修复选择模型后点击确认跳转回 deepseek 的 bug - +- 修复 mcp 项目初始化点击工具全部都是空的 bug ## [main] 0.0.3 diff --git a/renderer/src/hook/panel.ts b/renderer/src/hook/panel.ts index d80e7c8..07a0b31 100644 --- a/renderer/src/hook/panel.ts +++ b/renderer/src/hook/panel.ts @@ -35,6 +35,7 @@ export function loadPanels() { if (persistTab.tabs.length === 0) { // 空的,直接返回不需要管 + panelLoaded.value = true; resolve(void 0); return; } diff --git a/renderer/src/views/debug/welcome.vue b/renderer/src/views/debug/welcome.vue index eef0289..7590dfc 100644 --- a/renderer/src/views/debug/welcome.vue +++ b/renderer/src/views/debug/welcome.vue @@ -59,6 +59,7 @@ function chooseDebugMode(index: number) { if (connectionResult.success) { const activeTab = tabs.activeTab; activeTab.component = markRaw(debugModes[index]); + activeTab.componentIndex = index; activeTab.icon = debugOptions[index].icon; @@ -66,6 +67,8 @@ function chooseDebugMode(index: number) { // console.log(debugOptions[index]); activeTab.name = debugOptions[index].name as any; + console.log(tabs); + } else { const message = t('warning.click-to-connect') .replace('$1', t('connect')); diff --git a/service/tabs.锦恢的 MCP Server.json b/service/tabs.锦恢的 MCP Server.json index 76bcaaf..d5e71b1 100644 --- a/service/tabs.锦恢的 MCP Server.json +++ b/service/tabs.锦恢的 MCP Server.json @@ -1,149 +1,6 @@ { - "currentIndex": 2, + "currentIndex": 0, "tabs": [ - { - "name": "交互测试", - "icon": "icon-robot", - "type": "blank", - "componentIndex": 3, - "storage": { - "messages": [ - { - "role": "user", - "content": "float 9.9 and float 9.11, which one is bigger", - "extraInfo": { - "created": 1744971603852, - "serverName": "openai" - } - }, - { - "role": "assistant", - "content": "错误: OpenAI API error: 401 Incorrect API key provided: AK-e5ecb***************************1f37. You can find your API key at https://platform.openai.com/account/api-keys.", - "extraInfo": { - "created": 1744971604583, - "serverName": "openai" - } - }, - { - "role": "user", - "content": "杭州今天的气温", - "extraInfo": { - "created": 1744979181964, - "serverName": "deepseek" - } - }, - { - "role": "assistant", - "content": "", - "tool_calls": [ - { - "id": "call_0_99f46975-2238-49b0-a4ba-eace2f199a74", - "index": 0, - "type": "function", - "function": { - "name": "get_weather_by_city_code", - "arguments": "{\"city_code\":101210101}" - } - } - ], - "extraInfo": { - "created": 1744979187506, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 207, - "completion_tokens": 26, - "total_tokens": 233, - "prompt_tokens_details": { - "cached_tokens": 0 - }, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 207 - } - } - }, - { - "role": "tool", - "tool_call_id": "call_0_99f46975-2238-49b0-a4ba-eace2f199a74", - "content": "[{\"type\":\"text\",\"text\":\"CityWeather(city_name_en='hangzhou', city_name_cn='杭州', city_code='101210101', temp='24.7', wd='', ws='', sd='58%', aqi='69', weather='晴')\"}]", - "extraInfo": { - "created": 1744979187685, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 207, - "completion_tokens": 26, - "total_tokens": 233, - "prompt_tokens_details": { - "cached_tokens": 0 - }, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 207 - } - } - }, - { - "role": "assistant", - "content": "杭州今天的气温是24.7°C,天气晴朗,空气质量指数为69。", - "extraInfo": { - "created": 1744979192559, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 299, - "completion_tokens": 19, - "total_tokens": 318, - "prompt_tokens_details": { - "cached_tokens": 192 - }, - "prompt_cache_hit_tokens": 192, - "prompt_cache_miss_tokens": 107 - } - } - } - ], - "settings": { - "modelIndex": 0, - "enableTools": [ - { - "name": "add", - "description": "对两个数字进行实数域的加法", - "enabled": true - }, - { - "name": "multiply", - "description": "对两个数字进行实数域的乘法运算", - "enabled": true - }, - { - "name": "is_even", - "description": "判断一个整数是否为偶数", - "enabled": true - }, - { - "name": "capitalize", - "description": "将字符串首字母大写", - "enabled": true - }, - { - "name": "get_weather_by_city_code", - "description": "根据城市天气预报的城市编码 (int),获取指定城市的天气信息", - "enabled": true - } - ], - "enableWebSearch": false, - "temperature": 0.7, - "contextLength": 10, - "systemPrompt": "" - } - } - }, - { - "name": "资源", - "icon": "icon-file", - "type": "blank", - "componentIndex": 0, - "storage": { - "currentResourceName": "greeting" - } - }, { "name": "交互测试", "icon": "icon-robot",