@agent-native/core 0.149.1 → 0.149.3

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 (422) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +54 -488
  3. package/corpus/templates/analytics/.agents/skills/actions/references/action-fields.md +136 -0
  4. package/corpus/templates/analytics/.agents/skills/actions/references/examples.md +94 -0
  5. package/corpus/templates/analytics/.agents/skills/actions/references/provider-apis.md +95 -0
  6. package/corpus/templates/analytics/.agents/skills/create-skill/SKILL.md +9 -35
  7. package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +4 -2
  8. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +2 -0
  9. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +4 -5
  10. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +18 -31
  11. package/corpus/templates/analytics/AGENTS.md +25 -32
  12. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +150 -46
  13. package/corpus/templates/analytics/app/global.css +1 -1
  14. package/corpus/templates/analytics/app/i18n-data.ts +37 -0
  15. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
  16. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -0
  17. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -0
  18. package/corpus/templates/analytics/changelog/2026-08-10-dashboard-tables-can-be-copied-and-sorted-by-multiple-column.md +6 -0
  19. package/corpus/templates/analytics/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  20. package/corpus/templates/analytics/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  21. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +54 -488
  22. package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +136 -0
  23. package/corpus/templates/assets/.agents/skills/actions/references/examples.md +94 -0
  24. package/corpus/templates/assets/.agents/skills/actions/references/provider-apis.md +95 -0
  25. package/corpus/templates/assets/.agents/skills/create-skill/SKILL.md +9 -35
  26. package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +4 -2
  27. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +4 -5
  28. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +18 -31
  29. package/corpus/templates/assets/AGENTS.md +6 -9
  30. package/corpus/templates/assets/app/global.css +1 -1
  31. package/corpus/templates/assets/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  32. package/corpus/templates/assets/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  33. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +54 -488
  34. package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +136 -0
  35. package/corpus/templates/brain/.agents/skills/actions/references/examples.md +94 -0
  36. package/corpus/templates/brain/.agents/skills/actions/references/provider-apis.md +95 -0
  37. package/corpus/templates/brain/.agents/skills/create-skill/SKILL.md +9 -35
  38. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +4 -5
  39. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +18 -31
  40. package/corpus/templates/brain/AGENTS.md +5 -12
  41. package/corpus/templates/brain/app/global.css +1 -1
  42. package/corpus/templates/brain/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  43. package/corpus/templates/brain/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  44. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +54 -488
  45. package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +136 -0
  46. package/corpus/templates/calendar/.agents/skills/actions/references/examples.md +94 -0
  47. package/corpus/templates/calendar/.agents/skills/actions/references/provider-apis.md +95 -0
  48. package/corpus/templates/calendar/.agents/skills/create-skill/SKILL.md +9 -35
  49. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +4 -5
  50. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +18 -31
  51. package/corpus/templates/calendar/AGENTS.md +8 -9
  52. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  53. package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  54. package/corpus/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  55. package/corpus/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  56. package/corpus/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  57. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  58. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  59. package/corpus/templates/chat/AGENTS.md +32 -80
  60. package/corpus/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  61. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +54 -488
  62. package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +136 -0
  63. package/corpus/templates/clips/.agents/skills/actions/references/examples.md +94 -0
  64. package/corpus/templates/clips/.agents/skills/actions/references/provider-apis.md +95 -0
  65. package/corpus/templates/clips/.agents/skills/create-skill/SKILL.md +9 -35
  66. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +4 -5
  67. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +18 -31
  68. package/corpus/templates/clips/AGENTS.md +25 -31
  69. package/corpus/templates/clips/changelog/2026-08-10-clips-desktop-sign-in-now-starts-with-magic-links-and-google.md +6 -0
  70. package/corpus/templates/clips/chrome-extension/src/overlay.css +1 -0
  71. package/corpus/templates/clips/desktop/src/app.tsx +274 -137
  72. package/corpus/templates/clips/desktop/src/styles.css +35 -0
  73. package/corpus/templates/content/.agents/skills/actions/SKILL.md +54 -488
  74. package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +136 -0
  75. package/corpus/templates/content/.agents/skills/actions/references/examples.md +94 -0
  76. package/corpus/templates/content/.agents/skills/actions/references/provider-apis.md +95 -0
  77. package/corpus/templates/content/.agents/skills/create-skill/SKILL.md +9 -35
  78. package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +4 -2
  79. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +4 -5
  80. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +18 -31
  81. package/corpus/templates/content/AGENTS.md +5 -9
  82. package/corpus/templates/content/app/global.css +1 -0
  83. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +18 -31
  84. package/corpus/templates/crm/AGENTS.md +7 -11
  85. package/corpus/templates/crm/app/global.css +1 -1
  86. package/corpus/templates/crm/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  87. package/corpus/templates/crm/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  88. package/corpus/templates/design/.agents/skills/actions/SKILL.md +54 -488
  89. package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +136 -0
  90. package/corpus/templates/design/.agents/skills/actions/references/examples.md +94 -0
  91. package/corpus/templates/design/.agents/skills/actions/references/provider-apis.md +95 -0
  92. package/corpus/templates/design/.agents/skills/create-skill/SKILL.md +9 -35
  93. package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +4 -2
  94. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +4 -5
  95. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +18 -31
  96. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +70 -3
  97. package/corpus/templates/design/AGENTS.md +13 -21
  98. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +12 -0
  99. package/corpus/templates/design/app/components/design/LayersPanel.tsx +19 -2
  100. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +115 -7
  101. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +82 -7
  102. package/corpus/templates/design/app/components/design/design-trace.ts +120 -0
  103. package/corpus/templates/design/app/components/design/dnd-debug.ts +2 -1
  104. package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +40 -26
  105. package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -1
  106. package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +12 -3
  107. package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +4 -0
  108. package/corpus/templates/design/app/components/design/multi-screen/types.ts +7 -0
  109. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -2
  110. package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -2
  111. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -0
  112. package/corpus/templates/design/app/i18n-data.ts +1 -0
  113. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +5 -5
  114. package/corpus/templates/design/app/pages/DesignSystems.tsx +3 -2
  115. package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +100 -13
  116. package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +1 -1
  117. package/corpus/templates/design/app/pages/design-editor/data-operations.ts +14 -0
  118. package/corpus/templates/design/changelog/2026-08-10-marquee-selecting-layers-far-down-a-tall-screen-now-selects-.md +6 -0
  119. package/corpus/templates/design/changelog/2026-08-10-the-frame-tool-draws-a-plain-frame-by-default-with-screen-av.md +6 -0
  120. package/corpus/templates/design/e2e/global-setup.ts +27 -32
  121. package/corpus/templates/design/playwright.config.ts +3 -5
  122. package/corpus/templates/design/shared/breakpoint-media.ts +9 -2
  123. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +54 -488
  124. package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +136 -0
  125. package/corpus/templates/dispatch/.agents/skills/actions/references/examples.md +94 -0
  126. package/corpus/templates/dispatch/.agents/skills/actions/references/provider-apis.md +95 -0
  127. package/corpus/templates/dispatch/.agents/skills/create-skill/SKILL.md +9 -35
  128. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +4 -5
  129. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +18 -31
  130. package/corpus/templates/dispatch/AGENTS.md +9 -16
  131. package/corpus/templates/dispatch/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  132. package/corpus/templates/factory/.agents/skills/actions/SKILL.md +54 -488
  133. package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +136 -0
  134. package/corpus/templates/factory/.agents/skills/actions/references/examples.md +94 -0
  135. package/corpus/templates/factory/.agents/skills/actions/references/provider-apis.md +95 -0
  136. package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +9 -35
  137. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +4 -5
  138. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +18 -31
  139. package/corpus/templates/factory/AGENTS.md +10 -24
  140. package/corpus/templates/factory/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  141. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +54 -488
  142. package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +136 -0
  143. package/corpus/templates/forms/.agents/skills/actions/references/examples.md +94 -0
  144. package/corpus/templates/forms/.agents/skills/actions/references/provider-apis.md +95 -0
  145. package/corpus/templates/forms/.agents/skills/create-skill/SKILL.md +9 -35
  146. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +4 -5
  147. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +18 -31
  148. package/corpus/templates/forms/AGENTS.md +11 -17
  149. package/corpus/templates/forms/app/global.css +1 -0
  150. package/corpus/templates/forms/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  151. package/corpus/templates/forms/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  152. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +4 -5
  153. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +18 -31
  154. package/corpus/templates/macros/AGENTS.md +8 -8
  155. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +54 -488
  156. package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +136 -0
  157. package/corpus/templates/mail/.agents/skills/actions/references/examples.md +94 -0
  158. package/corpus/templates/mail/.agents/skills/actions/references/provider-apis.md +95 -0
  159. package/corpus/templates/mail/.agents/skills/create-skill/SKILL.md +9 -35
  160. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +4 -5
  161. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +18 -31
  162. package/corpus/templates/mail/AGENTS.md +5 -6
  163. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +54 -488
  164. package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +136 -0
  165. package/corpus/templates/plan/.agents/skills/actions/references/examples.md +94 -0
  166. package/corpus/templates/plan/.agents/skills/actions/references/provider-apis.md +95 -0
  167. package/corpus/templates/plan/.agents/skills/create-skill/SKILL.md +9 -35
  168. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +4 -5
  169. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +18 -31
  170. package/corpus/templates/plan/AGENTS.md +5 -14
  171. package/corpus/templates/plan/app/global.css +1 -0
  172. package/corpus/templates/plan/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  173. package/corpus/templates/plan/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
  174. package/corpus/templates/plan/server/ui-plan-html.ts +4 -1
  175. package/corpus/templates/plan/vite.config.ts +5 -0
  176. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +54 -488
  177. package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +136 -0
  178. package/corpus/templates/slides/.agents/skills/actions/references/examples.md +94 -0
  179. package/corpus/templates/slides/.agents/skills/actions/references/provider-apis.md +95 -0
  180. package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +2 -2
  181. package/corpus/templates/slides/.agents/skills/create-skill/SKILL.md +9 -35
  182. package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +6 -3
  183. package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +6 -1
  184. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +4 -5
  185. package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +3 -2
  186. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -0
  187. package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -3
  188. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +18 -31
  189. package/corpus/templates/slides/AGENTS.md +33 -35
  190. package/corpus/templates/slides/actions/add-deck.ts +2 -0
  191. package/corpus/templates/slides/actions/add-slide.ts +15 -1
  192. package/corpus/templates/slides/actions/create-deck.ts +18 -6
  193. package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
  194. package/corpus/templates/slides/actions/get-deck.ts +83 -7
  195. package/corpus/templates/slides/actions/import-file.ts +2 -1
  196. package/corpus/templates/slides/actions/patch-deck.ts +165 -9
  197. package/corpus/templates/slides/actions/save-deck.ts +24 -1
  198. package/corpus/templates/slides/actions/update-slide.ts +1 -1
  199. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +2 -2
  200. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -23
  201. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -2
  202. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +6 -6
  203. package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +3 -3
  204. package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +4 -4
  205. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
  206. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +432 -668
  207. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +296 -259
  208. package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +1 -1
  209. package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +13 -1
  210. package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +56 -174
  211. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +241 -116
  212. package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
  213. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +42 -14
  214. package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +6 -12
  215. package/corpus/templates/slides/app/components/editor/editor-command-model.ts +35 -0
  216. package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +1 -1
  217. package/corpus/templates/slides/app/components/layout/Layout.tsx +34 -35
  218. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +8 -10
  219. package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +2 -5
  220. package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +45 -40
  221. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +63 -16
  222. package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
  223. package/corpus/templates/slides/app/global.css +76 -1
  224. package/corpus/templates/slides/app/hooks/use-generating-slide-preview.ts +25 -3
  225. package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
  226. package/corpus/templates/slides/app/lib/create-deck-generation.ts +52 -23
  227. package/corpus/templates/slides/app/lib/recent-references.ts +23 -1
  228. package/corpus/templates/slides/app/lib/slide-animation-elements.ts +104 -3
  229. package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -33
  230. package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
  231. package/corpus/templates/slides/app/pages/Index.tsx +315 -151
  232. package/corpus/templates/slides/app/root.tsx +43 -0
  233. package/corpus/templates/slides/changelog/2026-08-10-ai-editing-avatar-badge.md +6 -0
  234. package/corpus/templates/slides/changelog/2026-08-10-generated-decks-keep-a-clear-human-readable-title.md +6 -0
  235. package/corpus/templates/slides/changelog/2026-08-10-new-deck-creation-now-shows-progress-opens-the-editor-direct.md +6 -0
  236. package/corpus/templates/slides/changelog/2026-08-10-presentation-reveals-now-follow-valid-targets.md +6 -0
  237. package/corpus/templates/slides/changelog/2026-08-10-slides-editing-controls-are-consolidated-into-one-focused-me.md +6 -0
  238. package/corpus/templates/slides/changelog/2026-08-10-slides-now-verify-and-restyle-every-imported-slide-in-one-pa.md +6 -0
  239. package/corpus/templates/slides/changelog/2026-08-10-slides-only-suggests-a-google-connection-for-relevant-reques.md +6 -0
  240. package/corpus/templates/slides/changelog/2026-08-10-the-google-slides-import-option-is-now-labeled-slides.md +6 -0
  241. package/corpus/templates/slides/changelog/2026-08-11-faster-slides-chat-deck-reads.md +6 -0
  242. package/corpus/templates/slides/changelog/2026-08-11-slides-chat-can-read-one-slide-without-loading-the-full-deck.md +6 -0
  243. package/corpus/templates/slides/changelog/2026-08-11-slides-clearly-indicate-when-an-ai-agent-is-editing-alongsid.md +6 -0
  244. package/corpus/templates/slides/package.json +1 -0
  245. package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
  246. package/corpus/templates/slides/server/lib/validate-slide-animations.ts +163 -0
  247. package/corpus/templates/slides/server/plugins/agent-chat.ts +8 -5
  248. package/corpus/templates/slides/shared/api.ts +47 -15
  249. package/corpus/templates/slides/shared/deck-title.ts +135 -0
  250. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +54 -488
  251. package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +136 -0
  252. package/corpus/templates/tasks/.agents/skills/actions/references/examples.md +94 -0
  253. package/corpus/templates/tasks/.agents/skills/actions/references/provider-apis.md +95 -0
  254. package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +1 -0
  255. package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +9 -35
  256. package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +1 -0
  257. package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +1 -0
  258. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +4 -5
  259. package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +1 -0
  260. package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +1 -0
  261. package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +1 -0
  262. package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +1 -0
  263. package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +1 -0
  264. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +18 -31
  265. package/corpus/templates/tasks/AGENTS.md +5 -20
  266. package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +4 -1
  267. package/dist/agent/engine/ai-sdk-engine.js +1 -1
  268. package/dist/agent/production-agent.d.ts +21 -1
  269. package/dist/agent/production-agent.js +505 -355
  270. package/dist/agent/run-manager.js +156 -14
  271. package/dist/agent/run-store.d.ts +11 -10
  272. package/dist/agent/run-store.js +17 -13
  273. package/dist/agent/tool-approval-store.d.ts +18 -0
  274. package/dist/agent/tool-approval-store.js +122 -0
  275. package/dist/agent/types.d.ts +1 -1
  276. package/dist/cli/code-agent-executor.js +11 -2
  277. package/dist/client/AgentPanel.js +31 -6
  278. package/dist/client/AssistantChat.d.ts +9 -4
  279. package/dist/client/AssistantChat.js +221 -149
  280. package/dist/client/active-run-state.d.ts +9 -1
  281. package/dist/client/active-run-state.js +34 -3
  282. package/dist/client/agent-chat/index.d.ts +1 -1
  283. package/dist/client/agent-chat-adapter.d.ts +8 -0
  284. package/dist/client/agent-chat-adapter.js +125 -28
  285. package/dist/client/agent-chat.d.ts +1 -1
  286. package/dist/client/chat/markdown-renderer.js +14 -2
  287. package/dist/client/chat/message-components.d.ts +13 -3
  288. package/dist/client/chat/message-components.js +57 -52
  289. package/dist/client/chat/run-recovery.d.ts +1 -0
  290. package/dist/client/chat/run-recovery.js +8 -0
  291. package/dist/client/chat/tool-call-display.d.ts +5 -5
  292. package/dist/client/chat/tool-call-display.js +9 -212
  293. package/dist/client/chat-first/apps-rail.js +3 -3
  294. package/dist/client/chat-first/browser-pane.js +4 -1
  295. package/dist/client/chat-first/chat-history.d.ts +3 -1
  296. package/dist/client/chat-first/chat-history.js +7 -4
  297. package/dist/client/chat-first/surface-tabs.d.ts +1 -1
  298. package/dist/client/chat-first/surface-tabs.js +52 -41
  299. package/dist/client/chat-first/types.d.ts +3 -0
  300. package/dist/client/chat-first.d.ts +10 -0
  301. package/dist/client/chat-first.js +37 -2
  302. package/dist/client/components/ui/message-scroller.js +4 -1
  303. package/dist/client/i18n.js +3 -1
  304. package/dist/client/resources/McpConnectionSuggestion.js +9 -1
  305. package/dist/client/sse-event-processor.d.ts +4 -2
  306. package/dist/client/sse-event-processor.js +46 -6
  307. package/dist/client/use-chat-models.js +156 -80
  308. package/dist/client/use-run-stuck-detection.d.ts +2 -0
  309. package/dist/client/use-run-stuck-detection.js +85 -9
  310. package/dist/collab/awareness.d.ts +2 -2
  311. package/dist/collab/routes.d.ts +1 -1
  312. package/dist/collab/struct-routes.d.ts +1 -1
  313. package/dist/integrations/adapters/slack.d.ts +0 -4
  314. package/dist/integrations/adapters/slack.js +6 -30
  315. package/dist/integrations/catalog.js +1 -1
  316. package/dist/integrations/pending-tasks-store.d.ts +0 -8
  317. package/dist/integrations/pending-tasks-store.js +0 -21
  318. package/dist/integrations/slack-manifest.d.ts +2 -2
  319. package/dist/integrations/slack-manifest.js +0 -3
  320. package/dist/integrations/webhook-handler.js +1 -1
  321. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  322. package/dist/observability/routes.d.ts +3 -3
  323. package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
  324. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  325. package/dist/scripts/docs/source-search.js +2 -2
  326. package/dist/server/agent-chat/framework-prompts.js +7 -2
  327. package/dist/server/agent-chat/prompt-resources.js +2 -2
  328. package/dist/server/agent-chat/skill-frontmatter.d.ts +31 -2
  329. package/dist/server/agent-chat/skill-frontmatter.js +41 -15
  330. package/dist/server/agent-chat-plugin.js +3 -3
  331. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  332. package/dist/server/agents-bundle.d.ts +16 -19
  333. package/dist/server/agents-bundle.js +19 -35
  334. package/dist/server/auth.js +262 -31
  335. package/dist/server/better-auth-instance.d.ts +1 -0
  336. package/dist/server/better-auth-instance.js +17 -2
  337. package/dist/server/onboarding-html.js +56 -9
  338. package/dist/server/prompts/framework-core-compact.d.ts +6 -1
  339. package/dist/server/prompts/framework-core-compact.js +12 -9
  340. package/dist/server/prompts/framework-core.d.ts +6 -1
  341. package/dist/server/prompts/framework-core.js +11 -9
  342. package/dist/server/prompts/index.d.ts +1 -1
  343. package/dist/server/prompts/index.js +1 -1
  344. package/dist/server/prompts/shared-rules.d.ts +15 -11
  345. package/dist/server/prompts/shared-rules.js +17 -13
  346. package/dist/server/realtime-token.d.ts +1 -1
  347. package/dist/server/transcribe-voice.d.ts +1 -1
  348. package/dist/shared/reasoning-effort.d.ts +8 -8
  349. package/dist/shared/reasoning-effort.js +10 -10
  350. package/dist/shared/streaming-text-smoothing.js +41 -11
  351. package/dist/styles/agent-native.css +19 -32
  352. package/dist/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  353. package/dist/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  354. package/dist/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  355. package/dist/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  356. package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  357. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  358. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  359. package/dist/templates/chat/AGENTS.md +32 -80
  360. package/dist/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  361. package/dist/templates/default/.agents/skills/actions/SKILL.md +54 -488
  362. package/dist/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
  363. package/dist/templates/default/.agents/skills/actions/references/examples.md +94 -0
  364. package/dist/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
  365. package/dist/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
  366. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
  367. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
  368. package/dist/templates/headless/.agents/skills/actions/SKILL.md +54 -488
  369. package/dist/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
  370. package/dist/templates/headless/.agents/skills/actions/references/examples.md +94 -0
  371. package/dist/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
  372. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
  373. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
  374. package/dist/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
  375. package/dist/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
  376. package/dist/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
  377. package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
  378. package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
  379. package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
  380. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
  381. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
  382. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
  383. package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
  384. package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
  385. package/dist/templates/workspace-core/AGENTS.md +7 -16
  386. package/docs/content/messaging.mdx +6 -7
  387. package/docs/content/template-chat.mdx +1 -1
  388. package/package.json +2 -2
  389. package/src/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  390. package/src/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  391. package/src/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  392. package/src/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  393. package/src/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  394. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  395. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  396. package/src/templates/chat/AGENTS.md +32 -80
  397. package/src/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  398. package/src/templates/default/.agents/skills/actions/SKILL.md +54 -488
  399. package/src/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
  400. package/src/templates/default/.agents/skills/actions/references/examples.md +94 -0
  401. package/src/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
  402. package/src/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
  403. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
  404. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
  405. package/src/templates/headless/.agents/skills/actions/SKILL.md +54 -488
  406. package/src/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
  407. package/src/templates/headless/.agents/skills/actions/references/examples.md +94 -0
  408. package/src/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
  409. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
  410. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
  411. package/src/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
  412. package/src/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
  413. package/src/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
  414. package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
  415. package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
  416. package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
  417. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
  418. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
  419. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
  420. package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
  421. package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
  422. package/src/templates/workspace-core/AGENTS.md +7 -16
@@ -3,9 +3,12 @@ import { PromptComposer } from "@agent-native/core/client/composer";
3
3
  import { ensureEmbedAuthFetchInterceptor } from "@agent-native/core/client/host";
4
4
  import { useT } from "@agent-native/core/client/i18n";
5
5
  import {
6
+ IconArrowLeft,
6
7
  IconBrandGoogle,
7
8
  IconFileTypePdf,
9
+ IconLoader2,
8
10
  IconPresentation,
11
+ IconUpload,
9
12
  } from "@tabler/icons-react";
10
13
  import { useState, useEffect, useCallback, useRef } from "react";
11
14
  import { createPortal } from "react-dom";
@@ -86,7 +89,7 @@ interface PromptPopoverProps {
86
89
  placeholder?: string;
87
90
  onSkip?: () => void;
88
91
  skipLabel?: string;
89
- onSubmit: (prompt: string, files: UploadedFile[]) => void;
92
+ onSubmit: (prompt: string, files: UploadedFile[]) => void | Promise<void>;
90
93
  loading?: boolean;
91
94
  anchorRef?: React.RefObject<HTMLElement | null>;
92
95
  centered?: boolean;
@@ -125,10 +128,14 @@ export default function PromptPopover({
125
128
  }: PromptPopoverProps) {
126
129
  const t = useT();
127
130
  const [uploading, setUploading] = useState(false);
131
+ const [submitting, setSubmitting] = useState(false);
128
132
  const [promptText, setPromptText] = useState("");
129
133
  const [googleDocContext, setGoogleDocContext] = useState("");
130
134
  const [googleSlidesUrl, setGoogleSlidesUrl] = useState("");
131
- const [googleSlidesInputOpen, setGoogleSlidesInputOpen] = useState(false);
135
+ const [importMode, setImportMode] = useState<PromptImportSource | null>(null);
136
+ const [selectedImportFile, setSelectedImportFile] = useState<File | null>(
137
+ null,
138
+ );
132
139
  const [importingSource, setImportingSource] =
133
140
  useState<PromptImportSource | null>(null);
134
141
  const pdfInputRef = useRef<HTMLInputElement>(null);
@@ -216,16 +223,20 @@ export default function PromptPopover({
216
223
  if (files.length > 0 && onBeforeUpload?.(enrichedText, files) === false) {
217
224
  return;
218
225
  }
226
+ setSubmitting(true);
219
227
  try {
220
228
  const uploaded = await uploadFiles(files);
221
- onSubmit(enrichedText, uploaded);
229
+ await onSubmit(enrichedText, uploaded);
230
+ setSubmitting(false);
222
231
  } catch (error) {
232
+ setSubmitting(false);
223
233
  toast.error(t("raw.uploadFailed"), {
224
234
  description:
225
235
  error instanceof Error
226
236
  ? error.message
227
237
  : t("raw.uploadAttachedFailed"),
228
238
  });
239
+ throw error;
229
240
  }
230
241
  },
231
242
  [googleDocContext, onBeforeUpload, onSubmit, uploadFiles, t],
@@ -255,11 +266,25 @@ export default function PromptPopover({
255
266
  const handleFileImport = useCallback(
256
267
  (kind: "pdf" | "pptx", file: File | undefined) => {
257
268
  if (!file) return;
269
+ setSelectedImportFile(file);
258
270
  void runImport({ kind, files: [file] });
259
271
  },
260
272
  [runImport],
261
273
  );
262
274
 
275
+ const chooseImportMode = useCallback((kind: PromptImportSource) => {
276
+ setImportMode(kind);
277
+ setSelectedImportFile(null);
278
+ setGoogleSlidesUrl("");
279
+ }, []);
280
+
281
+ const returnToPrompt = useCallback(() => {
282
+ if (importingSource) return;
283
+ setImportMode(null);
284
+ setSelectedImportFile(null);
285
+ setGoogleSlidesUrl("");
286
+ }, [importingSource]);
287
+
263
288
  const handleGoogleSlidesImport = useCallback(() => {
264
289
  const url = googleSlidesUrl.trim();
265
290
  if (!url) return;
@@ -271,13 +296,31 @@ export default function PromptPopover({
271
296
  setPromptText("");
272
297
  setGoogleDocContext("");
273
298
  setGoogleSlidesUrl("");
274
- setGoogleSlidesInputOpen(false);
299
+ setImportMode(null);
300
+ setSelectedImportFile(null);
275
301
  setImportingSource(null);
302
+ setSubmitting(false);
276
303
  }
277
304
  }, [open]);
278
305
 
279
306
  if (!open) return null;
280
307
 
308
+ const importEnabled = Boolean(onImport && importFromLabel);
309
+ const normalizedImportFromLabel = importFromLabel
310
+ ?.trim()
311
+ .replace(/^or\s+/i, "")
312
+ .toLowerCase();
313
+ const importFromCopy = normalizedImportFromLabel
314
+ ? `Or ${normalizedImportFromLabel}`
315
+ : "";
316
+ const importModeLabel =
317
+ importMode === "google-slides"
318
+ ? t("home.googleSlidesReferenceTitle")
319
+ : importMode === "pdf"
320
+ ? "PDF"
321
+ : "PPT";
322
+ const importInputRef = importMode === "pdf" ? pdfInputRef : pptxInputRef;
323
+
281
324
  const popover = (
282
325
  <>
283
326
  {centered && (
@@ -296,7 +339,7 @@ export default function PromptPopover({
296
339
  >
297
340
  <div className="flex items-center justify-between gap-3 px-4 pb-2.5 pt-3.5">
298
341
  <span className="text-sm font-medium text-foreground">{title}</span>
299
- {onSkip && (
342
+ {onSkip && !importMode && !submitting && (
300
343
  <button
301
344
  type="button"
302
345
  onClick={() => {
@@ -310,132 +353,214 @@ export default function PromptPopover({
310
353
  )}
311
354
  </div>
312
355
 
313
- <div className="px-2.5 pb-2.5">
314
- <PromptComposer
315
- autoFocus
316
- attachmentsEnabled
317
- maxDocumentAttachmentBytes={MAX_REFERENCE_FILE_BYTES}
318
- documentAttachmentLimitLabel="Slides reference files"
319
- disabled={loading || uploading}
320
- placeholder={placeholder}
321
- onSubmit={handleSubmit}
322
- onTextChange={setPromptText}
323
- draftScope={draftScope}
324
- initialText={initialText}
325
- initialTextKey={initialTextKey}
356
+ {importEnabled && (
357
+ <input
358
+ ref={pdfInputRef}
359
+ type="file"
360
+ accept=".pdf,application/pdf"
361
+ className="sr-only"
362
+ aria-label={t("editorToolbar.importFile")}
363
+ onChange={(event) => {
364
+ handleFileImport("pdf", event.target.files?.[0]);
365
+ event.target.value = "";
366
+ }}
326
367
  />
327
- </div>
368
+ )}
369
+ {importEnabled && (
370
+ <input
371
+ ref={pptxInputRef}
372
+ type="file"
373
+ accept=".pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation"
374
+ className="sr-only"
375
+ aria-label={t("editorToolbar.importFile")}
376
+ onChange={(event) => {
377
+ handleFileImport("pptx", event.target.files?.[0]);
378
+ event.target.value = "";
379
+ }}
380
+ />
381
+ )}
328
382
 
329
- {onImport && importFromLabel && (
330
- <div className="border-t border-border/60 px-4 pb-3 pt-2.5">
331
- <div className="flex flex-wrap items-center gap-1.5">
332
- <span className="mr-1 text-xs text-muted-foreground">
333
- {importFromLabel}
334
- </span>
335
- <input
336
- ref={pdfInputRef}
337
- type="file"
338
- accept=".pdf,application/pdf"
339
- className="sr-only"
340
- aria-label={t("editorToolbar.importFile")}
341
- onChange={(event) => {
342
- handleFileImport("pdf", event.target.files?.[0]);
343
- event.target.value = "";
344
- }}
345
- />
346
- <input
347
- ref={pptxInputRef}
348
- type="file"
349
- accept=".pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation"
350
- className="sr-only"
351
- aria-label={t("editorToolbar.importFile")}
352
- onChange={(event) => {
353
- handleFileImport("pptx", event.target.files?.[0]);
354
- event.target.value = "";
355
- }}
383
+ <div className={importEnabled ? "grid" : undefined}>
384
+ <div
385
+ className={[
386
+ importEnabled ? "col-start-1 row-start-1" : "",
387
+ importMode ? "invisible pointer-events-none" : "",
388
+ ]
389
+ .filter(Boolean)
390
+ .join(" ")}
391
+ aria-hidden={importMode ? true : undefined}
392
+ >
393
+ <div className="px-2.5 pb-2.5">
394
+ <PromptComposer
395
+ autoFocus
396
+ attachmentsEnabled
397
+ maxDocumentAttachmentBytes={MAX_REFERENCE_FILE_BYTES}
398
+ documentAttachmentLimitLabel="Slides reference files"
399
+ disabled={
400
+ loading || uploading || submitting || Boolean(importMode)
401
+ }
402
+ placeholder={placeholder}
403
+ onSubmit={handleSubmit}
404
+ onTextChange={setPromptText}
405
+ draftScope={draftScope}
406
+ initialText={initialText}
407
+ initialTextKey={initialTextKey}
356
408
  />
357
- <Button
358
- type="button"
359
- variant="ghost"
360
- size="sm"
361
- className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
362
- disabled={importingSource !== null || loading || uploading}
363
- onClick={() => pdfInputRef.current?.click()}
364
- >
365
- <IconFileTypePdf className="size-3.5" />
366
- PDF
367
- </Button>
368
- <Button
369
- type="button"
370
- variant="ghost"
371
- size="sm"
372
- className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
373
- disabled={importingSource !== null || loading || uploading}
374
- onClick={() => setGoogleSlidesInputOpen((current) => !current)}
375
- >
376
- <IconBrandGoogle className="size-3.5" />
377
- {t("home.googleSlidesReferenceTitle")}
378
- </Button>
379
- <Button
380
- type="button"
381
- variant="ghost"
382
- size="sm"
383
- className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
384
- disabled={importingSource !== null || loading || uploading}
385
- onClick={() => pptxInputRef.current?.click()}
386
- >
387
- <IconPresentation className="size-3.5" />
388
- PPT
389
- </Button>
390
- {importingSource && (
391
- <span className="ml-auto text-xs text-muted-foreground">
392
- {importingLabel}
393
- </span>
394
- )}
395
409
  </div>
396
- {googleSlidesInputOpen && (
397
- <div className="mt-2 space-y-2">
398
- <GoogleDriveConnectionCta />
399
- <div className="flex gap-2">
400
- <Input
401
- autoFocus
402
- type="url"
403
- value={googleSlidesUrl}
404
- placeholder={t("home.googleSlidesReferenceUrl")}
405
- aria-label={t("home.googleSlidesReferenceUrl")}
406
- className="h-8 text-xs"
407
- disabled={importingSource !== null || loading || uploading}
408
- onChange={(event) => setGoogleSlidesUrl(event.target.value)}
409
- onKeyDown={(event) => {
410
- if (event.key === "Enter") handleGoogleSlidesImport();
411
- }}
412
- />
410
+
411
+ {submitting && (
412
+ <div
413
+ className="flex items-center gap-2 border-t border-border/60 px-4 py-2.5 text-xs text-muted-foreground"
414
+ role="status"
415
+ aria-live="polite"
416
+ >
417
+ <IconLoader2 className="size-3.5 animate-spin" />
418
+ <span>{t("raw.uploading")}</span>
419
+ </div>
420
+ )}
421
+
422
+ {importEnabled && (
423
+ <div className="border-t border-border/60 px-4 pb-3 pt-2.5">
424
+ <div className="flex flex-wrap items-center gap-1.5">
425
+ <span className="mr-1 text-xs text-muted-foreground">
426
+ {importFromCopy}
427
+ </span>
428
+ <Button
429
+ type="button"
430
+ variant="ghost"
431
+ size="sm"
432
+ className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
433
+ disabled={loading || uploading || submitting}
434
+ onClick={() => chooseImportMode("pdf")}
435
+ >
436
+ <IconFileTypePdf className="size-3.5" />
437
+ PDF
438
+ </Button>
413
439
  <Button
414
440
  type="button"
441
+ variant="ghost"
415
442
  size="sm"
416
- className="h-8 shrink-0 px-3 text-xs"
417
- disabled={
418
- !googleSlidesUrl.trim() ||
419
- importingSource !== null ||
420
- loading ||
421
- uploading
422
- }
423
- onClick={handleGoogleSlidesImport}
443
+ className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
444
+ disabled={loading || uploading || submitting}
445
+ onClick={() => chooseImportMode("google-slides")}
424
446
  >
425
- Import
447
+ <IconBrandGoogle className="size-3.5" />
448
+ {t("home.googleSlidesImportLabel")}
449
+ </Button>
450
+ <Button
451
+ type="button"
452
+ variant="ghost"
453
+ size="sm"
454
+ className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
455
+ disabled={loading || uploading || submitting}
456
+ onClick={() => chooseImportMode("pptx")}
457
+ >
458
+ <IconPresentation className="size-3.5" />
459
+ PPT
426
460
  </Button>
427
461
  </div>
428
462
  </div>
429
463
  )}
464
+
465
+ {children}
466
+
467
+ <GoogleDocImportHint
468
+ promptText={promptText}
469
+ onSourceContextChange={setGoogleDocContext}
470
+ />
430
471
  </div>
431
- )}
432
472
 
433
- {children}
473
+ {importEnabled && importMode && (
474
+ <div className="col-start-1 row-start-1 flex min-h-full flex-col px-4 pb-4 pt-3">
475
+ <div className="flex items-center gap-2">
476
+ <button
477
+ type="button"
478
+ onClick={returnToPrompt}
479
+ disabled={importingSource !== null}
480
+ className="-ms-1 inline-flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
481
+ aria-label={
482
+ "Back to prompt" /* i18n-ignore -- local import-flow control label */
483
+ }
484
+ >
485
+ <IconArrowLeft className="size-4" />
486
+ </button>
487
+ <span className="text-sm font-medium text-foreground">
488
+ Import {importModeLabel}
489
+ </span>
490
+ </div>
434
491
 
435
- <GoogleDocImportHint
436
- promptText={promptText}
437
- onSourceContextChange={setGoogleDocContext}
438
- />
492
+ <div className="flex flex-1 flex-col justify-center gap-3">
493
+ {importMode === "google-slides" ? (
494
+ <>
495
+ <GoogleDriveConnectionCta />
496
+ <div className="flex gap-2">
497
+ <Input
498
+ autoFocus
499
+ type="url"
500
+ value={googleSlidesUrl}
501
+ placeholder={t("home.googleSlidesReferenceUrl")}
502
+ aria-label={t("home.googleSlidesReferenceUrl")}
503
+ className="h-8 text-xs"
504
+ disabled={importingSource !== null || loading}
505
+ onChange={(event) =>
506
+ setGoogleSlidesUrl(event.target.value)
507
+ }
508
+ onKeyDown={(event) => {
509
+ if (event.key === "Enter") handleGoogleSlidesImport();
510
+ }}
511
+ />
512
+ <Button
513
+ type="button"
514
+ size="sm"
515
+ className="h-8 shrink-0 px-3 text-xs"
516
+ disabled={
517
+ !googleSlidesUrl.trim() ||
518
+ importingSource !== null ||
519
+ loading
520
+ }
521
+ onClick={handleGoogleSlidesImport}
522
+ >
523
+ Import
524
+ </Button>
525
+ </div>
526
+ </>
527
+ ) : (
528
+ <>
529
+ <p className="text-xs text-muted-foreground">
530
+ Choose a {importModeLabel} file to open it as a deck.
531
+ </p>
532
+ <Button
533
+ type="button"
534
+ variant="outline"
535
+ className="w-full justify-center gap-2"
536
+ disabled={importingSource !== null || loading}
537
+ onClick={() => importInputRef.current?.click()}
538
+ >
539
+ <IconUpload className="size-4" />
540
+ Upload {importModeLabel}
541
+ </Button>
542
+ {selectedImportFile && (
543
+ <p className="truncate text-center text-xs text-muted-foreground">
544
+ {selectedImportFile.name}
545
+ </p>
546
+ )}
547
+ </>
548
+ )}
549
+ </div>
550
+
551
+ {importingSource && (
552
+ <div
553
+ className="flex items-center justify-center gap-2 text-xs text-muted-foreground"
554
+ role="status"
555
+ aria-live="polite"
556
+ >
557
+ <IconLoader2 className="size-3.5 animate-spin" />
558
+ <span>{importingLabel}</span>
559
+ </div>
560
+ )}
561
+ </div>
562
+ )}
563
+ </div>
439
564
  </div>
440
565
  </>
441
566
  );
@@ -193,7 +193,7 @@ export function SlideContextToolbar({
193
193
  return (
194
194
  <div
195
195
  className={cn(
196
- "slide-context-toolbar flex h-10 shrink-0 items-center gap-1 overflow-x-auto whitespace-nowrap border-b border-border/70 bg-muted/60 px-2 sm:px-3",
196
+ "slide-context-toolbar flex h-10 shrink-0 items-center gap-1 overflow-x-auto whitespace-nowrap bg-transparent px-2 sm:px-3",
197
197
  className,
198
198
  )}
199
199
  data-slide-context-toolbar="true"
@@ -150,7 +150,7 @@ function ExcalidrawExitButton(props: { onExit: () => void; label: string }) {
150
150
  <Button
151
151
  variant="ghost"
152
152
  size="icon"
153
- className="absolute right-3 top-3 z-20 h-8 w-8 cursor-pointer border border-border bg-popover/95 shadow-lg backdrop-blur"
153
+ className="absolute right-3 top-3 z-20 h-8 w-8 cursor-pointer border border-border bg-popover/95 shadow-lg"
154
154
  onClick={props.onExit}
155
155
  aria-label={props.label}
156
156
  >
@@ -532,6 +532,8 @@ interface SlideEditorProps {
532
532
  * shell above the slide rail. Selection state lives here, so the toolbar is
533
533
  * portaled out rather than lifted. Falls back to rendering in place. */
534
534
  contextToolbarSlot?: HTMLElement | null;
535
+ /** Wide editor-shell host for the toolbar's top-row placement. */
536
+ wideContextToolbarSlot?: HTMLElement | null;
535
537
  /** Selection-independent actions for the head of the contextual toolbar. */
536
538
  contextToolbarLeading?: ReactNode;
537
539
  onGenerateImage: () => void;
@@ -564,8 +566,6 @@ interface SlideEditorProps {
564
566
  onComment?: (quotedText: string) => void;
565
567
  /** Zero-based index of the current slide */
566
568
  slideIndex?: number;
567
- /** Total number of slides in the deck */
568
- slideCount?: number;
569
569
  /** Design system to inject as CSS custom properties on the slide */
570
570
  designSystem?: DesignSystemData;
571
571
  /** Deck aspect ratio (defaults to 16:9 when omitted) */
@@ -647,12 +647,17 @@ function SameSlidePresenceIndicator({ users }: { users: CollabUser[] }) {
647
647
  if (users.length === 0) return null;
648
648
  const visible = users.slice(0, 3);
649
649
  const overflow = users.length - visible.length;
650
+ const agentIsPresent = users.some(
651
+ (user) => user.email.trim().toLowerCase() === "agent@system",
652
+ );
650
653
  const label =
651
- users.length === 1
652
- ? `${users[0].name} is here`
653
- : `${users.length} others here`;
654
+ agentIsPresent && users.length === 1
655
+ ? "AI editing"
656
+ : users.length === 1
657
+ ? `${users[0].name} is here`
658
+ : `${users.length} others here`;
654
659
  return (
655
- <div className="pointer-events-auto flex items-center gap-1.5 rounded-full border border-border bg-popover/95 py-1 pl-1 pr-2.5 text-xs text-popover-foreground shadow-lg backdrop-blur">
660
+ <div className="pointer-events-auto flex items-center gap-1.5 rounded-full border border-border bg-popover/95 py-1 pl-1 pr-2.5 text-xs text-popover-foreground shadow-lg">
656
661
  <div className="flex items-center">
657
662
  {visible.map((u) => (
658
663
  <SamePresenceAvatar key={u.email} user={u} />
@@ -993,6 +998,7 @@ export default function SlideEditor({
993
998
  onUpdateSlide,
994
999
  readOnly = false,
995
1000
  contextToolbarSlot,
1001
+ wideContextToolbarSlot,
996
1002
  contextToolbarLeading,
997
1003
  onGenerateImage,
998
1004
  onOpenAssetLibrary,
@@ -1004,7 +1010,6 @@ export default function SlideEditor({
1004
1010
  onToggleObjectFit,
1005
1011
  agentActive,
1006
1012
  slideIndex = 0,
1007
- slideCount = 1,
1008
1013
  designSystem,
1009
1014
  aspectRatio,
1010
1015
  drawMode,
@@ -4198,6 +4203,27 @@ export default function SlideEditor({
4198
4203
  // the button's onClick runs, so partial-text formatting would silently
4199
4204
  // apply to the whole object.
4200
4205
  data-slide-inline-edit-surface="true"
4206
+ data-slide-context-toolbar-placement="row"
4207
+ onPointerDownCapture={preserveRichTextSelection}
4208
+ >
4209
+ <SlideContextToolbar
4210
+ snapshot={selectedStyleSnapshot}
4211
+ background={slide.background}
4212
+ designSystem={designSystem}
4213
+ leading={contextToolbarLeading}
4214
+ onChange={applySelectedStylePatch}
4215
+ onBackgroundChange={applySlideBackground}
4216
+ onArrange={handleArrangeSelected}
4217
+ onToggleList={handleToggleList}
4218
+ />
4219
+ </div>
4220
+ ) : null;
4221
+
4222
+ const wideContextToolbar = !readOnly ? (
4223
+ <div
4224
+ className="shrink-0"
4225
+ data-slide-inline-edit-surface="true"
4226
+ data-slide-context-toolbar-placement="top"
4201
4227
  onPointerDownCapture={preserveRichTextSelection}
4202
4228
  >
4203
4229
  <SlideContextToolbar
@@ -4209,15 +4235,19 @@ export default function SlideEditor({
4209
4235
  onBackgroundChange={applySlideBackground}
4210
4236
  onArrange={handleArrangeSelected}
4211
4237
  onToggleList={handleToggleList}
4238
+ className="slide-context-toolbar--top-row"
4212
4239
  />
4213
4240
  </div>
4214
4241
  ) : null;
4215
4242
 
4216
4243
  return (
4217
4244
  <div
4218
- className="relative flex h-full min-h-0 flex-1 flex-col overflow-hidden"
4245
+ className="relative flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-l-lg bg-[var(--slides-editor-surface)]"
4219
4246
  data-slide-element-selected={slideElementSelected ? "true" : undefined}
4220
4247
  >
4248
+ {!readOnly && wideContextToolbarSlot
4249
+ ? createPortal(wideContextToolbar, wideContextToolbarSlot)
4250
+ : null}
4221
4251
  {contextToolbarSlot
4222
4252
  ? createPortal(contextToolbar, contextToolbarSlot)
4223
4253
  : contextToolbar}
@@ -4225,7 +4255,7 @@ export default function SlideEditor({
4225
4255
  <div className="flex min-h-0 flex-1 overflow-hidden">
4226
4256
  <div className="min-w-0 flex-1 overflow-hidden">
4227
4257
  {slide.excalidrawData ? (
4228
- <div className="relative h-full bg-background">
4258
+ <div className="relative h-full bg-[var(--slides-editor-surface)]">
4229
4259
  {!readOnly && (
4230
4260
  <ExcalidrawExitButton
4231
4261
  // JSON.stringify drops `undefined` properties before the patch
@@ -4245,8 +4275,8 @@ export default function SlideEditor({
4245
4275
  />
4246
4276
  </div>
4247
4277
  ) : (
4248
- <div className="relative h-full bg-background">
4249
- <div className="absolute right-3 top-3 z-20 flex h-8 items-center gap-0.5 rounded-md border border-border bg-popover/95 px-1 shadow-lg backdrop-blur">
4278
+ <div className="relative h-full bg-[var(--slides-editor-surface)]">
4279
+ <div className="absolute right-3 top-3 z-20 flex h-8 items-center gap-0.5 rounded-md bg-popover/95 px-1">
4250
4280
  <Tooltip>
4251
4281
  <TooltipTrigger asChild>
4252
4282
  <Button
@@ -4385,8 +4415,6 @@ export default function SlideEditor({
4385
4415
  <SpeakerNotesPanel
4386
4416
  notes={slide.notes}
4387
4417
  onChange={(notes) => onUpdateSlide({ notes })}
4388
- slideIndex={slideIndex}
4389
- slideCount={slideCount}
4390
4418
  readOnly={readOnly}
4391
4419
  />
4392
4420
 
@@ -5,8 +5,6 @@ import { useState, type PointerEvent as ReactPointerEvent } from "react";
5
5
  interface SpeakerNotesPanelProps {
6
6
  notes: string;
7
7
  onChange: (notes: string) => void;
8
- slideIndex: number;
9
- slideCount: number;
10
8
  readOnly?: boolean;
11
9
  }
12
10
 
@@ -21,16 +19,15 @@ function clampNotesHeight(value: number) {
21
19
  export function SpeakerNotesPanel({
22
20
  notes,
23
21
  onChange,
24
- slideIndex,
25
- slideCount,
26
22
  readOnly = false,
27
23
  }: SpeakerNotesPanelProps) {
28
24
  const t = useT();
29
25
  const [expanded, setExpanded] = useState(() => {
30
26
  try {
31
- return localStorage.getItem("speaker-notes-expanded") !== "false";
27
+ return localStorage.getItem("speaker-notes-expanded") === "true";
32
28
  } catch {
33
- return true;
29
+ // coercion-ok: browser storage is optional; the collapsed state is the default.
30
+ return false;
34
31
  }
35
32
  });
36
33
  const [height, setHeight] = useState(() => {
@@ -74,7 +71,7 @@ export function SpeakerNotesPanel({
74
71
  };
75
72
 
76
73
  return (
77
- <div className="flex-shrink-0 border-t border-border bg-background">
74
+ <div className="flex-shrink-0 bg-[var(--slides-editor-surface)]">
78
75
  {expanded && (
79
76
  <div
80
77
  role="separator"
@@ -83,7 +80,7 @@ export function SpeakerNotesPanel({
83
80
  className="group flex h-2 cursor-row-resize items-center justify-center"
84
81
  onPointerDown={startResize}
85
82
  >
86
- <div className="h-px w-10 rounded-full bg-border transition-colors group-hover:bg-muted-foreground/70" />
83
+ <div className="h-px w-10 rounded-full bg-muted-foreground/30 transition-colors group-hover:bg-muted-foreground/70" />
87
84
  </div>
88
85
  )}
89
86
  <button
@@ -91,10 +88,7 @@ export function SpeakerNotesPanel({
91
88
  className="flex w-full cursor-pointer items-center justify-between px-4 py-1.5"
92
89
  >
93
90
  <span className="text-[10px] font-medium text-muted-foreground uppercase tracking-wider">
94
- {t("raw.speakerNotesForSlide", {
95
- index: slideIndex + 1,
96
- count: slideCount,
97
- })}
91
+ {t("raw.speakerNotes")}
98
92
  </span>
99
93
  {expanded ? (
100
94
  <IconChevronDown className="w-3 h-3 text-muted-foreground" />