Skip to content

Commit f1d7996

Browse files
authored
Apply suggestions from code review
1 parent 057a9c3 commit f1d7996

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/core/tools/useMcpToolTool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ async function processToolContent(task: Task, toolResult: McpToolCallResponse):
212212
const { blob: _, ...rest } = item.resource
213213
return JSON.stringify(rest, null, 2)
214214
}
215+
// kilocode_change start
215216
if (item.type === "resource_link") {
216217
const { uri, name, description, mimeType } = item
217218
return `Resource Link: ${name || uri}${description ? ` - ${description}` : ""}${mimeType ? ` (${mimeType})` : ""}`
@@ -222,6 +223,7 @@ async function processToolContent(task: Task, toolResult: McpToolCallResponse):
222223
if (item.type === "audio") {
223224
return `[Audio: ${item.mimeType}]`
224225
}
226+
// kilocode_change end
225227
return ""
226228
})
227229
.filter(Boolean)

src/shared/mcp.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ export type McpToolCallResponse = {
5858
| {
5959
type: "text"
6060
text: string
61-
_meta?: Record<string, any>
61+
_meta?: Record<string, any> // kilocode_change
6262
}
6363
| {
6464
type: "image"
6565
data: string
6666
mimeType: string
67-
_meta?: Record<string, any>
67+
_meta?: Record<string, any> // kilocode_change
6868
}
6969
| {
7070
type: "audio"
7171
data: string
7272
mimeType: string
73-
_meta?: Record<string, any>
73+
_meta?: Record<string, any> // kilocode_change
7474
}
7575
| {
7676
type: "resource"
@@ -79,10 +79,11 @@ export type McpToolCallResponse = {
7979
mimeType?: string
8080
text?: string
8181
blob?: string
82-
_meta?: Record<string, any>
82+
_meta?: Record<string, any> // kilocode_change
8383
}
84-
_meta?: Record<string, any>
84+
_meta?: Record<string, any> // kilocode_change
8585
}
86+
// kilocode_change start
8687
| {
8788
type: "resource_link"
8889
uri: string
@@ -91,7 +92,8 @@ export type McpToolCallResponse = {
9192
mimeType?: string
9293
_meta?: Record<string, any>
9394
}
95+
// kilocode_change end
9496
>
95-
structuredContent?: Record<string, any>
97+
structuredContent?: Record<string, any> // kilocode_change
9698
isError?: boolean
9799
}

0 commit comments

Comments
 (0)