feat(ask): add question and option notes

This commit is contained in:
Erik Kotsiuba
2026-04-17 16:50:53 +02:00
parent 52dfc4f9a6
commit 16ff8c42e2
7 changed files with 718 additions and 57 deletions
+26
View File
@@ -151,10 +151,36 @@ The current prototype supports:
- single-select questions
- multi-select questions
- preview questions with a dedicated preview pane
- free-form answers via `Type your own`
- per-question notes via `Ctrl+N`
- per-option notes via `N`
- full inline rendering of saved notes
- number-key quick selection
- final submit/review page
- transcript rendering for call/result rows
### Result shape notes
The returned `details.answers[questionId]` object may include:
```ts
{
values: string[]
labels: string[]
customText?: string
note?: string // question-level note
optionNotes?: Record<string, string> // selected options only
}
```
Behavior:
- question-level notes are submitted whenever authored
- option notes can be authored for any active option during the UI flow
- only notes for currently selected options are included in the submitted result
- deselecting an option keeps its note in UI state, so re-selecting it restores the note
- empty note text clears the note
## Example agent instruction
You can give the agent an instruction like this to encourage proper `ask_user` usage: