continue-custom/extensions/cli/src/stream
continue[bot] 14dd72eb21 Fix compaction and token counting issues from Cubic review
Address code review feedback:
1. Add fallback to use compacted history directly when ChatHistoryService
   is unavailable (fixes P1 issue in handlePostToolValidation and
   handleNormalAutoCompaction)
2. Prevent double-counting of system message tokens by checking if
   system message is already in history before subtracting tokens
3. Remove tool output name from token count since it's not sent to model

This ensures compaction works correctly in headless contexts and provides
more accurate token estimation.

Co-authored-by: nate <nate@continue.dev>
2025-12-01 23:03:38 +00:00
..
handleToolCalls.ts refactor(cli): throw tool error instead of returning and matching error strings (#8432) 2025-10-27 16:43:05 -07:00
messageQueue.test.ts fix: inline --rule improvements and fix msg queue behavior (#7939) 2025-09-23 23:39:59 -07:00
messageQueue.ts fix: inline --rule improvements and fix msg queue behavior (#7939) 2025-09-23 23:39:59 -07:00
streamChatResponse.autoCompaction.test.ts Improve system message token accounting in compaction and context validation 2025-12-01 14:25:50 -08:00
streamChatResponse.autoCompaction.ts Improve system message token accounting in compaction and context validation 2025-12-01 14:25:50 -08:00
streamChatResponse.compactionHelpers.ts Fix compaction and token counting issues from Cubic review 2025-12-01 23:03:38 +00:00
streamChatResponse.getAllTools.test.ts fix: remove search from expected tools since rg install not gauranteed 2025-11-18 16:45:20 -08:00
streamChatResponse.helpers.ts refactor(cli): throw tool error instead of returning and matching error strings (#8432) 2025-10-27 16:43:05 -07:00
streamChatResponse.modeSwitch.test.ts fix(cli): exclude ask first tools in headless (#8416) 2025-10-23 19:12:47 -07:00
streamChatResponse.systemMessage.test.ts Add blank line between parent and sibling imports 2025-12-01 22:42:38 +00:00
streamChatResponse.test.ts Fix TypeScript errors in streamChatResponse tests 2025-12-01 22:34:19 +00:00
streamChatResponse.ts Improve system message token accounting in compaction and context validation 2025-12-01 14:25:50 -08:00
streamChatResponse.types.ts fix: types, imports, and formatting 2025-08-27 21:32:23 -07:00