eve 0.74.0 → 0.75.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/src/channel/auth/result.d.ts +4 -0
  3. package/dist/src/channel/auth/result.js +1 -0
  4. package/dist/src/channel/types.d.ts +14 -2
  5. package/dist/src/chunks/{use-eve-agent-mP0M7SrL.js → use-eve-agent-B2Kne9z6.js} +7 -2
  6. package/dist/src/chunks/{use-eve-agent-DOOXadF0.js → use-eve-agent-DK_T88EP.js} +7 -2
  7. package/dist/src/cli/commands/deploy.js +1 -1
  8. package/dist/src/cli/commands/integration-connect.d.ts +2 -0
  9. package/dist/src/cli/commands/integration-connect.js +1 -1
  10. package/dist/src/cli/commands/integration-setup.js +1 -1
  11. package/dist/src/cli/commands/link.d.ts +2 -1
  12. package/dist/src/cli/commands/link.js +1 -1
  13. package/dist/src/cli/commands/registry-declared-setups.d.ts +19 -0
  14. package/dist/src/cli/commands/registry-declared-setups.js +1 -1
  15. package/dist/src/cli/commands/registry-recovery.d.ts +3 -1
  16. package/dist/src/cli/commands/registry-recovery.js +1 -1
  17. package/dist/src/cli/commands/registry.d.ts +12 -4
  18. package/dist/src/cli/commands/registry.js +1 -1
  19. package/dist/src/cli/commands/vercel-non-interactive.d.ts +6 -4
  20. package/dist/src/cli/commands/vercel-non-interactive.js +1 -1
  21. package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
  22. package/dist/src/cli/dev/tui/setup-commands.d.ts +2 -0
  23. package/dist/src/cli/dev/tui/setup-commands.js +2 -2
  24. package/dist/src/client/index.d.ts +1 -0
  25. package/dist/src/client/session.d.ts +1 -1
  26. package/dist/src/client/session.js +1 -1
  27. package/dist/src/client/sessions.d.ts +1 -1
  28. package/dist/src/client/types.d.ts +6 -0
  29. package/dist/src/compiled/.vendor-stamp.json +8 -8
  30. package/dist/src/compiled/@eve/catalog/index.js +1 -1
  31. package/dist/src/compiled/@workflow/core/global.d.ts +10 -0
  32. package/dist/src/compiled/@workflow/core/index.js +1 -1
  33. package/dist/src/compiled/@workflow/core/private.d.ts +11 -0
  34. package/dist/src/compiled/@workflow/core/private.js +1 -1
  35. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +36 -8
  36. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  37. package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +10 -6
  38. package/dist/src/compiled/@workflow/core/runtime/out-of-band-observation.d.ts +159 -0
  39. package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +28 -4
  40. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  41. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  42. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  43. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  44. package/dist/src/compiled/@workflow/world-local/index.js +5 -5
  45. package/dist/src/compiled/@workflow/world-vercel/index.js +4 -4
  46. package/dist/src/compiled/_chunks/workflow/{attribute-changes-CSqvJx6j.js → attribute-changes-BW-kbMMn.js} +1 -1
  47. package/dist/src/compiled/_chunks/workflow/dist-CyBgVS7g.js +1 -0
  48. package/dist/src/compiled/_chunks/workflow/{helpers-BXCuoPUb.js → helpers-DlLD3ov_.js} +1 -1
  49. package/dist/src/compiled/_chunks/workflow/private-tQUuwBoQ.js +1 -0
  50. package/dist/src/compiled/_chunks/workflow/{resume-hook-CvENCrxc.js → resume-hook-DMsV_b4n.js} +1 -1
  51. package/dist/src/compiled/_chunks/workflow/{run-8pLWuR2U.js → run-DzdAqdb1.js} +1 -1
  52. package/dist/src/compiled/_chunks/workflow/{serialization-vDozzDhh.js → serialization-DPdYS_w2.js} +2 -2
  53. package/dist/src/compiled/_chunks/workflow/sleep-BY6leHh8.js +1 -0
  54. package/dist/src/compiled/_chunks/workflow/{token-BKeK6DmC.js → token-D5ugC3PI.js} +1 -1
  55. package/dist/src/compiled/_chunks/workflow/{token-util-CddTZ_ef.js → token-util-Bla5Z0G9.js} +1 -1
  56. package/dist/src/compiled/_chunks/workflow/undici-D-ILjOKD.js +95 -0
  57. package/dist/src/compiled/_chunks/workflow/{wait-until-A344L2AG.js → wait-until-xbRRDuUf.js} +1 -1
  58. package/dist/src/compiler/extension-compatibility.d.ts +18 -12
  59. package/dist/src/compiler/extension-compatibility.js +1 -1
  60. package/dist/src/context/dynamic-connection-lifecycle.d.ts +6 -0
  61. package/dist/src/context/dynamic-connection-lifecycle.js +1 -1
  62. package/dist/src/context/keys.d.ts +4 -1
  63. package/dist/src/context/keys.js +1 -1
  64. package/dist/src/context/providers/sandbox.js +1 -1
  65. package/dist/src/context/providers/tool-stubs-key.d.ts +8 -0
  66. package/dist/src/context/providers/tool-stubs-key.js +1 -0
  67. package/dist/src/context/providers/tool-stubs.d.ts +10 -0
  68. package/dist/src/context/providers/tool-stubs.js +1 -0
  69. package/dist/src/context/run-step.js +1 -1
  70. package/dist/src/evals/index.d.ts +1 -0
  71. package/dist/src/evals/runner/execute-task.js +1 -1
  72. package/dist/src/evals/session-manager.d.ts +2 -0
  73. package/dist/src/evals/session-manager.js +1 -1
  74. package/dist/src/eve-channel/create-request.d.ts +2 -0
  75. package/dist/src/eve-channel/index.js +1 -1
  76. package/dist/src/eve-channel/request.js +1 -1
  77. package/dist/src/execution/agent-sessions/context.d.ts +2 -0
  78. package/dist/src/execution/agent-sessions/context.js +1 -1
  79. package/dist/src/execution/agent-sessions/steps.js +1 -1
  80. package/dist/src/execution/cancelled-model-call-batch.js +1 -1
  81. package/dist/src/execution/dynamic-connection-recovery.d.ts +14 -0
  82. package/dist/src/execution/dynamic-connection-recovery.js +1 -0
  83. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  84. package/dist/src/execution/forward-session-input.js +1 -1
  85. package/dist/src/execution/legacy-session/authorization.js +1 -1
  86. package/dist/src/execution/legacy-session/completion-step.js +1 -1
  87. package/dist/src/execution/legacy-session/inbox.js +1 -1
  88. package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
  89. package/dist/src/execution/ndjson-stream.d.ts +6 -6
  90. package/dist/src/execution/ndjson-stream.js +3 -3
  91. package/dist/src/execution/proxied-deliver-step.js +1 -1
  92. package/dist/src/execution/runtime-context.js +1 -1
  93. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  94. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  95. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  96. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  97. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  98. package/dist/src/execution/sandbox/ensure.d.ts +3 -1
  99. package/dist/src/execution/sandbox/ensure.js +1 -1
  100. package/dist/src/execution/session/active-turn.js +1 -1
  101. package/dist/src/execution/session/admission.js +1 -1
  102. package/dist/src/execution/session/checkpoint-migrations.js +1 -1
  103. package/dist/src/execution/session/end-sandbox-step.d.ts +12 -0
  104. package/dist/src/execution/session/end-sandbox-step.js +1 -0
  105. package/dist/src/execution/session/finalization.js +1 -1
  106. package/dist/src/execution/session/handoff-steps.js +1 -1
  107. package/dist/src/execution/session/handoff.d.ts +1 -1
  108. package/dist/src/execution/session/handoff.js +1 -1
  109. package/dist/src/execution/session/program.js +1 -1
  110. package/dist/src/execution/session/timeout-steps.js +1 -1
  111. package/dist/src/execution/session/turn-step.js +1 -1
  112. package/dist/src/execution/session-inbox/inbox.d.ts +6 -1
  113. package/dist/src/execution/session-inbox/inbox.js +1 -1
  114. package/dist/src/execution/session-inbox/release-step.js +1 -1
  115. package/dist/src/execution/session-inbox/resume.d.ts +2 -1
  116. package/dist/src/execution/session-inbox/resume.js +1 -1
  117. package/dist/src/execution/session-workflow-tool-run.js +1 -1
  118. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  119. package/dist/src/execution/tasks/model-step.js +1 -1
  120. package/dist/src/execution/tasks/steps.js +1 -1
  121. package/dist/src/execution/tasks/table.d.ts +7 -1
  122. package/dist/src/execution/tasks/table.js +1 -1
  123. package/dist/src/execution/tool-stubs/playback.d.ts +11 -0
  124. package/dist/src/execution/tool-stubs/playback.js +1 -0
  125. package/dist/src/execution/tool-stubs/steps.d.ts +18 -0
  126. package/dist/src/execution/tool-stubs/steps.js +1 -0
  127. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  128. package/dist/src/execution/tools/connection-tools.d.ts +0 -6
  129. package/dist/src/execution/tools/connection-tools.js +2 -2
  130. package/dist/src/execution/tools/workflow/authorization-completion.js +1 -1
  131. package/dist/src/execution/tools/workflow/body.js +1 -1
  132. package/dist/src/execution/tools/workflow/serve.js +1 -1
  133. package/dist/src/execution/tools/workflow/withdraw-step.js +1 -1
  134. package/dist/src/execution/workflow-runtime.js +1 -1
  135. package/dist/src/execution/workflow-webhook-route.js +1 -1
  136. package/dist/src/harness/compaction/engine.d.ts +8 -19
  137. package/dist/src/harness/compaction/engine.js +1 -1
  138. package/dist/src/harness/compaction/step.d.ts +7 -1
  139. package/dist/src/harness/compaction/step.js +1 -1
  140. package/dist/src/harness/coordination.js +1 -1
  141. package/dist/src/harness/emission.js +1 -1
  142. package/dist/src/harness/hitl/approved-calls.d.ts +2 -0
  143. package/dist/src/harness/hitl/approved-calls.js +1 -1
  144. package/dist/src/harness/hitl/index.d.ts +9 -1
  145. package/dist/src/harness/hitl/index.js +1 -1
  146. package/dist/src/harness/hitl/intake.js +1 -1
  147. package/dist/src/harness/model-call/call.d.ts +2 -3
  148. package/dist/src/harness/model-call/call.js +1 -1
  149. package/dist/src/harness/model-call/model.d.ts +4 -5
  150. package/dist/src/harness/model-call/model.js +1 -1
  151. package/dist/src/harness/model-call/request.d.ts +1 -2
  152. package/dist/src/harness/model-call/request.js +1 -1
  153. package/dist/src/harness/model-call/retry.d.ts +1 -1
  154. package/dist/src/harness/model-call/retry.js +1 -1
  155. package/dist/src/harness/model-call/run.js +1 -1
  156. package/dist/src/harness/model-call/tools.d.ts +3 -4
  157. package/dist/src/harness/model-call/tools.js +1 -1
  158. package/dist/src/harness/model-call/usage.js +1 -1
  159. package/dist/src/harness/model-profile.d.ts +23 -0
  160. package/dist/src/harness/model-profile.js +1 -0
  161. package/dist/src/harness/prompt-cache.d.ts +5 -53
  162. package/dist/src/harness/prompt-cache.js +1 -1
  163. package/dist/src/harness/provider-safety.d.ts +3 -5
  164. package/dist/src/harness/provider-safety.js +1 -1
  165. package/dist/src/harness/provider-tools.d.ts +5 -13
  166. package/dist/src/harness/provider-tools.js +1 -1
  167. package/dist/src/harness/proxy-input-requests.d.ts +17 -6
  168. package/dist/src/harness/proxy-input-requests.js +1 -1
  169. package/dist/src/harness/session-machine/current.d.ts +4 -0
  170. package/dist/src/harness/session-machine/current.js +1 -1
  171. package/dist/src/harness/step/after-model.js +1 -1
  172. package/dist/src/harness/step/context.d.ts +7 -2
  173. package/dist/src/harness/step/context.js +1 -1
  174. package/dist/src/harness/step-hooks.d.ts +2 -3
  175. package/dist/src/harness/step-hooks.js +1 -1
  176. package/dist/src/harness/tool-call-io.js +1 -1
  177. package/dist/src/harness/tool-loop.js +1 -1
  178. package/dist/src/harness/tools.d.ts +2 -3
  179. package/dist/src/harness/tools.js +1 -1
  180. package/dist/src/harness/turn-tag-state.d.ts +12 -0
  181. package/dist/src/harness/turn-tag-state.js +1 -1
  182. package/dist/src/internal/application/package.js +1 -1
  183. package/dist/src/internal/gateway.d.ts +0 -13
  184. package/dist/src/internal/gateway.js +1 -1
  185. package/dist/src/internal/invocation/workflow-execution.js +1 -1
  186. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  187. package/dist/src/internal/workflow/cancel-expired-development-run.js +1 -1
  188. package/dist/src/protocol/routes.d.ts +4 -0
  189. package/dist/src/protocol/routes.js +1 -1
  190. package/dist/src/public/channels/auth.d.ts +21 -4
  191. package/dist/src/public/channels/auth.js +1 -1
  192. package/dist/src/public/channels/mcp.js +1 -1
  193. package/dist/src/public/schedules/providers/in-memory.js +1 -1
  194. package/dist/src/public/schedules/providers/vercel.js +1 -1
  195. package/dist/src/public/schedules/subscription.d.ts +0 -1
  196. package/dist/src/sandbox/state.d.ts +1 -0
  197. package/dist/src/self-modification/extension/subagents/agent/instructions.js +1 -1
  198. package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
  199. package/dist/src/setup/flows/registry-session.d.ts +10 -2
  200. package/dist/src/setup/flows/registry-session.js +1 -1
  201. package/dist/src/setup/flows/registry.d.ts +2 -0
  202. package/dist/src/setup/flows/registry.js +1 -1
  203. package/dist/src/setup/integrations/shared/prerequisite.d.ts +8 -0
  204. package/dist/src/setup/integrations/shared/prerequisite.js +1 -1
  205. package/dist/src/setup/registry-setup-client.js +1 -1
  206. package/dist/src/setup/scaffold/create/project.js +1 -1
  207. package/dist/src/setup/scaffold/create/web-template.d.ts +3 -2
  208. package/dist/src/setup/scaffold/create/web-template.js +383 -411
  209. package/dist/src/setup/scaffold/index.js +1 -1
  210. package/dist/src/setup/vercel-project.d.ts +2 -3
  211. package/dist/src/setup/vercel-project.js +0 -0
  212. package/dist/src/shared/sandbox-provider.d.ts +9 -2
  213. package/dist/src/subagents/adapter.d.ts +3 -2
  214. package/dist/src/subagents/adapter.js +1 -1
  215. package/dist/src/subagents/callback-route.js +1 -1
  216. package/dist/src/subagents/hitl-proxy.d.ts +4 -3
  217. package/dist/src/subagents/hitl-proxy.js +1 -1
  218. package/dist/src/subagents/parent-notification.js +1 -1
  219. package/dist/src/svelte/index.js +1 -1
  220. package/dist/src/svelte/use-eve-agent.js +1 -1
  221. package/dist/src/tool-stubs/execute.d.ts +13 -0
  222. package/dist/src/tool-stubs/execute.js +1 -0
  223. package/dist/src/tool-stubs/output.d.ts +4 -0
  224. package/dist/src/tool-stubs/output.js +1 -0
  225. package/dist/src/tool-stubs/playback.d.ts +15 -0
  226. package/dist/src/tool-stubs/playback.js +1 -0
  227. package/dist/src/tool-stubs/rules.d.ts +3 -0
  228. package/dist/src/tool-stubs/rules.js +1 -0
  229. package/dist/src/tool-stubs/schema.d.ts +4 -0
  230. package/dist/src/tool-stubs/schema.js +1 -0
  231. package/dist/src/tool-stubs/target.d.ts +8 -0
  232. package/dist/src/tool-stubs/target.js +1 -0
  233. package/dist/src/tool-stubs/types.d.ts +56 -0
  234. package/dist/src/tool-stubs/types.js +1 -0
  235. package/dist/src/tool-stubs/validate-targets.d.ts +6 -0
  236. package/dist/src/tool-stubs/validate-targets.js +1 -0
  237. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  238. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  239. package/dist/src/vue/index.js +1 -1
  240. package/dist/src/vue/use-eve-agent.js +1 -1
  241. package/docs/concepts/sessions-runs-and-streaming.md +2 -2
  242. package/docs/evals/meta.json +10 -1
  243. package/docs/evals/overview.mdx +2 -0
  244. package/docs/evals/tool-stubs.mdx +257 -0
  245. package/docs/extensions.md +1 -1
  246. package/docs/guides/auth-and-route-protection.md +25 -0
  247. package/docs/guides/dynamic-capabilities.md +10 -3
  248. package/docs/guides/frontend/nextjs.mdx +17 -4
  249. package/docs/sandbox/index.mdx +10 -2
  250. package/docs/subagents/index.mdx +1 -1
  251. package/docs/tools/human-in-the-loop.md +1 -1
  252. package/docs/tools/overview.mdx +8 -4
  253. package/docs/tools/workflows.mdx +15 -7
  254. package/package.json +6 -6
  255. package/dist/src/compiled/_chunks/workflow/dist-DmXynLVH.js +0 -1
  256. package/dist/src/compiled/_chunks/workflow/private-Dlf90Zvn.js +0 -1
  257. package/dist/src/compiled/_chunks/workflow/signal-exit-iIdjQcCK.js +0 -95
  258. package/dist/src/compiled/_chunks/workflow/sleep-BMqbraZM.js +0 -1
@@ -322,11 +322,9 @@ import type {
322
322
  EveMessageInputRequest,
323
323
  EveMessagePart,
324
324
  } from "eve/react";
325
- import { useState } from "react";
325
+ import type { FormEvent } from "react";
326
326
  import {
327
- ArrowRightIcon,
328
327
  CheckCircleIcon,
329
- CheckIcon,
330
328
  ExternalLinkIcon,
331
329
  FileIcon,
332
330
  ImageIcon,
@@ -334,16 +332,6 @@ import {
334
332
  XCircleIcon,
335
333
  } from "lucide-react";
336
334
  import { Message, MessageContent, MessageResponse } from "@/components/ai-elements/message";
337
- import {
338
- Question,
339
- QuestionInput,
340
- QuestionOption,
341
- QuestionOptions,
342
- QuestionPrompt,
343
- type QuestionResponse,
344
- QuestionSubmit,
345
- type QuestionValue,
346
- } from "@/components/ai-elements/question";
347
335
  import { Reasoning, ReasoningContent, ReasoningTrigger } from "@/components/ai-elements/reasoning";
348
336
  import {
349
337
  BashToolContent,
@@ -354,6 +342,18 @@ import {
354
342
  ToolOutput,
355
343
  } from "@/components/ai-elements/tool";
356
344
  import { Button } from "@/components/ui/button";
345
+ import {
346
+ Questionnaire,
347
+ QuestionnaireActions,
348
+ QuestionnaireChoice,
349
+ QuestionnaireChoiceDescription,
350
+ QuestionnaireChoices,
351
+ QuestionnaireError,
352
+ QuestionnaireInput,
353
+ QuestionnaireItem,
354
+ QuestionnaireSubmit,
355
+ QuestionnaireTitle,
356
+ } from "@/components/ui/questionnaire";
357
357
  import { cn } from "@/lib/utils";
358
358
 
359
359
  export type AgentInputResponse = {
@@ -506,90 +506,73 @@ function QuestionRequest({
506
506
  readonly inputResponse?: AgentInputResponse;
507
507
  readonly onInputResponses: (responses: readonly AgentInputResponse[]) => void | Promise<void>;
508
508
  }) {
509
- const hasOptions = (inputRequest.options?.length ?? 0) > 0;
510
- const acceptsFreeform = inputRequest.allowFreeform === true || !hasOptions;
511
- const [questionValue, setQuestionValue] = useState<QuestionValue>({
512
- selectedValues: inputResponse?.optionId ? [inputResponse.optionId] : [],
513
- text: inputResponse?.text ?? "",
514
- });
509
+ const options = inputRequest.options ?? [];
510
+ const acceptsFreeform = inputRequest.allowFreeform === true || options.length === 0;
511
+ const disabled = !canRespond || inputResponse !== undefined;
512
+
513
+ const submitResponse = (event: FormEvent<HTMLFormElement>) => {
514
+ event.preventDefault();
515
+ const answer = new FormData(event.currentTarget).get(inputRequest.requestId);
516
+ if (typeof answer !== "string") {
517
+ return;
518
+ }
515
519
 
516
- const submitOption = (optionId: string) => {
517
- setQuestionValue((value) => ({ ...value, selectedValues: [optionId] }));
518
- return onInputResponses([
519
- {
520
- optionId,
521
- requestId: inputRequest.requestId,
522
- },
520
+ const option = options.find(({ id }) => id === answer);
521
+ void onInputResponses([
522
+ option === undefined
523
+ ? { requestId: inputRequest.requestId, text: answer.trim() }
524
+ : { optionId: option.id, requestId: inputRequest.requestId },
523
525
  ]);
524
526
  };
525
527
 
526
- const submitResponse = ({ selectedValues, text }: QuestionResponse) =>
527
- onInputResponses([
528
- {
529
- optionId: selectedValues[0],
530
- requestId: inputRequest.requestId,
531
- text,
532
- },
533
- ]);
534
-
535
528
  return (
536
- <Question
537
- disabled={!canRespond || inputResponse !== undefined}
529
+ <Questionnaire
530
+ className="gap-4 rounded-xl border bg-card p-4"
531
+ // Validation reads disabled answers as missing, so locking a submitted form in place would
532
+ // flag it invalid. Remounting restores the answer from the response instead.
533
+ key={disabled ? "locked" : "open"}
538
534
  onSubmit={submitResponse}
539
- onValueChange={setQuestionValue}
540
- value={questionValue}
535
+ shortcuts="numbers"
541
536
  >
542
- <QuestionPrompt>{inputRequest.prompt}</QuestionPrompt>
543
- {hasOptions ? (
544
- <QuestionOptions className="flex-col items-stretch" aria-label={inputRequest.prompt}>
545
- {inputRequest.options?.map((option, index) => (
546
- <QuestionOption
547
- className="justify-start px-3 py-2 text-left"
537
+ <QuestionnaireItem name={inputRequest.requestId} required>
538
+ <QuestionnaireTitle className="text-sm font-medium">
539
+ {inputRequest.prompt}
540
+ </QuestionnaireTitle>
541
+ <QuestionnaireChoices>
542
+ {options.map((option) => (
543
+ <QuestionnaireChoice
544
+ className={cn(inputResponse?.optionId === option.id && "data-disabled:opacity-100")}
545
+ defaultChecked={inputResponse?.optionId === option.id}
546
+ disabled={disabled}
548
547
  key={option.id}
549
- onClick={() => void submitOption(option.id)}
550
548
  value={option.id}
551
549
  >
552
- <span className="min-w-0 flex-1">
553
- <span className="block text-foreground text-sm leading-tight">{option.label}</span>
554
- {option.description ? (
555
- <span className="block text-sm text-muted-foreground leading-tight">
556
- {option.description}
557
- </span>
558
- ) : null}
559
- </span>
560
- {inputResponse === undefined ? (
561
- <span aria-hidden="true" className="relative size-6 shrink-0">
562
- <span className="absolute inset-0 flex items-center justify-center rounded-full bg-foreground/8 text-xs text-muted-foreground transition-opacity group-hover/option:opacity-0 group-focus-visible/option:opacity-0">
563
- {index + 1}
564
- </span>
565
- <ArrowRightIcon className="absolute top-1/2 left-1/2 size-4 -translate-x-1/2 -translate-y-1/2 text-muted-foreground opacity-0 transition-[color,opacity] group-hover/option:text-foreground group-hover/option:opacity-100 group-focus-visible/option:opacity-100" />
566
- </span>
567
- ) : (
568
- <CheckIcon className="size-4 shrink-0 opacity-0 transition-opacity group-data-[state=checked]/option:opacity-100" />
569
- )}
570
- </QuestionOption>
550
+ {option.label}
551
+ {option.description ? (
552
+ <QuestionnaireChoiceDescription>
553
+ {option.description}
554
+ </QuestionnaireChoiceDescription>
555
+ ) : null}
556
+ </QuestionnaireChoice>
571
557
  ))}
572
- </QuestionOptions>
573
- ) : null}
574
- {acceptsFreeform ? (
575
- <div className="relative">
576
- <QuestionInput
577
- aria-label="Answer"
578
- className={inputResponse === undefined ? "pr-12 pb-12" : undefined}
579
- placeholder="Type your answer…"
580
- />
581
- {inputResponse === undefined && questionValue.text.trim().length > 0 ? (
582
- <QuestionSubmit
558
+ {acceptsFreeform ? (
559
+ <QuestionnaireInput
583
560
  aria-label="Answer"
584
- className="absolute right-2 bottom-2"
585
- size="icon-sm"
586
- >
587
- <ArrowRightIcon />
588
- </QuestionSubmit>
561
+ className={cn(inputResponse?.text !== undefined && "disabled:opacity-100")}
562
+ defaultValue={inputResponse?.text}
563
+ disabled={disabled}
564
+ placeholder="Type your answer…"
565
+ />
589
566
  ) : null}
590
- </div>
591
- ) : null}
592
- </Question>
567
+ </QuestionnaireChoices>
568
+ <QuestionnaireError />
569
+ </QuestionnaireItem>
570
+ {disabled ? null : (
571
+ <QuestionnaireActions>
572
+ <QuestionnaireSubmit size="sm">Answer</QuestionnaireSubmit>
573
+ </QuestionnaireActions>
574
+ )}
575
+ </Questionnaire>
593
576
  );
594
577
  }
595
578
 
@@ -3624,332 +3607,6 @@ export const PromptInputCommandSeparator = ({
3624
3607
  className,
3625
3608
  ...props
3626
3609
  }: PromptInputCommandSeparatorProps) => <CommandSeparator className={cn(className)} {...props} />;
3627
- `,"components/ai-elements/question.tsx":`"use client";
3628
-
3629
- import type {
3630
- ChangeEvent,
3631
- ComponentProps,
3632
- FormEvent,
3633
- HTMLAttributes,
3634
- KeyboardEvent,
3635
- MouseEvent,
3636
- ReactNode,
3637
- } from "react";
3638
-
3639
- import { Button } from "@/components/ui/button";
3640
- import { Textarea } from "@/components/ui/textarea";
3641
- import { cn } from "@/lib/utils";
3642
- import { createContext, useCallback, useContext, useMemo, useState } from "react";
3643
-
3644
- export interface QuestionValue {
3645
- selectedValues: readonly string[];
3646
- text: string;
3647
- }
3648
-
3649
- export interface QuestionResponse {
3650
- selectedValues: readonly string[];
3651
- text?: string;
3652
- }
3653
-
3654
- type SelectionMode = "multiple" | "single";
3655
-
3656
- interface QuestionContextValue {
3657
- disabled: boolean;
3658
- selectedValues: readonly string[];
3659
- selectionMode: SelectionMode;
3660
- setText: (text: string) => void;
3661
- text: string;
3662
- toggleValue: (value: string) => void;
3663
- }
3664
-
3665
- const QuestionContext = createContext<QuestionContextValue | null>(null);
3666
-
3667
- const useQuestion = () => {
3668
- const context = useContext(QuestionContext);
3669
-
3670
- if (!context) {
3671
- throw new Error("Question components must be used within Question");
3672
- }
3673
-
3674
- return context;
3675
- };
3676
-
3677
- export type QuestionProps = Omit<ComponentProps<"form">, "defaultValue" | "onSubmit" | "value"> & {
3678
- defaultValue?: QuestionValue;
3679
- disabled?: boolean;
3680
- onSubmit?: (
3681
- response: QuestionResponse,
3682
- event: FormEvent<HTMLFormElement>,
3683
- ) => void | Promise<void>;
3684
- onValueChange?: (value: QuestionValue) => void;
3685
- selectionMode?: SelectionMode;
3686
- value?: QuestionValue;
3687
- };
3688
-
3689
- const EMPTY_VALUE: QuestionValue = { selectedValues: [], text: "" };
3690
-
3691
- const getSelectedValues = (
3692
- currentValues: readonly string[],
3693
- optionValue: string,
3694
- selectionMode: SelectionMode,
3695
- ): readonly string[] => {
3696
- const isSelected = currentValues.includes(optionValue);
3697
-
3698
- if (selectionMode === "single") {
3699
- return isSelected ? [] : [optionValue];
3700
- }
3701
-
3702
- if (isSelected) {
3703
- return currentValues.filter((item) => item !== optionValue);
3704
- }
3705
-
3706
- return [...currentValues, optionValue];
3707
- };
3708
-
3709
- export const Question = ({
3710
- children,
3711
- className,
3712
- defaultValue = EMPTY_VALUE,
3713
- disabled = false,
3714
- onSubmit,
3715
- onValueChange,
3716
- selectionMode = "single",
3717
- value: controlledValue,
3718
- ...props
3719
- }: QuestionProps) => {
3720
- const [internalValue, setInternalValue] = useState(defaultValue);
3721
- const value = controlledValue ?? internalValue;
3722
-
3723
- const setValue = useCallback(
3724
- (nextValue: QuestionValue) => {
3725
- if (controlledValue === undefined) {
3726
- setInternalValue(nextValue);
3727
- }
3728
- onValueChange?.(nextValue);
3729
- },
3730
- [controlledValue, onValueChange],
3731
- );
3732
-
3733
- const setText = useCallback(
3734
- (text: string) => {
3735
- setValue({ ...value, text });
3736
- },
3737
- [setValue, value],
3738
- );
3739
-
3740
- const toggleValue = useCallback(
3741
- (optionValue: string) => {
3742
- const selectedValues = getSelectedValues(value.selectedValues, optionValue, selectionMode);
3743
- setValue({ ...value, selectedValues });
3744
- },
3745
- [selectionMode, setValue, value],
3746
- );
3747
-
3748
- const contextValue = useMemo(
3749
- () => ({
3750
- disabled,
3751
- selectedValues: value.selectedValues,
3752
- selectionMode,
3753
- setText,
3754
- text: value.text,
3755
- toggleValue,
3756
- }),
3757
- [disabled, selectionMode, setText, toggleValue, value],
3758
- );
3759
-
3760
- const handleSubmit = useCallback(
3761
- async (event: FormEvent<HTMLFormElement>) => {
3762
- event.preventDefault();
3763
- if (disabled) {
3764
- return;
3765
- }
3766
-
3767
- const text = value.text.trim();
3768
- if (value.selectedValues.length === 0 && text.length === 0) {
3769
- return;
3770
- }
3771
-
3772
- await onSubmit?.(
3773
- {
3774
- selectedValues: value.selectedValues,
3775
- text: text.length > 0 ? text : undefined,
3776
- },
3777
- event,
3778
- );
3779
- },
3780
- [disabled, onSubmit, value],
3781
- );
3782
-
3783
- return (
3784
- <QuestionContext.Provider value={contextValue}>
3785
- <form
3786
- className={cn("space-y-3 rounded-xl border bg-card p-4", className)}
3787
- onSubmit={handleSubmit}
3788
- {...props}
3789
- >
3790
- {children}
3791
- </form>
3792
- </QuestionContext.Provider>
3793
- );
3794
- };
3795
-
3796
- export type QuestionPromptProps = HTMLAttributes<HTMLParagraphElement>;
3797
-
3798
- export const QuestionPrompt = ({ className, ...props }: QuestionPromptProps) => (
3799
- <p className={cn("font-medium text-sm leading-snug", className)} {...props} />
3800
- );
3801
-
3802
- export type QuestionDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
3803
-
3804
- export const QuestionDescription = ({ className, ...props }: QuestionDescriptionProps) => (
3805
- <p className={cn("text-muted-foreground text-sm", className)} {...props} />
3806
- );
3807
-
3808
- export type QuestionOptionsProps = HTMLAttributes<HTMLDivElement>;
3809
-
3810
- export const QuestionOptions = ({ className, ...props }: QuestionOptionsProps) => {
3811
- const { selectionMode } = useQuestion();
3812
-
3813
- return (
3814
- <div
3815
- className={cn("flex flex-wrap gap-1.5", className)}
3816
- role={selectionMode === "single" ? "radiogroup" : "group"}
3817
- {...props}
3818
- />
3819
- );
3820
- };
3821
-
3822
- export type QuestionOptionProps = Omit<ComponentProps<typeof Button>, "value"> & {
3823
- value: string;
3824
- };
3825
-
3826
- export const QuestionOption = ({
3827
- children,
3828
- className,
3829
- disabled,
3830
- onClick,
3831
- value,
3832
- variant,
3833
- ...props
3834
- }: QuestionOptionProps) => {
3835
- const question = useQuestion();
3836
- const isSelected = question.selectedValues.includes(value);
3837
- const role = question.selectionMode === "single" ? "radio" : "checkbox";
3838
- const handleClick = useCallback(
3839
- (event: MouseEvent<HTMLButtonElement>) => {
3840
- question.toggleValue(value);
3841
- onClick?.(event);
3842
- },
3843
- [onClick, question, value],
3844
- );
3845
-
3846
- return (
3847
- <Button
3848
- aria-checked={isSelected}
3849
- // Selection only changes colors: the border is always present so the
3850
- // layout never shifts when an option is picked.
3851
- className={cn(
3852
- "group/option h-auto whitespace-normal border border-input font-normal shadow-none transition-colors",
3853
- isSelected
3854
- ? "border-foreground/20 bg-accent text-accent-foreground disabled:opacity-100"
3855
- : "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
3856
- className,
3857
- )}
3858
- data-state={isSelected ? "checked" : "unchecked"}
3859
- disabled={question.disabled || disabled}
3860
- onClick={handleClick}
3861
- role={role}
3862
- type="button"
3863
- variant={variant ?? "ghost"}
3864
- {...props}
3865
- >
3866
- {children ?? value}
3867
- </Button>
3868
- );
3869
- };
3870
-
3871
- export type QuestionInputProps = Omit<ComponentProps<typeof Textarea>, "defaultValue" | "value">;
3872
-
3873
- export const QuestionInput = ({
3874
- className,
3875
- disabled,
3876
- onChange,
3877
- onKeyDown,
3878
- ...props
3879
- }: QuestionInputProps) => {
3880
- const question = useQuestion();
3881
- const handleChange = useCallback(
3882
- (event: ChangeEvent<HTMLTextAreaElement>) => {
3883
- question.setText(event.currentTarget.value);
3884
- onChange?.(event);
3885
- },
3886
- [onChange, question],
3887
- );
3888
- const handleKeyDown = useCallback(
3889
- (event: KeyboardEvent<HTMLTextAreaElement>) => {
3890
- onKeyDown?.(event);
3891
- if (
3892
- event.defaultPrevented ||
3893
- event.key !== "Enter" ||
3894
- event.shiftKey ||
3895
- event.nativeEvent.isComposing
3896
- ) {
3897
- return;
3898
- }
3899
-
3900
- event.preventDefault();
3901
- event.currentTarget.form?.requestSubmit();
3902
- },
3903
- [onKeyDown],
3904
- );
3905
-
3906
- return (
3907
- <Textarea
3908
- className={cn(
3909
- "min-h-16 resize-none rounded-lg text-base md:text-sm shadow-none focus-visible:border-foreground!",
3910
- className,
3911
- )}
3912
- disabled={question.disabled || disabled}
3913
- onChange={handleChange}
3914
- onKeyDown={handleKeyDown}
3915
- value={question.text}
3916
- {...props}
3917
- />
3918
- );
3919
- };
3920
-
3921
- export type QuestionActionsProps = HTMLAttributes<HTMLDivElement>;
3922
-
3923
- export const QuestionActions = ({ className, ...props }: QuestionActionsProps) => (
3924
- <div className={cn("flex items-center justify-end gap-2", className)} {...props} />
3925
- );
3926
-
3927
- export type QuestionSubmitProps = ComponentProps<typeof Button> & {
3928
- children?: ReactNode;
3929
- };
3930
-
3931
- export const QuestionSubmit = ({
3932
- children = "Submit",
3933
- className,
3934
- disabled,
3935
- size = "sm",
3936
- ...props
3937
- }: QuestionSubmitProps) => {
3938
- const question = useQuestion();
3939
- const hasResponse = question.selectedValues.length > 0 || question.text.trim().length > 0;
3940
-
3941
- return (
3942
- <Button
3943
- className={cn("text-sm! shadow-none", className)}
3944
- disabled={question.disabled || disabled || !hasResponse}
3945
- size={size}
3946
- type="submit"
3947
- {...props}
3948
- >
3949
- {children}
3950
- </Button>
3951
- );
3952
- };
3953
3610
  `,"components/ai-elements/reasoning.tsx":`"use client";
3954
3611
 
3955
3612
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
@@ -5392,6 +5049,321 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
5392
5049
  }
5393
5050
 
5394
5051
  export { Input };
5052
+ `,"components/ui/questionnaire.tsx":`"use client";
5053
+
5054
+ import * as React from "react";
5055
+ import { Questionnaire as QuestionnairePrimitive } from "@shadcn/react/questionnaire";
5056
+ import { CheckIcon } from "lucide-react";
5057
+
5058
+ import { buttonVariants, type Button } from "@/components/ui/button";
5059
+ import { cn } from "@/lib/utils";
5060
+
5061
+ function Questionnaire({
5062
+ className,
5063
+ ...props
5064
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Root>) {
5065
+ return (
5066
+ <QuestionnairePrimitive.Root
5067
+ data-slot="questionnaire"
5068
+ className={cn("flex w-full min-w-0 flex-col gap-6", className)}
5069
+ {...props}
5070
+ />
5071
+ );
5072
+ }
5073
+
5074
+ function QuestionnaireProgress({
5075
+ className,
5076
+ ...props
5077
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Progress>) {
5078
+ return (
5079
+ <QuestionnairePrimitive.Progress
5080
+ data-slot="questionnaire-progress"
5081
+ className={cn(
5082
+ "min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums",
5083
+ className,
5084
+ )}
5085
+ {...props}
5086
+ />
5087
+ );
5088
+ }
5089
+
5090
+ function QuestionnaireItem({
5091
+ className,
5092
+ ...props
5093
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Item>) {
5094
+ return (
5095
+ <QuestionnairePrimitive.Item
5096
+ data-slot="questionnaire-item"
5097
+ className={cn("flex min-w-0 flex-col gap-5 border-0 p-0 outline-none", className)}
5098
+ {...props}
5099
+ />
5100
+ );
5101
+ }
5102
+
5103
+ function QuestionnaireTitle({
5104
+ className,
5105
+ ...props
5106
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Title>) {
5107
+ return (
5108
+ <QuestionnairePrimitive.Title
5109
+ data-slot="questionnaire-title"
5110
+ className={cn(
5111
+ "text-base font-semibold text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-5",
5112
+ className,
5113
+ )}
5114
+ {...props}
5115
+ />
5116
+ );
5117
+ }
5118
+
5119
+ function QuestionnaireDescription({
5120
+ className,
5121
+ ...props
5122
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Description>) {
5123
+ return (
5124
+ <QuestionnairePrimitive.Description
5125
+ data-slot="questionnaire-description"
5126
+ className={cn("text-sm text-pretty text-muted-foreground", className)}
5127
+ {...props}
5128
+ />
5129
+ );
5130
+ }
5131
+
5132
+ function QuestionnaireChoices({
5133
+ className,
5134
+ ...props
5135
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Choices>) {
5136
+ return (
5137
+ <QuestionnairePrimitive.Choices
5138
+ data-slot="questionnaire-choices"
5139
+ className={cn("group/questionnaire-choices grid min-w-0 gap-3", className)}
5140
+ {...props}
5141
+ />
5142
+ );
5143
+ }
5144
+
5145
+ function QuestionnaireChoice({
5146
+ children,
5147
+ className,
5148
+ ...props
5149
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Choice>) {
5150
+ return (
5151
+ <QuestionnairePrimitive.Choice
5152
+ data-slot="questionnaire-choice"
5153
+ className={cn(
5154
+ "group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-3 rounded-md border border-input bg-transparent px-4 py-3.5 text-start text-sm shadow-xs transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted",
5155
+ "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50",
5156
+ className,
5157
+ )}
5158
+ {...props}
5159
+ >
5160
+ <QuestionnairePrimitive.ChoiceInput
5161
+ data-slot="questionnaire-choice-input"
5162
+ className="absolute inset-0 z-10 size-full cursor-pointer opacity-0"
5163
+ />
5164
+ <span
5165
+ aria-hidden="true"
5166
+ data-slot="questionnaire-choice-indicator"
5167
+ className="pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary"
5168
+ >
5169
+ <span
5170
+ data-slot="questionnaire-choice-indicator-dot"
5171
+ className="hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
5172
+ />
5173
+ <CheckIcon
5174
+ data-slot="questionnaire-choice-indicator-check"
5175
+ className="hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
5176
+ />
5177
+ </span>
5178
+ <QuestionnairePrimitive.ChoiceLabel
5179
+ data-slot="questionnaire-choice-label"
5180
+ className="flex min-w-0 flex-1 flex-col gap-1 leading-snug"
5181
+ >
5182
+ {children}
5183
+ </QuestionnairePrimitive.ChoiceLabel>
5184
+ <QuestionnairePrimitive.ChoiceShortcut
5185
+ data-slot="questionnaire-choice-shortcut"
5186
+ className="pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground shadow-xs group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
5187
+ />
5188
+ </QuestionnairePrimitive.Choice>
5189
+ );
5190
+ }
5191
+
5192
+ function QuestionnaireChoiceDescription({ className, ...props }: React.ComponentProps<"span">) {
5193
+ return (
5194
+ <span
5195
+ data-slot="questionnaire-choice-description"
5196
+ className={cn("text-muted-foreground", className)}
5197
+ {...props}
5198
+ />
5199
+ );
5200
+ }
5201
+
5202
+ function QuestionnaireInput({
5203
+ className,
5204
+ ...props
5205
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Input>) {
5206
+ return (
5207
+ <div
5208
+ data-slot="questionnaire-input-wrapper"
5209
+ className="group/questionnaire-input relative w-full min-w-0"
5210
+ >
5211
+ <QuestionnairePrimitive.Input
5212
+ data-slot="questionnaire-input"
5213
+ className={cn(
5214
+ "h-9 min-h-11 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
5215
+ "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground",
5216
+ className,
5217
+ )}
5218
+ {...props}
5219
+ />
5220
+ </div>
5221
+ );
5222
+ }
5223
+
5224
+ function QuestionnaireError({
5225
+ className,
5226
+ ...props
5227
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Error>) {
5228
+ return (
5229
+ <QuestionnairePrimitive.Error
5230
+ data-slot="questionnaire-error"
5231
+ className={cn("text-sm text-destructive", className)}
5232
+ {...props}
5233
+ />
5234
+ );
5235
+ }
5236
+
5237
+ function QuestionnaireActions({ className, ...props }: React.ComponentProps<"div">) {
5238
+ return (
5239
+ <div
5240
+ data-slot="questionnaire-actions"
5241
+ className={cn(
5242
+ "grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-9",
5243
+ className,
5244
+ )}
5245
+ {...props}
5246
+ />
5247
+ );
5248
+ }
5249
+
5250
+ function QuestionnairePrevious({
5251
+ children,
5252
+ className,
5253
+ size = "default",
5254
+ variant = "outline",
5255
+ ...props
5256
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Previous> &
5257
+ Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
5258
+ return (
5259
+ <QuestionnairePrimitive.Previous
5260
+ data-slot="questionnaire-previous"
5261
+ data-size={size}
5262
+ data-variant={variant}
5263
+ className={cn(
5264
+ buttonVariants({ size, variant }),
5265
+ "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0",
5266
+ className,
5267
+ )}
5268
+ {...props}
5269
+ >
5270
+ {children ?? "Previous"}
5271
+ </QuestionnairePrimitive.Previous>
5272
+ );
5273
+ }
5274
+
5275
+ function QuestionnaireSkip({
5276
+ children,
5277
+ className,
5278
+ size = "default",
5279
+ variant = "outline",
5280
+ ...props
5281
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Skip> &
5282
+ Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
5283
+ return (
5284
+ <QuestionnairePrimitive.Skip
5285
+ data-slot="questionnaire-skip"
5286
+ data-size={size}
5287
+ data-variant={variant}
5288
+ className={cn(
5289
+ buttonVariants({ size, variant }),
5290
+ "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0",
5291
+ className,
5292
+ )}
5293
+ {...props}
5294
+ >
5295
+ {children ?? "Skip"}
5296
+ </QuestionnairePrimitive.Skip>
5297
+ );
5298
+ }
5299
+
5300
+ function QuestionnaireNext({
5301
+ children,
5302
+ className,
5303
+ size = "default",
5304
+ variant = "default",
5305
+ ...props
5306
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Next> &
5307
+ Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
5308
+ return (
5309
+ <QuestionnairePrimitive.Next
5310
+ data-slot="questionnaire-next"
5311
+ data-size={size}
5312
+ data-variant={variant}
5313
+ className={cn(
5314
+ buttonVariants({ size, variant }),
5315
+ "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
5316
+ className,
5317
+ )}
5318
+ {...props}
5319
+ >
5320
+ {children ?? "Next"}
5321
+ </QuestionnairePrimitive.Next>
5322
+ );
5323
+ }
5324
+
5325
+ function QuestionnaireSubmit({
5326
+ children,
5327
+ className,
5328
+ size = "default",
5329
+ variant = "default",
5330
+ ...props
5331
+ }: React.ComponentProps<typeof QuestionnairePrimitive.Submit> &
5332
+ Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
5333
+ return (
5334
+ <QuestionnairePrimitive.Submit
5335
+ data-slot="questionnaire-submit"
5336
+ data-size={size}
5337
+ data-variant={variant}
5338
+ className={cn(
5339
+ buttonVariants({ size, variant }),
5340
+ "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
5341
+ className,
5342
+ )}
5343
+ {...props}
5344
+ >
5345
+ {children ?? "Submit"}
5346
+ </QuestionnairePrimitive.Submit>
5347
+ );
5348
+ }
5349
+
5350
+ export {
5351
+ Questionnaire,
5352
+ QuestionnaireActions,
5353
+ QuestionnaireChoice,
5354
+ QuestionnaireChoiceDescription,
5355
+ QuestionnaireChoices,
5356
+ QuestionnaireDescription,
5357
+ QuestionnaireError,
5358
+ QuestionnaireInput,
5359
+ QuestionnaireItem,
5360
+ QuestionnaireNext,
5361
+ QuestionnairePrevious,
5362
+ QuestionnaireProgress,
5363
+ QuestionnaireSkip,
5364
+ QuestionnaireSubmit,
5365
+ QuestionnaireTitle,
5366
+ };
5395
5367
  `,"components/ui/select.tsx":`"use client";
5396
5368
 
5397
5369
  import * as React from "react";
@@ -6143,4 +6115,4 @@ export const auth = betterAuth({
6143
6115
  },
6144
6116
  },
6145
6117
  });
6146
- `},WEB_APP_TEMPLATE_PACKAGE_JSON={scripts:{build:`next build`,"build:eve":`eve build`,dev:`next dev`,"dev:eve":`eve dev`,start:`next start`,"start:eve":`eve start`,typecheck:`tsc --noEmit -p tsconfig.json`},dependencies:{"@radix-ui/react-use-controllable-state":`1.2.2`,"@shikijs/core":`3.23.0`,"@shikijs/engine-javascript":`3.23.0`,"@shikijs/engine-oniguruma":`3.23.0`,"@streamdown/cjk":`1.0.3`,"@streamdown/code":`1.1.1`,"@streamdown/math":`1.0.2`,"@streamdown/mermaid":`1.0.2`,"@tailwindcss/postcss":`4.3.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,cmdk:`1.1.1`,"lucide-react":`1.16.0`,motion:`12.40.0`,nanoid:`5.1.11`,next:`16.3.6`,"radix-ui":`1.4.3`,react:`19.2.6`,"react-dom":`19.2.6`,shiki:`3.23.0`,streamdown:`2.5.0`,"tailwind-merge":`3.6.0`,tailwindcss:`4.3.0`,"use-stick-to-bottom":`1.1.4`,zod:`4.5.4`},devDependencies:{"@types/node":`26`,"@types/react":`19.2.15`,"@types/react-dom":`19.2.3`,typescript:`6.0.3`}};export{WEB_APP_SIGN_IN_WITH_VERCEL_TEMPLATE_FILES,WEB_APP_TEMPLATE_FILES,WEB_APP_TEMPLATE_PACKAGE_JSON,WEB_CHANNEL_TEMPLATES};
6118
+ `},WEB_APP_TEMPLATE_PACKAGE_JSON={scripts:{build:`next build`,"build:eve":`eve build`,dev:`next dev`,"dev:eve":`eve dev`,start:`next start`,"start:eve":`eve start`,typecheck:`tsc --noEmit -p tsconfig.json`},dependencies:{"@radix-ui/react-use-controllable-state":`1.2.2`,"@shadcn/react":`0.3.1`,"@shikijs/core":`3.23.0`,"@shikijs/engine-javascript":`3.23.0`,"@shikijs/engine-oniguruma":`3.23.0`,"@streamdown/cjk":`1.0.3`,"@streamdown/code":`1.1.1`,"@streamdown/math":`1.0.2`,"@streamdown/mermaid":`1.0.2`,"@tailwindcss/postcss":`4.3.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,cmdk:`1.1.1`,"lucide-react":`1.16.0`,motion:`12.40.0`,nanoid:`5.1.11`,next:`16.3.6`,"radix-ui":`1.4.3`,react:`19.2.6`,"react-dom":`19.2.6`,shiki:`3.23.0`,streamdown:`2.5.0`,"tailwind-merge":`3.6.0`,tailwindcss:`4.3.0`,"use-stick-to-bottom":`1.1.4`,zod:`4.5.4`},devDependencies:{"@types/node":`26`,"@types/react":`19.2.15`,"@types/react-dom":`19.2.3`,typescript:`6.0.3`}};export{WEB_APP_SIGN_IN_WITH_VERCEL_TEMPLATE_FILES,WEB_APP_TEMPLATE_FILES,WEB_APP_TEMPLATE_PACKAGE_JSON,WEB_CHANNEL_TEMPLATES};