|
@@ -502,8 +502,13 @@ function describeTool(item: ThreadItem, cwd: string): { name: string; title: str
|
|
|
return { name: 'Bash', title: commandTitle(item.command), input: { command: item.command, cwd: item.cwd } }
|
|
return { name: 'Bash', title: commandTitle(item.command), input: { command: item.command, cwd: item.cwd } }
|
|
|
case 'fileChange':
|
|
case 'fileChange':
|
|
|
return { name: 'Edit', title: item.changes.map(c => rel(c.path)).join('、').slice(0, 200), input: { changes: item.changes.map(c => ({ path: c.path, kind: c.kind, diff: c.diff })) } }
|
|
return { name: 'Edit', title: item.changes.map(c => rel(c.path)).join('、').slice(0, 200), input: { changes: item.changes.map(c => ({ path: c.path, kind: c.kind, diff: c.diff })) } }
|
|
|
- case 'mcpToolCall':
|
|
|
|
|
- return { name: `mcp__${item.server}__${item.tool}`, title: '', input: item.arguments }
|
|
|
|
|
|
|
+ case 'mcpToolCall': {
|
|
|
|
|
+ // 标题取最有代表性的参数:网址 / 输入文件(及目标格式)
|
|
|
|
|
+ const a = (item.arguments ?? {}) as Record<string, unknown>
|
|
|
|
|
+ const title = typeof a.url === 'string' ? a.url
|
|
|
|
|
+ : typeof a.input === 'string' ? `${rel(a.input)}${typeof a.format === 'string' ? ` → ${a.format}` : ''}` : ''
|
|
|
|
|
+ return { name: `mcp__${item.server}__${item.tool}`, title, input: item.arguments }
|
|
|
|
|
+ }
|
|
|
case 'webSearch':
|
|
case 'webSearch':
|
|
|
return { name: 'WebSearch', title: (item as { query?: string }).query ?? '', input: { query: (item as { query?: string }).query } }
|
|
return { name: 'WebSearch', title: (item as { query?: string }).query ?? '', input: { query: (item as { query?: string }).query } }
|
|
|
case 'imageView':
|
|
case 'imageView':
|