Question

Pause an agent conversation for one structured answer, then return control to the prompt composer.

How should I structure the authentication work?

I found two viable approaches. Choose one so I can continue with the implementation.

Waiting for an answer

Installation

Copy the command below and run it in your terminal.

bunx --package @sivir-ui/svelte sivir add question

Usage

Render Question.Root in the same layout slot as PromptComposer.Root. Keep the prompt value in their shared parent so swapping the forms never clears an unsent draft.

import * as Question from '@sivir-ui/svelte/components/question';
import type { QuestionAnswer } from '@sivir-ui/svelte/components/question';

let answer = $state<QuestionAnswer>();

<Question.Root bind:value={answer} onSubmit={(value) => continueAgent(value)}>
  <Question.Title>Which environment should I use?</Question.Title>
  <Question.Description>Your prompt draft remains untouched.</Question.Description>
  <Question.Options>
    <Question.Option value="preview" label="Preview" />
    <Question.Option value="production" label="Production" />
  </Question.Options>
  <Question.Actions>
    <Question.Cancel onclick={() => skipQuestion()}>Skip question</Question.Cancel>
    <Question.Submit />
  </Question.Actions>
</Question.Root>

Use type="single" for one option, type="multiple" for several, or type="text" with Question.Input. Async submit handlers are awaited and cannot run twice while unresolved. Changing type resets the bound answer to the new mode's empty value.

Examples

Collect multiple selections or place the question directly beneath a live transcript.

Multiple choice

Which checks should I run before opening the pull request?

Select every check you want included.

No checks queued

Free text

What constraint should I preserve?

Add any implementation detail that is not captured by the current plan.

Waiting for an answer

Conversation takeover

Answer or skip the question to restore the composer with its draft intact.

Add the account migration and keep the rollout safe. I started a follow-up in the composer.
I can continue after I know which environment should receive the first run.

Where should I run the migration first?

Your unsent composer draft will stay in place while you answer.

Anatomy

Question.Root - Manages answer state and submission.

Question.Title - Labels the question fieldset.

Question.Description - Adds context for the decision.

Question.Options - Groups structured answer choices.

Question.Option - Defines one answer choice.

Question.Input - Accepts a free-text answer.

Question.Actions - Groups question actions.

Question.Cancel - Skips or defers the question.

Question.Submit - Submits the current answer.