From ae35beff4d1e8e8c36e3dea49444725e76e3a8d4 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 11 Jul 2026 20:32:38 -0500 Subject: [PATCH] refac --- .../lib/components/chat/AskUserCard.svelte | 154 +++++++++--------- 1 file changed, 78 insertions(+), 76 deletions(-) diff --git a/cptr/frontend/src/lib/components/chat/AskUserCard.svelte b/cptr/frontend/src/lib/components/chat/AskUserCard.svelte index 2d67ffe..1976250 100644 --- a/cptr/frontend/src/lib/components/chat/AskUserCard.svelte +++ b/cptr/frontend/src/lib/components/chat/AskUserCard.svelte @@ -86,102 +86,104 @@
{#if question} -
-
-
- {question.header} + {#key question.id} +
+
+
+ {question.header} +
+
+ {question.question} +
-
- {question.question} -
-
- {#if pending} -
- {#each question.options || [] as option, optionIndex} + {#if pending} +
+ {#each question.options || [] as option, optionIndex} + + {/each} - {/each} - - {#if selections[question.id] === '__other__'} - - (otherAnswers = { ...otherAnswers, [question.id]: event.currentTarget.value })} - /> - {/if} -
- {:else} -
- {resolved.answers?.[question.id]?.answers?.join(', ') || 'No answer recorded'} -
- {/if} -
+ {#if selections[question.id] === '__other__'} + + (otherAnswers = { ...otherAnswers, [question.id]: event.currentTarget.value })} + /> + {/if} +
+ {:else} +
+ {resolved.answers?.[question.id]?.answers?.join(', ') || 'No answer recorded'} +
+ {/if} +
+ {/key} {/if}