"use client" import * as React from "react" import { toast } from "sonner" import { NativeSelect, NativeSelectOption, } from "@/styles/base-nova/ui/native-select" import { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireItem, QuestionnaireSubmit, QuestionnaireTitle, } from "@/styles/base-nova/ui/questionnaire" const items = [ { choices: [{ value: "inspect" }, { value: "tests" }, { value: "patch" }], name: "action", required: true, }, ] as const type ShortcutMode = React.ComponentProps["shortcuts"] export function QuestionnaireShortcuts() { const [shortcuts, setShortcuts] = React.useState("letters") function handleSubmit(event: React.FormEvent) { event.preventDefault() const action = new FormData(event.currentTarget).get("action") toast("Next action selected", { description: `Action: ${action ?? "None"} ยท Shortcuts: ${shortcuts ?? "none"}`, }) } return (
{ const value = event.target.value setShortcuts( value === "letters" || value === "numbers" ? value : undefined ) }} > No shortcuts Letters Numbers What should the agent do next? Use the displayed shortcut or navigate with the keyboard. Inspect the implementation Run the relevant tests Prepare the patch Confirm action
) }