Files
gemini-cli/packages
Coco Sheng 6e1180dd6b perf(core): minimalist optimization for ToolOutputMaskingService
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.
2026-04-29 13:18:01 -04:00
..