continue-custom/extensions/cli/src/util
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
..
apiClient.test.ts fix: logger mock and error message 2025-11-18 17:00:04 -08:00
apiClient.ts feat: status tool for cn (#8007) 2025-10-01 08:44:34 -07:00
apiKeyValidation.test.ts fix: ant expected key format 2025-08-22 07:53:52 -07:00
apiKeyValidation.ts fix: ant expected key format 2025-08-22 07:53:52 -07:00
cli.test.ts fix: 🐛 More fixes 2025-11-18 19:59:36 -08:00
cli.ts fix: 🐛 More fixes 2025-11-18 19:59:36 -08:00
clipboard.test.ts fix: logger mock and error message 2025-11-18 17:00:04 -08:00
clipboard.ts fix: address feedback 2025-09-02 19:12:19 -07:00
error.ts Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
exit.ts Add agent session metadata tracking and reporting to control plane 2025-11-21 16:19:21 -08:00
exponentialBackoff.test.ts chore: run prettier --write on cli 2025-08-20 17:57:35 -07:00
exponentialBackoff.ts feat: impl Responses API in oai-adapters (#8417) 2025-10-29 13:17:32 -07:00
filePatterns.ts Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
fileWatcher.test.ts feat: show remote sessions in cn ls (#7694) 2025-09-19 22:44:26 -07:00
fileWatcher.ts feat: show remote sessions in cn ls (#7694) 2025-09-19 22:44:26 -07:00
formatError.test.ts chore: run prettier --write on cli 2025-08-20 17:57:35 -07:00
formatError.ts Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
git.test.ts chore: prettier 2025-09-02 18:04:40 -07:00
git.ts feat: --id flag for cn serve (#7884) 2025-09-21 13:24:39 -07:00
inputHistory.test.ts chore: run prettier --write on cli 2025-08-20 17:57:35 -07:00
inputHistory.ts Add 'extensions/cli/' from commit 'e27a5c87d520e28844c9eac10bc6d301feee4b5e' 2025-08-20 17:19:56 -07:00
isInHomeDirectory.test.ts refactor: move isInHomeDirectory to a util function 2025-09-04 20:21:30 +05:30
isInHomeDirectory.ts refactor: move isInHomeDirectory to a util function 2025-09-04 20:21:30 +05:30
logger.ts fix: improved unhandled error logging 2025-11-26 11:03:48 -08:00
metadata.test.ts Fix calculateDiffStats to correctly handle code with ++ or -- operators 2025-12-01 01:44:46 +00:00
metadata.ts Fix calculateDiffStats to correctly handle code with ++ or -- operators 2025-12-01 01:44:46 +00:00
modelPersistence.ts fix: multiple cn nitpicks (#8049) 2025-10-01 00:06:15 -07:00
pathResolver.ts Apply suggestion from @cubic-dev-ai[bot] 2025-10-17 10:19:15 -07:00
prompt.test.ts ci: fix release workflows to block if version check fails (#7350) 2025-09-22 14:34:38 -07:00
prompt.ts ci: fix release workflows to block if version check fails (#7350) 2025-09-22 14:34:38 -07:00
promptProcessor.test.ts fix: prepend agent prompt in serve mode (#8393) 2025-10-22 15:47:47 -07:00
promptProcessor.ts fix: prepend agent prompt in serve mode (#8393) 2025-10-22 15:47:47 -07:00
stdin.test.ts chore: run prettier --write on cli 2025-08-20 17:57:35 -07:00
stdin.ts feat: ✨ Remove TTY requirement for the cli in headless mode 2025-11-18 19:45:15 -08:00
tokenizer.contextValidation.test.ts feat: add more robust context length validation (#7817) 2025-09-17 16:03:53 -07:00
tokenizer.test.ts fix: logger mock and error message 2025-11-18 17:00:04 -08:00
tokenizer.ts Fix compaction and token counting issues from Cubic review 2025-12-01 23:03:38 +00:00
withExponentialBackoff.test.ts fix abort listeners 2025-08-20 19:06:45 -07:00
yamlConfigUpdater.test.ts fix: multiple cn nitpicks (#8049) 2025-10-01 00:06:15 -07:00
yamlConfigUpdater.ts fix: multiple cn nitpicks (#8049) 2025-10-01 00:06:15 -07:00