Skip to content

Commit 4462a01

Browse files
committed
fix: mcp service check
1 parent 9f11a16 commit 4462a01

4 files changed

Lines changed: 25 additions & 18 deletions

File tree

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ai-tools",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "A LLM client with shortcut",
55
"main": "./out/main/index.js",
66
"author": "elsejj",
@@ -23,37 +23,37 @@
2323
"@electron-toolkit/preload": "^3.0.2",
2424
"@electron-toolkit/utils": "^4.0.0",
2525
"katex": "^0.16.25",
26-
"marked-katex-extension": "^5.1.5",
26+
"marked-katex-extension": "^5.1.6",
2727
"sendkey": "file:./sendkey"
2828
},
2929
"devDependencies": {
3030
"@electron-toolkit/tsconfig": "^2.0.0",
3131
"@iconify-json/lucide-lab": "^1.2.3",
32-
"@iconify/tailwind4": "^1.0.6",
33-
"@modelcontextprotocol/sdk": "^1.20.2",
32+
"@iconify/tailwind4": "^1.1.0",
33+
"@modelcontextprotocol/sdk": "^1.22.0",
3434
"@primeuix/themes": "^1.2.5",
3535
"@primevue/auto-import-resolver": "^4.4.1",
36-
"@tailwindcss/vite": "^4.1.16",
37-
"@types/node": "^24.9.1",
38-
"@vitejs/plugin-vue": "^6.0.1",
36+
"@tailwindcss/vite": "^4.1.17",
37+
"@types/node": "^24.10.1",
38+
"@vitejs/plugin-vue": "^6.0.2",
3939
"dexie": "^4.2.1",
40-
"electron": "^38.4.0",
40+
"electron": "^38.7.1",
4141
"electron-builder": "^26.0.12",
4242
"electron-vite": "^4.0.1",
4343
"highlight.js": "^11.11.1",
4444
"html-to-image": "^1.11.13",
45-
"marked": "^16.4.1",
46-
"marked-highlight": "^2.2.2",
45+
"marked": "^16.4.2",
46+
"marked-highlight": "^2.2.3",
4747
"openai": "^5.23.2",
48-
"pinia": "^3.0.3",
48+
"pinia": "^3.0.4",
4949
"primevue": "^4.4.1",
50-
"tailwindcss": "^4.1.16",
50+
"tailwindcss": "^4.1.17",
5151
"tailwindcss-primeui": "^0.6.1",
5252
"typescript": "^5.9.3",
5353
"unplugin-vue-components": "^29.2.0",
54-
"vite": "^7.1.12",
55-
"vue": "^3.5.22",
54+
"vite": "^7.2.4",
55+
"vue": "^3.5.24",
5656
"vue-router": "^4.6.3",
57-
"vue-tsc": "^3.1.1"
57+
"vue-tsc": "^3.1.4"
5858
}
5959
}

src/renderer/components.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
/* eslint-disable */
22
// @ts-nocheck
3+
// biome-ignore lint: disable
4+
// oxlint-disable
5+
// ------
36
// Generated by unplugin-vue-components
47
// Read more: https://github.com/vuejs/core/pull/3399
5-
// biome-ignore lint: disable
8+
69
export {}
710

811
/* prettier-ignore */

src/renderer/src/pages/EditTools.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ async function onMcpPromptSelected(event: any) {
248248
if (prompt) {
249249
tool.value.systemPrompt = prompt.messages
250250
.map((message) => {
251-
return message.content.text
251+
if (message.content.type === 'text') {
252+
return message.content.text
253+
} else {
254+
return ''
255+
}
252256
})
253257
.join('\n')
254258
selectedPrompt.prompt = tool.value.systemPrompt

src/renderer/src/services/mcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export async function connectMcpClient(
1616
const controller = new AbortController()
1717
const signal = controller.signal
1818
const response = await fetch(u, { signal })
19-
if (!response.ok) {
19+
if (response.status !== 200 && response.status !== 406) {
2020
throw new Error(`Failed to fetch from ${url}: ${response.statusText}`)
2121
}
2222
controller.abort()

0 commit comments

Comments
 (0)