mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 06:12:50 -07:00
6e1180dd6b
Optimizes ToolOutputMaskingService by skipping redundant serialization for already-masked items. - Introduced a fast structural check early in the scan loop to detect and skip previously masked tool outputs using the isRecord type guard. - Maintains canonical estimateTokenCountSync logic for unmasked items, ensuring consistency with project-wide token limits. - Resolves the O(N^2) overhead identified in the issue with minimal risk of regression or logic drift. - Explicitly supports array responses for masking.