You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/shell-integration.md
+35-44Lines changed: 35 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ Shell integration is automatically enabled in Roo Code and connects directly to
14
14
- React intelligently to terminal output without user intervention
15
15
- Stop running commands directly from the chat interface using the stop button that appears next to the command execution message.
16
16
17
-
<imgsrc="/img/v3.15/v3.15.png"alt="Stop Command Button in Chat UI"width="600" />
17
+
<imgsrc="/img/v3.15/v3.15.png"alt="Stop Command Button in Chat UI"width="600" />
18
+
18
19
When you ask Roo to perform tasks like installing dependencies, starting a development server, or analyzing build errors, shell integration works behind the scenes to make these interactions smooth and effective.
19
20
20
21
## Troubleshooting Shell Integration
@@ -35,42 +36,19 @@ Roo Code includes a fallback mechanism to ensure commands can still run even if
35
36
-**Notification**: You'll see a notification in the chat if this fallback is used, indicating that the command is running without full shell integration features (like real-time output streaming or exit code detection might be limited).
36
37
-**Resolution**: The notification will include links to help you troubleshoot the underlying shell integration issue if you wish to restore full functionality. Often, following the steps in this document resolves the problem.
37
38
38
-
<imgsrc="/img/v3.15.0/v3.15.0.png"alt="Stop Command Button in Chat UI"width="600" />
39
-
39
+
<imgsrc="/img/v3.15.0/v3.15.0.png"alt="Stop Command Button in Chat UI"width="600" />
40
40
41
41
Roo Code provides several settings to fine-tune shell integration. Access these in the Roo Code sidebar under Settings → Terminal.
42
42
43
43
### Basic Settings
44
44
45
45
#### Terminal Output Limit
46
46
<imgsrc="/img/shell-integration/shell-integration.png"alt="Terminal output limit slider set to 500"width="600" />
47
-
Controls the maximum number of lines captured from terminal output. When exceeded, it keeps 20% of the beginning and 80% of the end with a truncation message in between. This prevents excessive token usage while maintaining context. Default: 500 lines.
48
-
Controls the maximum number of lines captured from terminal output. When exceeded, lines are removed from the middle to save tokens. Default: 500 lines.
49
-
50
-
#### Terminal Shell Integration Timeout
51
-
<imgsrc="/img/shell-integration/shell-integration-1.png"alt="Terminal shell integration timeout slider set to 15s"width="600" />
52
-
53
-
Maximum time to wait for shell integration to initialize before executing commands. Increase this value if you experience "Shell Integration Unavailable" errors. Default: 15 seconds.
54
-
55
-
#### Terminal Command Delay
56
-
<imgsrc="/img/shell-integration/shell-integration-2.png"alt="Terminal command delay slider set to 0ms"width="600" />
57
-
58
-
Adds a small pause after running commands to help Roo capture all output correctly. This setting can significantly impact shell integration reliability due to VSCode's implementation of terminal integration across different operating systems and shell configurations:
59
-
60
-
-**Default**: 0ms (as of Roo v3.11.13)
61
-
-**Common Values**:
62
-
* 0ms: Works best for some users with newer VSCode versions
63
-
* 50ms: Historical default, still effective for many users
64
-
* 150ms: Recommended for PowerShell users
65
-
-**Note**: Different values may work better depending on your:
Maximum number of lines to include in terminal output when executing commands. When exceeded lines will be removed from the middle, saving tokens. Default: 500 lines.
72
48
73
-
Enable this setting if terminal commands aren't working correctly or you encounter 'Shell Integration Unavailable' errors. When enabled, Roo Code uses a simpler, fallback method to execute commands, which bypasses some advanced terminal integration features but can improve reliability in problematic environments.
49
+
#### Compress progress bar output
50
+
<imgsrc="/img/shell-integration/shell-integration-10.png"alt="Compress progress bar output checkbox"width="600" />
51
+
When enabled, processes terminal output with carriage returns (\\r) to simulate how a real terminal would display content like progress bars. This removes intermediate progress bar states, retaining only the final state, which conserves context space for more relevant information.
74
52
75
53
### Advanced Settings
76
54
@@ -85,30 +63,43 @@ Changes to advanced terminal settings only take effect after restarting your ter
85
63
Always restart all open terminals after changing any of these settings.
When enabled, the terminal will inherit environment variables from VSCode's parent process, such as user-profile-defined shell integration settings. This directly toggles the VSCode global setting [`terminal.integrated.inheritEnv`](https://code.visualstudio.com/docs/editor/integrated-terminal#_inherit-environment-variables).
90
69
91
-
Helps PowerShell run the same command multiple times in a row. Enable this if you notice Roo can't run identical commands consecutively in PowerShell.
Enable this if terminal commands aren't working correctly or you see 'Shell Integration Unavailable' errors. This uses a simpler method to run commands, bypassing some advanced terminal features.
92
73
93
-
#### Clear ZSH EOL Mark
94
-
<imgsrc="/img/shell-integration/shell-integration-4.png"alt="Clear ZSH EOL mark checkbox"width="600" />
74
+
The following settings are applicable when "Disable terminal shell integration" is **unchecked** (i.e., shell integration is enabled):
95
75
96
-
Prevents ZSH from adding special characters at the end of output lines that can confuse Roo when reading terminal results.
76
+
##### a. Terminal shell integration timeout
77
+
<imgsrc="/img/shell-integration/shell-integration-1.png"alt="Terminal shell integration timeout slider set to 15s"width="600" />
78
+
Maximum time to wait for shell integration to initialize before executing commands. For users with long shell startup times, this value may need to be increased if you see 'Shell Integration Unavailable' errors in the terminal. Default: 15s (as shown in UI).
97
79
98
-
#### Oh My Zsh Integration
99
-
<imgsrc="/img/shell-integration/shell-integration-5.png"alt="Enable Oh My Zsh integration checkbox"width="600" />
80
+
##### b. Terminal command delay
81
+
<imgsrc="/img/shell-integration/shell-integration-2.png"alt="Terminal command delay slider set to 0ms"width="600" />
82
+
Delay in milliseconds to add after command execution. The default setting of 0 disables the delay completely. This can help ensure command output is fully captured in terminals with timing issues. In most terminals, it is implemented by setting `PROMPT_COMMAND='sleep N'` and Powershell appends `start-sleep` to the end of each command. Originally was workaround for VSCode bug [#237208](https://github.com/microsoft/vscode/issues/237208) and may not be needed. Default: 0ms.
100
83
101
-
Makes Roo work better with the popular Oh My Zsh shell customization framework. Turn this on if you use Oh My Zsh and experience terminal issues.
When enabled, adds a counter to PowerShell commands to ensure proper command execution. This helps with PowerShell terminals that might have issues with command output capture.
<imgsrc="/img/shell-integration/shell-integration-4.png"alt="Clear ZSH EOL mark checkbox"width="600" />
90
+
When enabled, clears the ZSH end-of-line mark by setting `PROMPT_EOL_MARK=''`. This prevents issues with command output interpretation when output ends with special characters like '%'.
105
91
106
-
Improves compatibility if you use the Powerlevel10k theme for ZSH. Turn this on if your fancy terminal prompt causes issues with Roo.
92
+
##### e. Enable Oh My Zsh integration
93
+
<imgsrc="/img/shell-integration/shell-integration-5.png"alt="Enable Oh My Zsh integration checkbox"width="600" />
94
+
When enabled, sets `ITERM_SHELL_INTEGRATION_INSTALLED=Yes` to enable Oh My Zsh shell integration features. Applying this setting might require restarting the IDE.
When enabled, creates a temporary directory for ZDOTDIR to handle zsh shell integration properly. This ensures VSCode shell integration works correctly with zsh while preserving your zsh configuration.
0 commit comments