Skip to content

Commit 6454604

Browse files
committed
Fix bug where initialPrompt was not sent
1 parent 41b6807 commit 6454604

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cli/src/hooks/use-chat-input.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ export const useChatInput = ({
7575
if (initialPrompt && !hasAutoSubmittedRef.current) {
7676
hasAutoSubmittedRef.current = true
7777

78-
const timeout = setTimeout(() => {
78+
setTimeout(() => {
7979
onSubmitPrompt(initialPrompt, agentMode)
8080
}, 100)
81-
82-
return () => clearTimeout(timeout)
8381
}
8482
return undefined
8583
}, [initialPrompt, agentMode, onSubmitPrompt])

0 commit comments

Comments
 (0)