fix(coding-agent): restore afterToolCall error overrides closes #3051

This commit is contained in:
Mario Zechner
2026-04-17 01:49:34 +02:00
parent 32c52a86a8
commit e9808b5854
2 changed files with 4 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
### Fixed ### Fixed
- Fixed `tool_result` / `afterToolCall` extension handling for error results by forwarding `details` and `isError` overrides through `AgentSession` instead of dropping them when `isError` was already true ([#3051](https://github.com/badlogic/pi-mono/issues/3051))
- Fixed missing root exports for `RpcClient` and RPC protocol types from `@mariozechner/pi-coding-agent`, so ESM consumers can import them from the main package entrypoint ([#3275](https://github.com/badlogic/pi-mono/issues/3275)) - Fixed missing root exports for `RpcClient` and RPC protocol types from `@mariozechner/pi-coding-agent`, so ESM consumers can import them from the main package entrypoint ([#3275](https://github.com/badlogic/pi-mono/issues/3275))
- Fixed Bun binary asset path resolution to honor `PI_PACKAGE_DIR` for built-in themes, HTML export templates, and interactive bundled assets ([#3074](https://github.com/badlogic/pi-mono/issues/3074)) - Fixed Bun binary asset path resolution to honor `PI_PACKAGE_DIR` for built-in themes, HTML export templates, and interactive bundled assets ([#3074](https://github.com/badlogic/pi-mono/issues/3074))
- Fixed user-message turn spacing in interactive mode by restoring an inter-message spacer before user turns (except the first user message), preventing assistant and user blocks from rendering flush together. - Fixed user-message turn spacing in interactive mode by restoring an inter-message spacer before user turns (except the first user message), preventing assistant and user blocks from rendering flush together.

View File

@@ -398,17 +398,18 @@ export class AgentSession {
toolCallId: toolCall.id, toolCallId: toolCall.id,
input: args as Record<string, unknown>, input: args as Record<string, unknown>,
content: result.content, content: result.content,
details: isError ? undefined : result.details, details: result.details,
isError, isError,
}); });
if (!hookResult || isError) { if (!hookResult) {
return undefined; return undefined;
} }
return { return {
content: hookResult.content, content: hookResult.content,
details: hookResult.details, details: hookResult.details,
isError: hookResult.isError ?? isError,
}; };
}; };
} }