Skip to content

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Oct 3, 2025

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.

  • Behavior:
    • Default terminal shell integration is now disabled, routing commands via execa unless explicitly enabled in settings (executeCommandTool() and executeCommand() in executeCommandTool.ts).
    • ClineProvider initializes terminal with shell integration disabled by default (ClineProvider.ts).
    • Webview state defaults to shell integration disabled when unset (ClineProvider.ts).
  • Notes:
    • Existing user settings that explicitly enable shell integration are respected.
    • All tests pass locally.

This description was created by Ellipsis for e74c3a5. You can customize this summary. It will automatically update as commits are pushed.

@roomote roomote bot requested review from mrubens, cte and jr as code owners October 3, 2025 03:22
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Oct 3, 2025
Copy link
Author

@roomote roomote bot left a 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,
Copy link
Author

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 ?? {}
Copy link
Author

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.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 3, 2025
@dreness
Copy link

dreness commented Oct 3, 2025

Hi :) Can anyone summarize the rationale for this change? I don't object or anything, just curious. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

3 participants