@@ -73,11 +73,15 @@ function setUserInputDraftOption(
7373 ...current ,
7474 [ requestKey ] : {
7575 ...current [ requestKey ] ,
76- [ question . id ] : togglePendingUserInputOptionSelection (
77- question ,
78- seededDraft ( current [ requestKey ] , question ) ,
79- value ,
80- ) ,
76+ [ question . id ] : {
77+ ...togglePendingUserInputOptionSelection (
78+ question ,
79+ seededDraft ( current [ requestKey ] , question ) ,
80+ value ,
81+ ) ,
82+ customAnswerResetVersion :
83+ ( current [ requestKey ] ?. [ question . id ] ?. customAnswerResetVersion ?? 0 ) + 1 ,
84+ } ,
8185 } ,
8286 } ) ;
8387}
@@ -92,11 +96,14 @@ function setUserInputDraftCustomAnswer(
9296 ...current ,
9397 [ requestKey ] : {
9498 ...current [ requestKey ] ,
95- [ question . id ] : setPendingUserInputCustomAnswer (
96- question ,
97- seededDraft ( current [ requestKey ] , question ) ,
98- customAnswer ,
99- ) ,
99+ [ question . id ] : {
100+ ...setPendingUserInputCustomAnswer (
101+ question ,
102+ seededDraft ( current [ requestKey ] , question ) ,
103+ customAnswer ,
104+ ) ,
105+ customAnswerResetVersion : current [ requestKey ] ?. [ question . id ] ?. customAnswerResetVersion ?? 0 ,
106+ } ,
100107 } ,
101108 } ) ;
102109}
@@ -198,7 +205,7 @@ export function useSelectedThreadRequests() {
198205 const preparationCounts = useAtomValue ( questionAttachmentPreparationAtom ) ;
199206 const uploadStates = useAtomValue ( composerAttachmentUploadsAtom ) ;
200207 // Suggested answers are shown until the user edits them; only edits are stored.
201- const activePendingUserInputAnswerDrafts =
208+ const activePendingUserInputAnswerDrafts : Record < string , PendingUserInputDraftAnswer > =
202209 activePendingUserInput && selectedThreadShell
203210 ? seedUserInputDraftAnswers (
204211 activePendingUserInput . questions ,
0 commit comments