Skip to content

Commit 5cf95e3

Browse files
committed
tune UX when click new task
1 parent cfc3cb6 commit 5cf95e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
421421
case "completion_result":
422422
case "resume_completed_task":
423423
// extension waiting for feedback. but we can just present a new task button
424+
if (inputValue.trim() !== "") {
425+
vscode.postMessage({ type: "newTask", text: inputValue })
426+
setInputValue("")
427+
break
428+
}
424429
startNewTask()
425430
break
426431
}
@@ -430,7 +435,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
430435
disableAutoScrollRef.current = false
431436
setPromptSuggest([])
432437
},
433-
[clineAsk, startNewTask],
438+
[clineAsk, inputValue, startNewTask],
434439
)
435440

436441
const handleSecondaryButtonClick = useCallback(

0 commit comments

Comments
 (0)