>((acc, question, index) => {
+ if (freeText.trim()) {
+ acc[question.question] = freeText.trim()
+ } else if (selections[index]) {
+ acc[question.question] = selections[index]!
+ }
+ return acc
+ }, {})
+
+ setHasSubmitted(true)
+ respondToPermission(activeTabId, pendingRequest.requestId, true, {
+ updatedInput: {
+ ...inputObject,
+ answers,
+ },
+ })
}
// All questions must be answered (via selection or free text) to enable submit
@@ -241,7 +279,7 @@ export function AskUserQuestion({ toolUseId: _toolUseId, input }: Props) {
check_circle
- {t('question.answeredPrefix')}{freeText.trim() || Object.values(selections).join(', ')}
+ {t('question.answeredPrefix')}{answeredText}
)}
@@ -253,7 +291,7 @@ export function AskUserQuestion({ toolUseId: _toolUseId, input }: Props) {