@agent-native/core 0.79.27 → 0.80.0

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 (346) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +26 -0
  3. package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +41 -0
  4. package/corpus/core/docs/content/locales/de-DE/template-design.mdx +51 -0
  5. package/corpus/core/docs/content/locales/es-ES/template-design.mdx +50 -0
  6. package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +49 -0
  7. package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +44 -0
  8. package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +46 -0
  9. package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +44 -0
  10. package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +48 -0
  11. package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +36 -0
  12. package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +38 -0
  13. package/corpus/core/docs/content/template-design.mdx +45 -0
  14. package/corpus/core/package.json +2 -1
  15. package/corpus/core/src/agent/engine/index.ts +1 -0
  16. package/corpus/core/src/agent/engine/registry.ts +40 -0
  17. package/corpus/core/src/agent/production-agent.ts +6 -2
  18. package/corpus/core/src/cli/design-connect.ts +490 -0
  19. package/corpus/core/src/cli/index.ts +16 -0
  20. package/corpus/core/src/cli/skills.ts +126 -3
  21. package/corpus/core/src/client/AssistantChat.tsx +43 -7
  22. package/corpus/core/src/client/agent-chat.ts +27 -3
  23. package/corpus/core/src/client/blocks/library/MermaidBlock.tsx +1 -1
  24. package/corpus/core/src/client/blocks/library/diagram.tsx +2 -2
  25. package/corpus/core/src/client/blocks/library/wireframe.tsx +1 -1
  26. package/corpus/core/src/client/chat/message-components.tsx +1 -1
  27. package/corpus/core/src/client/chat-model-groups.ts +1 -2
  28. package/corpus/core/src/client/components/LiveCursorOverlay.tsx +33 -66
  29. package/corpus/core/src/client/composer/TiptapComposer.tsx +99 -24
  30. package/corpus/core/src/client/composer/useVoiceDictation.ts +429 -260
  31. package/corpus/core/src/client/frame-protocol.ts +17 -2
  32. package/corpus/core/src/client/rich-markdown-editor/RegistryBlockNode.tsx +2 -2
  33. package/corpus/core/src/client/sharing/ShareButton.tsx +20 -15
  34. package/corpus/core/src/client/use-agent-engine-configured.ts +80 -28
  35. package/corpus/core/src/server/transcribe-voice.ts +57 -22
  36. package/corpus/core/src/shared/mcp-embed-headers.ts +23 -1
  37. package/corpus/core/src/styles/agent-native.css +56 -7
  38. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  39. package/corpus/core/src/vite/client.ts +2 -0
  40. package/corpus/core/src/voice/index.ts +18 -0
  41. package/corpus/core/src/voice/voice-cleanup-prompt.ts +38 -0
  42. package/corpus/core/src/voice/voice-context.ts +217 -0
  43. package/corpus/core/src/voice/voice-replacements.ts +75 -0
  44. package/corpus/templates/analytics/AGENTS.md +4 -3
  45. package/corpus/templates/analytics/actions/list-session-recordings.ts +6 -1
  46. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +557 -400
  47. package/corpus/templates/analytics/app/global.css +0 -4
  48. package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
  49. package/corpus/templates/analytics/app/i18n-data.ts +20 -0
  50. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +33 -8
  51. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +7 -0
  52. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +7 -0
  53. package/corpus/templates/analytics/changelog/2026-06-28-ask-tab-now-matches-the-darker-app-background.md +6 -0
  54. package/corpus/templates/analytics/changelog/2026-06-28-dashboard-email-reports-now-use-cleaner-light-mode-snapshots.md +6 -0
  55. package/corpus/templates/analytics/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  56. package/corpus/templates/analytics/changelog/2026-06-28-sessions-now-show-only-signed-in-recordings-with-playable-re.md +6 -0
  57. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +3 -3
  58. package/corpus/templates/analytics/server/lib/dashboard-report.ts +29 -7
  59. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +5 -2
  60. package/corpus/templates/analytics/server/lib/session-replay.ts +24 -4
  61. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +4 -4
  62. package/corpus/templates/assets/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  63. package/corpus/templates/brain/app/components/layout/Layout.tsx +29 -2
  64. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +131 -42
  65. package/corpus/templates/brain/app/i18n/zh-TW.ts +2 -0
  66. package/corpus/templates/brain/app/i18n-data.ts +20 -0
  67. package/corpus/templates/brain/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  68. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +29 -1
  69. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +417 -299
  70. package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
  71. package/corpus/templates/calendar/app/i18n-data.ts +20 -0
  72. package/corpus/templates/calendar/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  73. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +6 -19
  74. package/corpus/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  75. package/corpus/templates/clips/AGENTS.md +4 -0
  76. package/corpus/templates/clips/actions/cleanup-transcript.ts +39 -9
  77. package/corpus/templates/clips/actions/finalize-meeting.ts +81 -12
  78. package/corpus/templates/clips/actions/lib/agents-md-context.ts +4 -1
  79. package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
  80. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +1 -1
  81. package/corpus/templates/clips/app/components/player/share-dialog.tsx +2 -2
  82. package/corpus/templates/clips/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
  83. package/corpus/templates/clips/desktop/src/lib/personal-vocabulary.ts +13 -8
  84. package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +60 -1
  85. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +1 -1
  86. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +1 -1
  87. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +5 -5
  88. package/corpus/templates/content/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  89. package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +137 -0
  90. package/corpus/templates/design/AGENTS.md +95 -5
  91. package/corpus/templates/design/DESIGN.md +82 -0
  92. package/corpus/templates/design/DEVELOPING.md +43 -0
  93. package/corpus/templates/design/actions/add-localhost-screens.ts +426 -0
  94. package/corpus/templates/design/actions/apply-shader.ts +277 -0
  95. package/corpus/templates/design/actions/apply-visual-edit.ts +303 -0
  96. package/corpus/templates/design/actions/connect-localhost.ts +183 -0
  97. package/corpus/templates/design/actions/edit-design.ts +195 -42
  98. package/corpus/templates/design/actions/generate-design.ts +71 -1
  99. package/corpus/templates/design/actions/generate-screens.ts +193 -0
  100. package/corpus/templates/design/actions/get-code-layer-projection.ts +191 -0
  101. package/corpus/templates/design/actions/get-shader.ts +119 -0
  102. package/corpus/templates/design/actions/list-localhost-connections.ts +95 -0
  103. package/corpus/templates/design/actions/navigate.ts +55 -2
  104. package/corpus/templates/design/actions/view-screen.ts +68 -1
  105. package/corpus/templates/design/agent-native.app-skill.json +10 -0
  106. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +761 -0
  107. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +2057 -103
  108. package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +74 -38
  109. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +399 -0
  110. package/corpus/templates/design/app/components/design/EditPanel.tsx +3185 -439
  111. package/corpus/templates/design/app/components/design/LayersPanel.tsx +1124 -0
  112. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +3116 -147
  113. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +700 -13
  114. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +107 -63
  115. package/corpus/templates/design/app/components/design/index.ts +0 -5
  116. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +286 -0
  117. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +699 -0
  118. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +461 -0
  119. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +166 -0
  120. package/corpus/templates/design/app/components/design/inspector/FigmaColorPicker.tsx +1420 -0
  121. package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +420 -0
  122. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +215 -0
  123. package/corpus/templates/design/app/components/design/inspector/ShaderControls.stories.tsx +71 -0
  124. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +518 -0
  125. package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +106 -0
  126. package/corpus/templates/design/app/components/design/inspector/figma-icons.tsx +361 -0
  127. package/corpus/templates/design/app/components/design/inspector/index.ts +60 -0
  128. package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +201 -0
  129. package/corpus/templates/design/app/components/design/types.ts +23 -0
  130. package/corpus/templates/design/app/components/layout/Layout.tsx +24 -13
  131. package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -4
  132. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +474 -36
  133. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +22 -5
  134. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +24 -11
  135. package/corpus/templates/design/app/global.css +121 -3
  136. package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -0
  137. package/corpus/templates/design/app/hooks/use-navigation-state.ts +130 -8
  138. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +329 -0
  139. package/corpus/templates/design/app/i18n/zh-TW.ts +264 -0
  140. package/corpus/templates/design/app/i18n-data.ts +2790 -1
  141. package/corpus/templates/design/app/pages/DesignEditor.tsx +5108 -851
  142. package/corpus/templates/design/changelog/2026-06-28-annotate-mode-now-combines-drawing-and-comment-pins-in-one-c.md +6 -0
  143. package/corpus/templates/design/changelog/2026-06-28-design-editor-panel-borders-are-cleaner-so-the-canvas-edge-s.md +6 -0
  144. package/corpus/templates/design/changelog/2026-06-28-drawing-prompts-now-reliably-open-and-submit-to-the-design-a.md +6 -0
  145. package/corpus/templates/design/changelog/2026-06-28-editor-app-menus-now-use-an-outline-agent-native-mark-with-b.md +6 -0
  146. package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +6 -0
  147. package/corpus/templates/design/changelog/2026-06-28-layer-selection-now-updates-chat-context-without-opening-the.md +6 -0
  148. package/corpus/templates/design/changelog/2026-06-28-layer-selections-now-preserve-hidden-and-locked-canvas-state.md +6 -0
  149. package/corpus/templates/design/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  150. package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +6 -0
  151. package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +6 -0
  152. package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-handles-zooming-drawing-opening-and-dele.md +6 -0
  153. package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-selects-screens-on-click-and-opens-them-.md +6 -0
  154. package/corpus/templates/design/changelog/2026-06-28-screen-overview-zooms-into-the-active-screen-with-smoother-e.md +6 -0
  155. package/corpus/templates/design/changelog/2026-06-28-selected-element-chips-in-chat-are-shorter-and-easier-to-sca.md +6 -0
  156. package/corpus/templates/design/changelog/2026-06-28-the-design-editor-toolbar-is-more-compact-and-the-app-menu-m.md +6 -0
  157. package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-at-the-top-of-the-design-sidebar-instead-of-.md +6 -0
  158. package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-in-the-right-inspector-beside-the-design-tab.md +6 -0
  159. package/corpus/templates/design/changelog/2026-06-29-active-sidebar-rows-use-soft-highlights.md +6 -0
  160. package/corpus/templates/design/changelog/2026-06-29-agents-can-now-open-screen-overview-focus-screens-and-add.md +6 -0
  161. package/corpus/templates/design/changelog/2026-06-29-design-agents-now-edit-broad-copy-changes-more-reliably.md +6 -0
  162. package/corpus/templates/design/changelog/2026-06-29-design-editor-extensions-now-run-inline-beside-the-artboard.md +6 -0
  163. package/corpus/templates/design/changelog/2026-06-29-sidebars-use-darker-chrome-and-chat-warns-immediately.md +6 -0
  164. package/corpus/templates/design/changelog/2026-06-29-visual-edit-can-open-localhost-routes-as-url-backed-screens.md +6 -0
  165. package/corpus/templates/design/package.json +1 -0
  166. package/corpus/templates/design/server/db/schema.ts +26 -0
  167. package/corpus/templates/design/server/lib/design-snapshot.ts +1 -1
  168. package/corpus/templates/design/server/plugins/agent-chat.ts +3 -0
  169. package/corpus/templates/design/shared/api.ts +27 -0
  170. package/corpus/templates/design/shared/canvas-frames.ts +103 -0
  171. package/corpus/templates/design/shared/canvas-math.ts +1058 -0
  172. package/corpus/templates/design/shared/code-layer.ts +2212 -0
  173. package/corpus/templates/design/shared/color-utils.ts +180 -0
  174. package/corpus/templates/design/shared/generation-session.ts +61 -0
  175. package/corpus/templates/design/shared/shader-presets.ts +782 -0
  176. package/corpus/templates/design/shared/shader-safety.ts +137 -0
  177. package/corpus/templates/design/shared/source-mode.ts +237 -0
  178. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +149 -6
  179. package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
  180. package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
  181. package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
  182. package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
  183. package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
  184. package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
  185. package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
  186. package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
  187. package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
  188. package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
  189. package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
  190. package/corpus/templates/forms/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  191. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +2 -2
  192. package/corpus/templates/macros/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
  193. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +408 -247
  194. package/corpus/templates/mail/app/i18n/ar-SA.ts +4 -0
  195. package/corpus/templates/mail/app/i18n/de-DE.ts +4 -0
  196. package/corpus/templates/mail/app/i18n/en-US.ts +4 -0
  197. package/corpus/templates/mail/app/i18n/es-ES.ts +4 -0
  198. package/corpus/templates/mail/app/i18n/fr-FR.ts +4 -0
  199. package/corpus/templates/mail/app/i18n/hi-IN.ts +4 -0
  200. package/corpus/templates/mail/app/i18n/ja-JP.ts +4 -0
  201. package/corpus/templates/mail/app/i18n/ko-KR.ts +4 -0
  202. package/corpus/templates/mail/app/i18n/pt-BR.ts +4 -0
  203. package/corpus/templates/mail/app/i18n/zh-CN.ts +4 -0
  204. package/corpus/templates/mail/app/i18n/zh-TW.ts +4 -0
  205. package/corpus/templates/mail/changelog/2026-06-28-pinned-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  206. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +6 -8
  207. package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
  208. package/corpus/templates/plan/app/global.css +61 -78
  209. package/corpus/templates/plan/app/pages/PlansPage.tsx +8 -0
  210. package/corpus/templates/plan/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  211. package/corpus/templates/plan/changelog/2026-06-28-plans-use-the-shared-neutral-light-and-dark-theme.md +6 -0
  212. package/corpus/templates/plan/changelog/2026-06-28-sending-open-feedback-from-a-plan-now-opens-the-inline-plan-.md +6 -0
  213. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
  214. package/corpus/templates/slides/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  215. package/corpus/templates/videos/app/components/Sidebar.tsx +2 -2
  216. package/corpus/templates/videos/app/components/layout/Layout.tsx +29 -2
  217. package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +113 -30
  218. package/corpus/templates/videos/app/i18n/ar-SA.ts +2 -0
  219. package/corpus/templates/videos/app/i18n/de-DE.ts +2 -0
  220. package/corpus/templates/videos/app/i18n/en-US.ts +2 -0
  221. package/corpus/templates/videos/app/i18n/es-ES.ts +2 -0
  222. package/corpus/templates/videos/app/i18n/fr-FR.ts +2 -0
  223. package/corpus/templates/videos/app/i18n/hi-IN.ts +2 -0
  224. package/corpus/templates/videos/app/i18n/ja-JP.ts +2 -0
  225. package/corpus/templates/videos/app/i18n/ko-KR.ts +2 -0
  226. package/corpus/templates/videos/app/i18n/pt-BR.ts +2 -0
  227. package/corpus/templates/videos/app/i18n/zh-CN.ts +2 -0
  228. package/corpus/templates/videos/app/i18n/zh-TW.ts +2 -0
  229. package/corpus/templates/videos/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  230. package/dist/agent/engine/index.d.ts +1 -1
  231. package/dist/agent/engine/index.d.ts.map +1 -1
  232. package/dist/agent/engine/index.js +1 -1
  233. package/dist/agent/engine/index.js.map +1 -1
  234. package/dist/agent/engine/registry.d.ts +9 -0
  235. package/dist/agent/engine/registry.d.ts.map +1 -1
  236. package/dist/agent/engine/registry.js +37 -0
  237. package/dist/agent/engine/registry.js.map +1 -1
  238. package/dist/agent/production-agent.d.ts.map +1 -1
  239. package/dist/agent/production-agent.js +4 -3
  240. package/dist/agent/production-agent.js.map +1 -1
  241. package/dist/cli/design-connect.d.ts +52 -0
  242. package/dist/cli/design-connect.d.ts.map +1 -0
  243. package/dist/cli/design-connect.js +409 -0
  244. package/dist/cli/design-connect.js.map +1 -0
  245. package/dist/cli/index.js +15 -0
  246. package/dist/cli/index.js.map +1 -1
  247. package/dist/cli/skills.d.ts +3 -0
  248. package/dist/cli/skills.d.ts.map +1 -1
  249. package/dist/cli/skills.js +121 -3
  250. package/dist/cli/skills.js.map +1 -1
  251. package/dist/client/AssistantChat.d.ts.map +1 -1
  252. package/dist/client/AssistantChat.js +38 -8
  253. package/dist/client/AssistantChat.js.map +1 -1
  254. package/dist/client/agent-chat.d.ts +6 -0
  255. package/dist/client/agent-chat.d.ts.map +1 -1
  256. package/dist/client/agent-chat.js +17 -3
  257. package/dist/client/agent-chat.js.map +1 -1
  258. package/dist/client/blocks/library/MermaidBlock.js +1 -1
  259. package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
  260. package/dist/client/blocks/library/diagram.js +1 -1
  261. package/dist/client/blocks/library/diagram.js.map +1 -1
  262. package/dist/client/blocks/library/wireframe.js +1 -1
  263. package/dist/client/blocks/library/wireframe.js.map +1 -1
  264. package/dist/client/chat/message-components.js +1 -1
  265. package/dist/client/chat/message-components.js.map +1 -1
  266. package/dist/client/chat-model-groups.d.ts.map +1 -1
  267. package/dist/client/chat-model-groups.js +1 -2
  268. package/dist/client/chat-model-groups.js.map +1 -1
  269. package/dist/client/components/LiveCursorOverlay.d.ts +1 -2
  270. package/dist/client/components/LiveCursorOverlay.d.ts.map +1 -1
  271. package/dist/client/components/LiveCursorOverlay.js +19 -40
  272. package/dist/client/components/LiveCursorOverlay.js.map +1 -1
  273. package/dist/client/composer/TiptapComposer.d.ts +3 -1
  274. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  275. package/dist/client/composer/TiptapComposer.js +86 -24
  276. package/dist/client/composer/TiptapComposer.js.map +1 -1
  277. package/dist/client/composer/useVoiceDictation.d.ts +9 -0
  278. package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
  279. package/dist/client/composer/useVoiceDictation.js +154 -32
  280. package/dist/client/composer/useVoiceDictation.js.map +1 -1
  281. package/dist/client/frame-protocol.d.ts +17 -2
  282. package/dist/client/frame-protocol.d.ts.map +1 -1
  283. package/dist/client/frame-protocol.js.map +1 -1
  284. package/dist/client/rich-markdown-editor/RegistryBlockNode.js +2 -2
  285. package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
  286. package/dist/client/sharing/ShareButton.d.ts +2 -0
  287. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  288. package/dist/client/sharing/ShareButton.js +7 -6
  289. package/dist/client/sharing/ShareButton.js.map +1 -1
  290. package/dist/client/use-agent-engine-configured.d.ts +5 -0
  291. package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
  292. package/dist/client/use-agent-engine-configured.js +51 -25
  293. package/dist/client/use-agent-engine-configured.js.map +1 -1
  294. package/dist/collab/awareness.d.ts +2 -2
  295. package/dist/collab/awareness.d.ts.map +1 -1
  296. package/dist/collab/routes.d.ts +1 -1
  297. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  298. package/dist/notifications/routes.d.ts +3 -3
  299. package/dist/observability/routes.d.ts +8 -8
  300. package/dist/progress/routes.d.ts +1 -1
  301. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  302. package/dist/server/transcribe-voice.d.ts.map +1 -1
  303. package/dist/server/transcribe-voice.js +40 -24
  304. package/dist/server/transcribe-voice.js.map +1 -1
  305. package/dist/shared/mcp-embed-headers.d.ts +1 -0
  306. package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
  307. package/dist/shared/mcp-embed-headers.js +20 -1
  308. package/dist/shared/mcp-embed-headers.js.map +1 -1
  309. package/dist/styles/agent-native.css +56 -7
  310. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  311. package/dist/vite/client.d.ts.map +1 -1
  312. package/dist/vite/client.js +2 -0
  313. package/dist/vite/client.js.map +1 -1
  314. package/dist/voice/index.d.ts +5 -0
  315. package/dist/voice/index.d.ts.map +1 -0
  316. package/dist/voice/index.js +4 -0
  317. package/dist/voice/index.js.map +1 -0
  318. package/dist/voice/voice-cleanup-prompt.d.ts +6 -0
  319. package/dist/voice/voice-cleanup-prompt.d.ts.map +1 -0
  320. package/dist/voice/voice-cleanup-prompt.js +26 -0
  321. package/dist/voice/voice-cleanup-prompt.js.map +1 -0
  322. package/dist/voice/voice-context.d.ts +25 -0
  323. package/dist/voice/voice-context.d.ts.map +1 -0
  324. package/dist/voice/voice-context.js +156 -0
  325. package/dist/voice/voice-context.js.map +1 -0
  326. package/dist/voice/voice-replacements.d.ts +4 -0
  327. package/dist/voice/voice-replacements.d.ts.map +1 -0
  328. package/dist/voice/voice-replacements.js +52 -0
  329. package/dist/voice/voice-replacements.js.map +1 -0
  330. package/docs/content/locales/ar-SA/template-design.mdx +41 -0
  331. package/docs/content/locales/de-DE/template-design.mdx +51 -0
  332. package/docs/content/locales/es-ES/template-design.mdx +50 -0
  333. package/docs/content/locales/fr-FR/template-design.mdx +49 -0
  334. package/docs/content/locales/hi-IN/template-design.mdx +44 -0
  335. package/docs/content/locales/ja-JP/template-design.mdx +46 -0
  336. package/docs/content/locales/ko-KR/template-design.mdx +44 -0
  337. package/docs/content/locales/pt-BR/template-design.mdx +48 -0
  338. package/docs/content/locales/zh-CN/template-design.mdx +36 -0
  339. package/docs/content/locales/zh-TW/template-design.mdx +38 -0
  340. package/docs/content/template-design.mdx +45 -0
  341. package/package.json +2 -1
  342. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  343. package/corpus/templates/design/app/components/design/DesignToolbar.tsx +0 -339
  344. package/corpus/templates/design/app/components/design/PresentMode.tsx +0 -68
  345. package/corpus/templates/design/app/components/design/ViewportTabs.tsx +0 -149
  346. package/corpus/templates/design/app/components/design/ZoomControls.tsx +0 -157
@@ -17,19 +17,26 @@
17
17
  * The hook exposes amplitude (0..1) and duration (ms) so the composer can
18
18
  * render the Lovable-style live waveform + MM:SS timer.
19
19
  */
20
+ import { type VoiceContextPack } from "../../voice/index.js";
20
21
  export type VoiceProvider = "auto" | "openai" | "browser" | "google-realtime" | "builder-gemini" | "builder" | "gemini" | "groq";
21
22
  export type TranscriptionMode = "mac-native" | "google-realtime" | "batch";
22
23
  export interface VoicePrefs {
23
24
  provider: VoiceProvider;
24
25
  transcriptionMode?: TranscriptionMode;
25
26
  instructions?: string;
27
+ cleanupEnabled?: boolean;
26
28
  }
29
+ export interface VoiceCleanupPrefs {
30
+ enabled?: boolean;
31
+ }
32
+ type VoiceContextPackSource = VoiceContextPack | (() => VoiceContextPack | undefined | Promise<VoiceContextPack | undefined>) | undefined;
27
33
  export type VoiceState = "idle" | "starting" | "recording" | "transcribing" | "error";
28
34
  export interface UseVoiceDictationOptions {
29
35
  onTranscript: (text: string) => void;
30
36
  onError?: (message: string) => void;
31
37
  /** Called with (accumulatedFinalText, currentInterimText) as speech is recognized in real time. */
32
38
  onLiveUpdate?: (finalText: string, interimText: string) => void;
39
+ contextPack?: VoiceContextPackSource;
33
40
  }
34
41
  export interface VoiceDictationApi {
35
42
  state: VoiceState;
@@ -43,6 +50,8 @@ export interface VoiceDictationApi {
43
50
  cancel: () => void;
44
51
  dismissError: () => void;
45
52
  }
53
+ export declare function providerForTextCleanup(provider: VoiceProvider): VoiceProvider;
46
54
  export declare function voiceDictationStartErrorMessage(error: unknown): string;
47
55
  export declare function useVoiceDictation(options: UseVoiceDictationOptions): VoiceDictationApi;
56
+ export {};
48
57
  //# sourceMappingURL=useVoiceDictation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useVoiceDictation.d.ts","sourceRoot":"","sources":["../../../src/client/composer/useVoiceDictation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,gBAAgB,GAChB,SAAS,GACT,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,iBAAiB,GAAG,OAAO,CAAC;AAE3E,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,aAAa,CAAC;IACxB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAgDD,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,UAAU,GACV,WAAW,GACX,cAAc,GACd,OAAO,CAAC;AAEZ,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,mGAAmG;IACnG,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACjE;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAsFD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAkCtE;AAeD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,iBAAiB,CA+tBnB"}
1
+ {"version":3,"file":"useVoiceDictation.d.ts","sourceRoot":"","sources":["../../../src/client/composer/useVoiceDictation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,gBAAgB,GAChB,SAAS,GACT,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,iBAAiB,GAAG,OAAO,CAAC;AAE3E,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,aAAa,CAAC;IACxB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,KAAK,sBAAsB,GACvB,gBAAgB,GAChB,CAAC,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC,GAC5E,SAAS,CAAC;AAoDd,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,UAAU,GACV,WAAW,GACX,cAAc,GACd,OAAO,CAAC;AAEZ,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,mGAAmG;IACnG,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAqHD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa,CAE7E;AA0DD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAkCtE;AAeD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,iBAAiB,CA0xBnB"}
@@ -18,9 +18,12 @@
18
18
  * render the Lovable-style live waveform + MM:SS timer.
19
19
  */
20
20
  import { useCallback, useEffect, useRef, useState } from "react";
21
+ import { applyVoiceContextReplacements, } from "../../voice/index.js";
21
22
  import { agentNativePath } from "../api-path.js";
22
23
  const PREFS_KEY = "voice-transcription-prefs";
24
+ const CLEANUP_PREFS_KEY = "voice-cleanup-prefs";
23
25
  const PREFS_URL = agentNativePath(`/_agent-native/application-state/${PREFS_KEY}`);
26
+ const CLEANUP_PREFS_URL = agentNativePath(`/_agent-native/application-state/${CLEANUP_PREFS_KEY}`);
24
27
  const TRANSCRIBE_URL = agentNativePath("/_agent-native/transcribe-voice");
25
28
  const GOOGLE_REALTIME_SESSION_URL = agentNativePath("/_agent-native/transcribe-stream/session");
26
29
  const GOOGLE_REALTIME_WS_PROTOCOL = "google-realtime.v1";
@@ -55,10 +58,15 @@ function normalizeProviderForMode(mode, provider) {
55
58
  return provider === "builder" ? "builder-gemini" : provider;
56
59
  }
57
60
  async function readVoicePrefs() {
61
+ const cleanupPrefs = await readVoiceCleanupPrefs();
58
62
  try {
59
63
  const res = await fetch(PREFS_URL);
60
- if (!res.ok)
61
- return { provider: await defaultProvider() };
64
+ if (!res.ok) {
65
+ return {
66
+ provider: await defaultProvider(),
67
+ cleanupEnabled: cleanupPrefs.enabled,
68
+ };
69
+ }
62
70
  const body = (await res.json());
63
71
  const value = body?.value ??
64
72
  body;
@@ -74,6 +82,7 @@ async function readVoicePrefs() {
74
82
  return {
75
83
  transcriptionMode: mode,
76
84
  provider,
85
+ cleanupEnabled: cleanupPrefs.enabled,
77
86
  instructions: typeof instructions === "string" ? instructions.trim() : undefined,
78
87
  };
79
88
  }
@@ -81,7 +90,24 @@ async function readVoicePrefs() {
81
90
  catch {
82
91
  /* fall through */
83
92
  }
84
- return { provider: await defaultProvider() };
93
+ return {
94
+ provider: await defaultProvider(),
95
+ cleanupEnabled: cleanupPrefs.enabled,
96
+ };
97
+ }
98
+ async function readVoiceCleanupPrefs() {
99
+ try {
100
+ const res = await fetch(CLEANUP_PREFS_URL);
101
+ if (!res.ok)
102
+ return {};
103
+ const body = (await res.json());
104
+ const value = body?.value ??
105
+ body;
106
+ return { enabled: value?.enabled === true };
107
+ }
108
+ catch {
109
+ return {};
110
+ }
85
111
  }
86
112
  function getSpeechRecognitionCtor() {
87
113
  if (typeof window === "undefined")
@@ -110,6 +136,52 @@ function pickMimeType() {
110
136
  }
111
137
  return "audio/webm";
112
138
  }
139
+ async function resolveVoiceContextPack(source) {
140
+ try {
141
+ const value = typeof source === "function" ? await source() : source;
142
+ return value && typeof value === "object" ? value : undefined;
143
+ }
144
+ catch {
145
+ return undefined;
146
+ }
147
+ }
148
+ function appendVoiceContext(form, contextPack) {
149
+ if (!contextPack)
150
+ return;
151
+ try {
152
+ form.append("voiceContext", JSON.stringify(contextPack));
153
+ }
154
+ catch {
155
+ /* best effort */
156
+ }
157
+ }
158
+ export function providerForTextCleanup(provider) {
159
+ return provider === "google-realtime" ? "auto" : provider;
160
+ }
161
+ async function cleanupRecognizedText({ text, provider, instructions, contextPack, }) {
162
+ if (provider === "browser") {
163
+ return applyVoiceContextReplacements(text, contextPack);
164
+ }
165
+ const form = new FormData();
166
+ form.append("text", text);
167
+ form.append("provider", providerForTextCleanup(provider));
168
+ if (instructions?.trim()) {
169
+ form.append("instructions", instructions.trim());
170
+ }
171
+ appendVoiceContext(form, contextPack);
172
+ const res = await fetch(TRANSCRIBE_URL, {
173
+ method: "POST",
174
+ body: form,
175
+ });
176
+ if (!res.ok) {
177
+ const body = await res
178
+ .json()
179
+ .catch(() => ({ error: `HTTP ${res.status}` }));
180
+ throw new Error(body.error || `Transcript cleanup failed (${res.status})`);
181
+ }
182
+ const data = (await res.json());
183
+ return (data.text ?? "").trim() || text;
184
+ }
113
185
  function microphoneBlockedByPermissionsPolicy() {
114
186
  if (typeof document === "undefined")
115
187
  return false;
@@ -161,13 +233,15 @@ function voiceDictationSpeechErrorMessage(error) {
161
233
  return `Speech recognition error: ${error ?? "unknown"}`;
162
234
  }
163
235
  export function useVoiceDictation(options) {
164
- const { onTranscript, onError, onLiveUpdate } = options;
236
+ const { onTranscript, onError, onLiveUpdate, contextPack } = options;
165
237
  const onTranscriptRef = useRef(onTranscript);
166
238
  const onErrorRef = useRef(onError);
167
239
  const onLiveUpdateRef = useRef(onLiveUpdate);
240
+ const contextPackRef = useRef(contextPack);
168
241
  onTranscriptRef.current = onTranscript;
169
242
  onErrorRef.current = onError;
170
243
  onLiveUpdateRef.current = onLiveUpdate;
244
+ contextPackRef.current = contextPack;
171
245
  const [state, setState] = useState("idle");
172
246
  const [amplitude, setAmplitude] = useState(0);
173
247
  const [durationMs, setDurationMs] = useState(0);
@@ -270,6 +344,7 @@ export function useVoiceDictation(options) {
270
344
  onErrorRef.current?.(message);
271
345
  teardown();
272
346
  }, [teardown]);
347
+ const getVoiceContextPack = useCallback(() => resolveVoiceContextPack(contextPackRef.current), []);
273
348
  const startMeter = useCallback((stream) => {
274
349
  try {
275
350
  const AudioCtor = typeof window !== "undefined"
@@ -356,6 +431,7 @@ export function useVoiceDictation(options) {
356
431
  if (instructions?.trim()) {
357
432
  form.append("instructions", instructions.trim());
358
433
  }
434
+ appendVoiceContext(form, await getVoiceContextPack());
359
435
  const res = await fetch(TRANSCRIBE_URL, {
360
436
  method: "POST",
361
437
  body: form,
@@ -445,8 +521,8 @@ export function useVoiceDictation(options) {
445
521
  /* best effort — live preview just won't appear */
446
522
  }
447
523
  }
448
- }, [startMeter, startTimer, teardown, failWith]);
449
- const startBrowser = useCallback(async () => {
524
+ }, [startMeter, startTimer, teardown, failWith, getVoiceContextPack]);
525
+ const startBrowser = useCallback(async (prefs) => {
450
526
  const Ctor = getSpeechRecognitionCtor();
451
527
  if (!Ctor) {
452
528
  throw new Error("Your browser doesn't support speech recognition. Add an OpenAI API key in settings for Whisper transcription.");
@@ -503,15 +579,38 @@ export function useVoiceDictation(options) {
503
579
  const wasCancelled = cancelledRef.current;
504
580
  cancelledRef.current = false;
505
581
  teardown();
506
- if (!wasCancelled && text)
507
- onTranscriptRef.current?.(text);
508
- setState("idle");
582
+ if (wasCancelled || !text) {
583
+ setState("idle");
584
+ return;
585
+ }
586
+ void (async () => {
587
+ let finalText = text;
588
+ if (prefs.cleanupEnabled) {
589
+ setState("transcribing");
590
+ try {
591
+ finalText = await cleanupRecognizedText({
592
+ text,
593
+ provider: prefs.provider,
594
+ instructions: prefs.instructions,
595
+ contextPack: await getVoiceContextPack(),
596
+ });
597
+ }
598
+ catch {
599
+ finalText = text;
600
+ }
601
+ }
602
+ if (!cancelledRef.current && finalText) {
603
+ onTranscriptRef.current?.(finalText);
604
+ }
605
+ cancelledRef.current = false;
606
+ setState("idle");
607
+ })();
509
608
  };
510
609
  startTimer();
511
610
  setState("recording");
512
611
  recognition.start();
513
- }, [startMeter, startTimer, teardown, failWith]);
514
- const startGoogleRealtime = useCallback(async () => {
612
+ }, [startMeter, startTimer, teardown, failWith, getVoiceContextPack]);
613
+ const startGoogleRealtime = useCallback(async (prefs) => {
515
614
  const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
516
615
  if (cancelledRef.current) {
517
616
  for (const track of stream.getTracks())
@@ -557,25 +656,48 @@ export function useVoiceDictation(options) {
557
656
  if (finalized)
558
657
  return;
559
658
  finalized = true;
560
- const finalText = realtimeFinalRef.current.trim();
561
- const interimText = realtimeInterimRef.current.trim();
562
- const text = [finalText, interimText].filter(Boolean).join(" ").trim();
563
- teardown();
564
- if (cancelledRef.current) {
565
- cancelledRef.current = false;
566
- setState("idle");
567
- return;
568
- }
569
- if (text) {
570
- onTranscriptRef.current?.(text);
659
+ void (async () => {
660
+ const finalText = realtimeFinalRef.current.trim();
661
+ const interimText = realtimeInterimRef.current.trim();
662
+ const text = [finalText, interimText]
663
+ .filter(Boolean)
664
+ .join(" ")
665
+ .trim();
666
+ teardown();
667
+ if (cancelledRef.current) {
668
+ cancelledRef.current = false;
669
+ setState("idle");
670
+ return;
671
+ }
672
+ if (text) {
673
+ let cleanedText = text;
674
+ if (prefs.cleanupEnabled) {
675
+ setState("transcribing");
676
+ try {
677
+ cleanedText = await cleanupRecognizedText({
678
+ text,
679
+ provider: prefs.provider,
680
+ instructions: prefs.instructions,
681
+ contextPack: await getVoiceContextPack(),
682
+ });
683
+ }
684
+ catch {
685
+ cleanedText = text;
686
+ }
687
+ }
688
+ if (!cancelledRef.current && cleanedText) {
689
+ onTranscriptRef.current?.(cleanedText);
690
+ }
691
+ cancelledRef.current = false;
692
+ setState("idle");
693
+ return;
694
+ }
695
+ if (errorMessage) {
696
+ failWith(errorMessage);
697
+ return;
698
+ }
571
699
  setState("idle");
572
- return;
573
- }
574
- if (errorMessage) {
575
- failWith(errorMessage);
576
- return;
577
- }
578
- setState("idle");
700
+ })();
579
701
  };
580
702
  recorder.ondataavailable = async (event) => {
581
703
  if (!event.data || event.data.size === 0)
@@ -703,7 +825,7 @@ export function useVoiceDictation(options) {
703
825
  finish(err?.message ?? "Could not start realtime stream");
704
826
  }
705
827
  };
706
- }, [startMeter, startTimer, teardown, failWith]);
828
+ }, [startMeter, startTimer, teardown, failWith, getVoiceContextPack]);
707
829
  const start = useCallback(async () => {
708
830
  if (state === "recording" || state === "starting")
709
831
  return;
@@ -740,10 +862,10 @@ export function useVoiceDictation(options) {
740
862
  if (!mediaRecorderSupported) {
741
863
  throw new Error("Your browser doesn't support audio recording, so Google realtime transcription can't start.");
742
864
  }
743
- await startGoogleRealtime();
865
+ await startGoogleRealtime(prefs);
744
866
  }
745
867
  else {
746
- await startBrowser();
868
+ await startBrowser(prefs);
747
869
  }
748
870
  }
749
871
  catch (err) {