fix: add input field to tool call data and simplify CLAUDE.md orchestrator docs

This commit is contained in:
Mohamed Boudra
2025-12-20 12:56:59 +07:00
parent fd36c9b8e2
commit a6d2ea3153
4 changed files with 183 additions and 110 deletions
+2
View File
@@ -112,6 +112,7 @@ export interface AgentToolCallData {
callId?: string;
displayName?: string;
kind?: string;
input?: unknown;
result?: unknown;
error?: unknown;
parsedEdits?: EditEntry[];
@@ -784,6 +785,7 @@ export function reduceStreamUpdate(
callId: item.callId,
displayName: item.displayName,
kind: item.kind,
input: item.input,
result: item.output,
error: item.error,
},
@@ -1095,11 +1095,17 @@ class ClaudeAgentSession implements AgentSession {
return structured;
}
// Fallback to legacy format
// Fallback format - try to parse JSON first
const result: Record<string, unknown> = {};
if (content.length > 0) {
result.result = { output: content };
try {
// If content is a JSON string, parse it
result.output = JSON.parse(content);
} catch {
// If not JSON, return as-is (no extra wrapping)
result.output = content;
}
}
// Preserve file changes tracked during tool execution