Fix option value extraction in prompt rendering

Options are objects with value and label fields. Updated exit_plan
rendering to use opt.value and opt.label instead of treating opt as
a string.
This commit is contained in:
Jared Miller 2026-01-28 13:02:57 -05:00
parent 419034255a
commit 17ba44182b
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -673,8 +673,8 @@
const optionsHtml = options.map((opt, idx) => ` const optionsHtml = options.map((opt, idx) => `
<label class="prompt-option" onclick="selectOption('${p.id}', ${idx})"> <label class="prompt-option" onclick="selectOption('${p.id}', ${idx})">
<input type="radio" name="prompt-${p.id}" value="${escapeHtml(opt)}"> <input type="radio" name="prompt-${p.id}" value="${escapeHtml(opt.value)}">
<span class="prompt-option-label">${escapeHtml(opt)}</span> <span class="prompt-option-label">${escapeHtml(opt.label)}</span>
</label> </label>
`).join(''); `).join('');