Skip to content
Closed
Changes from all 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
50 changes: 22 additions & 28 deletions src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,35 +747,29 @@ export class ClineProvider

// Initialize out-of-scope variables that need to receive persistent
// global state values.
this.getState().then(
({
terminalShellIntegrationTimeout = Terminal.defaultShellIntegrationTimeout,
terminalShellIntegrationDisabled = false,
terminalCommandDelay = 0,
terminalZshClearEolMark = true,
terminalZshOhMy = false,
terminalZshP10k = false,
terminalPowershellCounter = false,
terminalZdotdir = false,
}) => {
Terminal.setShellIntegrationTimeout(terminalShellIntegrationTimeout)
Terminal.setShellIntegrationDisabled(terminalShellIntegrationDisabled)
Terminal.setCommandDelay(terminalCommandDelay)
Terminal.setTerminalZshClearEolMark(terminalZshClearEolMark)
Terminal.setTerminalZshOhMy(terminalZshOhMy)
Terminal.setTerminalZshP10k(terminalZshP10k)
Terminal.setPowershellCounter(terminalPowershellCounter)
Terminal.setTerminalZdotdir(terminalZdotdir)
},
)

this.getState().then(({ ttsEnabled }) => {
setTtsEnabled(ttsEnabled ?? false)
})
const {
terminalShellIntegrationTimeout = Terminal.defaultShellIntegrationTimeout,
terminalShellIntegrationDisabled = false,
terminalCommandDelay = 0,
terminalZshClearEolMark = true,
terminalZshOhMy = false,
terminalZshP10k = false,
terminalPowershellCounter = false,
terminalZdotdir = false,
ttsEnabled,
ttsSpeed,
} = await this.getState()

this.getState().then(({ ttsSpeed }) => {
setTtsSpeed(ttsSpeed ?? 1)
})
Terminal.setShellIntegrationTimeout(terminalShellIntegrationTimeout)
Terminal.setShellIntegrationDisabled(terminalShellIntegrationDisabled)
Terminal.setCommandDelay(terminalCommandDelay)
Terminal.setTerminalZshClearEolMark(terminalZshClearEolMark)
Terminal.setTerminalZshOhMy(terminalZshOhMy)
Terminal.setTerminalZshP10k(terminalZshP10k)
Terminal.setPowershellCounter(terminalPowershellCounter)
Terminal.setTerminalZdotdir(terminalZdotdir)
setTtsEnabled(ttsEnabled ?? false)
setTtsSpeed(ttsSpeed ?? 1)

// Set up webview options with proper resource roots
const resourceRoots = [this.contextProxy.extensionUri]
Expand Down