Skip to content

Commit 4ac4571

Browse files
authored
handle clarify cancellation (#236)
1 parent 99b5767 commit 4ac4571

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

web/src/components/common/Clarification.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,15 @@ export const Clarification = () => {
7676
}
7777

7878
const handleCancel = () => {
79-
dispatch(toggleClarification({show: false, questions: []}))
79+
clarification.questions.forEach((_, index) => {
80+
// For each question from currentQuestionIndex, set the answer to "Figure it out"
81+
if (index >= currentQuestionIndex) {
82+
dispatch(setClarificationAnswer({
83+
questionIndex: index,
84+
answer: "Figure it out"
85+
}))
86+
}
87+
})
8088
}
8189

8290
return (

0 commit comments

Comments
 (0)