Skip to content

Commit 0f054a7

Browse files
committed
feat: focus chat input when clicking plus button in extension menu
- Added focusInput action after chatButtonClicked in plusButtonClicked handler - This ensures the text area in ChatView gets focused when users click the + button - Improves user experience by allowing immediate typing after creating new chat
1 parent 1d714c8 commit 0f054a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/activate/registerCommands.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
9797
await visibleProvider.removeClineFromStack()
9898
await visibleProvider.postStateToWebview()
9999
await visibleProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" })
100+
101+
// Focus the input after a short delay to ensure the view has switched
102+
setTimeout(() => {
103+
visibleProvider.postMessageToWebview({ type: "action", action: "focusInput" })
104+
}, 100)
100105
},
101106
mcpButtonClicked: () => {
102107
const visibleProvider = getVisibleProviderOrLog(outputChannel)

0 commit comments

Comments
 (0)