Roo-Code/src/shared
roomote[bot] 37300ef0c5
fix: add character limit to prevent terminal output context explosion (#5777)
* fix: add character limit to prevent terminal output context explosion

- Enhanced truncateOutput function to accept character limits alongside line limits
- Character limits take priority over line limits to prevent context window explosion
- Added terminalOutputCharacterLimit setting (default: 100,000 characters)
- Updated all terminal output processing to use both limits
- Added comprehensive tests for character limit functionality

Fixes #5775

* feat: add terminal output character limit setting to UI

- Add character limit slider to Terminal Settings UI (default: 50,000)
- Update ExtensionStateContext to manage character limit state
- Add validation for positive character limit values
- Add English translation and translations for all 17 supported languages
- Connect UI to backend through proper message handling
- Character limit takes precedence over line limit to prevent memory issues

* fix: update test expectations for character limit edge cases

- Fix multi-byte character test to account for JavaScript's string length behavior
- Fix newline content test to match actual slice behavior
- Tests now correctly validate the truncateOutput function's character limit handling

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-19 13:26:25 -04:00
..
__tests__ Update the max-token calculation in model-params to use the shared logic (#5720) 2025-07-15 02:20:22 -04:00
api.ts Update the max-token calculation in model-params to use the shared logic (#5720) 2025-07-15 02:20:22 -04:00
array.ts Initial streaming refactor 2024-10-09 01:49:54 -04:00
checkExistApiConfig.ts Remove Gemini CLI provider (#5223) 2025-06-28 23:48:28 -04:00
combineApiRequests.ts Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
combineCommandSequences.ts feat(mcp): improve mcp with McpExecution, make UX like terminal execute (#3485) 2025-06-12 00:46:07 -04:00
context-mentions.ts feat: Allow escaping of context mentions (#4362) 2025-06-12 11:49:19 -04:00
cost.ts Yield the cost in usage data for Anthropic (#4849) 2025-06-18 11:59:11 -07:00
embeddingModels.ts feat: Add Mistral embedding provider (#5932) (#5946) 2025-07-19 13:24:24 -04:00
experiments.ts Fixes #4882: Remove experimental setting for command execution in attempt_completion (#4884) 2025-06-20 17:48:01 -04:00
ExtensionMessage.ts fix: add character limit to prevent terminal output context explosion (#5777) 2025-07-19 13:26:25 -04:00
getApiMetrics.ts fix: exclude cache tokens from context window calculation (#5603) 2025-07-11 16:54:51 -04:00
globalFileNames.ts Use yaml as default custom modes format (#3749) 2025-05-20 16:44:29 -04:00
language.ts feat: Indonesian translation (#4672) 2025-06-13 20:25:05 -04:00
mcp.ts feature: add toggle for disable mcp server tool from prompt (#3551) 2025-06-20 19:14:59 -04:00
modes.ts feat: Enable dynamic tool selection in architect mode for context discovery (#5607) 2025-07-11 22:47:45 -04:00
package.ts Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
ProfileValidator.ts Roo Code Cloud (#4069) 2025-05-28 20:43:30 -07:00
safeJsonParse.ts feat: vertex/gemini prompt caching (#2996) 2025-04-28 15:11:35 -07:00
support-prompt.ts Fix linter errors (#3821) 2025-05-21 23:16:43 -07:00
TelemetrySetting.ts Add telemetry and privacy policy 2025-03-07 03:03:44 -05:00
todo.ts add todo tool (#5182) 2025-07-07 14:07:39 -04:00
tools.ts add todo tool (#5182) 2025-07-07 14:07:39 -04:00
vsCodeSelectorUtils.ts Prettier backfill 2025-01-17 14:11:28 -05:00
WebviewMessage.ts fix: add character limit to prevent terminal output context explosion (#5777) 2025-07-19 13:26:25 -04:00