-
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?
Conversation
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.
Self-review initiated: evaluating my own defaults like a recursive function waiting for a base case.
({ | ||
terminalShellIntegrationTimeout = Terminal.defaultShellIntegrationTimeout, | ||
terminalShellIntegrationDisabled = false, | ||
terminalShellIntegrationDisabled = 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.
[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.
terminalOutputCharacterLimit = DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT, | ||
terminalShellIntegrationDisabled = false, | ||
terminalShellIntegrationDisabled = true, | ||
} = providerState ?? {} |
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.
Hi :) Can anyone summarize the rationale for this change? I don't object or anything, just curious. Cheers! |
Set terminal shell integration disabled by default across the extension.\n\nChanges:\n- Default tool state routes commands via execa unless explicitly enabled in settings (see src/core/tools/executeCommandTool.ts, TypeScript.executeCommand()).\n- Provider initializes Terminal with disabled-by-default (see src/core/webview/ClineProvider.ts).\n- Webview-posted state defaults to disabled when unset (see src/core/webview/ClineProvider.ts, TypeScript.getState()).\n\nNotes:\n- Existing users with an explicit setting are respected.\n- All tests pass locally.
Important
Default terminal shell integration is now disabled, routing commands via
execa
unless explicitly enabled, affecting command execution and webview state initialization.execa
unless explicitly enabled in settings (executeCommandTool()
andexecuteCommand()
inexecuteCommandTool.ts
).ClineProvider
initializes terminal with shell integration disabled by default (ClineProvider.ts
).ClineProvider.ts
).This description was created by
for e74c3a5. You can customize this summary. It will automatically update as commits are pushed.