diff --git a/src/activate/registerCommands.ts b/src/activate/registerCommands.ts index bd925b0e90..d1c7a347c2 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)