diff --git a/src/activate/registerCommands.ts b/src/activate/registerCommands.ts index 2f8212ffa0..0534f24782 100644 --- a/src/activate/registerCommands.ts +++ b/src/activate/registerCommands.ts @@ -97,6 +97,9 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt await visibleProvider.removeClineFromStack() await visibleProvider.postStateToWebview() await visibleProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" }) + // Send focusInput action immediately after chatButtonClicked + // This ensures the focus happens after the view has switched + await visibleProvider.postMessageToWebview({ type: "action", action: "focusInput" }) }, mcpButtonClicked: () => { const visibleProvider = getVisibleProviderOrLog(outputChannel)