From 75ed81b5ef7e039a175dd656afeda090a010b8e1 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Thu, 17 Apr 2025 20:29:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renderer/src/App.vue | 3 + renderer/src/hook/panel.ts | 1 + service/tabs.锦恢的 MCP Server.json | 259 +--------------------------- 3 files changed, 6 insertions(+), 257 deletions(-) diff --git a/renderer/src/App.vue b/renderer/src/App.vue index a99d729..73580ee 100644 --- a/renderer/src/App.vue +++ b/renderer/src/App.vue @@ -62,8 +62,11 @@ async function initProduce() { // 初始化 tab await loadPanels(); + console.log(route); + if (route.name !== 'debug') { router.replace('/debug'); + router.push('/debug'); } } diff --git a/renderer/src/hook/panel.ts b/renderer/src/hook/panel.ts index 6d713fb..d80e7c8 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) { // 空的,直接返回不需要管 + resolve(void 0); return; } diff --git a/service/tabs.锦恢的 MCP Server.json b/service/tabs.锦恢的 MCP Server.json index ce44fc6..497bc1e 100644 --- a/service/tabs.锦恢的 MCP Server.json +++ b/service/tabs.锦恢的 MCP Server.json @@ -1,259 +1,4 @@ { - "currentIndex": 3, - "tabs": [ - { - "name": "资源", - "icon": "icon-file", - "type": "blank", - "componentIndex": 0, - "storage": { - "currentResourceName": "greeting" - } - }, - { - "name": "交互测试", - "icon": "icon-robot", - "type": "blank", - "componentIndex": 3, - "storage": { - "messages": [ - { - "role": "user", - "content": "请问杭州的天气是什么", - "extraInfo": { - "created": 1744881516541, - "serverName": "deepseek" - } - }, - { - "role": "assistant", - "content": "", - "tool_calls": [ - { - "id": "call_0_bbae6a23-1981-486c-a9b4-0f73166100be", - "index": 0, - "type": "function", - "function": { - "name": "weather", - "arguments": "{\"city\":\"杭州\"}" - } - } - ], - "extraInfo": { - "created": 1744881520505, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 119, - "completion_tokens": 17, - "total_tokens": 136, - "prompt_tokens_details": { - "cached_tokens": 0 - }, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 119 - } - } - }, - { - "role": "tool", - "tool_call_id": "call_0_bbae6a23-1981-486c-a9b4-0f73166100be", - "content": "[{\"type\":\"text\",\"text\":\"Weather in 杭州: Sunny, 25°C\"}]", - "extraInfo": { - "created": 1744881520527, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 119, - "completion_tokens": 17, - "total_tokens": 136, - "prompt_tokens_details": { - "cached_tokens": 0 - }, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 119 - } - } - }, - { - "role": "assistant", - "content": "杭州的天气是晴天,气温为25°C。", - "extraInfo": { - "created": 1744881525621, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 162, - "completion_tokens": 12, - "total_tokens": 174, - "prompt_tokens_details": { - "cached_tokens": 128 - }, - "prompt_cache_hit_tokens": 128, - "prompt_cache_miss_tokens": 34 - } - } - } - ], - "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-tool", - "type": "blank", - "componentIndex": 2, - "storage": { - "currentToolName": "add" - } - }, - { - "name": "交互测试", - "icon": "icon-robot", - "type": "blank", - "componentIndex": 3, - "storage": { - "messages": [ - { - "role": "user", - "content": "请问杭州的温度是多少?", - "extraInfo": { - "created": 1744891124259, - "serverName": "deepseek" - } - }, - { - "role": "assistant", - "content": "", - "tool_calls": [ - { - "id": "call_0_b289e7fb-386e-4071-8749-e02ff9506f74", - "index": 0, - "type": "function", - "function": { - "name": "get_weather_by_city_code", - "arguments": "{\"city_code\":101210101}" - } - } - ], - "extraInfo": { - "created": 1744891130497, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 144, - "completion_tokens": 27, - "total_tokens": 171, - "prompt_tokens_details": { - "cached_tokens": 128 - }, - "prompt_cache_hit_tokens": 128, - "prompt_cache_miss_tokens": 16 - } - } - }, - { - "role": "tool", - "tool_call_id": "call_0_b289e7fb-386e-4071-8749-e02ff9506f74", - "content": "[{\"type\":\"text\",\"text\":\"CityWeather(city_name_en='hangzhou', city_name_cn='杭州', city_code='101210101', temp='19.2', wd='', ws='', sd='76%', aqi='62', weather='晴')\"}]", - "extraInfo": { - "created": 1744891130615, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 144, - "completion_tokens": 27, - "total_tokens": 171, - "prompt_tokens_details": { - "cached_tokens": 128 - }, - "prompt_cache_hit_tokens": 128, - "prompt_cache_miss_tokens": 16 - } - } - }, - { - "role": "assistant", - "content": "杭州当前的温度是19.2℃,天气为晴,空气质量指数(AQI)为62,湿度为76%。", - "extraInfo": { - "created": 1744891135309, - "serverName": "deepseek", - "usage": { - "prompt_tokens": 236, - "completion_tokens": 25, - "total_tokens": 261, - "prompt_tokens_details": { - "cached_tokens": 192 - }, - "prompt_cache_hit_tokens": 192, - "prompt_cache_miss_tokens": 44 - } - } - } - ], - "settings": { - "modelIndex": 0, - "enableTools": [ - { - "name": "add", - "description": "对两个数字进行实数域的加法", - "enabled": false - }, - { - "name": "multiply", - "description": "对两个数字进行实数域的乘法运算", - "enabled": false - }, - { - "name": "is_even", - "description": "判断一个整数是否为偶数", - "enabled": false - }, - { - "name": "capitalize", - "description": "将字符串首字母大写", - "enabled": false - }, - { - "name": "get_weather_by_city_code", - "description": "根据城市天气预报的城市编码 (int),获取指定城市的天气信息", - "enabled": true - } - ], - "enableWebSearch": false, - "temperature": 0.7, - "contextLength": 10, - "systemPrompt": "" - } - } - } - ] + "tabs": [], + "currentIndex": -1 } \ No newline at end of file