Roo-Code/src/core/tools
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__ Add command timeout allowlist with IPC support (#5910) 2025-07-18 16:48:39 -04:00
accessMcpResourceTool.ts fix access_mcp_resource fails to handle images correctly (#5254) 2025-07-02 23:50:15 -04:00
applyDiffTool.ts feat: add configurable delay for Go diagnostics to prevent premature error reporting (#5863) 2025-07-18 16:12:00 -04:00
askFollowupQuestionTool.ts Add optional mode suggestions to follow-up questions (#5200) 2025-06-27 16:26:17 -04:00
attemptCompletionTool.ts Prevent completion with open todos (#5716) 2025-07-18 11:31:31 -04:00
browserActionTool.ts Rename Cline to Task (#3352) 2025-05-08 12:47:50 -07:00
codebaseSearchTool.ts Handle partial messages in the codebase search tool (#3934) 2025-05-24 14:33:29 -04:00
executeCommandTool.ts fix: add character limit to prevent terminal output context explosion (#5777) 2025-07-19 13:26:25 -04:00
fetchInstructionsTool.ts Rename Cline to Task (#3352) 2025-05-08 12:47:50 -07:00
insertContentTool.ts feat: add configurable delay for Go diagnostics to prevent premature error reporting (#5863) 2025-07-18 16:12:00 -04:00
listCodeDefinitionNamesTool.ts Make listing tools respect auto-approve settings for outside of the workspace (#4682) 2025-06-13 23:12:31 -04:00
listFilesTool.ts Make listing tools respect auto-approve settings for outside of the workspace (#4682) 2025-06-13 23:12:31 -04:00
multiApplyDiffTool.ts feat: add configurable delay for Go diagnostics to prevent premature error reporting (#5863) 2025-07-18 16:12:00 -04:00
newTaskTool.ts Fix new_task tool streaming issue (#5432) 2025-07-06 09:17:18 -04:00
readFileTool.ts chore: fix typos in comment & document (#5569) 2025-07-10 11:33:26 -04:00
searchAndReplaceTool.ts feat: add configurable delay for Go diagnostics to prevent premature error reporting (#5863) 2025-07-18 16:12:00 -04:00
searchFilesTool.ts Adjust searching outside of the workspace to respect the auto-approve… (#4670) 2025-06-13 18:49:39 -04:00
switchModeTool.ts Rename Cline to Task (#3352) 2025-05-08 12:47:50 -07:00
ToolRepetitionDetector.ts feat: Add configurable error & repetition limit with unified control (#5654) (#5752) 2025-07-15 18:25:43 -04:00
updateTodoListTool.ts add todo tool (#5182) 2025-07-07 14:07:39 -04:00
useMcpToolTool.ts feat(mcp): improve mcp with McpExecution, make UX like terminal execute (#3485) 2025-06-12 00:46:07 -04:00
validateToolUse.ts Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
writeToFileTool.ts feat: add configurable delay for Go diagnostics to prevent premature error reporting (#5863) 2025-07-18 16:12:00 -04:00