diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index fc15a8dd5c..54b5c42348 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -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]