mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-27 12:40:32 +00:00
read output in a code block
This commit is contained in:
15
src/tools.ts
15
src/tools.ts
@@ -463,9 +463,20 @@ export function toolUpdateFromToolResult(
|
||||
case "WebFetch":
|
||||
case "WebSearch":
|
||||
case "Other":
|
||||
case "mcp__acp__read":
|
||||
if (Array.isArray(toolResult.content)) {
|
||||
return {
|
||||
content: toolResult.content.map((content: any) => ({
|
||||
type: "content",
|
||||
content: {
|
||||
type: "text",
|
||||
text: `\`\`\`${toolUse.input?.abs_path ?? ""}\n${content.text ?? ""}\n\`\`\``,
|
||||
},
|
||||
})),
|
||||
};
|
||||
}
|
||||
return {};
|
||||
default: {
|
||||
// This happens for the mcp__acp__read tool,
|
||||
// but may also for others...
|
||||
if (Array.isArray(toolResult.content)) {
|
||||
return {
|
||||
content: toolResult.content.map((content: any) => ({
|
||||
|
||||
Reference in New Issue
Block a user