mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-17 07:13:07 -07:00
2a8918c72f
This change ensures that tool execution in the Agent Protocol experiment reaches visual parity with the legacy implementation by passing rich metadata and objects (like FileDiff) through the AgentEvent stream. Key changes: - Core 'LegacyAgentSession' now builds temporary invocations for tool requests to capture rich, argument-aware descriptions (e.g. 'Writing to poem.md'). - Core 'LegacyAgentSession' now attaches the raw 'resultDisplay' object and 'outputFile' path to the 'tool_response' event metadata. - Core 'LegacyAgentSession' now passes the rich description through 'tool_update' events to ensure dynamic descriptions are updated during execution. - UI 'useAgentStream' hook now extracts these rich values from event metadata to populate the local 'trackedTools' state, allowing 'mapToDisplay' to correctly trigger bespoke rendering components (like the diff viewer).