-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(terminal): disable VS Code terminal shell integration by default #8480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -731,7 +731,7 @@ export class ClineProvider | |
this.getState().then( | ||
({ | ||
terminalShellIntegrationTimeout = Terminal.defaultShellIntegrationTimeout, | ||
terminalShellIntegrationDisabled = false, | ||
terminalShellIntegrationDisabled = true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Default duplicated in multiple locations. The default true for terminalShellIntegrationDisabled is set here, in getStateToPostToWebview(), and in executeCommandTool (provider getState destructure and executeCommand param default). This scatters the source of truth and risks drift if one site changes. Consider introducing a single shared constant (e.g., DEFAULT_SHELL_INTEGRATION_DISABLED) in a common module and referencing it in all call sites to keep behavior consistent. |
||
terminalCommandDelay = 0, | ||
terminalZshClearEolMark = true, | ||
terminalZshOhMy = false, | ||
|
@@ -1885,7 +1885,7 @@ export class ClineProvider | |
terminalOutputLineLimit: terminalOutputLineLimit ?? 500, | ||
terminalOutputCharacterLimit: terminalOutputCharacterLimit ?? DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT, | ||
terminalShellIntegrationTimeout: terminalShellIntegrationTimeout ?? Terminal.defaultShellIntegrationTimeout, | ||
terminalShellIntegrationDisabled: terminalShellIntegrationDisabled ?? false, | ||
terminalShellIntegrationDisabled: terminalShellIntegrationDisabled ?? true, | ||
terminalCommandDelay: terminalCommandDelay ?? 0, | ||
terminalPowershellCounter: terminalPowershellCounter ?? false, | ||
terminalZshClearEolMark: terminalZshClearEolMark ?? true, | ||
|
@@ -2106,7 +2106,7 @@ export class ClineProvider | |
stateValues.terminalOutputCharacterLimit ?? DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT, | ||
terminalShellIntegrationTimeout: | ||
stateValues.terminalShellIntegrationTimeout ?? Terminal.defaultShellIntegrationTimeout, | ||
terminalShellIntegrationDisabled: stateValues.terminalShellIntegrationDisabled ?? false, | ||
terminalShellIntegrationDisabled: stateValues.terminalShellIntegrationDisabled ?? true, | ||
terminalCommandDelay: stateValues.terminalCommandDelay ?? 0, | ||
terminalPowershellCounter: stateValues.terminalPowershellCounter ?? false, | ||
terminalZshClearEolMark: stateValues.terminalZshClearEolMark ?? true, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] Same default hardcoded here as elsewhere. To avoid future divergence between webview state, provider initialization, and execution path selection (execa vs vscode), consider centralizing the default into a shared constant and importing it here.