Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/tools/executeCommandTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function executeCommandTool(
const {
terminalOutputLineLimit = 500,
terminalOutputCharacterLimit = DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
terminalShellIntegrationDisabled = false,
terminalShellIntegrationDisabled = true,
} = providerState ?? {}

// Get command execution timeout from VSCode configuration (in seconds)
Expand Down Expand Up @@ -149,7 +149,7 @@ export async function executeCommand(
executionId,
command,
customCwd,
terminalShellIntegrationDisabled = false,
terminalShellIntegrationDisabled = true,
terminalOutputLineLimit = 500,
terminalOutputCharacterLimit = DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
commandExecutionTimeout = 0,
Expand Down
58 changes: 29 additions & 29 deletions webview-ui/src/components/settings/TerminalSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,35 +201,7 @@ export const TerminalSettings = ({
<div className="flex flex-col gap-3 pl-3 border-l-2 border-vscode-button-background">
<div>
<VSCodeCheckbox
checked={inheritEnv}
onChange={(e: any) => {
setInheritEnv(e.target.checked)
vscode.postMessage({
type: "updateVSCodeSetting",
setting: "terminal.integrated.inheritEnv",
value: e.target.checked,
})
}}
data-testid="terminal-inherit-env-checkbox">
<span className="font-medium">{t("settings:terminal.inheritEnv.label")}</span>
</VSCodeCheckbox>
<div className="text-vscode-descriptionForeground text-sm mt-1">
<Trans i18nKey="settings:terminal.inheritEnv.description">
<VSCodeLink
href={buildDocLink(
"features/shell-integration#inherit-environment-variables",
"settings_terminal_inherit_env",
)}
style={{ display: "inline" }}>
{" "}
</VSCodeLink>
</Trans>
</div>
</div>

<div>
<VSCodeCheckbox
checked={terminalShellIntegrationDisabled ?? false}
checked={terminalShellIntegrationDisabled ?? true}
onChange={(e: any) =>
setCachedStateField("terminalShellIntegrationDisabled", e.target.checked)
}>
Expand All @@ -253,6 +225,34 @@ export const TerminalSettings = ({

{!terminalShellIntegrationDisabled && (
<>
<div>
<VSCodeCheckbox
checked={inheritEnv}
onChange={(e: any) => {
setInheritEnv(e.target.checked)
vscode.postMessage({
type: "updateVSCodeSetting",
setting: "terminal.integrated.inheritEnv",
value: e.target.checked,
})
}}
data-testid="terminal-inherit-env-checkbox">
<span className="font-medium">{t("settings:terminal.inheritEnv.label")}</span>
</VSCodeCheckbox>
<div className="text-vscode-descriptionForeground text-sm mt-1">
<Trans i18nKey="settings:terminal.inheritEnv.description">
<VSCodeLink
href={buildDocLink(
"features/shell-integration#inherit-environment-variables",
"settings_terminal_inherit_env",
)}
style={{ display: "inline" }}>
{" "}
</VSCodeLink>
</Trans>
</div>
</div>

<div>
<label className="block font-medium mb-1">
{t("settings:terminal.shellIntegrationTimeout.label")}
Expand Down
28 changes: 14 additions & 14 deletions webview-ui/src/i18n/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -619,55 +619,55 @@
},
"advanced": {
"label": "Terminal Settings: Advanced",
"description": "The following options may require a terminal restart to apply the setting."
"description": "These settings apply only when 'Use Inline Terminal' is disabled."
},
"outputLineLimit": {
"label": "Terminal output limit",
"description": "Maximum number of lines to include in terminal output when executing commands. When exceeded lines will be removed from the middle, saving tokens. <0>Learn more</0>"
"description": "Keeps the first and last lines and drops the middle to stay under the limit. Lower to save tokens; raise to give Roo more middle detail. Roo sees a placeholder where the content is skipped.<0>Learn more</0>"
},
"outputCharacterLimit": {
"label": "Terminal character limit",
"description": "Maximum number of characters to include in terminal output when executing commands. This limit takes precedence over the line limit to prevent memory issues from extremely long lines. When exceeded, output will be truncated. <0>Learn more</0>"
"description": "Overrides the line limit to prevent memory issues by enforcing a hard cap on output size. If exceeded, keeps the beginning and end and shows a placeholder to Roo where content is skipped. <0>Learn more</0>"
},
"shellIntegrationTimeout": {
"label": "Terminal shell integration timeout",
"description": "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. <0>Learn more</0>"
"description": "How long to wait for VS Code shell integration before running commands. Raise if your shell starts slowly or you see 'Shell Integration Unavailable' errors. <0>Learn more</0>"
},
"shellIntegrationDisabled": {
"label": "Disable terminal shell integration",
"description": "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. <0>Learn more</0>"
"label": "Use Inline Terminal (recommended)",
"description": "Run commands in the Inline Terminal (chat) to bypass shell profiles/integration for faster, more reliable runs. When disabled Roo uses the VS Code terminal with your shell profile, prompts, and plugins. <0>Learn more</0>"
},
"commandDelay": {
"label": "Terminal command delay",
"description": "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 and may not be needed. <0>Learn more</0>"
"description": "Adds a short pause after each command so the VS Code terminal can flush all output (bash/zsh: PROMPT_COMMAND sleep; PowerShell: start-sleep). Use only if you see missing tail output; otherwise leave at 0. VS Code terminal only. <0>Learn more</0>"
},
"compressProgressBar": {
"label": "Compress progress bar output",
"description": "When enabled, processes terminal output with carriage returns (\\r) to simulate how a real terminal would display content. This removes intermediate progress bar states, retaining only the final state, which conserves context space for more relevant information. <0>Learn more</0>"
"description": "Collapses progress bars/spinners so only the final state is kept (saves tokens). <0>Learn more</0>"
},
"powershellCounter": {
"label": "Enable PowerShell counter workaround",
"description": "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. <0>Learn more</0>"
"description": "Turn this on when PowerShell output is missing or duplicated; it appends a tiny counter to each command to stabilize output. Keep this off if output already looks correct. <0>Learn more</0>"
},
"zshClearEolMark": {
"label": "Clear ZSH EOL mark",
"description": "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 '%'. <0>Learn more</0>"
"description": "Turn this on when you see stray % at the end of lines or parsing looks wrong; it omits Zsh’s end‑of‑line mark (%). <0>Learn more</0>"
},
"zshOhMy": {
"label": "Enable Oh My Zsh integration",
"description": "When enabled, sets ITERM_SHELL_INTEGRATION_INSTALLED=Yes to enable Oh My Zsh shell integration features. Applying this setting might require restarting the IDE. <0>Learn more</0>"
"description": "Turn this on when your Oh My Zsh theme/plugins expect shell integration; it sets ITERM_SHELL_INTEGRATION_INSTALLED=Yes. Turn this off to avoid setting that variable. VS Code terminal (zsh) only. May require restarting the IDE. <0>Learn more</0>"
},
"zshP10k": {
"label": "Enable Powerlevel10k integration",
"description": "When enabled, sets POWERLEVEL9K_TERM_SHELL_INTEGRATION=true to enable Powerlevel10k shell integration features. <0>Learn more</0>"
"description": "Turn this on when using Powerlevel10k shell integration. <0>Learn more</0>"
},
"zdotdir": {
"label": "Enable ZDOTDIR handling",
"description": "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>Learn more</0>"
"description": "Turn this on when zsh shell integration fails or conflicts with your dotfiles. <0>Learn more</0>"
},
"inheritEnv": {
"label": "Inherit environment variables",
"description": "When enabled, the terminal will inherit environment variables from VSCode's parent process, such as user-profile-defined shell integration settings. This directly toggles VSCode global setting `terminal.integrated.inheritEnv`. <0>Learn more</0>"
"description": "Turn this on to inherit environment variables from the parent VS Code process.<0>Learn more</0>"
}
},
"advancedSettings": {
Expand Down