Commit graph

6777 commits

Author SHA1 Message Date
Hannes Rudolph
65a6ddefe7 i18n: add missing translations for interactive terminal feature
Add translations for terminal session and stdin operation strings
to all 17 supported locales in chat.json:
- terminal.sessionsRunning (singular/plural forms)
- stdinOperations.sentToSession
- stdinOperations.polledSession
- stdinOperations.wantsToTerminate
- stdinOperations.didTerminate
- stdinOperations.wantsToListSessions
- stdinOperations.didListSessions
2026-01-28 15:22:54 -07:00
Hannes Rudolph
bb5ee6c0f2 fix: add activeTerminalSessions to initial state in ExtensionStateContext and test mock 2026-01-28 14:55:27 -07:00
Hannes Rudolph
1071717537 feat(ui): add terminal session indicator in TaskHeader
- Add activeTerminalSessions count to ExtensionState type
- Add ProcessManager query in ClineProvider.getState() to count running sessions
- Add TerminalSquare icon indicator in TaskHeader showing session count
- Show indicator only when there are active sessions (green icon + count)
- Add i18n translations for terminal session tooltip
- Update ExtensionStateContext test with new property
2026-01-28 14:40:13 -07:00
Hannes Rudolph
56da141bd9 feat(ui): improve write_stdin, terminate_session, list_sessions rendering in ChatRow
- Add proper UI cases for write_stdin showing session ID and input chars
- Add terminate_session rendering with termination status
- Add list_sessions rendering with sessions table
- Add i18n translations for all stdin operations
2026-01-28 14:40:13 -07:00
Hannes Rudolph
cb28f75fff feat: add stdin support for ExecaTerminalProcess
- Add writeStdin method to RooTerminalProcess interface
- Add abstract writeStdin to BaseTerminalProcess
- Implement writeStdin in ExecaTerminalProcess using stdin pipe
- Implement writeStdin in TerminalProcess using terminal.sendText
- Change ExecaTerminalProcess from stdin: 'ignore' to stdin: 'pipe'
- Update WriteStdinTool to use unified process.writeStdin() method

This enables write_stdin tool to work with both VSCode terminals and
Execa terminals, providing consistent interactive terminal support.
2026-01-28 14:40:13 -07:00
Hannes Rudolph
c9af762114 feat: add terminate_session and list_sessions tools
- Add terminate_session tool to kill running terminal sessions
- Add list_sessions tool to view active terminal sessions
- Add listSessions and terminateSession methods to ProcessManager
- Create native tool schemas for both tools
- Create tool handlers (TerminateSessionTool, ListSessionsTool)
- Add routing in presentAssistantMessage.ts
- Add parsing support in NativeToolCallParser.ts
- Add 8 new tests for ProcessManager methods (23 total tests)

These tools complement write_stdin to provide complete terminal session management:
- execute_command starts a process (returns session_id if still running)
- write_stdin sends input to running processes
- list_sessions shows all active sessions
- terminate_session kills a running session
2026-01-28 14:40:13 -07:00
Hannes Rudolph
3b99b936f8 feat: add write_stdin tool for interactive terminal support
This commit implements the interactive terminal feature from the terminal
integration specification (plans/extract-terminal-integration.md).

Changes:
- Add write_stdin to toolNames in packages/types/src/tool.ts
- Create write_stdin native tool schema in src/core/prompts/tools/native-tools/
- Create WriteStdinTool handler in src/core/tools/
- Add ProcessManager to track running processes by session_id
- Modify ExecuteCommandTool to register processes when still running
- Add write_stdin to tool routing in presentAssistantMessage.ts
- Add write_stdin to NativeToolCallParser for streaming support
- Add tests for ProcessManager

The write_stdin tool enables the LLM to:
- Send input to running terminal processes (y/n prompts, passwords)
- Send control characters like Ctrl+C (\x03)
- Poll for new output from long-running processes

When execute_command starts a process that's still running after the
yield time, it registers the process with ProcessManager and returns
a session_id. The LLM can then use write_stdin with that session_id
to interact with the process.
2026-01-28 14:40:13 -07:00
Hannes Rudolph
d6aab9fcaf fix: display search pattern and match count in read_command_output UI
When using search mode, the UI now shows the search pattern and match count
instead of the misleading byte range (0 B - totalSize).

- Added searchPattern and matchCount fields to ClineSayTool type
- Updated ReadCommandOutputTool to return match count from search operations
- Updated ChatRow to display 'search: "pattern" • N matches' for search mode
2026-01-28 14:40:13 -07:00
Hannes Rudolph
f15bea2c59 feat: update i18n labels for new preview sizes (5KB/10KB/20KB)
Update all 18 locale files with new preview size labels:
- small: 2KB → 5KB
- medium: 4KB → 10KB
- large: 8KB → 20KB
2026-01-28 14:39:41 -07:00
Hannes Rudolph
70787f7a4a feat: align output limits with terminal integration spec
- Update preview sizes: 2KB/4KB/8KB → 5KB/10KB/20KB (default 10KB)
- Update read_command_output default limit: 32KB → 40KB
- Match spec's MODEL_TRUNCATION_BYTES (10KB) for preview
- Match spec's DEFAULT_MAX_OUTPUT_TOKENS (10000 tokens × 4 bytes = 40KB) for retrieval
- Update all related tests and documentation
2026-01-28 14:39:41 -07:00
Hannes Rudolph
5711f1f32b fix: ensure onCompleted callback finishes before using persistedResult
- Update RooTerminalCallbacks.onCompleted type to allow async callbacks (void | Promise<void>)
- Track onCompleted completion with a promise and await it before using persistedResult
- This fixes a race condition where exitDetails could be set before the async finalize() completes
- Fix test callback to not return assignment value
2026-01-28 14:39:41 -07:00
Hannes Rudolph
6bc2a14d61 fix: address review feedback for lossless terminal output
- OutputInterceptor.finalize() now awaits stream flush before returning
  This ensures artifact files are fully written before the artifact_id
  is advertised to the LLM, preventing partial reads.

- Remove strict mode from read_command_output native tool schema
  With strict: true, OpenAI requires all params in 'required', forcing
  the LLM to provide explicit null values for optional params. This
  created verbose tool calls. Now optional params can be omitted entirely.

- Update tests to handle async finalize() method
2026-01-28 14:38:53 -07:00
Hannes Rudolph
f5faf0ff93 fix: use chunked streaming for search to avoid memory blowup
Replace fs.readFile with chunked streaming in searchInArtifact() to keep
memory usage bounded for large command outputs. Instead of loading the
entire file into memory, reads in 64KB chunks and processes lines as
they are encountered.

This addresses the concern that loading 100MB+ build logs into memory
defeats the purpose of the persisted output feature.
2026-01-28 14:36:56 -07:00
Hannes Rudolph
2dcd3a187f fix: ensure lossless artifact storage and strict mode compatibility
- OutputInterceptor: Buffer ALL chunks before spilling to disk to preserve
  full content losslessly. Previously, the rolling tail buffer could drop
  middle content before the spill decision was made.

- read_command_output schema: Include all properties in 'required' array
  for OpenAI strict mode compliance. With strict: true, all properties
  must be listed in required (optional ones use null union types).
2026-01-28 14:36:56 -07:00
Hannes Rudolph
cf7472945d feat: update OutputInterceptor to use 50/50 head/tail split like Codex
- Replace single buffer with separate headBuffer and tailBuffer
- Each buffer gets 50% of the preview budget
- Head captures beginning of output, tail keeps rolling end
- Middle content is dropped when output exceeds threshold
- Preview shows: head + [omission indicator] + tail
- Add tests for head/tail split behavior

This approach ensures the LLM sees both:
- The beginning (command startup, environment info, early errors)
- The end (final results, exit codes, error summaries)
2026-01-28 14:36:56 -07:00
Hannes Rudolph
22346f0224 Delete Roo-EXTRACTION-terminal-shell-integration.md 2026-01-28 14:36:56 -07:00
Hannes Rudolph
d4e0305fcd Delete codex-extract-terminal-spawning-tool.md 2026-01-28 14:36:56 -07:00
Hannes Rudolph
af0f70a370 Delete claude-code.md 2026-01-28 14:36:55 -07:00
Hannes Rudolph
e60d6898df refactor: remove terminalOutputLineLimit and terminalOutputCharacterLimit settings
These settings were redundant with terminalOutputPreviewSize which controls
the preview shown to the LLM. The line/char limits were for UI truncation
which is now handled with hardcoded defaults (500 lines, 50K chars) since
they don't need to be user-configurable.

- Remove settings from packages/types schemas
- Remove DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT constant
- Update compressTerminalOutput() to use hardcoded limits
- Update ExecuteCommandTool to not pass limit parameters
- Update ClineProvider state handling
- Update webview context and settings
- Update tests to not use removed settings
2026-01-28 14:36:55 -07:00
Hannes Rudolph
47c3f496a0 feat(ui): add read_command_output activity indicator
Show read progress in chat when read_command_output tool is used:
- Display 'Roo read command output (0 B - 100 KB of 263.3 KB)'
- Shows the specific byte range being read each call
- Uses same visual style as read_file tool
- Add 'tool' to ClineSay types
- Add readCommandOutput to ClineSayTool with readStart/readEnd/totalBytes
2026-01-28 14:36:08 -07:00
Hannes Rudolph
cd1b9f43fd fix(parser): add read_command_output to NativeToolCallParser
chore: remove terminalCompressProgressBar setting

- Fix: Add missing read_command_output case to parser (was causing 'Invalid arguments' errors)
- Remove: Delete compress progress bar setting from all components (redundant with preview size control)
- Clean up: Remove from global-settings, OutputInterceptor, BaseTerminal, ExecuteCommandTool, SettingsView, TerminalSettings, ExtensionStateContext
- Clean up: Remove from all i18n locale files
2026-01-28 14:34:54 -07:00
Hannes Rudolph
980e616c54 fix: resolve CI failures for PR #10944
- Remove unused barrel file (src/integrations/terminal/index.ts) to fix knip check
- Fix Windows path test in OutputInterceptor.test.ts by using path.normalize()
- Add missing translations for terminal.outputPreviewSize settings to all 17 locales
2026-01-28 14:33:57 -07:00
Hannes Rudolph
525bf9f3ad fix: address PR review comments
- Read terminalOutputPreviewSize from providerState instead of hardcoded default
- Fix native tool schema to only require artifact_id (optional params no longer required)
- Fix Buffer allocation for line numbers using chunked 64KB reads to avoid memory blowup
2026-01-28 14:32:56 -07:00
Hannes Rudolph
0a70e046e7 feat: add read_command_output tool for retrieving truncated command output
Implements a new tool that allows the LLM to retrieve full command output
when execute_command produces output exceeding the preview threshold.

Key components:
- ReadCommandOutputTool: Reads persisted output with search/pagination
- OutputInterceptor: Intercepts and persists large command outputs to disk
- Terminal settings UI: Configuration for output interception behavior
- Type definitions for output interception settings

The tool supports:
- Reading full output beyond the truncated preview
- Search/filtering with regex patterns (like grep)
- Pagination through large outputs using offset/limit

Includes comprehensive tests for ReadCommandOutputTool and OutputInterceptor.
2026-01-28 14:32:55 -07:00
Hannes Rudolph
d7fa963b13
docs: clarify read_command_output search param should be omitted when not filtering (#11056) 2026-01-28 13:30:01 -07:00
roomote[bot]
8640fd1472
fix: calculate header percentage based on available input space (#11054)
Co-authored-by: Roo Code <roomote@roocode.com>
2026-01-28 15:29:34 -05:00
Daniel
fe722dad23
feat: add AI SDK dependencies and message conversion utilities (#11047) 2026-01-28 14:05:53 -05:00
Daniel
f5004ac40a
fix: prevent time-travel bug in parallel tool calling (#11046) 2026-01-28 13:25:02 -05:00
Hannes Rudolph
e7965d9b45
feat: lossless terminal output with on-demand retrieval (#10944) 2026-01-27 22:12:19 -07:00
roomote[bot]
a44842f16f
fix: include reserved output tokens in task header percentage calculation (#11034)
Co-authored-by: Roo Code <roomote@roocode.com>
2026-01-27 23:37:48 -05:00
github-actions[bot]
c6d0306550
Changeset version bump (#11037)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-27 23:05:16 -05:00
Matt Rubens
7632807021
Release v3.45.0 (#11036) 2026-01-27 22:59:23 -05:00
Hannes Rudolph
d748de6fae
feat(condense v2.1): add smart code folding (#10942)
* feat(condense): add smart code folding with tree-sitter signatures

At context condensation time, use tree-sitter to generate folded code
signatures (function definitions, class declarations) for files read
during the conversation. Each file is included as its own <system-reminder>
block in the condensed summary, preserving structural awareness without
consuming excessive tokens.

- Add getFilesReadByRoo() method to FileContextTracker
- Create generateFoldedFileContext() using tree-sitter parsing
- Update summarizeConversation() to accept array of file sections
- Each file gets its own content block in the summary message
- Add comprehensive test coverage (12 tests)

* fix: skip tree-sitter error strings in folded file context

- Add isTreeSitterErrorString helper to detect error messages
- Skip files that return error strings instead of embedding them
- Add test for error string handling

* refactor: move generateFoldedFileContext() inside summarizeConversation()

- Update summarizeConversation() to accept filesReadByRoo, cwd, rooIgnoreController instead of pre-generated sections
- Move folded file context generation inside summarizeConversation() (lines 319-339)
- Update ContextManagementOptions type and manageContext() to pass new parameters
- Remove generateFoldedFileContext from Task.ts imports - folding now handled internally
- Update all tests to use new parameter signature
- Reduces Task.ts complexity by moving folding logic to summarization module

* fix: prioritize most recently read files in folded context

Files are now sorted by roo_read_date descending before folded context
generation, so if the character budget runs out, the most relevant
(recently read) files are included and older files are skipped.

* refactor: improve code quality in condense module

- Convert summarizeConversation to use options object instead of 11 positional params
- Extract duplicated getFilesReadByRoo error handling into helper method
- Remove unnecessary re-export of generateFoldedFileContext
- Update all test files to use new options object pattern

* fix: address roomote feedback - batch error logging and early budget exit

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
2026-01-27 18:47:24 -05:00
github-actions[bot]
7607c684e9
Changeset version bump (#11027)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-27 15:52:37 -05:00
Matt Rubens
e9043723d3
Release v3.44.2 (#11025) 2026-01-27 15:43:20 -05:00
Daniel
17d3456e96
fix: remove duplicate tool_call emission from Responses API providers (#11008) 2026-01-27 13:33:15 -05:00
Daniel
b9cf163b87
fix: use relative paths in isPathInIgnoredDirectory to fix worktree indexing (#11009) 2026-01-27 12:43:47 -05:00
roomote[bot]
d6d00dedec
Fix local model validation error for Ollama models (#10893)
fix: prevent false validation error for local Ollama models

The validation logic was checking against an empty router models object
that was initialized but never populated for Ollama. This caused false
validation errors even when models existed locally.

Now only validates against router models if they actually contain data,
preventing the false error when using local Ollama models.

Fixes ROO-581

Co-authored-by: Roo Code <roomote@roocode.com>
2026-01-27 16:50:05 +00:00
Matt Rubens
dc5e765e9c
Revert "Revert "Enable parallel tool calling with new_task isolation safeguards"" (#11006) 2026-01-27 10:31:03 -05:00
github-actions[bot]
2078537201
Changeset version bump (#11005)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-27 10:28:20 -05:00
Matt Rubens
7b54a733e7
Release v3.44.1 (#11003) 2026-01-27 10:22:03 -05:00
Matt Rubens
5b3626f1a6
Revert "Enable parallel tool calling with new_task isolation safeguards" (#11004) 2026-01-27 10:20:12 -05:00
Seb Duerr
6e08ae4bfd
Add temperature=0.9 and top_p=0.95 to zai-glm-4.7 model (#10945)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-27 09:57:21 -05:00
MP
5100d15830
Add quality checks to marketing site deployment workflows (#10959)
Co-authored-by: cte <cestreich@gmail.com>
2026-01-27 00:56:30 -08:00
Daniel
2584504b9b
Enable parallel tool calling with new_task isolation safeguards (#10979)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
2026-01-27 00:26:49 -05:00
Daniel
f5d32e771a
Fix LiteLLM tool ID validation errors for Bedrock proxy (#10990) 2026-01-26 23:54:48 -05:00
github-actions[bot]
3edf71e29a
Changeset version bump (#10989)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-26 23:26:46 -05:00
Matt Rubens
826e6da416
chore: add changeset for v3.44.0 (#10987) 2026-01-26 23:19:13 -05:00
roomote[bot]
2391a0f065
fix: use --force by default when deleting worktrees (#10986)
Co-authored-by: Roo Code <roomote@roocode.com>
2026-01-26 23:10:23 -05:00
Hannes Rudolph
2f92cb7a8d
fix: prevent nested condensing from including previously-condensed content (#10985) 2026-01-26 22:34:04 -05:00