Skip to content

Commit 296ab11

Browse files
committed
docs: improve shell integration settings descriptions for clarity and usability
1 parent 0c378a8 commit 296ab11

File tree

1 file changed

+25
-33
lines changed

1 file changed

+25
-33
lines changed

docs/features/shell-integration.md

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,59 +43,51 @@ Maximum time to wait for shell integration to initialize before executing comman
4343
#### Terminal Command Delay
4444
<img src="/img/shell-integration/shell-integration-2.png" alt="Terminal command delay slider set to 0ms" width="600" />
4545

46-
Adds a delay after command execution to ensure full output capture. Implemented using `PROMPT_COMMAND='sleep N'` in bash/zsh or `start-sleep` in PowerShell. Originally a workaround for VSCode bug #237208, may not be needed on most systems. Default: 0ms (disabled).
46+
Adds a small pause after running commands to help Roo capture all output correctly. This is helpful if Roo seems to miss parts of command output or reacts before commands finish. Default: 0ms (disabled).
4747

4848
### Advanced Settings
4949

5050
#### PowerShell Counter Workaround
5151
<img src="/img/shell-integration/shell-integration-3.png" alt="PowerShell counter workaround checkbox" width="600" />
5252

53-
Appends a unique counter to PowerShell commands to prevent duplicate command issues. Enable this if PowerShell fails to execute identical consecutive commands.
53+
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.
5454

5555
#### Clear ZSH EOL Mark
5656
<img src="/img/shell-integration/shell-integration-4.png" alt="Clear ZSH EOL mark checkbox" width="600" />
5757

58-
Sets `PROMPT_EOL_MARK=""` to clear ZSH end-of-line marks, preventing issues with command output when output ends with special characters like '%'.
58+
Prevents ZSH from adding special characters at the end of output lines that can confuse Roo when reading terminal results.
5959

6060
#### Oh My Zsh Integration
6161
<img src="/img/shell-integration/shell-integration-5.png" alt="Enable Oh My Zsh integration checkbox" width="600" />
6262

63-
Sets `ITERM_SHELL_INTEGRATION_INSTALLED="Yes"` to enable proper integration with Oh My Zsh. Experimental feature for users of Oh My Zsh.
63+
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.
6464

6565
#### Powerlevel10k Integration
6666
<img src="/img/shell-integration/shell-integration-6.png" alt="Enable Powerlevel10k integration checkbox" width="600" />
6767

68-
Sets `POWERLEVEL9K_TERM_SHELL_INTEGRATION=true` to enable proper integration with the Powerlevel10k ZSH theme.
68+
Improves compatibility if you use the Powerlevel10k theme for ZSH. Turn this on if your fancy terminal prompt causes issues with Roo.
6969

7070
#### ZDOTDIR Handling
7171
<img src="/img/shell-integration/shell-integration-7.png" alt="Enable ZDOTDIR handling checkbox" width="600" />
7272

73-
Creates a temporary directory for ZDOTDIR to handle ZSH shell integration properly while preserving your ZSH configuration.
73+
Helps Roo work with custom ZSH configurations without interfering with your personal shell settings and customizations.
7474

7575
## How Shell Integration Works
7676

77-
Shell integration uses terminal sequences to mark different stages of command execution:
77+
Shell integration connects Roo to your terminal's command execution process in real-time:
7878

79-
1. **Activation**: When you open a terminal, your shell sends an activation sequence (`\x1b]633;A\x07`).
79+
1. **Connection**: When you open a terminal, VS Code establishes a special connection with your shell.
8080

81-
2. **Command Lifecycle**: VSCode tracks each command using Operating System Command (OSC) sequences:
82-
- OSC 633;A - Mark prompt start
83-
- OSC 633;B - Mark command start
84-
- OSC 633;C - Mark command executed
85-
- OSC 633;D - Mark command finished with exit code
86-
- OSC 633;E - Set command line
87-
- OSC 633;P - Set properties like current working directory
81+
2. **Command Tracking**: VS Code monitors your terminal activities by detecting:
82+
- When a new prompt appears
83+
- When you enter a command
84+
- When the command starts running
85+
- When the command finishes (and whether it succeeded or failed)
86+
- What directory you're currently in
8887

89-
3. **Shell-Specific Implementation**:
88+
3. **Different Shells, Same Result**: Each shell type (Bash, Zsh, PowerShell, Fish) implements this slightly differently behind the scenes, but they all provide the same functionality to Roo.
9089

91-
| Shell | Initial Activation | Command Start | Command Stop |
92-
|-------|-------------------|---------------|--------------|
93-
| Bash | `PROMPT_COMMAND` | `trap DEBUG` | `PROMPT_COMMAND` |
94-
| Zsh | `precmd` | `preexec` | `precmd` |
95-
| PowerShell | `prompt` function | `PSConsoleHostReadLine` | `prompt` function |
96-
| Fish | `fish_prompt` | `fish_preexec` | `fish_prompt` |
97-
98-
4. **Output Capture**: Roo Code captures command text, working directory, start/end times, exit codes, and output streams.
90+
4. **Information Gathering**: Roo can see what commands are running, where they're running, how long they take, whether they succeed, and their complete output - all without you having to copy and paste anything.
9991

10092
## Troubleshooting Shell Integration
10193

@@ -188,28 +180,28 @@ Visual indicators of active shell integration:
188180

189181
### Ctrl+C Behavior
190182

191-
**Issue**: If text is in the terminal when Roo runs a command, shell integration sends Ctrl+C first, breaking output capture.
183+
**Issue**: If text is already typed in the terminal when Roo tries to run a command, Roo will press Ctrl+C first to clear the line, which can interrupt running processes.
192184

193-
**Workaround**: Ensure terminal prompt is clean before letting Roo run commands.
185+
**Workaround**: Make sure your terminal prompt is empty (no partial commands typed) before asking Roo to execute terminal commands.
194186

195187
### Multi-line Command Issues
196188

197-
**Issue**: Multi-line commands produce unexpected behavior with phantom output from previous commands.
189+
**Issue**: Commands that span multiple lines can confuse Roo and may show output from previous commands mixed in with current output.
198190

199-
**Workaround**: Use command chaining with `&&` instead of multiple lines (e.g., `echo a && echo b`).
191+
**Workaround**: Instead of multi-line commands, use command chaining with `&&` to keep everything on one line (e.g., `echo a && echo b` instead of typing each command on a separate line).
200192

201193
### PowerShell-Specific Issues
202194

203-
1. **Output Buffering**: PowerShell may emit completion markers before output is fully processed.
204-
2. **Duplicate Commands**: PowerShell fails to execute identical consecutive commands.
195+
1. **Premature Completion**: PowerShell sometimes tells Roo a command is finished before all the output has been shown.
196+
2. **Repeated Commands**: PowerShell may refuse to run the same command twice in a row.
205197

206-
**Workaround**: Enable the "PowerShell counter workaround" setting and set a terminal command delay of 150ms.
198+
**Workaround**: Enable the "PowerShell counter workaround" setting and set a terminal command delay of 150ms in the settings to give commands more time to complete.
207199

208200
### Incomplete Terminal Output
209201

210-
**Issue**: VSCode may not capture complete command output.
202+
**Issue**: Sometimes VS Code doesn't show or capture all the output from a command.
211203

212-
**Workaround**: Close and reopen the terminal, then run the command again.
204+
**Workaround**: If you notice missing output, try closing and reopening the terminal tab, then run the command again. This refreshes the terminal connection.
213205

214206
## Troubleshooting Resources
215207

0 commit comments

Comments
 (0)