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:
parent
419034255a
commit
17ba44182b
1 changed files with 2 additions and 2 deletions
|
|
@ -673,8 +673,8 @@
|
|||
|
||||
const optionsHtml = options.map((opt, idx) => `
|
||||
<label class="prompt-option" onclick="selectOption('${p.id}', ${idx})">
|
||||
<input type="radio" name="prompt-${p.id}" value="${escapeHtml(opt)}">
|
||||
<span class="prompt-option-label">${escapeHtml(opt)}</span>
|
||||
<input type="radio" name="prompt-${p.id}" value="${escapeHtml(opt.value)}">
|
||||
<span class="prompt-option-label">${escapeHtml(opt.label)}</span>
|
||||
</label>
|
||||
`).join('');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue