mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-31 01:37:28 +08:00
ed7c990dfd
slimPatch and slimMultiedit used `...meta` spreads that leaked heavy fields (metadata.diff up to 158KB, files[].before/after ~128KB each) through to the VS Code webview on every session switch. Replace with explicit allowlist construction matching the pattern slimEdit/slimWrite already used. Add size-based guardrail tests that inject unknown heavy fields into each tool's metadata and assert the slimmed output stays under 10KB. This catches future upstream changes regardless of field names. Add a runtime warning in slimPart (non-production) when slimmed state exceeds 50KB so regressions surface during development.