mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-28 13:01:20 +00:00
Compare commits
1 Commits
enable-cla
...
code-block
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abae47de80 |
15
src/tools.ts
15
src/tools.ts
@@ -463,9 +463,20 @@ export function toolUpdateFromToolResult(
|
|||||||
case "WebFetch":
|
case "WebFetch":
|
||||||
case "WebSearch":
|
case "WebSearch":
|
||||||
case "Other":
|
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: {
|
default: {
|
||||||
// This happens for the mcp__acp__read tool,
|
|
||||||
// but may also for others...
|
|
||||||
if (Array.isArray(toolResult.content)) {
|
if (Array.isArray(toolResult.content)) {
|
||||||
return {
|
return {
|
||||||
content: toolResult.content.map((content: any) => ({
|
content: toolResult.content.map((content: any) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user