Skip to content

Commit 006fbcb

Browse files
Custom modes2 (#185)
* docs: Update custom modes documentation and add new interface image * docs: Update shell integration documentation with new settings and images
1 parent 18fddd4 commit 006fbcb

File tree

3 files changed

+35
-44
lines changed

3 files changed

+35
-44
lines changed

docs/features/shell-integration.md

Lines changed: 35 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Shell integration is automatically enabled in Roo Code and connects directly to
1414
- React intelligently to terminal output without user intervention
1515
- Stop running commands directly from the chat interface using the stop button that appears next to the command execution message.
1616

17-
<img src="/img/v3.15/v3.15.png" alt="Stop Command Button in Chat UI" width="600" />
17+
<img src="/img/v3.15/v3.15.png" alt="Stop Command Button in Chat UI" width="600" />
18+
1819
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.
1920

2021
## Troubleshooting Shell Integration
@@ -35,42 +36,19 @@ Roo Code includes a fallback mechanism to ensure commands can still run even if
3536
- **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).
3637
- **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.
3738

38-
<img src="/img/v3.15.0/v3.15.0.png" alt="Stop Command Button in Chat UI" width="600" />
39-
39+
<img src="/img/v3.15.0/v3.15.0.png" alt="Stop Command Button in Chat UI" width="600" />
4040

4141
Roo Code provides several settings to fine-tune shell integration. Access these in the Roo Code sidebar under Settings → Terminal.
4242

4343
### Basic Settings
4444

4545
#### Terminal Output Limit
4646
<img src="/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-
<img src="/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-
<img src="/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:
66-
* VSCode version
67-
* Shell customizations (oh-my-zsh, powerlevel10k, etc.)
68-
* Operating system and environment
69-
70-
#### Disable Terminal Shell Integration
71-
<img src="/img/shell-integration/shell-integration-9.png" alt="Disable terminal shell integration checkbox" width="600" />
47+
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.
7248

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+
<img src="/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.
7452

7553
### Advanced Settings
7654

@@ -85,30 +63,43 @@ Changes to advanced terminal settings only take effect after restarting your ter
8563
Always restart all open terminals after changing any of these settings.
8664
:::
8765

88-
#### PowerShell Counter Workaround
89-
<img src="/img/shell-integration/shell-integration-3.png" alt="PowerShell counter workaround checkbox" width="600" />
66+
#### Inherit environment variables
67+
<img src="/img/shell-integration/shell-integration-11.png" alt="Inherit environment variables checkbox" width="600" />
68+
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).
9069

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.
70+
#### Disable terminal shell integration
71+
<img src="/img/shell-integration/shell-integration-9.png" alt="Disable terminal shell integration checkbox" width="600" />
72+
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.
9273

93-
#### Clear ZSH EOL Mark
94-
<img src="/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):
9575

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+
<img src="/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).
9779

98-
#### Oh My Zsh Integration
99-
<img src="/img/shell-integration/shell-integration-5.png" alt="Enable Oh My Zsh integration checkbox" width="600" />
80+
##### b. Terminal command delay
81+
<img src="/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.
10083

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.
84+
##### c. Enable PowerShell counter workaround
85+
<img src="/img/shell-integration/shell-integration-3.png" alt="Enable PowerShell counter workaround checkbox" width="600" />
86+
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.
10287

103-
#### Powerlevel10k Integration
104-
<img src="/img/shell-integration/shell-integration-6.png" alt="Enable Powerlevel10k integration checkbox" width="600" />
88+
##### d. Clear ZSH EOL mark
89+
<img src="/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 '%'.
10591

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+
<img src="/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.
10795

108-
#### ZDOTDIR Handling
109-
<img src="/img/shell-integration/shell-integration-7.png" alt="Enable ZDOTDIR handling checkbox" width="600" />
96+
##### f. Enable Powerlevel10k integration
97+
<img src="/img/shell-integration/shell-integration-6.png" alt="Enable Powerlevel10k integration checkbox" width="600" />
98+
When enabled, sets `POWERLEVEL9K_TERM_SHELL_INTEGRATION=true` to enable Powerlevel10k shell integration features.
11099

111-
Helps Roo work with custom ZSH configurations without interfering with your personal shell settings and customizations.
100+
##### g. Enable ZDOTDIR handling
101+
<img src="/img/shell-integration/shell-integration-7.png" alt="Enable ZDOTDIR handling checkbox" width="600" />
102+
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.
112103

113104
## How Shell Integration Works
114105

49.3 KB
Loading
45 KB
Loading

0 commit comments

Comments
 (0)