@agent-native/core 0.14.8 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (544) hide show
  1. package/README.md +1 -1
  2. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  3. package/dist/agent/engine/builder-engine.js +30 -9
  4. package/dist/agent/engine/builder-engine.js.map +1 -1
  5. package/dist/agent/engine/registry.d.ts.map +1 -1
  6. package/dist/agent/engine/registry.js +14 -4
  7. package/dist/agent/engine/registry.js.map +1 -1
  8. package/dist/agent/production-agent.d.ts.map +1 -1
  9. package/dist/agent/production-agent.js +71 -4
  10. package/dist/agent/production-agent.js.map +1 -1
  11. package/dist/agent/types.d.ts +9 -0
  12. package/dist/agent/types.d.ts.map +1 -1
  13. package/dist/agent/types.js.map +1 -1
  14. package/dist/appearance/actions/change-appearance.d.ts +3 -0
  15. package/dist/appearance/actions/change-appearance.d.ts.map +1 -0
  16. package/dist/appearance/actions/change-appearance.js +29 -0
  17. package/dist/appearance/actions/change-appearance.js.map +1 -0
  18. package/dist/chat-threads/store.d.ts +53 -2
  19. package/dist/chat-threads/store.d.ts.map +1 -1
  20. package/dist/chat-threads/store.js +172 -12
  21. package/dist/chat-threads/store.js.map +1 -1
  22. package/dist/cli/create.d.ts.map +1 -1
  23. package/dist/cli/create.js +114 -37
  24. package/dist/cli/create.js.map +1 -1
  25. package/dist/cli/index.js +30 -4
  26. package/dist/cli/index.js.map +1 -1
  27. package/dist/cli/workspace-dev.d.ts +25 -1
  28. package/dist/cli/workspace-dev.d.ts.map +1 -1
  29. package/dist/cli/workspace-dev.js +275 -49
  30. package/dist/cli/workspace-dev.js.map +1 -1
  31. package/dist/client/AgentPanel.d.ts +23 -4
  32. package/dist/client/AgentPanel.d.ts.map +1 -1
  33. package/dist/client/AgentPanel.js +276 -53
  34. package/dist/client/AgentPanel.js.map +1 -1
  35. package/dist/client/AppearancePicker.d.ts +11 -0
  36. package/dist/client/AppearancePicker.d.ts.map +1 -0
  37. package/dist/client/AppearancePicker.js +16 -0
  38. package/dist/client/AppearancePicker.js.map +1 -0
  39. package/dist/client/AssistantChat.d.ts +35 -0
  40. package/dist/client/AssistantChat.d.ts.map +1 -1
  41. package/dist/client/AssistantChat.js +315 -32
  42. package/dist/client/AssistantChat.js.map +1 -1
  43. package/dist/client/ConnectBuilderCard.d.ts.map +1 -1
  44. package/dist/client/ConnectBuilderCard.js +5 -2
  45. package/dist/client/ConnectBuilderCard.js.map +1 -1
  46. package/dist/client/ErrorBoundary.d.ts.map +1 -1
  47. package/dist/client/ErrorBoundary.js +8 -10
  48. package/dist/client/ErrorBoundary.js.map +1 -1
  49. package/dist/client/FeedbackButton.d.ts.map +1 -1
  50. package/dist/client/FeedbackButton.js +1 -1
  51. package/dist/client/FeedbackButton.js.map +1 -1
  52. package/dist/client/MultiTabAssistantChat.d.ts +13 -1
  53. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  54. package/dist/client/MultiTabAssistantChat.js +217 -38
  55. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  56. package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
  57. package/dist/client/NewWorkspaceAppFlow.js +37 -14
  58. package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
  59. package/dist/client/agent-chat-adapter.d.ts +5 -0
  60. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  61. package/dist/client/agent-chat-adapter.js +4 -0
  62. package/dist/client/agent-chat-adapter.js.map +1 -1
  63. package/dist/client/agent-sidebar-state.d.ts +12 -0
  64. package/dist/client/agent-sidebar-state.d.ts.map +1 -1
  65. package/dist/client/agent-sidebar-state.js +8 -0
  66. package/dist/client/agent-sidebar-state.js.map +1 -1
  67. package/dist/client/analytics.d.ts.map +1 -1
  68. package/dist/client/analytics.js +175 -3
  69. package/dist/client/analytics.js.map +1 -1
  70. package/dist/client/appearance.d.ts +40 -0
  71. package/dist/client/appearance.d.ts.map +1 -0
  72. package/dist/client/appearance.js +114 -0
  73. package/dist/client/appearance.js.map +1 -0
  74. package/dist/client/builder-frame.d.ts +1 -0
  75. package/dist/client/builder-frame.d.ts.map +1 -1
  76. package/dist/client/builder-frame.js +19 -9
  77. package/dist/client/builder-frame.js.map +1 -1
  78. package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
  79. package/dist/client/components/CodeRequiredDialog.js +10 -2
  80. package/dist/client/components/CodeRequiredDialog.js.map +1 -1
  81. package/dist/client/components/ui/dropdown-menu.js +2 -2
  82. package/dist/client/components/ui/dropdown-menu.js.map +1 -1
  83. package/dist/client/components/ui/hover-card.js +1 -1
  84. package/dist/client/components/ui/hover-card.js.map +1 -1
  85. package/dist/client/components/ui/popover.js +1 -1
  86. package/dist/client/components/ui/popover.js.map +1 -1
  87. package/dist/client/composer/PromptComposer.d.ts +7 -0
  88. package/dist/client/composer/PromptComposer.d.ts.map +1 -1
  89. package/dist/client/composer/PromptComposer.js +63 -32
  90. package/dist/client/composer/PromptComposer.js.map +1 -1
  91. package/dist/client/composer/TiptapComposer.d.ts +5 -0
  92. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  93. package/dist/client/composer/TiptapComposer.js +36 -6
  94. package/dist/client/composer/TiptapComposer.js.map +1 -1
  95. package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
  96. package/dist/client/composer/useVoiceDictation.js +13 -1
  97. package/dist/client/composer/useVoiceDictation.js.map +1 -1
  98. package/dist/client/dev-mode.d.ts +14 -0
  99. package/dist/client/dev-mode.d.ts.map +1 -0
  100. package/dist/client/dev-mode.js +14 -0
  101. package/dist/client/dev-mode.js.map +1 -0
  102. package/dist/client/error-format.d.ts +3 -2
  103. package/dist/client/error-format.d.ts.map +1 -1
  104. package/dist/client/error-format.js +9 -2
  105. package/dist/client/error-format.js.map +1 -1
  106. package/dist/client/extensions/EmbeddedTool.d.ts +20 -0
  107. package/dist/client/extensions/EmbeddedTool.d.ts.map +1 -0
  108. package/dist/client/extensions/EmbeddedTool.js +199 -0
  109. package/dist/client/extensions/EmbeddedTool.js.map +1 -0
  110. package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
  111. package/dist/client/extensions/ExtensionViewer.js +24 -2
  112. package/dist/client/extensions/ExtensionViewer.js.map +1 -1
  113. package/dist/client/extensions/ToolEditor.d.ts +5 -0
  114. package/dist/client/extensions/ToolEditor.d.ts.map +1 -0
  115. package/dist/client/extensions/ToolEditor.js +129 -0
  116. package/dist/client/extensions/ToolEditor.js.map +1 -0
  117. package/dist/client/extensions/ToolViewer.d.ts +5 -0
  118. package/dist/client/extensions/ToolViewer.d.ts.map +1 -0
  119. package/dist/client/extensions/ToolViewer.js +400 -0
  120. package/dist/client/extensions/ToolViewer.js.map +1 -0
  121. package/dist/client/extensions/ToolViewerPage.d.ts +2 -0
  122. package/dist/client/extensions/ToolViewerPage.d.ts.map +1 -0
  123. package/dist/client/extensions/ToolViewerPage.js +24 -0
  124. package/dist/client/extensions/ToolViewerPage.js.map +1 -0
  125. package/dist/client/extensions/ToolsListPage.d.ts +2 -0
  126. package/dist/client/extensions/ToolsListPage.d.ts.map +1 -0
  127. package/dist/client/extensions/ToolsListPage.js +67 -0
  128. package/dist/client/extensions/ToolsListPage.js.map +1 -0
  129. package/dist/client/extensions/ToolsSidebarSection.d.ts +2 -0
  130. package/dist/client/extensions/ToolsSidebarSection.d.ts.map +1 -0
  131. package/dist/client/extensions/ToolsSidebarSection.js +236 -0
  132. package/dist/client/extensions/ToolsSidebarSection.js.map +1 -0
  133. package/dist/client/extensions/tool-order.d.ts +7 -0
  134. package/dist/client/extensions/tool-order.d.ts.map +1 -0
  135. package/dist/client/extensions/tool-order.js +47 -0
  136. package/dist/client/extensions/tool-order.js.map +1 -0
  137. package/dist/client/index.d.ts +8 -1
  138. package/dist/client/index.d.ts.map +1 -1
  139. package/dist/client/index.js +7 -0
  140. package/dist/client/index.js.map +1 -1
  141. package/dist/client/onboarding/OnboardingPanel.js +1 -0
  142. package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
  143. package/dist/client/org/InvitationBanner.d.ts.map +1 -1
  144. package/dist/client/org/InvitationBanner.js +23 -2
  145. package/dist/client/org/InvitationBanner.js.map +1 -1
  146. package/dist/client/org/OrgSwitcher.d.ts +5 -4
  147. package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
  148. package/dist/client/org/OrgSwitcher.js +57 -9
  149. package/dist/client/org/OrgSwitcher.js.map +1 -1
  150. package/dist/client/org/hooks.d.ts.map +1 -1
  151. package/dist/client/org/hooks.js +10 -6
  152. package/dist/client/org/hooks.js.map +1 -1
  153. package/dist/client/org/workspace-app-links.d.ts +31 -0
  154. package/dist/client/org/workspace-app-links.d.ts.map +1 -0
  155. package/dist/client/org/workspace-app-links.js +268 -0
  156. package/dist/client/org/workspace-app-links.js.map +1 -0
  157. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  158. package/dist/client/resources/ResourcesPanel.js +18 -5
  159. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  160. package/dist/client/resources/use-resources.d.ts +18 -13
  161. package/dist/client/resources/use-resources.d.ts.map +1 -1
  162. package/dist/client/resources/use-resources.js +24 -6
  163. package/dist/client/resources/use-resources.js.map +1 -1
  164. package/dist/client/settings/BackgroundAgentSection.d.ts.map +1 -1
  165. package/dist/client/settings/BackgroundAgentSection.js +9 -1
  166. package/dist/client/settings/BackgroundAgentSection.js.map +1 -1
  167. package/dist/client/settings/BrowserSection.d.ts.map +1 -1
  168. package/dist/client/settings/BrowserSection.js +16 -1
  169. package/dist/client/settings/BrowserSection.js.map +1 -1
  170. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  171. package/dist/client/settings/SettingsPanel.js +4 -1
  172. package/dist/client/settings/SettingsPanel.js.map +1 -1
  173. package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
  174. package/dist/client/settings/VoiceTranscriptionSection.js +5 -5
  175. package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
  176. package/dist/client/settings/useBuilderStatus.d.ts +8 -0
  177. package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
  178. package/dist/client/settings/useBuilderStatus.js +50 -13
  179. package/dist/client/settings/useBuilderStatus.js.map +1 -1
  180. package/dist/client/settings/useBuilderStatus.spec.d.ts +2 -0
  181. package/dist/client/settings/useBuilderStatus.spec.d.ts.map +1 -0
  182. package/dist/client/settings/useBuilderStatus.spec.js +64 -0
  183. package/dist/client/settings/useBuilderStatus.spec.js.map +1 -0
  184. package/dist/client/sharing/ShareButton.d.ts +5 -0
  185. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  186. package/dist/client/sharing/ShareButton.js +60 -6
  187. package/dist/client/sharing/ShareButton.js.map +1 -1
  188. package/dist/client/theme.js +1 -1
  189. package/dist/client/theme.js.map +1 -1
  190. package/dist/client/tools/EmbeddedTool.d.ts +20 -0
  191. package/dist/client/tools/EmbeddedTool.d.ts.map +1 -0
  192. package/dist/client/tools/EmbeddedTool.js +199 -0
  193. package/dist/client/tools/EmbeddedTool.js.map +1 -0
  194. package/dist/client/tools/ExtensionSlot.d.ts +27 -0
  195. package/dist/client/tools/ExtensionSlot.d.ts.map +1 -0
  196. package/dist/client/tools/ExtensionSlot.js +96 -0
  197. package/dist/client/tools/ExtensionSlot.js.map +1 -0
  198. package/dist/client/tools/ToolEditor.d.ts +5 -0
  199. package/dist/client/tools/ToolEditor.d.ts.map +1 -0
  200. package/dist/client/tools/ToolEditor.js +129 -0
  201. package/dist/client/tools/ToolEditor.js.map +1 -0
  202. package/dist/client/tools/ToolViewer.d.ts +5 -0
  203. package/dist/client/tools/ToolViewer.d.ts.map +1 -0
  204. package/dist/client/tools/ToolViewer.js +400 -0
  205. package/dist/client/tools/ToolViewer.js.map +1 -0
  206. package/dist/client/tools/ToolViewerPage.d.ts +2 -0
  207. package/dist/client/tools/ToolViewerPage.d.ts.map +1 -0
  208. package/dist/client/tools/ToolViewerPage.js +24 -0
  209. package/dist/client/tools/ToolViewerPage.js.map +1 -0
  210. package/dist/client/tools/ToolsListPage.d.ts +2 -0
  211. package/dist/client/tools/ToolsListPage.d.ts.map +1 -0
  212. package/dist/client/tools/ToolsListPage.js +67 -0
  213. package/dist/client/tools/ToolsListPage.js.map +1 -0
  214. package/dist/client/tools/ToolsSidebarSection.d.ts +2 -0
  215. package/dist/client/tools/ToolsSidebarSection.d.ts.map +1 -0
  216. package/dist/client/tools/ToolsSidebarSection.js +236 -0
  217. package/dist/client/tools/ToolsSidebarSection.js.map +1 -0
  218. package/dist/client/tools/iframe-bridge.d.ts +38 -0
  219. package/dist/client/tools/iframe-bridge.d.ts.map +1 -0
  220. package/dist/client/tools/iframe-bridge.js +207 -0
  221. package/dist/client/tools/iframe-bridge.js.map +1 -0
  222. package/dist/client/tools/index.d.ts +8 -0
  223. package/dist/client/tools/index.d.ts.map +1 -0
  224. package/dist/client/tools/index.js +8 -0
  225. package/dist/client/tools/index.js.map +1 -0
  226. package/dist/client/tools/tool-order.d.ts +7 -0
  227. package/dist/client/tools/tool-order.d.ts.map +1 -0
  228. package/dist/client/tools/tool-order.js +47 -0
  229. package/dist/client/tools/tool-order.js.map +1 -0
  230. package/dist/client/transcription/BuilderTranscriptionCta.d.ts.map +1 -1
  231. package/dist/client/transcription/BuilderTranscriptionCta.js +2 -3
  232. package/dist/client/transcription/BuilderTranscriptionCta.js.map +1 -1
  233. package/dist/client/use-change-version.d.ts +46 -0
  234. package/dist/client/use-change-version.d.ts.map +1 -0
  235. package/dist/client/use-change-version.js +135 -0
  236. package/dist/client/use-change-version.js.map +1 -0
  237. package/dist/client/use-chat-threads.d.ts +16 -2
  238. package/dist/client/use-chat-threads.d.ts.map +1 -1
  239. package/dist/client/use-chat-threads.js +87 -12
  240. package/dist/client/use-chat-threads.js.map +1 -1
  241. package/dist/client/use-chat-threads.spec.d.ts +2 -0
  242. package/dist/client/use-chat-threads.spec.d.ts.map +1 -0
  243. package/dist/client/use-chat-threads.spec.js +85 -0
  244. package/dist/client/use-chat-threads.spec.js.map +1 -0
  245. package/dist/client/use-db-sync.d.ts +5 -2
  246. package/dist/client/use-db-sync.d.ts.map +1 -1
  247. package/dist/client/use-db-sync.js +41 -16
  248. package/dist/client/use-db-sync.js.map +1 -1
  249. package/dist/client/use-pinch-zoom.d.ts +35 -0
  250. package/dist/client/use-pinch-zoom.d.ts.map +1 -0
  251. package/dist/client/use-pinch-zoom.js +105 -0
  252. package/dist/client/use-pinch-zoom.js.map +1 -0
  253. package/dist/deploy/workspace-deploy.d.ts.map +1 -1
  254. package/dist/deploy/workspace-deploy.js +99 -5
  255. package/dist/deploy/workspace-deploy.js.map +1 -1
  256. package/dist/extensions/actions.d.ts.map +1 -1
  257. package/dist/extensions/actions.js +3 -0
  258. package/dist/extensions/actions.js.map +1 -1
  259. package/dist/extensions/store.d.ts +5 -0
  260. package/dist/extensions/store.d.ts.map +1 -1
  261. package/dist/extensions/store.js +16 -1
  262. package/dist/extensions/store.js.map +1 -1
  263. package/dist/file-upload/actions/upload-image.d.ts +3 -0
  264. package/dist/file-upload/actions/upload-image.d.ts.map +1 -0
  265. package/dist/file-upload/actions/upload-image.js +145 -0
  266. package/dist/file-upload/actions/upload-image.js.map +1 -0
  267. package/dist/file-upload/builder.d.ts.map +1 -1
  268. package/dist/file-upload/builder.js +31 -11
  269. package/dist/file-upload/builder.js.map +1 -1
  270. package/dist/file-upload/index.d.ts +1 -0
  271. package/dist/file-upload/index.d.ts.map +1 -1
  272. package/dist/file-upload/index.js +1 -0
  273. package/dist/file-upload/index.js.map +1 -1
  274. package/dist/file-upload/pre-upload-attachments.d.ts +39 -0
  275. package/dist/file-upload/pre-upload-attachments.d.ts.map +1 -0
  276. package/dist/file-upload/pre-upload-attachments.js +110 -0
  277. package/dist/file-upload/pre-upload-attachments.js.map +1 -0
  278. package/dist/file-upload/registry.d.ts.map +1 -1
  279. package/dist/file-upload/registry.js +8 -7
  280. package/dist/file-upload/registry.js.map +1 -1
  281. package/dist/onboarding/default-steps.js +1 -1
  282. package/dist/onboarding/default-steps.js.map +1 -1
  283. package/dist/org/context.d.ts +15 -1
  284. package/dist/org/context.d.ts.map +1 -1
  285. package/dist/org/context.js +25 -0
  286. package/dist/org/context.js.map +1 -1
  287. package/dist/org/handlers.d.ts +2 -2
  288. package/dist/org/handlers.d.ts.map +1 -1
  289. package/dist/org/handlers.js +3 -17
  290. package/dist/org/handlers.js.map +1 -1
  291. package/dist/org/index.d.ts +1 -1
  292. package/dist/org/index.d.ts.map +1 -1
  293. package/dist/org/index.js +1 -1
  294. package/dist/org/index.js.map +1 -1
  295. package/dist/resources/handlers.d.ts +6 -0
  296. package/dist/resources/handlers.d.ts.map +1 -1
  297. package/dist/resources/handlers.js +30 -6
  298. package/dist/resources/handlers.js.map +1 -1
  299. package/dist/resources/script-helpers.d.ts +11 -2
  300. package/dist/resources/script-helpers.d.ts.map +1 -1
  301. package/dist/resources/script-helpers.js +20 -3
  302. package/dist/resources/script-helpers.js.map +1 -1
  303. package/dist/resources/store.d.ts +28 -3
  304. package/dist/resources/store.d.ts.map +1 -1
  305. package/dist/resources/store.js +170 -20
  306. package/dist/resources/store.js.map +1 -1
  307. package/dist/scripts/resources/list.d.ts +1 -1
  308. package/dist/scripts/resources/list.d.ts.map +1 -1
  309. package/dist/scripts/resources/list.js +16 -4
  310. package/dist/scripts/resources/list.js.map +1 -1
  311. package/dist/scripts/resources/write.d.ts +1 -1
  312. package/dist/scripts/resources/write.d.ts.map +1 -1
  313. package/dist/scripts/resources/write.js +47 -3
  314. package/dist/scripts/resources/write.js.map +1 -1
  315. package/dist/server/action-discovery.d.ts.map +1 -1
  316. package/dist/server/action-discovery.js +8 -3
  317. package/dist/server/action-discovery.js.map +1 -1
  318. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  319. package/dist/server/agent-chat-plugin.js +214 -25
  320. package/dist/server/agent-chat-plugin.js.map +1 -1
  321. package/dist/server/agent-discovery.d.ts +35 -0
  322. package/dist/server/agent-discovery.d.ts.map +1 -1
  323. package/dist/server/agent-discovery.js +139 -8
  324. package/dist/server/agent-discovery.js.map +1 -1
  325. package/dist/server/app-url.d.ts +12 -6
  326. package/dist/server/app-url.d.ts.map +1 -1
  327. package/dist/server/app-url.js +58 -11
  328. package/dist/server/app-url.js.map +1 -1
  329. package/dist/server/auth.d.ts +22 -0
  330. package/dist/server/auth.d.ts.map +1 -1
  331. package/dist/server/auth.js +316 -65
  332. package/dist/server/auth.js.map +1 -1
  333. package/dist/server/better-auth-instance.d.ts +0 -4
  334. package/dist/server/better-auth-instance.d.ts.map +1 -1
  335. package/dist/server/better-auth-instance.js +0 -3
  336. package/dist/server/better-auth-instance.js.map +1 -1
  337. package/dist/server/builder-browser.d.ts.map +1 -1
  338. package/dist/server/builder-browser.js +23 -0
  339. package/dist/server/builder-browser.js.map +1 -1
  340. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  341. package/dist/server/core-routes-plugin.js +29 -14
  342. package/dist/server/core-routes-plugin.js.map +1 -1
  343. package/dist/server/credential-provider.d.ts +14 -0
  344. package/dist/server/credential-provider.d.ts.map +1 -1
  345. package/dist/server/credential-provider.js +88 -11
  346. package/dist/server/credential-provider.js.map +1 -1
  347. package/dist/server/google-auth-plugin.d.ts.map +1 -1
  348. package/dist/server/google-auth-plugin.js +65 -17
  349. package/dist/server/google-auth-plugin.js.map +1 -1
  350. package/dist/server/google-oauth.d.ts.map +1 -1
  351. package/dist/server/google-oauth.js +47 -17
  352. package/dist/server/google-oauth.js.map +1 -1
  353. package/dist/server/index.d.ts +1 -1
  354. package/dist/server/index.d.ts.map +1 -1
  355. package/dist/server/index.js +1 -1
  356. package/dist/server/index.js.map +1 -1
  357. package/dist/server/local-migration.d.ts +41 -0
  358. package/dist/server/local-migration.d.ts.map +1 -0
  359. package/dist/server/local-migration.js +235 -0
  360. package/dist/server/local-migration.js.map +1 -0
  361. package/dist/server/oauth-public-origin.d.ts.map +1 -1
  362. package/dist/server/oauth-public-origin.js +19 -1
  363. package/dist/server/oauth-public-origin.js.map +1 -1
  364. package/dist/server/onboarding-html.d.ts.map +1 -1
  365. package/dist/server/onboarding-html.js +74 -19
  366. package/dist/server/onboarding-html.js.map +1 -1
  367. package/dist/server/poll.d.ts.map +1 -1
  368. package/dist/server/poll.js +20 -5
  369. package/dist/server/poll.js.map +1 -1
  370. package/dist/server/request-context.d.ts +8 -0
  371. package/dist/server/request-context.d.ts.map +1 -1
  372. package/dist/server/request-context.js.map +1 -1
  373. package/dist/shared/index.d.ts +2 -0
  374. package/dist/shared/index.d.ts.map +1 -1
  375. package/dist/shared/index.js +2 -0
  376. package/dist/shared/index.js.map +1 -1
  377. package/dist/shared/llm-connection.d.ts +10 -0
  378. package/dist/shared/llm-connection.d.ts.map +1 -0
  379. package/dist/shared/llm-connection.js +29 -0
  380. package/dist/shared/llm-connection.js.map +1 -0
  381. package/dist/shared/workspace-app-audience.d.ts +25 -0
  382. package/dist/shared/workspace-app-audience.d.ts.map +1 -0
  383. package/dist/shared/workspace-app-audience.js +126 -0
  384. package/dist/shared/workspace-app-audience.js.map +1 -0
  385. package/dist/shared/workspace-app-id.d.ts +1 -1
  386. package/dist/shared/workspace-app-id.d.ts.map +1 -1
  387. package/dist/shared/workspace-app-id.js +1 -0
  388. package/dist/shared/workspace-app-id.js.map +1 -1
  389. package/dist/sharing/access.d.ts.map +1 -1
  390. package/dist/sharing/access.js +46 -5
  391. package/dist/sharing/access.js.map +1 -1
  392. package/dist/sharing/actions/list-resource-shares.d.ts.map +1 -1
  393. package/dist/sharing/actions/list-resource-shares.js +8 -1
  394. package/dist/sharing/actions/list-resource-shares.js.map +1 -1
  395. package/dist/sharing/actions/set-resource-visibility.d.ts.map +1 -1
  396. package/dist/sharing/actions/set-resource-visibility.js +12 -3
  397. package/dist/sharing/actions/set-resource-visibility.js.map +1 -1
  398. package/dist/sharing/actions/share-resource.d.ts.map +1 -1
  399. package/dist/sharing/actions/share-resource.js +50 -1
  400. package/dist/sharing/actions/share-resource.js.map +1 -1
  401. package/dist/sharing/registry.d.ts +26 -0
  402. package/dist/sharing/registry.d.ts.map +1 -1
  403. package/dist/sharing/registry.js.map +1 -1
  404. package/dist/styles/agent-native.css +91 -0
  405. package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +72 -0
  406. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +60 -37
  407. package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +28 -17
  408. package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +79 -0
  409. package/dist/templates/default/AGENTS.md +22 -19
  410. package/dist/templates/default/actions/navigate.ts +3 -0
  411. package/dist/templates/default/app/hooks/use-navigation-state.ts +29 -5
  412. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +251 -0
  413. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +264 -0
  414. package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +130 -0
  415. package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +112 -0
  416. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +88 -0
  417. package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +191 -0
  418. package/dist/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +74 -0
  419. package/dist/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +75 -0
  420. package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +190 -0
  421. package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +168 -0
  422. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +163 -0
  423. package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +205 -0
  424. package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +720 -0
  425. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +92 -0
  426. package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +285 -0
  427. package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +192 -0
  428. package/dist/templates/workspace-core/.agents/skills/onboarding/SKILL.md +43 -0
  429. package/dist/templates/workspace-core/.agents/skills/portability/SKILL.md +84 -0
  430. package/dist/templates/workspace-core/.agents/skills/qa/SKILL.md +313 -0
  431. package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +112 -0
  432. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +165 -0
  433. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +41 -0
  434. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +239 -0
  435. package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +191 -0
  436. package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +79 -0
  437. package/dist/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +73 -0
  438. package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +79 -0
  439. package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +217 -0
  440. package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +132 -0
  441. package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +150 -0
  442. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +124 -0
  443. package/dist/templates/workspace-core/AGENTS.md +16 -1
  444. package/dist/templates/workspace-root/AGENTS.md +35 -0
  445. package/dist/templates/workspace-root/README.md +7 -0
  446. package/dist/tools/actions.d.ts +3 -0
  447. package/dist/tools/actions.d.ts.map +1 -0
  448. package/dist/tools/actions.js +272 -0
  449. package/dist/tools/actions.js.map +1 -0
  450. package/dist/tools/fetch-tool.d.ts +23 -0
  451. package/dist/tools/fetch-tool.d.ts.map +1 -0
  452. package/dist/tools/fetch-tool.js +178 -0
  453. package/dist/tools/fetch-tool.js.map +1 -0
  454. package/dist/tools/html-shell.d.ts +45 -0
  455. package/dist/tools/html-shell.d.ts.map +1 -0
  456. package/dist/tools/html-shell.js +514 -0
  457. package/dist/tools/html-shell.js.map +1 -0
  458. package/dist/tools/proxy-security.d.ts +12 -0
  459. package/dist/tools/proxy-security.d.ts.map +1 -0
  460. package/dist/tools/proxy-security.js +158 -0
  461. package/dist/tools/proxy-security.js.map +1 -0
  462. package/dist/tools/routes.d.ts +2 -0
  463. package/dist/tools/routes.d.ts.map +1 -0
  464. package/dist/tools/routes.js +627 -0
  465. package/dist/tools/routes.js.map +1 -0
  466. package/dist/tools/schema.d.ts +664 -0
  467. package/dist/tools/schema.d.ts.map +1 -0
  468. package/dist/tools/schema.js +146 -0
  469. package/dist/tools/schema.js.map +1 -0
  470. package/dist/tools/slots/routes.d.ts +15 -0
  471. package/dist/tools/slots/routes.d.ts.map +1 -0
  472. package/dist/tools/slots/routes.js +94 -0
  473. package/dist/tools/slots/routes.js.map +1 -0
  474. package/dist/tools/slots/schema.d.ts +303 -0
  475. package/dist/tools/slots/schema.d.ts.map +1 -0
  476. package/dist/tools/slots/schema.js +76 -0
  477. package/dist/tools/slots/schema.js.map +1 -0
  478. package/dist/tools/slots/store.d.ts +66 -0
  479. package/dist/tools/slots/store.d.ts.map +1 -0
  480. package/dist/tools/slots/store.js +227 -0
  481. package/dist/tools/slots/store.js.map +1 -0
  482. package/dist/tools/store.d.ts +40 -0
  483. package/dist/tools/store.d.ts.map +1 -0
  484. package/dist/tools/store.js +193 -0
  485. package/dist/tools/store.js.map +1 -0
  486. package/dist/tools/theme.d.ts +2 -0
  487. package/dist/tools/theme.d.ts.map +1 -0
  488. package/dist/tools/theme.js +67 -0
  489. package/dist/tools/theme.js.map +1 -0
  490. package/dist/tools/url-safety.d.ts +24 -0
  491. package/dist/tools/url-safety.d.ts.map +1 -0
  492. package/dist/tools/url-safety.js +224 -0
  493. package/dist/tools/url-safety.js.map +1 -0
  494. package/dist/vite/action-types-plugin.d.ts.map +1 -1
  495. package/dist/vite/action-types-plugin.js +4 -0
  496. package/dist/vite/action-types-plugin.js.map +1 -1
  497. package/docs/content/authentication.md +36 -0
  498. package/docs/content/creating-templates.md +15 -0
  499. package/docs/content/dispatch.md +3 -3
  500. package/docs/content/multi-app-workspace.md +5 -0
  501. package/docs/content/tracking.md +12 -0
  502. package/docs/content/workspace-management.md +39 -4
  503. package/package.json +15 -12
  504. package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +72 -0
  505. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +60 -37
  506. package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +28 -17
  507. package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +79 -0
  508. package/src/templates/default/AGENTS.md +22 -19
  509. package/src/templates/default/actions/navigate.ts +3 -0
  510. package/src/templates/default/app/hooks/use-navigation-state.ts +29 -5
  511. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +251 -0
  512. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +264 -0
  513. package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +130 -0
  514. package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +112 -0
  515. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +88 -0
  516. package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +191 -0
  517. package/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +74 -0
  518. package/src/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +75 -0
  519. package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +190 -0
  520. package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +168 -0
  521. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +163 -0
  522. package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +205 -0
  523. package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +720 -0
  524. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +92 -0
  525. package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +285 -0
  526. package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +192 -0
  527. package/src/templates/workspace-core/.agents/skills/onboarding/SKILL.md +43 -0
  528. package/src/templates/workspace-core/.agents/skills/portability/SKILL.md +84 -0
  529. package/src/templates/workspace-core/.agents/skills/qa/SKILL.md +313 -0
  530. package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +112 -0
  531. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +165 -0
  532. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +41 -0
  533. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +239 -0
  534. package/src/templates/workspace-core/.agents/skills/security/SKILL.md +191 -0
  535. package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +79 -0
  536. package/src/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +73 -0
  537. package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +79 -0
  538. package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +217 -0
  539. package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +132 -0
  540. package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +150 -0
  541. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +124 -0
  542. package/src/templates/workspace-core/AGENTS.md +16 -1
  543. package/src/templates/workspace-root/AGENTS.md +35 -0
  544. package/src/templates/workspace-root/README.md +7 -0
@@ -1 +1 @@
1
- {"version":3,"file":"builder-frame.js","sourceRoot":"","sources":["../../src/client/builder-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,cAAc;IACrB,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC/C,M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MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gCAAgC,CAC9C,IAAwB;IAExB,IAAI,CAAC,gBAAgB,EAAE;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAClD,OAAO,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["import { getFrameOrigin } from \"./frame.js\";\n\nfunction normalizeOrigin(value: unknown): string | null {\n if (typeof value !== \"string\" || !value.trim()) return null;\n try {\n return new URL(value).origin;\n } catch {\n return null;\n }\n}\n\nfunction ancestorOrigin(): string | null {\n if (typeof window === \"undefined\") return null;\n const origins = (\n window.location as Location & { ancestorOrigins?: DOMStringList }\n ).ancestorOrigins;\n const first = origins?.[0];\n const fromAncestor = normalizeOrigin(first);\n if (fromAncestor) return fromAncestor;\n return normalizeOrigin(document.referrer);\n}\n\nfunction isStrictBuilderHost(origin: string | null): boolean {\n if (!origin) return false;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return (\n hostname === \"builder.io\" ||\n hostname.endsWith(\".builder.io\") ||\n hostname === \"builder.my\" ||\n hostname.endsWith(\".builder.my\")\n );\n } catch {\n return false;\n }\n}\n\nfunction isBuilderLikeOrigin(origin: string | null): boolean {\n if (!origin) return false;\n if (isStrictBuilderHost(origin)) return true;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return hostname === \"localhost\" || hostname === \"127.0.0.1\";\n } catch {\n return false;\n }\n}\n\nfunction hasBuilderPreviewParams(): boolean {\n if (typeof window === \"undefined\") return false;\n const params = new URLSearchParams(window.location.search);\n return (\n params.has(\"builder.space\") ||\n params.has(\"builder.preview\") ||\n params.has(\"builder.frameEditing\") ||\n params.has(\"builder.user.permissions\") ||\n params.has(\"builder.user.role.name\") ||\n params.has(\"__builder_editing__\")\n );\n}\n\n/**\n * For *.builder.io / *.builder.my the parent origin alone is sufficient — those\n * are Builder-owned hosts and any iframe they load is by definition a Builder\n * editor session. For localhost we still require the legacy `?builder.*` query\n * params, because \"parent is localhost\" can mean anything in dev. The params\n * check existed historically as a belt-and-suspenders signal, but Builder's\n * Interact mode tunnels straight to the iframe URL without appending them, so\n * requiring them everywhere caused `isInBuilderFrame()` to return false for\n * real Builder editor sessions and `HomeChatPanel` submissions silently fell\n * through to `agentNative.submitChat` (which Builder ignores).\n */\nexport function getBuilderParentOrigin(): string | null {\n const frameOrigin = getFrameOrigin();\n if (frameOrigin) {\n if (isStrictBuilderHost(frameOrigin)) return frameOrigin;\n if (isBuilderLikeOrigin(frameOrigin) && hasBuilderPreviewParams()) {\n return frameOrigin;\n }\n }\n const origin = ancestorOrigin();\n if (origin) {\n if (isStrictBuilderHost(origin)) return origin;\n if (isBuilderLikeOrigin(origin) && hasBuilderPreviewParams()) {\n return origin;\n }\n }\n return null;\n}\n\nexport function isInBuilderFrame(): boolean {\n if (typeof window === \"undefined\") return false;\n if (getBuilderParentOrigin() !== null) return true;\n\n // Electron webviews run the preview as a top-level page, so there is no\n // parent frame to inspect. Builder still marks those URLs with builder.*\n // preview params, and sendToBuilderChat will use the console relay.\n return hasBuilderPreviewParams();\n}\n\nexport function isTrustedBuilderMessage(event: MessageEvent): boolean {\n if (typeof window === \"undefined\") return false;\n const origin = getBuilderParentOrigin();\n if (!origin) return false;\n return event.origin === origin && event.source === window.parent;\n}\n\nexport interface BuilderChatMessage {\n message: string;\n context?: string;\n submit?: boolean;\n}\n\nexport function sendToBuilderChat(opts: BuilderChatMessage): boolean {\n if (typeof window === \"undefined\" || !opts.message?.trim()) return false;\n const target = window.parent !== window ? window.parent : window;\n const targetOrigin = getBuilderParentOrigin() ?? \"*\";\n const payload = {\n type: \"builder.submitChat\",\n data: {\n message: opts.message,\n context: opts.context,\n submit: opts.submit,\n },\n };\n target.postMessage(payload, targetOrigin);\n\n // Builder's Electron/webview relay watches console output because webviews\n // cannot always post directly to the app frame. Keep the payload small and\n // never include credential values in callers' context.\n try {\n console.log(\n \"BUILDER_PARENT_MESSAGE:\" +\n JSON.stringify({ message: payload, targetOrigin }),\n );\n } catch {}\n\n return true;\n}\n\n// Detect \"build/create/make/scaffold a new app/agent\" style prompts.\n// Within agent-native, \"agent\" and \"app\" are synonyms — every agent-native\n// app is an agent, so users phrase build requests either way.\nconst BUILD_APP_OR_AGENT_RE =\n /\\b(?:build|create|make|scaffold|generate)\\b[^.!?\\n]*?\\b(?:agent[-\\s]native\\s+)?(?:workspace\\s+)?(?:app|agent)\\b/i;\n\n/**\n * Returns true if `text` looks like a \"build me an app/agent\" request that\n * should hand off to the code-writing agent (Builder, local code agent, etc.)\n * rather than be answered by the embedded app's domain agent.\n *\n * Conservative: requires both an imperative build verb AND an explicit\n * \"app\" / \"agent\" target word in the same sentence. \"Build me a tool\",\n * \"build a recurring job\", \"create a destination\" do not match — they\n * don't end in \"app\"/\"agent\" so they stay on the local agent. \"Build me\n * an email app\" / \"create me an email agent\" do match — the target\n * word is \"app\" / \"agent\", not \"email\".\n */\nexport function isBuildAppOrAgentRequest(text: string | undefined): boolean {\n const t = (text ?? \"\").trim();\n if (!t) return false;\n return BUILD_APP_OR_AGENT_RE.test(t);\n}\n\n/**\n * If the user typed a \"build me an app/agent\" prompt while running inside\n * the Builder.io webview/iframe, hand the prompt up to the parent Builder\n * chat via `builder.submitChat`. Returns true when delegated.\n *\n * Why: Builder is the code-writing agent. When a workspace app (Dispatch,\n * Mail, etc.) is mounted inside Builder's webview and the user asks the\n * embedded chat to \"build an app\", the user almost certainly means the\n * already-open Builder chat session — not a separate Builder agent run\n * spawned through `start-workspace-app-creation`.\n */\nexport function tryDelegateBuildRequestToBuilder(\n text: string | undefined,\n): boolean {\n if (!isInBuilderFrame()) return false;\n if (!isBuildAppOrAgentRequest(text)) return false;\n return sendToBuilderChat({ message: (text ?? \"\").trim(), submit: true });\n}\n"]}
1
+ {"version":3,"file":"builder-frame.js","sourceRoot":"","sources":["../../src/client/builder-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,cAAc;IACrB,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,OAAO,GACX,MAAM,CAAC,QACR,CAAC,eAAe,CAAC;IAClB,MAAM,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IACtC,OAAO,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAqB;IAChD,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QACxD,OAAO,CACL,QAAQ,KAAK,YAAY;YACzB,QAAQ,CAAC,QAAQ,CAAC,aAAa,CA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IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAClD,OAAO,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["import { getFrameOrigin } from \"./frame.js\";\n\nfunction normalizeOrigin(value: unknown): string | null {\n if (typeof value !== \"string\" || !value.trim()) return null;\n try {\n return new URL(value).origin;\n } catch {\n return null;\n }\n}\n\nfunction ancestorOrigin(): string | null {\n if (typeof window === \"undefined\") return null;\n const origins = (\n window.location as Location & { ancestorOrigins?: DOMStringList }\n ).ancestorOrigins;\n const first = origins?.[0];\n const fromAncestor = normalizeOrigin(first);\n if (fromAncestor) return fromAncestor;\n return normalizeOrigin(document.referrer);\n}\n\nfunction isStrictBuilderHost(origin: string | null): boolean {\n if (!origin) return false;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return (\n hostname === \"builder.io\" ||\n hostname.endsWith(\".builder.io\") ||\n hostname === \"builder.my\" ||\n hostname.endsWith(\".builder.my\")\n );\n } catch {\n return false;\n }\n}\n\nfunction isBuilderLikeOrigin(origin: string | null): boolean {\n if (!origin) return false;\n if (isStrictBuilderHost(origin)) return true;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return hostname === \"localhost\" || hostname === \"127.0.0.1\";\n } catch {\n return false;\n }\n}\n\nfunction hasBuilderPreviewParams(): boolean {\n if (typeof window === \"undefined\") return false;\n const params = new URLSearchParams(window.location.search);\n return (\n params.has(\"builder.space\") ||\n params.has(\"builder.preview\") ||\n params.has(\"builder.frameEditing\") ||\n params.has(\"builder.user.permissions\") ||\n params.has(\"builder.user.role.name\") ||\n params.has(\"__builder_editing__\")\n );\n}\n\n/**\n * For *.builder.io / *.builder.my the parent origin alone is sufficient — those\n * are Builder-owned hosts and any iframe they load is by definition a Builder\n * editor session. For localhost we still require the legacy `?builder.*` query\n * params, because \"parent is localhost\" can mean anything in dev. The params\n * check existed historically as a belt-and-suspenders signal, but Builder's\n * Interact mode tunnels straight to the iframe URL without appending them, so\n * requiring them everywhere caused `isInBuilderFrame()` to return false for\n * real Builder editor sessions and `HomeChatPanel` submissions silently fell\n * through to `agentNative.submitChat` (which Builder ignores).\n */\nexport function getBuilderParentOrigin(): string | null {\n const frameOrigin = getFrameOrigin();\n if (frameOrigin) {\n if (isStrictBuilderHost(frameOrigin)) return frameOrigin;\n if (isBuilderLikeOrigin(frameOrigin) && hasBuilderPreviewParams()) {\n return frameOrigin;\n }\n }\n const origin = ancestorOrigin();\n if (origin) {\n if (isStrictBuilderHost(origin)) return origin;\n if (isBuilderLikeOrigin(origin) && hasBuilderPreviewParams()) {\n return origin;\n }\n }\n return null;\n}\n\nexport function isInBuilderFrame(): boolean {\n if (typeof window === \"undefined\") return false;\n if (getBuilderParentOrigin() !== null) return true;\n\n // Electron webviews run the preview as a top-level page, so there is no\n // parent frame to inspect. Builder still marks those URLs with builder.*\n // preview params, and sendToBuilderChat will use the console relay.\n return hasBuilderPreviewParams();\n}\n\nexport function shouldParentFrameOwnAgentPanel(): boolean {\n if (typeof window === \"undefined\") return false;\n if (window.parent === window) return false;\n return !isInBuilderFrame();\n}\n\nexport function isTrustedBuilderMessage(event: MessageEvent): boolean {\n if (typeof window === \"undefined\") return false;\n const origin = getBuilderParentOrigin();\n if (!origin) return false;\n return event.origin === origin && event.source === window.parent;\n}\n\nexport interface BuilderChatMessage {\n message: string;\n context?: string;\n submit?: boolean;\n}\n\nexport function sendToBuilderChat(opts: BuilderChatMessage): boolean {\n if (typeof window === \"undefined\" || !opts.message?.trim()) return false;\n const hasParentFrame = window.parent !== window;\n const targetOrigin = getBuilderParentOrigin() ?? \"*\";\n const payload = {\n type: \"builder.submitChat\",\n data: {\n message: opts.message,\n context: opts.context,\n submit: opts.submit,\n },\n };\n\n if (hasParentFrame) {\n window.parent.postMessage(payload, targetOrigin);\n } else {\n // Builder's Electron/webview relay watches console output for top-level\n // previews that have no parent frame to receive postMessage.\n try {\n console.log(\n \"BUILDER_PARENT_MESSAGE:\" +\n JSON.stringify({ message: payload, targetOrigin }),\n );\n } catch {}\n }\n\n return true;\n}\n\n// Detect \"build/create/make/scaffold a new app/agent\" style prompts.\n// Within agent-native, \"agent\" and \"app\" are synonyms — every agent-native\n// app is an agent, so users phrase build requests either way.\nconst BUILD_APP_OR_AGENT_RE =\n /\\b(?:build|create|make|scaffold|generate)\\b[^.!?\\n]*?\\b(?:agent[-\\s]native\\s+)?(?:workspace\\s+)?(?:app|agent)\\b/i;\n\n/**\n * Returns true if `text` looks like a \"build me an app/agent\" request that\n * should hand off to the code-writing agent (Builder, local code agent, etc.)\n * rather than be answered by the embedded app's domain agent.\n *\n * Conservative: requires both an imperative build verb AND an explicit\n * \"app\" / \"agent\" target word in the same sentence. \"Build me a tool\",\n * \"build a recurring job\", \"create a destination\" do not match — they\n * don't end in \"app\"/\"agent\" so they stay on the local agent. \"Build me\n * an email app\" / \"create me an email agent\" do match — the target\n * word is \"app\" / \"agent\", not \"email\".\n */\nexport function isBuildAppOrAgentRequest(text: string | undefined): boolean {\n const t = (text ?? \"\").trim();\n if (!t) return false;\n return BUILD_APP_OR_AGENT_RE.test(t);\n}\n\n/**\n * If the user typed a \"build me an app/agent\" prompt while running inside\n * the Builder.io webview/iframe, hand the prompt up to the parent Builder\n * chat via `builder.submitChat`. Returns true when delegated.\n *\n * Why: Builder is the code-writing agent. When a workspace app (Dispatch,\n * Mail, etc.) is mounted inside Builder's webview and the user asks the\n * embedded chat to \"build an app\", the user almost certainly means the\n * already-open Builder chat session — not a separate Builder agent run\n * spawned through `start-workspace-app-creation`.\n */\nexport function tryDelegateBuildRequestToBuilder(\n text: string | undefined,\n): boolean {\n if (!isInBuilderFrame()) return false;\n if (!isBuildAppOrAgentRequest(text)) return false;\n return sendToBuilderChat({ message: (text ?? \"\").trim(), submit: true });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CodeRequiredDialog.d.ts","sourceRoot":"","sources":["../../../src/client/components/CodeRequiredDialog.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAuBD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,YAAY,GACb,EAAE,uBAAuB,OA6OzB"}
1
+ {"version":3,"file":"CodeRequiredDialog.d.ts","sourceRoot":"","sources":["../../../src/client/components/CodeRequiredDialog.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAuBD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,YAAY,GACb,EAAE,uBAAuB,OAqPzB"}
@@ -3,6 +3,7 @@ import { useEffect, useCallback, useState } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import { IconPackageExport, IconCode, IconExternalLink, IconX, IconLoader2, } from "@tabler/icons-react";
5
5
  import { agentNativePath } from "../api-path.js";
6
+ import { trackEvent } from "../analytics.js";
6
7
  const DESKTOP_DOWNLOAD_URL = "https://www.agent-native.com/download";
7
8
  function useBuilderConnected() {
8
9
  const [connected, setConnected] = useState(false);
@@ -86,7 +87,7 @@ export function CodeRequiredDialog({ open, onClose, featureLabel, }) {
86
87
  return null;
87
88
  return createPortal(_jsx("div", { style: s.backdrop, onClick: onClose, children: _jsxs("div", { style: s.dialog, onClick: (e) => e.stopPropagation(), role: "dialog", "aria-modal": "true", children: [_jsxs("div", { style: s.header, children: [_jsx("div", { style: s.iconWrap, children: _jsx(IconPackageExport, { size: 20 }) }), _jsxs("div", { children: [_jsx("h2", { style: s.title, children: "Code changes required" }), _jsx("p", { style: s.subtitle, children: featureLabel
88
89
  ? `"${featureLabel}" creates or modifies source code, which needs Desktop or Builder from this surface.`
89
- : "This action creates or modifies source code, which needs Desktop or Builder from this surface." })] })] }), _jsxs("div", { style: s.options, children: [_jsxs("a", { href: DESKTOP_DOWNLOAD_URL, target: "_blank", rel: "noreferrer", style: { ...s.optionCard, ...s.optionLink }, onMouseEnter: (e) => Object.assign(e.currentTarget.style, s.optionCardHover), onMouseLeave: (e) => Object.assign(e.currentTarget.style, { borderColor: "#e5e7eb" }), children: [_jsx("div", { style: s.optionIcon, children: _jsx(IconCode, { size: 24 }) }), _jsxs("div", { style: s.optionText, children: [_jsx("span", { style: s.optionTitle, children: "Use Agent Native Desktop" }), _jsx("span", { style: s.optionDesc, children: "Open the project in the desktop app to enable source edits, Workspace files, and CLI access." })] })] }), builderConnected && cloudAgentsAvailable ? (_jsxs("button", { style: {
90
+ : "This action creates or modifies source code, which needs Desktop or Builder from this surface." })] })] }), _jsxs("div", { style: s.options, children: [_jsxs("a", { href: DESKTOP_DOWNLOAD_URL, target: "_blank", rel: "noreferrer", style: { ...s.optionCard, ...s.optionLink }, onMouseEnter: (e) => Object.assign(e.currentTarget.style, s.optionCardHover), onMouseLeave: (e) => Object.assign(e.currentTarget.style, { borderColor: "#e5e7eb" }), children: [_jsx("div", { style: s.optionIcon, children: _jsx(IconCode, { size: 24 }) }), _jsxs("div", { style: s.optionText, children: [_jsx("span", { style: s.optionTitle, children: "Use Agent Native Desktop" }), _jsx("span", { style: s.optionDesc, children: "Open the project in the desktop app to enable source edits and CLI access." })] })] }), builderConnected && cloudAgentsAvailable ? (_jsxs("button", { style: {
90
91
  ...s.optionCard,
91
92
  ...(submitting
92
93
  ? { opacity: 0.7, pointerEvents: "none" }
@@ -95,7 +96,14 @@ export function CodeRequiredDialog({ open, onClose, featureLabel, }) {
95
96
  ...s.optionCard,
96
97
  cursor: "default",
97
98
  opacity: 0.85,
98
- }, children: [_jsx("div", { style: s.optionIcon, children: _jsx(IconExternalLink, { size: 24 }) }), _jsxs("div", { style: s.optionText, children: [_jsx("span", { style: s.optionTitle, children: "Builder Cloud Agents coming soon" }), _jsx("span", { style: s.optionDesc, children: "You don't have access yet. Use the desktop app or your local clone for this code change." })] }), _jsx("span", { style: s.badge, children: "Coming soon" })] })) : (_jsxs("a", { href: builderHref, target: "_blank", rel: "noreferrer", style: { ...s.optionCard, ...s.optionLink }, onMouseEnter: (e) => Object.assign(e.currentTarget.style, s.optionCardHover), onMouseLeave: (e) => Object.assign(e.currentTarget.style, {
99
+ }, children: [_jsx("div", { style: s.optionIcon, children: _jsx(IconExternalLink, { size: 24 }) }), _jsxs("div", { style: s.optionText, children: [_jsx("span", { style: s.optionTitle, children: "Builder Cloud Agents coming soon" }), _jsx("span", { style: s.optionDesc, children: "You don't have access yet. Use the desktop app or your local clone for this code change." })] }), _jsx("span", { style: s.badge, children: "Coming soon" })] })) : (_jsxs("a", { href: builderHref, target: "_blank", rel: "noreferrer", onClick: () => {
100
+ trackEvent("builder connect clicked", {
101
+ feature: "builder",
102
+ stage: "client",
103
+ source: "code_required_dialog",
104
+ connect_url_kind: connectUrl ? "provided" : "default",
105
+ });
106
+ }, style: { ...s.optionCard, ...s.optionLink }, onMouseEnter: (e) => Object.assign(e.currentTarget.style, s.optionCardHover), onMouseLeave: (e) => Object.assign(e.currentTarget.style, {
99
107
  borderColor: "#e5e7eb",
100
108
  }), children: [_jsx("div", { style: s.optionIcon, children: _jsx(IconExternalLink, { size: 24 }) }), _jsxs("div", { style: s.optionText, children: [_jsx("span", { style: s.optionTitle, children: "Connect Builder.io" }), _jsx("span", { style: s.optionDesc, children: "Connect Builder to enable cloud-based code changes from this app." })] }), !connectUrl && _jsx("span", { style: s.badge, children: "Setup required" })] }))] }), branchUrl && (_jsxs("div", { style: s.result, children: [_jsx("span", { style: { fontSize: 13, fontWeight: 600 }, children: "Branch created" }), _jsx("a", { href: branchUrl, target: "_blank", rel: "noopener noreferrer", style: s.resultLink, children: branchUrl })] })), error && (_jsx("p", { style: { color: "#ef4444", fontSize: 12, marginTop: 12 }, children: error })), _jsx("button", { style: s.closeButton, onClick: onClose, "aria-label": "Close", children: _jsx(IconX, { size: 16 }) })] }) }), document.body);
101
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CodeRequiredDialog.js","sourceRoot":"","sources":["../../../src/client/components/CodeRequiredDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,gBAAgB,EAChB,KAAK,EACL,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AASrE,SAAS,mBAAmB;IAC1B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAElE,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC;aACpD,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aACrC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACb,IAAI,IAAI,EAAE,CAAC;gBACT,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAChC,uB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AChB,KAAK,EAAE,SAAS;QAChB,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,WAAW;KACvB;CACF,CAAC","sourcesContent":["import { useEffect, useCallback, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport {\n IconPackageExport,\n IconCode,\n IconExternalLink,\n IconX,\n IconLoader2,\n} from \"@tabler/icons-react\";\nimport { agentNativePath } from \"../api-path.js\";\n\nconst DESKTOP_DOWNLOAD_URL = \"https://www.agent-native.com/download\";\n\nexport interface CodeRequiredDialogProps {\n open: boolean;\n onClose: () => void;\n /** Label describing the feature that requires code changes */\n featureLabel?: string;\n}\n\nfunction useBuilderConnected() {\n const [connected, setConnected] = useState(false);\n const [cloudAgentsAvailable, setCloudAgentsAvailable] = useState(false);\n const [connectUrl, setConnectUrl] = useState<string | null>(null);\n\n useEffect(() => {\n fetch(agentNativePath(\"/_agent-native/builder/status\"))\n .then((r) => (r.ok ? r.json() : null))\n .then((data) => {\n if (data) {\n setConnected(!!data.configured);\n setCloudAgentsAvailable(!!data.builderEnabled);\n setConnectUrl(data.connectUrl || null);\n }\n })\n .catch(() => {});\n }, []);\n\n return { connected, cloudAgentsAvailable, connectUrl };\n}\n\n/**\n * Modal shown when a user tries to use a code-requiring feature where local\n * source access is unavailable. Offers two paths: Agent Native Desktop or the\n * Builder.io agent.\n * Uses inline styles (no Radix/Tailwind dependency).\n */\nexport function CodeRequiredDialog({\n open,\n onClose,\n featureLabel,\n}: CodeRequiredDialogProps) {\n const {\n connected: builderConnected,\n cloudAgentsAvailable,\n connectUrl,\n } = useBuilderConnected();\n const [submitting, setSubmitting] = useState(false);\n const [branchUrl, setBranchUrl] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const builderHref =\n connectUrl || agentNativePath(\"/_agent-native/builder/connect\");\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === \"Escape\") onClose();\n },\n [onClose],\n );\n\n useEffect(() => {\n if (open) {\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }\n }, [open, handleKeyDown]);\n\n useEffect(() => {\n if (open) {\n setSubmitting(false);\n setBranchUrl(null);\n setError(null);\n }\n }, [open]);\n\n const handleBuilderAgent = async () => {\n if (!builderConnected) {\n // Open settings tab\n window.dispatchEvent(new Event(\"agent-panel:open-settings\"));\n onClose();\n return;\n }\n\n setSubmitting(true);\n setError(null);\n try {\n const res = await fetch(\n agentNativePath(\"/_agent-native/builder/agents-run\"),\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n userMessage:\n featureLabel || \"Make the requested code changes to this app\",\n }),\n },\n );\n if (!res.ok) {\n const body = await res.json().catch(() => ({}));\n throw new Error(body?.error || `Failed (${res.status})`);\n }\n const data = await res.json();\n setBranchUrl(data.url || null);\n } catch (err: any) {\n setError(err?.message || \"Failed to create branch\");\n } finally {\n setSubmitting(false);\n }\n };\n\n if (!open || typeof document === \"undefined\") return null;\n\n return createPortal(\n <div style={s.backdrop} onClick={onClose}>\n <div\n style={s.dialog}\n onClick={(e) => e.stopPropagation()}\n role=\"dialog\"\n aria-modal=\"true\"\n >\n {/* Header */}\n <div style={s.header}>\n <div style={s.iconWrap}>\n <IconPackageExport size={20} />\n </div>\n <div>\n <h2 style={s.title}>Code changes required</h2>\n <p style={s.subtitle}>\n {featureLabel\n ? `\"${featureLabel}\" creates or modifies source code, which needs Desktop or Builder from this surface.`\n : \"This action creates or modifies source code, which needs Desktop or Builder from this surface.\"}\n </p>\n </div>\n </div>\n\n {/* Options */}\n <div style={s.options}>\n <a\n href={DESKTOP_DOWNLOAD_URL}\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{ ...s.optionCard, ...s.optionLink }}\n onMouseEnter={(e) =>\n Object.assign(e.currentTarget.style, s.optionCardHover)\n }\n onMouseLeave={(e) =>\n Object.assign(e.currentTarget.style, { borderColor: \"#e5e7eb\" })\n }\n >\n <div style={s.optionIcon}>\n <IconCode size={24} />\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>Use Agent Native Desktop</span>\n <span style={s.optionDesc}>\n Open the project in the desktop app to enable source edits,\n Workspace files, and CLI access.\n </span>\n </div>\n </a>\n\n {builderConnected && cloudAgentsAvailable ? (\n <button\n style={{\n ...s.optionCard,\n ...(submitting\n ? { opacity: 0.7, pointerEvents: \"none\" as const }\n : {}),\n }}\n onMouseEnter={(e) =>\n Object.assign(e.currentTarget.style, s.optionCardHover)\n }\n onMouseLeave={(e) =>\n Object.assign(e.currentTarget.style, { borderColor: \"#e5e7eb\" })\n }\n onClick={handleBuilderAgent}\n >\n <div style={s.optionIcon}>\n {submitting ? (\n <IconLoader2\n size={24}\n style={{ animation: \"spin 1s linear infinite\" }}\n />\n ) : (\n <IconExternalLink size={24} />\n )}\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>Use Builder.io Agent</span>\n <span style={s.optionDesc}>\n Let our cloud agent make the changes for you. You'll get a\n link to preview and deploy.\n </span>\n </div>\n </button>\n ) : builderConnected ? (\n <div\n style={{\n ...s.optionCard,\n cursor: \"default\",\n opacity: 0.85,\n }}\n >\n <div style={s.optionIcon}>\n <IconExternalLink size={24} />\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>\n Builder Cloud Agents coming soon\n </span>\n <span style={s.optionDesc}>\n You don't have access yet. Use the desktop app or your local\n clone for this code change.\n </span>\n </div>\n <span style={s.badge}>Coming soon</span>\n </div>\n ) : (\n <a\n href={builderHref}\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{ ...s.optionCard, ...s.optionLink }}\n onMouseEnter={(e) =>\n Object.assign(e.currentTarget.style, s.optionCardHover)\n }\n onMouseLeave={(e) =>\n Object.assign(e.currentTarget.style, {\n borderColor: \"#e5e7eb\",\n })\n }\n >\n <div style={s.optionIcon}>\n <IconExternalLink size={24} />\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>Connect Builder.io</span>\n <span style={s.optionDesc}>\n Connect Builder to enable cloud-based code changes from this\n app.\n </span>\n </div>\n {!connectUrl && <span style={s.badge}>Setup required</span>}\n </a>\n )}\n </div>\n\n {/* Branch result */}\n {branchUrl && (\n <div style={s.result}>\n <span style={{ fontSize: 13, fontWeight: 600 }}>\n Branch created\n </span>\n <a\n href={branchUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n style={s.resultLink}\n >\n {branchUrl}\n </a>\n </div>\n )}\n\n {error && (\n <p style={{ color: \"#ef4444\", fontSize: 12, marginTop: 12 }}>\n {error}\n </p>\n )}\n\n {/* Close */}\n <button style={s.closeButton} onClick={onClose} aria-label=\"Close\">\n <IconX size={16} />\n </button>\n </div>\n </div>,\n document.body,\n );\n}\n\nconst s: Record<string, React.CSSProperties> = {\n backdrop: {\n position: \"fixed\",\n inset: 0,\n background: \"rgba(0, 0, 0, 0.5)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 99999,\n padding: \"16px\",\n },\n dialog: {\n position: \"relative\",\n background: \"#fff\",\n borderRadius: \"12px\",\n maxWidth: \"460px\",\n width: \"100%\",\n padding: \"24px\",\n boxShadow:\n \"0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1)\",\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n color: \"#111827\",\n },\n header: {\n display: \"flex\",\n gap: \"14px\",\n alignItems: \"flex-start\",\n marginBottom: \"20px\",\n },\n iconWrap: {\n flexShrink: 0,\n width: \"40px\",\n height: \"40px\",\n borderRadius: \"10px\",\n background: \"#f3f4f6\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"#6b7280\",\n },\n title: {\n margin: 0,\n fontSize: \"16px\",\n fontWeight: 600,\n lineHeight: \"1.4\",\n },\n subtitle: {\n margin: \"4px 0 0\",\n fontSize: \"13px\",\n color: \"#6b7280\",\n lineHeight: \"1.5\",\n },\n options: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"10px\",\n },\n optionCard: {\n position: \"relative\",\n display: \"flex\",\n alignItems: \"flex-start\",\n gap: \"14px\",\n padding: \"14px\",\n border: \"1px solid #e5e7eb\",\n borderRadius: \"10px\",\n background: \"transparent\",\n cursor: \"pointer\",\n textAlign: \"left\",\n width: \"100%\",\n fontSize: \"inherit\",\n fontFamily: \"inherit\",\n color: \"inherit\",\n },\n optionCardHover: {\n borderColor: \"#a5b4fc\",\n },\n optionLink: {\n textDecoration: \"none\",\n boxSizing: \"border-box\",\n },\n optionIcon: {\n flexShrink: 0,\n color: \"#00B5FF\",\n marginTop: \"2px\",\n },\n optionText: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"2px\",\n },\n optionTitle: {\n fontSize: \"14px\",\n fontWeight: 600,\n },\n optionDesc: {\n fontSize: \"12px\",\n color: \"#6b7280\",\n lineHeight: \"1.5\",\n },\n code: {\n background: \"#f3f4f6\",\n padding: \"1px 5px\",\n borderRadius: \"4px\",\n fontSize: \"11px\",\n fontFamily: \"monospace\",\n },\n badge: {\n position: \"absolute\",\n top: \"10px\",\n right: \"10px\",\n fontSize: \"10px\",\n fontWeight: 600,\n color: \"#00B5FF\",\n background: \"#e0f2fe\",\n padding: \"2px 8px\",\n borderRadius: \"99px\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.5px\",\n },\n closeButton: {\n position: \"absolute\",\n top: \"12px\",\n right: \"12px\",\n background: \"transparent\",\n border: \"none\",\n cursor: \"pointer\",\n padding: \"6px\",\n borderRadius: \"6px\",\n color: \"#9ca3af\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n result: {\n marginTop: \"16px\",\n padding: \"12px\",\n borderRadius: \"8px\",\n border: \"1px solid #22c55e40\",\n background: \"#f0fdf4\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n },\n resultLink: {\n fontSize: \"12px\",\n color: \"#00B5FF\",\n textDecoration: \"none\",\n wordBreak: \"break-all\",\n },\n};\n"]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,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,KAAK;KACX;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,SAAS;QAChB,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,WAAW;KACvB;CACF,CAAC","sourcesContent":["import { useEffect, useCallback, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport {\n IconPackageExport,\n IconCode,\n IconExternalLink,\n IconX,\n IconLoader2,\n} from \"@tabler/icons-react\";\nimport { agentNativePath } from \"../api-path.js\";\nimport { trackEvent } from \"../analytics.js\";\n\nconst DESKTOP_DOWNLOAD_URL = \"https://www.agent-native.com/download\";\n\nexport interface CodeRequiredDialogProps {\n open: boolean;\n onClose: () => void;\n /** Label describing the feature that requires code changes */\n featureLabel?: string;\n}\n\nfunction useBuilderConnected() {\n const [connected, setConnected] = useState(false);\n const [cloudAgentsAvailable, setCloudAgentsAvailable] = useState(false);\n const [connectUrl, setConnectUrl] = useState<string | null>(null);\n\n useEffect(() => {\n fetch(agentNativePath(\"/_agent-native/builder/status\"))\n .then((r) => (r.ok ? r.json() : null))\n .then((data) => {\n if (data) {\n setConnected(!!data.configured);\n setCloudAgentsAvailable(!!data.builderEnabled);\n setConnectUrl(data.connectUrl || null);\n }\n })\n .catch(() => {});\n }, []);\n\n return { connected, cloudAgentsAvailable, connectUrl };\n}\n\n/**\n * Modal shown when a user tries to use a code-requiring feature where local\n * source access is unavailable. Offers two paths: Agent Native Desktop or the\n * Builder.io agent.\n * Uses inline styles (no Radix/Tailwind dependency).\n */\nexport function CodeRequiredDialog({\n open,\n onClose,\n featureLabel,\n}: CodeRequiredDialogProps) {\n const {\n connected: builderConnected,\n cloudAgentsAvailable,\n connectUrl,\n } = useBuilderConnected();\n const [submitting, setSubmitting] = useState(false);\n const [branchUrl, setBranchUrl] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const builderHref =\n connectUrl || agentNativePath(\"/_agent-native/builder/connect\");\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === \"Escape\") onClose();\n },\n [onClose],\n );\n\n useEffect(() => {\n if (open) {\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }\n }, [open, handleKeyDown]);\n\n useEffect(() => {\n if (open) {\n setSubmitting(false);\n setBranchUrl(null);\n setError(null);\n }\n }, [open]);\n\n const handleBuilderAgent = async () => {\n if (!builderConnected) {\n // Open settings tab\n window.dispatchEvent(new Event(\"agent-panel:open-settings\"));\n onClose();\n return;\n }\n\n setSubmitting(true);\n setError(null);\n try {\n const res = await fetch(\n agentNativePath(\"/_agent-native/builder/agents-run\"),\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n userMessage:\n featureLabel || \"Make the requested code changes to this app\",\n }),\n },\n );\n if (!res.ok) {\n const body = await res.json().catch(() => ({}));\n throw new Error(body?.error || `Failed (${res.status})`);\n }\n const data = await res.json();\n setBranchUrl(data.url || null);\n } catch (err: any) {\n setError(err?.message || \"Failed to create branch\");\n } finally {\n setSubmitting(false);\n }\n };\n\n if (!open || typeof document === \"undefined\") return null;\n\n return createPortal(\n <div style={s.backdrop} onClick={onClose}>\n <div\n style={s.dialog}\n onClick={(e) => e.stopPropagation()}\n role=\"dialog\"\n aria-modal=\"true\"\n >\n {/* Header */}\n <div style={s.header}>\n <div style={s.iconWrap}>\n <IconPackageExport size={20} />\n </div>\n <div>\n <h2 style={s.title}>Code changes required</h2>\n <p style={s.subtitle}>\n {featureLabel\n ? `\"${featureLabel}\" creates or modifies source code, which needs Desktop or Builder from this surface.`\n : \"This action creates or modifies source code, which needs Desktop or Builder from this surface.\"}\n </p>\n </div>\n </div>\n\n {/* Options */}\n <div style={s.options}>\n <a\n href={DESKTOP_DOWNLOAD_URL}\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{ ...s.optionCard, ...s.optionLink }}\n onMouseEnter={(e) =>\n Object.assign(e.currentTarget.style, s.optionCardHover)\n }\n onMouseLeave={(e) =>\n Object.assign(e.currentTarget.style, { borderColor: \"#e5e7eb\" })\n }\n >\n <div style={s.optionIcon}>\n <IconCode size={24} />\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>Use Agent Native Desktop</span>\n <span style={s.optionDesc}>\n Open the project in the desktop app to enable source edits and\n CLI access.\n </span>\n </div>\n </a>\n\n {builderConnected && cloudAgentsAvailable ? (\n <button\n style={{\n ...s.optionCard,\n ...(submitting\n ? { opacity: 0.7, pointerEvents: \"none\" as const }\n : {}),\n }}\n onMouseEnter={(e) =>\n Object.assign(e.currentTarget.style, s.optionCardHover)\n }\n onMouseLeave={(e) =>\n Object.assign(e.currentTarget.style, { borderColor: \"#e5e7eb\" })\n }\n onClick={handleBuilderAgent}\n >\n <div style={s.optionIcon}>\n {submitting ? (\n <IconLoader2\n size={24}\n style={{ animation: \"spin 1s linear infinite\" }}\n />\n ) : (\n <IconExternalLink size={24} />\n )}\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>Use Builder.io Agent</span>\n <span style={s.optionDesc}>\n Let our cloud agent make the changes for you. You'll get a\n link to preview and deploy.\n </span>\n </div>\n </button>\n ) : builderConnected ? (\n <div\n style={{\n ...s.optionCard,\n cursor: \"default\",\n opacity: 0.85,\n }}\n >\n <div style={s.optionIcon}>\n <IconExternalLink size={24} />\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>\n Builder Cloud Agents coming soon\n </span>\n <span style={s.optionDesc}>\n You don't have access yet. Use the desktop app or your local\n clone for this code change.\n </span>\n </div>\n <span style={s.badge}>Coming soon</span>\n </div>\n ) : (\n <a\n href={builderHref}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => {\n trackEvent(\"builder connect clicked\", {\n feature: \"builder\",\n stage: \"client\",\n source: \"code_required_dialog\",\n connect_url_kind: connectUrl ? \"provided\" : \"default\",\n });\n }}\n style={{ ...s.optionCard, ...s.optionLink }}\n onMouseEnter={(e) =>\n Object.assign(e.currentTarget.style, s.optionCardHover)\n }\n onMouseLeave={(e) =>\n Object.assign(e.currentTarget.style, {\n borderColor: \"#e5e7eb\",\n })\n }\n >\n <div style={s.optionIcon}>\n <IconExternalLink size={24} />\n </div>\n <div style={s.optionText}>\n <span style={s.optionTitle}>Connect Builder.io</span>\n <span style={s.optionDesc}>\n Connect Builder to enable cloud-based code changes from this\n app.\n </span>\n </div>\n {!connectUrl && <span style={s.badge}>Setup required</span>}\n </a>\n )}\n </div>\n\n {/* Branch result */}\n {branchUrl && (\n <div style={s.result}>\n <span style={{ fontSize: 13, fontWeight: 600 }}>\n Branch created\n </span>\n <a\n href={branchUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n style={s.resultLink}\n >\n {branchUrl}\n </a>\n </div>\n )}\n\n {error && (\n <p style={{ color: \"#ef4444\", fontSize: 12, marginTop: 12 }}>\n {error}\n </p>\n )}\n\n {/* Close */}\n <button style={s.closeButton} onClick={onClose} aria-label=\"Close\">\n <IconX size={16} />\n </button>\n </div>\n </div>,\n document.body,\n );\n}\n\nconst s: Record<string, React.CSSProperties> = {\n backdrop: {\n position: \"fixed\",\n inset: 0,\n background: \"rgba(0, 0, 0, 0.5)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 99999,\n padding: \"16px\",\n },\n dialog: {\n position: \"relative\",\n background: \"#fff\",\n borderRadius: \"12px\",\n maxWidth: \"460px\",\n width: \"100%\",\n padding: \"24px\",\n boxShadow:\n \"0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1)\",\n fontFamily:\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n color: \"#111827\",\n },\n header: {\n display: \"flex\",\n gap: \"14px\",\n alignItems: \"flex-start\",\n marginBottom: \"20px\",\n },\n iconWrap: {\n flexShrink: 0,\n width: \"40px\",\n height: \"40px\",\n borderRadius: \"10px\",\n background: \"#f3f4f6\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"#6b7280\",\n },\n title: {\n margin: 0,\n fontSize: \"16px\",\n fontWeight: 600,\n lineHeight: \"1.4\",\n },\n subtitle: {\n margin: \"4px 0 0\",\n fontSize: \"13px\",\n color: \"#6b7280\",\n lineHeight: \"1.5\",\n },\n options: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"10px\",\n },\n optionCard: {\n position: \"relative\",\n display: \"flex\",\n alignItems: \"flex-start\",\n gap: \"14px\",\n padding: \"14px\",\n border: \"1px solid #e5e7eb\",\n borderRadius: \"10px\",\n background: \"transparent\",\n cursor: \"pointer\",\n textAlign: \"left\",\n width: \"100%\",\n fontSize: \"inherit\",\n fontFamily: \"inherit\",\n color: \"inherit\",\n },\n optionCardHover: {\n borderColor: \"#a5b4fc\",\n },\n optionLink: {\n textDecoration: \"none\",\n boxSizing: \"border-box\",\n },\n optionIcon: {\n flexShrink: 0,\n color: \"#00B5FF\",\n marginTop: \"2px\",\n },\n optionText: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"2px\",\n },\n optionTitle: {\n fontSize: \"14px\",\n fontWeight: 600,\n },\n optionDesc: {\n fontSize: \"12px\",\n color: \"#6b7280\",\n lineHeight: \"1.5\",\n },\n code: {\n background: \"#f3f4f6\",\n padding: \"1px 5px\",\n borderRadius: \"4px\",\n fontSize: \"11px\",\n fontFamily: \"monospace\",\n },\n badge: {\n position: \"absolute\",\n top: \"10px\",\n right: \"10px\",\n fontSize: \"10px\",\n fontWeight: 600,\n color: \"#00B5FF\",\n background: \"#e0f2fe\",\n padding: \"2px 8px\",\n borderRadius: \"99px\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.5px\",\n },\n closeButton: {\n position: \"absolute\",\n top: \"12px\",\n right: \"12px\",\n background: \"transparent\",\n border: \"none\",\n cursor: \"pointer\",\n padding: \"6px\",\n borderRadius: \"6px\",\n color: \"#9ca3af\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n result: {\n marginTop: \"16px\",\n padding: \"12px\",\n borderRadius: \"8px\",\n border: \"1px solid #22c55e40\",\n background: \"#f0fdf4\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n },\n resultLink: {\n fontSize: \"12px\",\n color: \"#00B5FF\",\n textDecoration: \"none\",\n wordBreak: \"break-all\",\n },\n};\n"]}
@@ -12,10 +12,10 @@ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
12
12
  const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [children, _jsx(IconChevronRight, { className: "ml-auto h-4 w-4" })] })));
13
13
  DropdownMenuSubTrigger.displayName =
14
14
  DropdownMenuPrimitive.SubTrigger.displayName;
15
- const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", className), ...props })));
15
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-[250] min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", className), ...props })));
16
16
  DropdownMenuSubContent.displayName =
17
17
  DropdownMenuPrimitive.SubContent.displayName;
18
- const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", className), ...props }) })));
18
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-[250] min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", className), ...props }) })));
19
19
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
20
20
  const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
21
21
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../../src/client/components/ui/dropdown-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAChD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAC;AAC1D,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,CAAC;AACtD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,MAAM,CAAC;AACxD,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,CAAC;AAClD,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,UAAU,CAAC;AAEhE,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAK7C,CAAC,EAAE,S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BAAsB,GACvB,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { IconCheck, IconChevronRight, IconCircle } from \"@tabler/icons-react\";\n\nimport { cn } from \"../../utils.js\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-xs font-semibold text-muted-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n);\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"]}
1
+ {"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../../src/client/components/ui/dropdown-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;A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;AACH,qBAAqB,CAAC,WAAW,GAAG,qBAAqB,CAAC,SAAS,CAAC,WAAW,CAAC;AAEhF,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EAC8B,EAAE,EAAE,CAAC,CAC3C,eACE,SAAS,EAAE,EAAE,CAAC,4CAA4C,EAAE,SAAS,CAAC,KAClE,KAAK,GACT,CACH,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE1D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { IconCheck, IconChevronRight, IconCircle } from \"@tabler/icons-react\";\n\nimport { cn } from \"../../utils.js\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-[250] min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-[250] min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-xs font-semibold text-muted-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n);\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"]}
@@ -4,7 +4,7 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
4
4
  import { cn } from "../../utils.js";
5
5
  const HoverCard = HoverCardPrimitive.Root;
6
6
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
7
- const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(HoverCardPrimitive.Portal, { children: _jsx(HoverCardPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
7
+ const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(HoverCardPrimitive.Portal, { children: _jsx(HoverCardPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-[250] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
8
8
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
9
9
  export { HoverCard, HoverCardTrigger, HoverCardContent };
10
10
  //# sourceMappingURL=hover-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card.js","sourceRoot":"","sources":["../../../../src/client/components/ui/hover-card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC;AAE1C,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,OAAO,CAAC;AAEpD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,kBAAkB,CAAC,MAAM,cACxB,KAAC,kBAAkB,CAAC,OAAO,IACzB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,4aAA4a,EAC5a,SAAS,CACV,KACG,KAAK,GACT,GACwB,CAC7B,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\n\nimport { cn } from \"../../utils.js\";\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nconst HoverCardContent = React.forwardRef<\n React.ElementRef<typeof HoverCardPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n));\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"]}
1
+ {"version":3,"file":"hover-card.js","sourceRoot":"","sources":["../../../../src/client/components/ui/hover-card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC;AAE1C,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,OAAO,CAAC;AAEpD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,kBAAkB,CAAC,MAAM,cACxB,KAAC,kBAAkB,CAAC,OAAO,IACzB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,+aAA+a,EAC/a,SAAS,CACV,KACG,KAAK,GACT,GACwB,CAC7B,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\n\nimport { cn } from \"../../utils.js\";\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nconst HoverCardContent = React.forwardRef<\n React.ElementRef<typeof HoverCardPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-[250] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n));\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"]}
@@ -5,7 +5,7 @@ import { cn } from "../../utils.js";
5
5
  const Popover = PopoverPrimitive.Root;
6
6
  const PopoverTrigger = PopoverPrimitive.Trigger;
7
7
  const PopoverAnchor = PopoverPrimitive.Anchor;
8
- const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
8
+ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-[250] w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
9
9
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
10
10
  export { Popover, PopoverTrigger, PopoverAnchor, PopoverContent };
11
11
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../src/client/components/ui/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAEtC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAEhD,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AAE9C,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,4aAA4a,EAC5a,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../utils.js\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverAnchor, PopoverContent };\n"]}
1
+ {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../src/client/components/ui/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAEtC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAEhD,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AAE9C,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,+aAA+a,EAC/a,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../../utils.js\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-[250] w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverAnchor, PopoverContent };\n"]}
@@ -35,6 +35,13 @@ export interface PromptComposerProps {
35
35
  /** Imperative handle for focusing the composer. */
36
36
  composerRef?: Ref<TiptapComposerHandle>;
37
37
  }
38
+ export declare function buildPromptComposerSubmission(options: {
39
+ text: string;
40
+ attachments?: ReadonlyArray<unknown>;
41
+ }): Promise<{
42
+ text: string;
43
+ files: File[];
44
+ }>;
38
45
  /**
39
46
  * Standalone composer that mirrors the agent sidebar's input experience —
40
47
  * voice dictation, file upload, model selector, submit-on-Enter — for use in
@@ -1 +1 @@
1
- {"version":3,"file":"PromptComposer.d.ts","sourceRoot":"","sources":["../../../src/client/composer/PromptComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAsBf,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAUxE;;;;GAIG;AAC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AAM,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAAC,CAgD3C;AAkQD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAqBxD"}
@@ -67,6 +67,65 @@ function formatInlineTextFile(name, text) {
67
67
  .filter(Boolean)
68
68
  .join("\n");
69
69
  }
70
+ function readFileDataUrl(file) {
71
+ return new Promise((resolve, reject) => {
72
+ const reader = new FileReader();
73
+ reader.onload = () => resolve(String(reader.result || ""));
74
+ reader.onerror = () => reject(reader.error ?? new Error("Could not read file"));
75
+ reader.readAsDataURL(file);
76
+ });
77
+ }
78
+ function formatInlineImageFile(name, contentType, dataUrl) {
79
+ return [
80
+ `<uploaded-image name="${name}" contentType="${contentType}">`,
81
+ dataUrl,
82
+ "</uploaded-image>",
83
+ ].join("\n");
84
+ }
85
+ export async function buildPromptComposerSubmission(options) {
86
+ const files = [];
87
+ const pastedTextBlocks = [];
88
+ const rawText = options.text;
89
+ for (const att of options.attachments ?? []) {
90
+ const a = att;
91
+ if ("file" in a && a.file instanceof File) {
92
+ const file = a.file;
93
+ if (isPastedTextAttachmentName(file.name)) {
94
+ try {
95
+ pastedTextBlocks.push(await file.text());
96
+ }
97
+ catch {
98
+ files.push(file);
99
+ }
100
+ }
101
+ else {
102
+ if (isInlineableTextFile(file)) {
103
+ try {
104
+ pastedTextBlocks.push(formatInlineTextFile(file.name, await file.text()));
105
+ }
106
+ catch {
107
+ // Keep the upload path fallback below.
108
+ }
109
+ }
110
+ else if (file.type.startsWith("image/") && !rawText.trim()) {
111
+ try {
112
+ pastedTextBlocks.push(formatInlineImageFile(file.name, file.type, await readFileDataUrl(file)));
113
+ }
114
+ catch {
115
+ // Keep the upload path fallback below.
116
+ }
117
+ }
118
+ files.push(file);
119
+ }
120
+ }
121
+ }
122
+ return {
123
+ text: pastedTextBlocks.length
124
+ ? [rawText.trim(), ...pastedTextBlocks].filter(Boolean).join("\n\n")
125
+ : rawText,
126
+ files,
127
+ };
128
+ }
70
129
  function getImageSrc(attachment) {
71
130
  if (attachment.type !== "image")
72
131
  return null;
@@ -147,38 +206,10 @@ function PromptComposerInner({ onSubmit, placeholder, disabled, autoFocus, class
147
206
  // into a "Pasted text" chip, which would otherwise disappear into an
148
207
  // unprocessed File. Inline the chip body back into the prompt text so
149
208
  // newlines and full content survive the round-trip.
150
- const files = [];
151
- const pastedTextBlocks = [];
152
- for (const att of attachments ?? []) {
153
- const a = att;
154
- if ("file" in a && a.file instanceof File) {
155
- const file = a.file;
156
- if (isPastedTextAttachmentName(file.name)) {
157
- try {
158
- pastedTextBlocks.push(await file.text());
159
- }
160
- catch {
161
- // If we can't read it, fall back to surfacing it as a regular
162
- // attachment file rather than silently losing it.
163
- files.push(file);
164
- }
165
- }
166
- else {
167
- if (isInlineableTextFile(file)) {
168
- try {
169
- pastedTextBlocks.push(formatInlineTextFile(file.name, await file.text()));
170
- }
171
- catch {
172
- // Keep the upload path fallback below.
173
- }
174
- }
175
- files.push(file);
176
- }
177
- }
178
- }
179
- const finalText = pastedTextBlocks.length
180
- ? [text.trim(), ...pastedTextBlocks].filter(Boolean).join("\n\n")
181
- : text;
209
+ const { text: finalText, files } = await buildPromptComposerSubmission({
210
+ text,
211
+ attachments,
212
+ });
182
213
  onSubmit(finalText, files, references, {
183
214
  model: showModelSelector ? models.selectedModel : undefined,
184
215
  engine: showModelSelector ? models.selectedEngine : undefined,