{text}
; +} + +const stepIcons = { running: "…", waiting: "?", done: "✓", error: "✗" }; + +export function Step({ label, status }: StepProps) { + return{stepIcons[status]} {label}
; +} + +export function Choice({ questions, answer, decline }: ChoiceQuestion) { + // One list of picked labels per question, in the same order as `questions`. + const [picked, setPicked] = useState{q.text}
+ {q.description &&{q.description}
} +Allow {action}?
+ {reason &&{reason}
} ++ {error.message} +
+ ); + } + return{phaseText[phase]}
; +} + +// The same parts, grouped the way{text}
; +} + +function Step({ label, status }: StepProps) { + return{label}
; +} + +function Choice({ questions, answer, decline }: ChoiceQuestion) { + const name = useId(); + const [picked, setPicked] = useStateAllow {action}?
+ {reason &&{reason}
} + + +{action} is waiting for you.
+ +{item.text}
+ * {item.steps.map((step) => {step.label})} + * {item.question?.kind === "approval" && ( + * + * )} + *{chat.error.message}
} + * + * > + * ); + * ``` + */ +export function useBase44Chat({ appId, server, onAppCreated }: Base44ChatOptions): Base44Chat { + const [messages, setMessages] = useState