@agent-native/core 0.110.2 → 0.111.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +17 -0
  3. package/corpus/core/docs/content/components.mdx +7 -0
  4. package/corpus/core/docs/content/locales/ar-SA/components.mdx +4 -2
  5. package/corpus/core/docs/content/locales/de-DE/components.mdx +4 -2
  6. package/corpus/core/docs/content/locales/es-ES/components.mdx +4 -2
  7. package/corpus/core/docs/content/locales/fr-FR/components.mdx +4 -2
  8. package/corpus/core/docs/content/locales/hi-IN/components.mdx +3 -2
  9. package/corpus/core/docs/content/locales/ja-JP/components.mdx +3 -2
  10. package/corpus/core/docs/content/locales/ko-KR/components.mdx +3 -2
  11. package/corpus/core/docs/content/locales/pt-BR/components.mdx +4 -2
  12. package/corpus/core/docs/content/locales/zh-CN/components.mdx +3 -2
  13. package/corpus/core/docs/content/locales/zh-TW/components.mdx +3 -2
  14. package/corpus/core/docs/content/toolkit-agent-ux.mdx +8 -3
  15. package/corpus/core/migration-manifest.json +133 -269
  16. package/corpus/core/package.json +32 -33
  17. package/corpus/core/scripts/check-dist-imports.mjs +25 -1
  18. package/corpus/core/scripts/finalize-build.mjs +59 -2
  19. package/corpus/core/src/client/AgentAskPopover.tsx +1 -1
  20. package/corpus/core/src/client/AgentPanel.tsx +1 -1
  21. package/corpus/core/src/client/AssistantChat.tsx +12 -14
  22. package/corpus/core/src/client/NewWorkspaceAppFlow.tsx +1 -1
  23. package/corpus/core/src/client/agent-chat-adapter.ts +1 -1
  24. package/corpus/core/src/client/blocks/RegistryBlockDataProvider.tsx +121 -0
  25. package/corpus/core/src/client/blocks/index.ts +6 -0
  26. package/corpus/core/src/client/chat/attachment-adapters.ts +4 -5
  27. package/corpus/core/src/client/chat/index.ts +0 -1
  28. package/corpus/core/src/client/chat/message-components.tsx +2 -2
  29. package/corpus/core/src/client/code-agent-chat-adapter.ts +2 -2
  30. package/corpus/core/src/client/collab/index.ts +0 -22
  31. package/corpus/core/src/client/composer/index.ts +5 -66
  32. package/corpus/core/src/client/composer/runtime-adapters.tsx +123 -0
  33. package/corpus/core/src/client/composer/use-mention-search.ts +2 -79
  34. package/corpus/core/src/client/composer/wired-components.tsx +53 -0
  35. package/corpus/core/src/client/extensions/ExtensionViewer.tsx +1 -1
  36. package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +1 -1
  37. package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +1 -1
  38. package/corpus/core/src/client/index.ts +0 -156
  39. package/corpus/core/src/client/resources/ResourceEditor.tsx +29 -681
  40. package/corpus/core/src/client/resources/ResourcesPanel.tsx +1 -1
  41. package/corpus/core/src/client/settings/AutomationsSection.tsx +1 -1
  42. package/corpus/core/src/client/sharing/index.ts +0 -4
  43. package/corpus/core/src/client/tombstone/agent-presence-chip.ts +17 -0
  44. package/corpus/core/src/client/tombstone/editor.ts +265 -0
  45. package/corpus/core/src/client/tombstone/live-cursor-overlay.ts +21 -0
  46. package/corpus/core/src/client/tombstone/presence-bar.ts +17 -0
  47. package/corpus/core/src/client/tombstone/recent-edit-highlights.ts +17 -0
  48. package/corpus/core/src/client/tombstone/remote-selection-rings.ts +21 -0
  49. package/corpus/core/src/client/tombstone/rich-markdown-editor.ts +265 -0
  50. package/corpus/core/src/client/tombstone/ui-dialog.ts +49 -0
  51. package/corpus/core/src/client/tombstone/ui-dropdown-menu.ts +69 -0
  52. package/corpus/core/src/client/tombstone/ui-hover-card.ts +21 -0
  53. package/corpus/core/src/client/tombstone/ui-popover.ts +25 -0
  54. package/corpus/core/src/client/tombstone/ui-sheet.ts +49 -0
  55. package/corpus/core/src/client/tombstone/ui-tooltip.ts +29 -0
  56. package/corpus/core/src/client/tombstone/visual-style-controls.ts +61 -0
  57. package/corpus/core/src/client/uploads/index.ts +5 -0
  58. package/corpus/core/src/client/{rich-markdown-editor/uploadEditorImage.ts → uploads/upload-editor-image.ts} +11 -4
  59. package/corpus/core/src/package-lifecycle/tombstone.ts +16 -2
  60. package/corpus/core/src/package-lifecycle/upgrade-error.ts +23 -5
  61. package/corpus/core/src/testing.ts +1 -4
  62. package/corpus/core/src/vite/client.ts +62 -22
  63. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +2 -4
  64. package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +1 -1
  65. package/corpus/templates/content/app/components/editor/registrySlashItems.ts +53 -52
  66. package/corpus/templates/plan/app/components/editor/PlanBlockNode.tsx +2 -2
  67. package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +1 -1
  68. package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +1 -1
  69. package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +1 -1
  70. package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +1 -1
  71. package/dist/catalog.json +1 -0
  72. package/dist/client/AgentAskPopover.js +1 -1
  73. package/dist/client/AgentAskPopover.js.map +1 -1
  74. package/dist/client/AgentPanel.js +1 -1
  75. package/dist/client/AgentPanel.js.map +1 -1
  76. package/dist/client/AssistantChat.d.ts +2 -2
  77. package/dist/client/AssistantChat.d.ts.map +1 -1
  78. package/dist/client/AssistantChat.js +5 -6
  79. package/dist/client/AssistantChat.js.map +1 -1
  80. package/dist/client/NewWorkspaceAppFlow.js +1 -1
  81. package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
  82. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  83. package/dist/client/agent-chat-adapter.js +1 -1
  84. package/dist/client/agent-chat-adapter.js.map +1 -1
  85. package/dist/client/blocks/RegistryBlockDataProvider.d.ts +7 -0
  86. package/dist/client/blocks/RegistryBlockDataProvider.d.ts.map +1 -0
  87. package/dist/client/blocks/RegistryBlockDataProvider.js +54 -0
  88. package/dist/client/blocks/RegistryBlockDataProvider.js.map +1 -0
  89. package/dist/client/blocks/index.d.ts +2 -0
  90. package/dist/client/blocks/index.d.ts.map +1 -1
  91. package/dist/client/blocks/index.js +1 -0
  92. package/dist/client/blocks/index.js.map +1 -1
  93. package/dist/client/chat/attachment-adapters.d.ts.map +1 -1
  94. package/dist/client/chat/attachment-adapters.js +1 -1
  95. package/dist/client/chat/attachment-adapters.js.map +1 -1
  96. package/dist/client/chat/index.d.ts +0 -1
  97. package/dist/client/chat/index.d.ts.map +1 -1
  98. package/dist/client/chat/index.js +0 -1
  99. package/dist/client/chat/index.js.map +1 -1
  100. package/dist/client/chat/message-components.d.ts.map +1 -1
  101. package/dist/client/chat/message-components.js +2 -2
  102. package/dist/client/chat/message-components.js.map +1 -1
  103. package/dist/client/code-agent-chat-adapter.d.ts.map +1 -1
  104. package/dist/client/code-agent-chat-adapter.js +1 -1
  105. package/dist/client/code-agent-chat-adapter.js.map +1 -1
  106. package/dist/client/collab/index.d.ts +0 -5
  107. package/dist/client/collab/index.d.ts.map +1 -1
  108. package/dist/client/collab/index.js +0 -5
  109. package/dist/client/collab/index.js.map +1 -1
  110. package/dist/client/composer/index.d.ts +3 -11
  111. package/dist/client/composer/index.d.ts.map +1 -1
  112. package/dist/client/composer/index.js +3 -10
  113. package/dist/client/composer/index.js.map +1 -1
  114. package/dist/client/composer/runtime-adapters.d.ts +5 -0
  115. package/dist/client/composer/runtime-adapters.d.ts.map +1 -0
  116. package/dist/client/composer/runtime-adapters.js +85 -0
  117. package/dist/client/composer/runtime-adapters.js.map +1 -0
  118. package/dist/client/composer/use-mention-search.d.ts +1 -2
  119. package/dist/client/composer/use-mention-search.d.ts.map +1 -1
  120. package/dist/client/composer/use-mention-search.js +2 -69
  121. package/dist/client/composer/use-mention-search.js.map +1 -1
  122. package/dist/client/composer/wired-components.d.ts +10 -0
  123. package/dist/client/composer/wired-components.d.ts.map +1 -0
  124. package/dist/client/composer/wired-components.js +20 -0
  125. package/dist/client/composer/wired-components.js.map +1 -0
  126. package/dist/client/extensions/ExtensionViewer.js +1 -1
  127. package/dist/client/extensions/ExtensionViewer.js.map +1 -1
  128. package/dist/client/extensions/ExtensionsListPage.js +1 -1
  129. package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
  130. package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
  131. package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
  132. package/dist/client/index.d.ts +0 -10
  133. package/dist/client/index.d.ts.map +1 -1
  134. package/dist/client/index.js +0 -26
  135. package/dist/client/index.js.map +1 -1
  136. package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
  137. package/dist/client/resources/ResourceEditor.js +14 -532
  138. package/dist/client/resources/ResourceEditor.js.map +1 -1
  139. package/dist/client/resources/ResourcesPanel.js +1 -1
  140. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  141. package/dist/client/settings/AutomationsSection.js +1 -1
  142. package/dist/client/settings/AutomationsSection.js.map +1 -1
  143. package/dist/client/sharing/index.d.ts +0 -1
  144. package/dist/client/sharing/index.d.ts.map +1 -1
  145. package/dist/client/sharing/index.js +0 -1
  146. package/dist/client/sharing/index.js.map +1 -1
  147. package/dist/client/tombstone/agent-presence-chip.d.ts +6 -0
  148. package/dist/client/tombstone/agent-presence-chip.d.ts.map +1 -0
  149. package/dist/client/tombstone/agent-presence-chip.js +5 -0
  150. package/dist/client/tombstone/agent-presence-chip.js.map +1 -0
  151. package/dist/client/tombstone/editor.d.ts +128 -0
  152. package/dist/client/tombstone/editor.d.ts.map +1 -0
  153. package/dist/client/tombstone/editor.js +76 -0
  154. package/dist/client/tombstone/editor.js.map +1 -0
  155. package/dist/client/tombstone/live-cursor-overlay.d.ts +8 -0
  156. package/dist/client/tombstone/live-cursor-overlay.d.ts.map +1 -0
  157. package/dist/client/tombstone/live-cursor-overlay.js +5 -0
  158. package/dist/client/tombstone/live-cursor-overlay.js.map +1 -0
  159. package/dist/client/tombstone/presence-bar.d.ts +6 -0
  160. package/dist/client/tombstone/presence-bar.d.ts.map +1 -0
  161. package/dist/client/tombstone/presence-bar.js +5 -0
  162. package/dist/client/tombstone/presence-bar.js.map +1 -0
  163. package/dist/client/tombstone/recent-edit-highlights.d.ts +6 -0
  164. package/dist/client/tombstone/recent-edit-highlights.d.ts.map +1 -0
  165. package/dist/client/tombstone/recent-edit-highlights.js +5 -0
  166. package/dist/client/tombstone/recent-edit-highlights.js.map +1 -0
  167. package/dist/client/tombstone/remote-selection-rings.d.ts +8 -0
  168. package/dist/client/tombstone/remote-selection-rings.d.ts.map +1 -0
  169. package/dist/client/tombstone/remote-selection-rings.js +5 -0
  170. package/dist/client/tombstone/remote-selection-rings.js.map +1 -0
  171. package/dist/client/tombstone/rich-markdown-editor.d.ts +128 -0
  172. package/dist/client/tombstone/rich-markdown-editor.d.ts.map +1 -0
  173. package/dist/client/tombstone/rich-markdown-editor.js +76 -0
  174. package/dist/client/tombstone/rich-markdown-editor.js.map +1 -0
  175. package/dist/client/tombstone/ui-dialog.d.ts +22 -0
  176. package/dist/client/tombstone/ui-dialog.d.ts.map +1 -0
  177. package/dist/client/tombstone/ui-dialog.js +23 -0
  178. package/dist/client/tombstone/ui-dialog.js.map +1 -0
  179. package/dist/client/tombstone/ui-dropdown-menu.d.ts +32 -0
  180. package/dist/client/tombstone/ui-dropdown-menu.d.ts.map +1 -0
  181. package/dist/client/tombstone/ui-dropdown-menu.js +33 -0
  182. package/dist/client/tombstone/ui-dropdown-menu.js.map +1 -0
  183. package/dist/client/tombstone/ui-hover-card.d.ts +8 -0
  184. package/dist/client/tombstone/ui-hover-card.d.ts.map +1 -0
  185. package/dist/client/tombstone/ui-hover-card.js +9 -0
  186. package/dist/client/tombstone/ui-hover-card.js.map +1 -0
  187. package/dist/client/tombstone/ui-popover.d.ts +10 -0
  188. package/dist/client/tombstone/ui-popover.d.ts.map +1 -0
  189. package/dist/client/tombstone/ui-popover.js +11 -0
  190. package/dist/client/tombstone/ui-popover.js.map +1 -0
  191. package/dist/client/tombstone/ui-sheet.d.ts +22 -0
  192. package/dist/client/tombstone/ui-sheet.d.ts.map +1 -0
  193. package/dist/client/tombstone/ui-sheet.js +23 -0
  194. package/dist/client/tombstone/ui-sheet.js.map +1 -0
  195. package/dist/client/tombstone/ui-tooltip.d.ts +12 -0
  196. package/dist/client/tombstone/ui-tooltip.d.ts.map +1 -0
  197. package/dist/client/tombstone/ui-tooltip.js +13 -0
  198. package/dist/client/tombstone/ui-tooltip.js.map +1 -0
  199. package/dist/client/tombstone/visual-style-controls.d.ts +28 -0
  200. package/dist/client/tombstone/visual-style-controls.d.ts.map +1 -0
  201. package/dist/client/tombstone/visual-style-controls.js +23 -0
  202. package/dist/client/tombstone/visual-style-controls.js.map +1 -0
  203. package/dist/client/uploads/index.d.ts +1 -0
  204. package/dist/client/uploads/index.d.ts.map +1 -1
  205. package/dist/client/uploads/index.js +1 -0
  206. package/dist/client/uploads/index.js.map +1 -1
  207. package/dist/client/{rich-markdown-editor/uploadEditorImage.d.ts → uploads/upload-editor-image.d.ts} +8 -4
  208. package/dist/client/uploads/upload-editor-image.d.ts.map +1 -0
  209. package/dist/client/{rich-markdown-editor/uploadEditorImage.js → uploads/upload-editor-image.js} +2 -2
  210. package/dist/client/uploads/upload-editor-image.js.map +1 -0
  211. package/dist/collab/struct-routes.d.ts +1 -1
  212. package/dist/notifications/routes.d.ts +3 -3
  213. package/dist/package-lifecycle/tombstone.d.ts.map +1 -1
  214. package/dist/package-lifecycle/tombstone.js +13 -3
  215. package/dist/package-lifecycle/tombstone.js.map +1 -1
  216. package/dist/package-lifecycle/upgrade-error.d.ts +2 -2
  217. package/dist/package-lifecycle/upgrade-error.d.ts.map +1 -1
  218. package/dist/package-lifecycle/upgrade-error.js +8 -5
  219. package/dist/package-lifecycle/upgrade-error.js.map +1 -1
  220. package/dist/secrets/routes.d.ts +9 -9
  221. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  222. package/dist/server/transcribe-voice.d.ts +1 -1
  223. package/dist/testing.d.ts +1 -3
  224. package/dist/testing.d.ts.map +1 -1
  225. package/dist/testing.js +1 -3
  226. package/dist/testing.js.map +1 -1
  227. package/dist/vite/client.d.ts.map +1 -1
  228. package/dist/vite/client.js +26 -22
  229. package/dist/vite/client.js.map +1 -1
  230. package/docs/content/components.mdx +7 -0
  231. package/docs/content/locales/ar-SA/components.mdx +4 -2
  232. package/docs/content/locales/de-DE/components.mdx +4 -2
  233. package/docs/content/locales/es-ES/components.mdx +4 -2
  234. package/docs/content/locales/fr-FR/components.mdx +4 -2
  235. package/docs/content/locales/hi-IN/components.mdx +3 -2
  236. package/docs/content/locales/ja-JP/components.mdx +3 -2
  237. package/docs/content/locales/ko-KR/components.mdx +3 -2
  238. package/docs/content/locales/pt-BR/components.mdx +4 -2
  239. package/docs/content/locales/zh-CN/components.mdx +3 -2
  240. package/docs/content/locales/zh-TW/components.mdx +3 -2
  241. package/docs/content/toolkit-agent-ux.mdx +8 -3
  242. package/migration-manifest.json +133 -269
  243. package/package.json +31 -32
  244. package/corpus/core/src/client/composer/AgentComposerFrame.tsx +0 -59
  245. package/corpus/core/src/client/composer/ComposerPlusMenu.tsx +0 -988
  246. package/corpus/core/src/client/composer/MentionPopover.tsx +0 -412
  247. package/corpus/core/src/client/composer/PastedTextChip.tsx +0 -150
  248. package/corpus/core/src/client/composer/PromptComposer.tsx +0 -714
  249. package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +0 -860
  250. package/corpus/core/src/client/composer/TiptapComposer.tsx +0 -2928
  251. package/corpus/core/src/client/composer/VoiceButton.tsx +0 -262
  252. package/corpus/core/src/client/composer/asset-picker-url.ts +0 -80
  253. package/corpus/core/src/client/composer/attachment-accept.ts +0 -71
  254. package/corpus/core/src/client/composer/draft-key.ts +0 -7
  255. package/corpus/core/src/client/composer/extensions/FileReference.tsx +0 -55
  256. package/corpus/core/src/client/composer/extensions/MentionReference.tsx +0 -93
  257. package/corpus/core/src/client/composer/extensions/SkillReference.tsx +0 -56
  258. package/corpus/core/src/client/composer/pasted-text.ts +0 -160
  259. package/corpus/core/src/client/composer/prompt-attachments.ts +0 -70
  260. package/corpus/core/src/client/composer/realtime-voice-audio-level.ts +0 -64
  261. package/corpus/core/src/client/composer/realtime-voice-transcript.ts +0 -134
  262. package/corpus/core/src/client/composer/types.ts +0 -66
  263. package/corpus/core/src/client/composer/use-file-search.ts +0 -63
  264. package/corpus/core/src/client/composer/use-skills.ts +0 -44
  265. package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +0 -2095
  266. package/corpus/core/src/client/composer/useVoiceDictation.ts +0 -1155
  267. package/corpus/core/src/client/editor/index.ts +0 -1
  268. package/corpus/core/src/client/rich-markdown-editor/RegistryBlockNode.tsx +0 -799
  269. package/corpus/core/src/client/rich-markdown-editor/index.ts +0 -70
  270. package/corpus/core/src/client/rich-markdown-editor/registrySlashCommands.ts +0 -112
  271. package/dist/client/composer/AgentComposerFrame.d.ts +0 -19
  272. package/dist/client/composer/AgentComposerFrame.d.ts.map +0 -1
  273. package/dist/client/composer/AgentComposerFrame.js +0 -14
  274. package/dist/client/composer/AgentComposerFrame.js.map +0 -1
  275. package/dist/client/composer/ComposerPlusMenu.d.ts +0 -17
  276. package/dist/client/composer/ComposerPlusMenu.d.ts.map +0 -1
  277. package/dist/client/composer/ComposerPlusMenu.js +0 -501
  278. package/dist/client/composer/ComposerPlusMenu.js.map +0 -1
  279. package/dist/client/composer/MentionPopover.d.ts +0 -29
  280. package/dist/client/composer/MentionPopover.d.ts.map +0 -1
  281. package/dist/client/composer/MentionPopover.js +0 -180
  282. package/dist/client/composer/MentionPopover.js.map +0 -1
  283. package/dist/client/composer/PastedTextChip.d.ts +0 -9
  284. package/dist/client/composer/PastedTextChip.d.ts.map +0 -1
  285. package/dist/client/composer/PastedTextChip.js +0 -47
  286. package/dist/client/composer/PastedTextChip.js.map +0 -1
  287. package/dist/client/composer/PromptComposer.d.ts +0 -115
  288. package/dist/client/composer/PromptComposer.d.ts.map +0 -1
  289. package/dist/client/composer/PromptComposer.js +0 -299
  290. package/dist/client/composer/PromptComposer.js.map +0 -1
  291. package/dist/client/composer/RealtimeVoiceMode.d.ts +0 -104
  292. package/dist/client/composer/RealtimeVoiceMode.d.ts.map +0 -1
  293. package/dist/client/composer/RealtimeVoiceMode.js +0 -245
  294. package/dist/client/composer/RealtimeVoiceMode.js.map +0 -1
  295. package/dist/client/composer/TiptapComposer.d.ts +0 -222
  296. package/dist/client/composer/TiptapComposer.d.ts.map +0 -1
  297. package/dist/client/composer/TiptapComposer.js +0 -1834
  298. package/dist/client/composer/TiptapComposer.js.map +0 -1
  299. package/dist/client/composer/VoiceButton.d.ts +0 -23
  300. package/dist/client/composer/VoiceButton.d.ts.map +0 -1
  301. package/dist/client/composer/VoiceButton.js +0 -100
  302. package/dist/client/composer/VoiceButton.js.map +0 -1
  303. package/dist/client/composer/asset-picker-url.d.ts +0 -16
  304. package/dist/client/composer/asset-picker-url.d.ts.map +0 -1
  305. package/dist/client/composer/asset-picker-url.js +0 -64
  306. package/dist/client/composer/asset-picker-url.js.map +0 -1
  307. package/dist/client/composer/attachment-accept.d.ts +0 -9
  308. package/dist/client/composer/attachment-accept.d.ts.map +0 -1
  309. package/dist/client/composer/attachment-accept.js +0 -65
  310. package/dist/client/composer/attachment-accept.js.map +0 -1
  311. package/dist/client/composer/draft-key.d.ts +0 -2
  312. package/dist/client/composer/draft-key.d.ts.map +0 -1
  313. package/dist/client/composer/draft-key.js +0 -8
  314. package/dist/client/composer/draft-key.js.map +0 -1
  315. package/dist/client/composer/extensions/FileReference.d.ts +0 -3
  316. package/dist/client/composer/extensions/FileReference.d.ts.map +0 -1
  317. package/dist/client/composer/extensions/FileReference.js +0 -36
  318. package/dist/client/composer/extensions/FileReference.js.map +0 -1
  319. package/dist/client/composer/extensions/MentionReference.d.ts +0 -3
  320. package/dist/client/composer/extensions/MentionReference.d.ts.map +0 -1
  321. package/dist/client/composer/extensions/MentionReference.js +0 -66
  322. package/dist/client/composer/extensions/MentionReference.js.map +0 -1
  323. package/dist/client/composer/extensions/SkillReference.d.ts +0 -3
  324. package/dist/client/composer/extensions/SkillReference.d.ts.map +0 -1
  325. package/dist/client/composer/extensions/SkillReference.js +0 -40
  326. package/dist/client/composer/extensions/SkillReference.js.map +0 -1
  327. package/dist/client/composer/pasted-text.d.ts +0 -31
  328. package/dist/client/composer/pasted-text.d.ts.map +0 -1
  329. package/dist/client/composer/pasted-text.js +0 -130
  330. package/dist/client/composer/pasted-text.js.map +0 -1
  331. package/dist/client/composer/prompt-attachments.d.ts +0 -11
  332. package/dist/client/composer/prompt-attachments.d.ts.map +0 -1
  333. package/dist/client/composer/prompt-attachments.js +0 -45
  334. package/dist/client/composer/prompt-attachments.js.map +0 -1
  335. package/dist/client/composer/realtime-voice-audio-level.d.ts +0 -14
  336. package/dist/client/composer/realtime-voice-audio-level.d.ts.map +0 -1
  337. package/dist/client/composer/realtime-voice-audio-level.js +0 -47
  338. package/dist/client/composer/realtime-voice-audio-level.js.map +0 -1
  339. package/dist/client/composer/realtime-voice-transcript.d.ts +0 -26
  340. package/dist/client/composer/realtime-voice-transcript.d.ts.map +0 -1
  341. package/dist/client/composer/realtime-voice-transcript.js +0 -103
  342. package/dist/client/composer/realtime-voice-transcript.js.map +0 -1
  343. package/dist/client/composer/types.d.ts +0 -60
  344. package/dist/client/composer/types.d.ts.map +0 -1
  345. package/dist/client/composer/types.js +0 -2
  346. package/dist/client/composer/types.js.map +0 -1
  347. package/dist/client/composer/use-file-search.d.ts +0 -6
  348. package/dist/client/composer/use-file-search.d.ts.map +0 -1
  349. package/dist/client/composer/use-file-search.js +0 -52
  350. package/dist/client/composer/use-file-search.js.map +0 -1
  351. package/dist/client/composer/use-skills.d.ts +0 -7
  352. package/dist/client/composer/use-skills.d.ts.map +0 -1
  353. package/dist/client/composer/use-skills.js +0 -39
  354. package/dist/client/composer/use-skills.js.map +0 -1
  355. package/dist/client/composer/useRealtimeVoiceMode.d.ts +0 -172
  356. package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +0 -1
  357. package/dist/client/composer/useRealtimeVoiceMode.js +0 -1648
  358. package/dist/client/composer/useRealtimeVoiceMode.js.map +0 -1
  359. package/dist/client/composer/useVoiceDictation.d.ts +0 -57
  360. package/dist/client/composer/useVoiceDictation.d.ts.map +0 -1
  361. package/dist/client/composer/useVoiceDictation.js +0 -975
  362. package/dist/client/composer/useVoiceDictation.js.map +0 -1
  363. package/dist/client/editor/index.d.ts +0 -2
  364. package/dist/client/editor/index.d.ts.map +0 -1
  365. package/dist/client/editor/index.js +0 -2
  366. package/dist/client/editor/index.js.map +0 -1
  367. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +0 -130
  368. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +0 -1
  369. package/dist/client/rich-markdown-editor/RegistryBlockNode.js +0 -426
  370. package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +0 -1
  371. package/dist/client/rich-markdown-editor/index.d.ts +0 -5
  372. package/dist/client/rich-markdown-editor/index.d.ts.map +0 -1
  373. package/dist/client/rich-markdown-editor/index.js +0 -5
  374. package/dist/client/rich-markdown-editor/index.js.map +0 -1
  375. package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts +0 -60
  376. package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts.map +0 -1
  377. package/dist/client/rich-markdown-editor/registrySlashCommands.js +0 -51
  378. package/dist/client/rich-markdown-editor/registrySlashCommands.js.map +0 -1
  379. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +0 -1
  380. package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceButton.js","sourceRoot":"","sources":["../../../src/client/composer/VoiceButton.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,KAAK,GACN,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC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AAsE;IACtE,kEAAkE;IAClE,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,MAAM,cAAc,GAClB,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5D,MAAM,SAAS,GACb,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,cAAc,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;QAC9D,IAAI,CAAC,IAAI,CACP,eAEE,SAAS,EAAC,kCAAkC,EAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,IAF3C,CAAC,CAGN,CACH,CAAC;IACJ,CAAC;IACD,OAAO,4BAAG,IAAI,GAAI,CAAC;AACrB,CAAC;AAED,SAAS,cAAc,CAAC,EAAU;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;IACjC,MAAM,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;IACrB,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACjD,CAAC","sourcesContent":["/**\n * Voice dictation button + recording overlay for the agent composer.\n *\n * UX mirrors Lovable: click-to-toggle record, a live amplitude bar and\n * MM:SS timer replace the editor area while recording, and a cancel X\n * discards without transcribing. The mic is always visible alongside the\n * send button (Cursor replaces send with mic; their users complain — we\n * don't copy that).\n */\n\nimport {\n IconMicrophone,\n IconPlayerStopFilled,\n IconLoader2,\n IconX,\n} from \"@tabler/icons-react\";\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useBuilderConnectFlow } from \"../settings/useBuilderStatus.js\";\nimport {\n type VoiceProviderStatus,\n useVoiceProviderStatus,\n} from \"../voice-provider-status.js\";\nimport { RealtimeVoiceModeEntry } from \"./RealtimeVoiceMode.js\";\nimport {\n useRealtimeVoiceModeCopy,\n useRealtimeVoiceModeOptional,\n} from \"./useRealtimeVoiceMode.js\";\nimport type { VoiceDictationApi } from \"./useVoiceDictation.js\";\n\nfunction openOpenAiKeySettings(): void {\n window.location.hash = \"#secrets:OPENAI_API_KEY\";\n window.dispatchEvent(new Event(\"agent-panel:open\"));\n window.dispatchEvent(\n new CustomEvent(\"agent-panel:open-settings\", {\n detail: { section: \"secrets\" },\n }),\n );\n}\n\nexport interface VoiceButtonProps {\n voice: VoiceDictationApi;\n isMac: boolean;\n disabled?: boolean;\n}\n\nexport function isRealtimeVoiceSetupRequired(\n status: VoiceProviderStatus | null,\n builderConfigured: boolean | null,\n): boolean {\n return (\n status !== null &&\n !status.builder &&\n !status.openai &&\n builderConfigured !== true\n );\n}\n\nexport function VoiceButton({ voice, isMac, disabled }: VoiceButtonProps) {\n const { state, start, stop, supported } = voice;\n const realtimeVoice = useRealtimeVoiceModeOptional();\n const realtimeCopy = useRealtimeVoiceModeCopy();\n const voiceProviders = useVoiceProviderStatus();\n const builderConnect = useBuilderConnectFlow({\n trackingSource: \"realtime_voice\",\n trackingFlow: \"voice_transcription\",\n onConnected: () => voiceProviders.refresh(),\n });\n\n if (!supported) return null;\n\n const recording = state === \"recording\" || state === \"starting\";\n const transcribing = state === \"transcribing\";\n\n if (realtimeVoice?.active && !recording && !transcribing) return null;\n\n if (realtimeVoice && !recording && !transcribing) {\n return (\n <RealtimeVoiceModeEntry\n copy={realtimeCopy}\n disabled={disabled}\n providerStatusPending={voiceProviders.status === null}\n setupRequired={isRealtimeVoiceSetupRequired(\n voiceProviders.status,\n builderConnect.statusResolved ? builderConnect.configured : null,\n )}\n openAiConfigured={voiceProviders.status?.openai === true}\n connectingBuilder={builderConnect.connecting}\n onConnectBuilder={builderConnect.start}\n onUseOpenAiKey={() => {\n if (voiceProviders.status?.openai) void realtimeVoice.start();\n else openOpenAiKeySettings();\n }}\n onStartVoiceMode={() => void realtimeVoice.start()}\n onKeepDictating={() => void start()}\n />\n );\n }\n\n const label = recording\n ? \"Stop recording\"\n : transcribing\n ? \"Transcribing…\"\n : `Dictate (${isMac ? \"⌘⇧M\" : \"Ctrl+Shift+M\"})`;\n\n const onClick = () => {\n if (recording) stop();\n else if (!transcribing) void start();\n };\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={onClick}\n disabled={disabled || transcribing}\n aria-label={label}\n aria-pressed={recording}\n className={`shrink-0 flex h-7 w-7 items-center justify-center rounded-md transition-colors duration-150 disabled:opacity-30 disabled:cursor-not-allowed ${\n recording\n ? \"text-[#00B5FF] bg-[#00B5FF]/10 hover:bg-[#00B5FF]/20\"\n : \"text-muted-foreground hover:text-foreground hover:bg-accent/50\"\n }`}\n >\n {transcribing ? (\n <IconLoader2 className=\"h-4 w-4 animate-spin\" />\n ) : recording ? (\n <IconPlayerStopFilled className=\"h-3.5 w-3.5\" />\n ) : (\n <IconMicrophone className=\"h-4 w-4\" />\n )}\n </button>\n </TooltipTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n );\n}\n\nexport interface VoiceRecordingOverlayProps {\n voice: VoiceDictationApi;\n}\n\nexport function VoiceRecordingOverlay({ voice }: VoiceRecordingOverlayProps) {\n const { state, amplitude, durationMs, errorMessage, cancel } = voice;\n const { dismissError, start } = voice;\n\n if (state === \"error\" && errorMessage) {\n return (\n <div\n role=\"alert\"\n className=\"mx-2 mt-1 flex items-start gap-2 rounded-md border border-red-500/40 bg-red-500/10 px-2 py-1.5 text-[11px] text-red-500\"\n >\n <span className=\"flex-1 min-w-0\">{errorMessage}</span>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => {\n dismissError();\n void start();\n }}\n className=\"shrink-0 cursor-pointer rounded px-1.5 py-0.5 text-[11px] font-medium text-red-500 hover:bg-red-500/20\"\n aria-label=\"Try again\"\n >\n Try again\n </button>\n </TooltipTrigger>\n <TooltipContent>Try again</TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={dismissError}\n className=\"shrink-0 flex h-4 w-4 cursor-pointer items-center justify-center rounded text-red-500 hover:bg-red-500/20\"\n aria-label=\"Dismiss\"\n >\n <IconX className=\"h-3 w-3\" />\n </button>\n </TooltipTrigger>\n <TooltipContent>Dismiss</TooltipContent>\n </Tooltip>\n </div>\n );\n }\n\n if (state !== \"recording\" && state !== \"starting\" && state !== \"transcribing\")\n return null;\n\n return (\n <div\n className=\"flex items-center gap-2 mx-2 mt-2 mb-1 h-[2rem] rounded-md border border-[#00B5FF]/40 bg-[#00B5FF]/10 px-2\"\n aria-live=\"polite\"\n >\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={cancel}\n className=\"shrink-0 flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-accent/40\"\n aria-label=\"Cancel recording\"\n >\n <IconX className=\"h-3 w-3\" />\n </button>\n </TooltipTrigger>\n <TooltipContent>Cancel (Esc)</TooltipContent>\n </Tooltip>\n\n <div className=\"flex-1 flex items-center gap-[2px] min-w-0 h-4\">\n {state === \"transcribing\" ? (\n <span className=\"text-[11px] text-muted-foreground\">\n Transcribing…\n </span>\n ) : (\n <AmplitudeBars amplitude={amplitude} />\n )}\n </div>\n\n <span className=\"shrink-0 text-[11px] font-medium tabular-nums text-muted-foreground\">\n {state === \"transcribing\" ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n formatDuration(durationMs)\n )}\n </span>\n </div>\n );\n}\n\nconst BAR_COUNT = 24;\n\nfunction AmplitudeBars({ amplitude }: { amplitude: number }) {\n // Render a symmetric meter — the middle bars peak first so the visual\n // matches what voice input looks like in Lovable / iOS dictation.\n const bars = [];\n for (let i = 0; i < BAR_COUNT; i++) {\n const centerDistance =\n Math.abs(i - (BAR_COUNT - 1) / 2) / ((BAR_COUNT - 1) / 2);\n const heightPct =\n Math.max(0.1, amplitude * (1 - centerDistance * 0.6)) * 100;\n bars.push(\n <span\n key={i}\n className=\"flex-1 rounded-full bg-[#00B5FF]\"\n style={{ height: `${heightPct}%`, minHeight: 2 }}\n />,\n );\n }\n return <>{bars}</>;\n}\n\nfunction formatDuration(ms: number): string {\n const total = Math.floor(ms / 1000);\n const m = Math.floor(total / 60);\n const s = total % 60;\n return `${m}:${s.toString().padStart(2, \"0\")}`;\n}\n"]}
@@ -1,16 +0,0 @@
1
- export declare const ASSET_PICKER_HANDOFF_PARAM = "__an_asset_picker_handoff";
2
- export declare const ASSET_PICKER_RETURN_ORIGIN_PARAM = "__an_asset_picker_return_origin";
3
- export interface StandaloneAssetPickerOptions {
4
- handoffId?: string;
5
- returnOrigin?: string;
6
- }
7
- export declare function createAssetPickerHandoffId(): string;
8
- /**
9
- * Cross-origin Assets pages cannot inherit the host app's authenticated
10
- * session inside an iframe. Treat those URLs as link-out targets so provider
11
- * sign-in runs in a normal top-level browser context.
12
- */
13
- export declare function isExternalAssetPickerUrl(value: string, currentOrigin: string): boolean;
14
- /** Build a top-level picker URL without iframe-only auth flags. */
15
- export declare function standaloneAssetPickerUrl(value: string, baseUrl?: string, options?: StandaloneAssetPickerOptions): string;
16
- //# sourceMappingURL=asset-picker-url.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-picker-url.d.ts","sourceRoot":"","sources":["../../../src/client/composer/asset-picker-url.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AACtE,eAAO,MAAM,gCAAgC,oCACV,CAAC;AAEpC,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,0BAA0B,IAAI,MAAM,CAWnD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,OAAO,CAQT;AAED,mEAAmE;AACnE,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,OAAO,SAAoB,EAC3B,OAAO,GAAE,4BAAiC,GACzC,MAAM,CAgCR"}
@@ -1,64 +0,0 @@
1
- const FALLBACK_BASE_URL = "http://agent-native.invalid";
2
- export const ASSET_PICKER_HANDOFF_PARAM = "__an_asset_picker_handoff";
3
- export const ASSET_PICKER_RETURN_ORIGIN_PARAM = "__an_asset_picker_return_origin";
4
- export function createAssetPickerHandoffId() {
5
- if (typeof crypto !== "undefined" && crypto.randomUUID) {
6
- return crypto.randomUUID();
7
- }
8
- if (typeof crypto !== "undefined" && crypto.getRandomValues) {
9
- const bytes = crypto.getRandomValues(new Uint8Array(16));
10
- return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
11
- }
12
- return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
13
- }
14
- /**
15
- * Cross-origin Assets pages cannot inherit the host app's authenticated
16
- * session inside an iframe. Treat those URLs as link-out targets so provider
17
- * sign-in runs in a normal top-level browser context.
18
- */
19
- export function isExternalAssetPickerUrl(value, currentOrigin) {
20
- try {
21
- return new URL(value, currentOrigin).origin !== currentOrigin;
22
- }
23
- catch {
24
- // A malformed configured URL should fail closed instead of being loaded in
25
- // an iframe with an unknown auth boundary.
26
- return true;
27
- }
28
- }
29
- /** Build a top-level picker URL without iframe-only auth flags. */
30
- export function standaloneAssetPickerUrl(value, baseUrl = FALLBACK_BASE_URL, options = {}) {
31
- try {
32
- const parsed = new URL(value, baseUrl);
33
- parsed.searchParams.delete("embedded");
34
- parsed.searchParams.delete("__an_embed_token");
35
- parsed.searchParams.set("mediaType", "image");
36
- let returnOrigin = null;
37
- if (options.returnOrigin) {
38
- try {
39
- const parsedOrigin = new URL(options.returnOrigin);
40
- if (parsedOrigin.protocol === "http:" ||
41
- parsedOrigin.protocol === "https:") {
42
- returnOrigin = parsedOrigin.origin;
43
- }
44
- }
45
- catch {
46
- // Omit an invalid return target rather than emitting an unverified
47
- // cross-origin callback URL.
48
- }
49
- }
50
- if (options.handoffId && returnOrigin) {
51
- parsed.searchParams.set(ASSET_PICKER_HANDOFF_PARAM, options.handoffId);
52
- parsed.searchParams.set(ASSET_PICKER_RETURN_ORIGIN_PARAM, returnOrigin);
53
- }
54
- else {
55
- parsed.searchParams.delete(ASSET_PICKER_HANDOFF_PARAM);
56
- parsed.searchParams.delete(ASSET_PICKER_RETURN_ORIGIN_PARAM);
57
- }
58
- return parsed.toString();
59
- }
60
- catch {
61
- return value;
62
- }
63
- }
64
- //# sourceMappingURL=asset-picker-url.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-picker-url.js","sourceRoot":"","sources":["../../../src/client/composer/asset-picker-url.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,6BAA6B,CAAC;AAExD,MAAM,CAAC,MAAM,0BAA0B,GAAG,2BAA2B,CAAC;AACtE,MAAM,CAAC,MAAM,gCAAgC,GAC3C,iCAAiC,CAAC;AAOpC,MAAM,UAAU,0BAA0B;IACxC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACvD,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC5D,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,KAAK,C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AAC,QAAQ,KAAK,OAAO;oBACjC,YAAY,CAAC,QAAQ,KAAK,QAAQ,EAClC,CAAC;oBACD,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC;gBACrC,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,mEAAmE;gBACnE,6BAA6B;YAC/B,CAAC;QACH,CAAC;QACD,IAAI,OAAO,CAAC,SAAS,IAAI,YAAY,EAAE,CAAC;YACtC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,0BAA0B,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;YACvE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,gCAAgC,EAAE,YAAY,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;YACvD,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,gCAAgC,CAAC,CAAC;QAC/D,CAAC;QACD,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC","sourcesContent":["const FALLBACK_BASE_URL = \"http://agent-native.invalid\";\n\nexport const ASSET_PICKER_HANDOFF_PARAM = \"__an_asset_picker_handoff\";\nexport const ASSET_PICKER_RETURN_ORIGIN_PARAM =\n \"__an_asset_picker_return_origin\";\n\nexport interface StandaloneAssetPickerOptions {\n handoffId?: string;\n returnOrigin?: string;\n}\n\nexport function createAssetPickerHandoffId(): string {\n if (typeof crypto !== \"undefined\" && crypto.randomUUID) {\n return crypto.randomUUID();\n }\n if (typeof crypto !== \"undefined\" && crypto.getRandomValues) {\n const bytes = crypto.getRandomValues(new Uint8Array(16));\n return Array.from(bytes, (byte) => byte.toString(16).padStart(2, \"0\")).join(\n \"\",\n );\n }\n return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;\n}\n\n/**\n * Cross-origin Assets pages cannot inherit the host app's authenticated\n * session inside an iframe. Treat those URLs as link-out targets so provider\n * sign-in runs in a normal top-level browser context.\n */\nexport function isExternalAssetPickerUrl(\n value: string,\n currentOrigin: string,\n): boolean {\n try {\n return new URL(value, currentOrigin).origin !== currentOrigin;\n } catch {\n // A malformed configured URL should fail closed instead of being loaded in\n // an iframe with an unknown auth boundary.\n return true;\n }\n}\n\n/** Build a top-level picker URL without iframe-only auth flags. */\nexport function standaloneAssetPickerUrl(\n value: string,\n baseUrl = FALLBACK_BASE_URL,\n options: StandaloneAssetPickerOptions = {},\n): string {\n try {\n const parsed = new URL(value, baseUrl);\n parsed.searchParams.delete(\"embedded\");\n parsed.searchParams.delete(\"__an_embed_token\");\n parsed.searchParams.set(\"mediaType\", \"image\");\n let returnOrigin: string | null = null;\n if (options.returnOrigin) {\n try {\n const parsedOrigin = new URL(options.returnOrigin);\n if (\n parsedOrigin.protocol === \"http:\" ||\n parsedOrigin.protocol === \"https:\"\n ) {\n returnOrigin = parsedOrigin.origin;\n }\n } catch {\n // Omit an invalid return target rather than emitting an unverified\n // cross-origin callback URL.\n }\n }\n if (options.handoffId && returnOrigin) {\n parsed.searchParams.set(ASSET_PICKER_HANDOFF_PARAM, options.handoffId);\n parsed.searchParams.set(ASSET_PICKER_RETURN_ORIGIN_PARAM, returnOrigin);\n } else {\n parsed.searchParams.delete(ASSET_PICKER_HANDOFF_PARAM);\n parsed.searchParams.delete(ASSET_PICKER_RETURN_ORIGIN_PARAM);\n }\n return parsed.toString();\n } catch {\n return value;\n }\n}\n"]}
@@ -1,9 +0,0 @@
1
- import { SimpleTextAttachmentAdapter } from "@assistant-ui/react";
2
- export declare const PROMPT_DOCUMENT_ATTACHMENT_ACCEPT: string;
3
- export declare const CHAT_DOCUMENT_ATTACHMENT_ACCEPT: string;
4
- export declare const IMAGE_ATTACHMENT_ACCEPT: string;
5
- export declare const TEXT_ATTACHMENT_ACCEPT: string;
6
- export declare class TextAttachmentAdapter extends SimpleTextAttachmentAdapter {
7
- accept: string;
8
- }
9
- //# sourceMappingURL=attachment-accept.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachment-accept.d.ts","sourceRoot":"","sources":["../../../src/client/composer/attachment-accept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAWlE,eAAO,MAAM,iCAAiC,QACH,CAAC;AAE5C,eAAO,MAAM,+BAA+B,QAIjC,CAAC;AAEZ,eAAO,MAAM,uBAAuB,QAsBzB,CAAC;AAEZ,eAAO,MAAM,sBAAsB,QAsBxB,CAAC;AAEZ,qBAAa,qBAAsB,SAAQ,2BAA2B;IAC7D,MAAM,SAA0B;CACxC"}
@@ -1,65 +0,0 @@
1
- import { SimpleTextAttachmentAdapter } from "@assistant-ui/react";
2
- const BASE_DOCUMENT_ATTACHMENT_ACCEPT = [
3
- "application/pdf",
4
- "application/vnd.openxmlformats-officedocument.presentationml.presentation",
5
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6
- ".pdf",
7
- ".pptx",
8
- ".docx",
9
- ];
10
- export const PROMPT_DOCUMENT_ATTACHMENT_ACCEPT = BASE_DOCUMENT_ATTACHMENT_ACCEPT.join(",");
11
- export const CHAT_DOCUMENT_ATTACHMENT_ACCEPT = [
12
- ...BASE_DOCUMENT_ATTACHMENT_ACCEPT,
13
- "image/svg+xml",
14
- ".svg",
15
- ].join(",");
16
- export const IMAGE_ATTACHMENT_ACCEPT = [
17
- "image/jpeg",
18
- "image/jpg",
19
- "image/png",
20
- "image/gif",
21
- "image/webp",
22
- "image/heic",
23
- "image/heif",
24
- "image/avif",
25
- "image/bmp",
26
- "image/tiff",
27
- ".jpg",
28
- ".jpeg",
29
- ".png",
30
- ".gif",
31
- ".webp",
32
- ".heic",
33
- ".heif",
34
- ".avif",
35
- ".bmp",
36
- ".tif",
37
- ".tiff",
38
- ].join(",");
39
- export const TEXT_ATTACHMENT_ACCEPT = [
40
- "text/plain",
41
- "text/html",
42
- "text/markdown",
43
- "text/csv",
44
- "text/xml",
45
- "text/json",
46
- "text/css",
47
- "text/yaml",
48
- "application/json",
49
- "application/x-yaml",
50
- ".txt",
51
- ".md",
52
- ".markdown",
53
- ".csv",
54
- ".json",
55
- ".html",
56
- ".htm",
57
- ".css",
58
- ".xml",
59
- ".yaml",
60
- ".yml",
61
- ].join(",");
62
- export class TextAttachmentAdapter extends SimpleTextAttachmentAdapter {
63
- accept = TEXT_ATTACHMENT_ACCEPT;
64
- }
65
- //# sourceMappingURL=attachment-accept.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachment-accept.js","sourceRoot":"","sources":["../../../src/client/composer/attachment-accept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAElE,MAAM,+BAA+B,GAAG;IACtC,iBAAiB;IACjB,2EAA2E;IAC3E,yEAAyE;IACzE,MAAM;IACN,OAAO;IACP,OAAO;CACR,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAC5C,+BAA+B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE5C,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,GAAG,+BAA+B;IAClC,eAAe;IACf,MAAM;CACP,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;CACR,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,YAAY;IACZ,WAAW;IACX,eAAe;IACf,UAAU;IACV,UAAU;IACV,WAAW;IACX,UAAU;IACV,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,KAAK;IACL,WAAW;IACX,MAAM;IACN,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;CACP,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,OAAO,qBAAsB,SAAQ,2BAA2B;IAC7D,MAAM,GAAG,sBAAsB,CAAC;CACxC","sourcesContent":["import { SimpleTextAttachmentAdapter } from \"@assistant-ui/react\";\n\nconst BASE_DOCUMENT_ATTACHMENT_ACCEPT = [\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \".pdf\",\n \".pptx\",\n \".docx\",\n];\n\nexport const PROMPT_DOCUMENT_ATTACHMENT_ACCEPT =\n BASE_DOCUMENT_ATTACHMENT_ACCEPT.join(\",\");\n\nexport const CHAT_DOCUMENT_ATTACHMENT_ACCEPT = [\n ...BASE_DOCUMENT_ATTACHMENT_ACCEPT,\n \"image/svg+xml\",\n \".svg\",\n].join(\",\");\n\nexport const IMAGE_ATTACHMENT_ACCEPT = [\n \"image/jpeg\",\n \"image/jpg\",\n \"image/png\",\n \"image/gif\",\n \"image/webp\",\n \"image/heic\",\n \"image/heif\",\n \"image/avif\",\n \"image/bmp\",\n \"image/tiff\",\n \".jpg\",\n \".jpeg\",\n \".png\",\n \".gif\",\n \".webp\",\n \".heic\",\n \".heif\",\n \".avif\",\n \".bmp\",\n \".tif\",\n \".tiff\",\n].join(\",\");\n\nexport const TEXT_ATTACHMENT_ACCEPT = [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"text/csv\",\n \"text/xml\",\n \"text/json\",\n \"text/css\",\n \"text/yaml\",\n \"application/json\",\n \"application/x-yaml\",\n \".txt\",\n \".md\",\n \".markdown\",\n \".csv\",\n \".json\",\n \".html\",\n \".htm\",\n \".css\",\n \".xml\",\n \".yaml\",\n \".yml\",\n].join(\",\");\n\nexport class TextAttachmentAdapter extends SimpleTextAttachmentAdapter {\n public accept = TEXT_ATTACHMENT_ACCEPT;\n}\n"]}
@@ -1,2 +0,0 @@
1
- export declare function getComposerDraftKey(scope?: string | null): string;
2
- //# sourceMappingURL=draft-key.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"draft-key.d.ts","sourceRoot":"","sources":["../../../src/client/composer/draft-key.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAIjE"}
@@ -1,8 +0,0 @@
1
- const BASE_COMPOSER_DRAFT_KEY = "an-composer-draft";
2
- export function getComposerDraftKey(scope) {
3
- const trimmed = scope?.trim();
4
- if (!trimmed)
5
- return BASE_COMPOSER_DRAFT_KEY;
6
- return `${BASE_COMPOSER_DRAFT_KEY}:${encodeURIComponent(trimmed)}`;
7
- }
8
- //# sourceMappingURL=draft-key.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"draft-key.js","sourceRoot":"","sources":["../../../src/client/composer/draft-key.ts"],"names":[],"mappings":"AAAA,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAEpD,MAAM,UAAU,mBAAmB,CAAC,KAAqB;IACvD,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO;QAAE,OAAO,uBAAuB,CAAC;IAC7C,OAAO,GAAG,uBAAuB,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;AACrE,CAAC","sourcesContent":["const BASE_COMPOSER_DRAFT_KEY = \"an-composer-draft\";\n\nexport function getComposerDraftKey(scope?: string | null): string {\n const trimmed = scope?.trim();\n if (!trimmed) return BASE_COMPOSER_DRAFT_KEY;\n return `${BASE_COMPOSER_DRAFT_KEY}:${encodeURIComponent(trimmed)}`;\n}\n"]}
@@ -1,3 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- export declare const FileReference: Node<any, any>;
3
- //# sourceMappingURL=FileReference.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileReference.d.ts","sourceRoot":"","sources":["../../../../src/client/composer/extensions/FileReference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AAyBrD,eAAO,MAAM,aAAa,gBA4BxB,CAAC"}
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconFile, IconFolder } from "@tabler/icons-react";
3
- import { mergeAttributes, Node } from "@tiptap/core";
4
- import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
5
- const FileReferenceComponent = ({ node }) => {
6
- const isFolder = node.attrs.path?.endsWith("/");
7
- const cleanPath = isFolder ? node.attrs.path.slice(0, -1) : node.attrs.path;
8
- const displayName = cleanPath.split("/").pop() || cleanPath;
9
- return (_jsx(NodeViewWrapper, { as: "span", className: "inline", children: _jsxs("span", { className: "inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[200px] select-none", title: node.attrs.path, children: [isFolder ? (_jsx(IconFolder, { size: 14, className: "shrink-0 text-muted-foreground" })) : (_jsx(IconFile, { size: 14, className: "shrink-0 text-muted-foreground" })), _jsx("span", { className: "truncate", children: displayName })] }) }));
10
- };
11
- export const FileReference = Node.create({
12
- name: "fileReference",
13
- group: "inline",
14
- inline: true,
15
- selectable: true,
16
- atom: true,
17
- addAttributes() {
18
- return {
19
- path: { default: null },
20
- source: { default: "codebase" },
21
- };
22
- },
23
- parseHTML() {
24
- return [{ tag: 'span[data-type="file-reference"]' }];
25
- },
26
- renderHTML({ HTMLAttributes }) {
27
- return [
28
- "span",
29
- mergeAttributes({ "data-type": "file-reference" }, HTMLAttributes),
30
- ];
31
- },
32
- addNodeView() {
33
- return ReactNodeViewRenderer(FileReferenceComponent);
34
- },
35
- });
36
- //# sourceMappingURL=FileReference.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileReference.js","sourceRoot":"","sources":["../../../../src/client/composer/extensions/FileReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,sBAAsB,GAAG,CAAC,EAAE,IAAI,EAAiB,EAAE,EAAE;IACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IAC5E,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,CAAC;IAE5D,OAAO,CACL,KAAC,eAAe,IAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,YAC3C,gBACE,SAAS,EAAC,2KAA2K,EACrL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,aAErB,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,gCAAgC,GAAG,CACpE,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,gCAAgC,GAAG,CAClE,EACD,eAAM,SAAS,EAAC,UAAU,YAAE,WAAW,GAAQ,IAC1C,GACS,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IAEV,aAAa;QACX,OAAO;YACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACvB,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SAChC,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,EAAE,GAAG,EAAE,kCAAkC,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO;YACL,MAAM;YACN,eAAe,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC;SACnE,CAAC;IACJ,CAAC;IAED,WAAW;QACT,OAAO,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;IACvD,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { IconFile, IconFolder } from \"@tabler/icons-react\";\nimport { mergeAttributes, Node } from \"@tiptap/core\";\nimport { NodeViewWrapper, ReactNodeViewRenderer } from \"@tiptap/react\";\n\nconst FileReferenceComponent = ({ node }: { node: any }) => {\n const isFolder = node.attrs.path?.endsWith(\"/\");\n const cleanPath = isFolder ? node.attrs.path.slice(0, -1) : node.attrs.path;\n const displayName = cleanPath.split(\"/\").pop() || cleanPath;\n\n return (\n <NodeViewWrapper as=\"span\" className=\"inline\">\n <span\n className=\"inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[200px] select-none\"\n title={node.attrs.path}\n >\n {isFolder ? (\n <IconFolder size={14} className=\"shrink-0 text-muted-foreground\" />\n ) : (\n <IconFile size={14} className=\"shrink-0 text-muted-foreground\" />\n )}\n <span className=\"truncate\">{displayName}</span>\n </span>\n </NodeViewWrapper>\n );\n};\n\nexport const FileReference = Node.create({\n name: \"fileReference\",\n group: \"inline\",\n inline: true,\n selectable: true,\n atom: true,\n\n addAttributes() {\n return {\n path: { default: null },\n source: { default: \"codebase\" },\n };\n },\n\n parseHTML() {\n return [{ tag: 'span[data-type=\"file-reference\"]' }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"span\",\n mergeAttributes({ \"data-type\": \"file-reference\" }, HTMLAttributes),\n ];\n },\n\n addNodeView() {\n return ReactNodeViewRenderer(FileReferenceComponent);\n },\n});\n"]}
@@ -1,3 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- export declare const MentionReference: Node<any, any>;
3
- //# sourceMappingURL=MentionReference.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MentionReference.d.ts","sourceRoot":"","sources":["../../../../src/client/composer/extensions/MentionReference.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AA0CrD,eAAO,MAAM,gBAAgB,gBAuC3B,CAAC"}
@@ -1,66 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconFile, IconFolder, IconFileText, IconCheckbox, IconMail, IconUser, IconPresentation, IconStack2, IconMessageChatbot, } from "@tabler/icons-react";
3
- import { mergeAttributes, Node } from "@tiptap/core";
4
- import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
5
- const iconProps = { size: 14, className: "shrink-0 text-muted-foreground" };
6
- function MentionIcon({ icon }) {
7
- switch (icon) {
8
- case "folder":
9
- return _jsx(IconFolder, { ...iconProps });
10
- case "document":
11
- return _jsx(IconFileText, { ...iconProps });
12
- case "form":
13
- return _jsx(IconCheckbox, { ...iconProps });
14
- case "email":
15
- return _jsx(IconMail, { ...iconProps });
16
- case "user":
17
- return _jsx(IconUser, { ...iconProps });
18
- case "deck":
19
- return _jsx(IconPresentation, { ...iconProps });
20
- case "agent":
21
- return _jsx(IconMessageChatbot, { ...iconProps });
22
- case "file":
23
- return _jsx(IconFile, { ...iconProps });
24
- default:
25
- return _jsx(IconStack2, { ...iconProps });
26
- }
27
- }
28
- const MentionReferenceComponent = ({ node }) => {
29
- return (_jsx(NodeViewWrapper, { as: "span", className: "inline", children: _jsxs("span", { className: "inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[200px] select-none", title: node.attrs.refPath || node.attrs.refId || node.attrs.label, children: [_jsx(MentionIcon, { icon: node.attrs.icon }), _jsx("span", { className: "truncate", children: node.attrs.label })] }) }));
30
- };
31
- export const MentionReference = Node.create({
32
- name: "mentionReference",
33
- group: "inline",
34
- inline: true,
35
- selectable: true,
36
- atom: true,
37
- addAttributes() {
38
- return {
39
- label: { default: null },
40
- icon: { default: "file" },
41
- source: { default: "" },
42
- refType: { default: "file" },
43
- refId: { default: null },
44
- refPath: { default: null },
45
- slotKey: { default: null },
46
- slotLabel: { default: null },
47
- metadata: { default: null },
48
- };
49
- },
50
- parseHTML() {
51
- return [{ tag: 'span[data-type="mention-reference"]' }];
52
- },
53
- renderHTML({ HTMLAttributes }) {
54
- return [
55
- "span",
56
- mergeAttributes({ "data-type": "mention-reference" }, HTMLAttributes),
57
- ];
58
- },
59
- renderText({ node }) {
60
- return `@${node.attrs.label}`;
61
- },
62
- addNodeView() {
63
- return ReactNodeViewRenderer(MentionReferenceComponent);
64
- },
65
- });
66
- //# sourceMappingURL=MentionReference.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MentionReference.js","sourceRoot":"","sources":["../../../../src/client/composer/extensions/MentionReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,e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IconUser,\n IconPresentation,\n IconStack2,\n IconMessageChatbot,\n} from \"@tabler/icons-react\";\nimport { mergeAttributes, Node } from \"@tiptap/core\";\nimport { NodeViewWrapper, ReactNodeViewRenderer } from \"@tiptap/react\";\n\nconst iconProps = { size: 14, className: \"shrink-0 text-muted-foreground\" };\n\nfunction MentionIcon({ icon }: { icon?: string }) {\n switch (icon) {\n case \"folder\":\n return <IconFolder {...iconProps} />;\n case \"document\":\n return <IconFileText {...iconProps} />;\n case \"form\":\n return <IconCheckbox {...iconProps} />;\n case \"email\":\n return <IconMail {...iconProps} />;\n case \"user\":\n return <IconUser {...iconProps} />;\n case \"deck\":\n return <IconPresentation {...iconProps} />;\n case \"agent\":\n return <IconMessageChatbot {...iconProps} />;\n case \"file\":\n return <IconFile {...iconProps} />;\n default:\n return <IconStack2 {...iconProps} />;\n }\n}\n\nconst MentionReferenceComponent = ({ node }: { node: any }) => {\n return (\n <NodeViewWrapper as=\"span\" className=\"inline\">\n <span\n className=\"inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[200px] select-none\"\n title={node.attrs.refPath || node.attrs.refId || node.attrs.label}\n >\n <MentionIcon icon={node.attrs.icon} />\n <span className=\"truncate\">{node.attrs.label}</span>\n </span>\n </NodeViewWrapper>\n );\n};\n\nexport const MentionReference = Node.create({\n name: \"mentionReference\",\n group: \"inline\",\n inline: true,\n selectable: true,\n atom: true,\n\n addAttributes() {\n return {\n label: { default: null },\n icon: { default: \"file\" },\n source: { default: \"\" },\n refType: { default: \"file\" },\n refId: { default: null },\n refPath: { default: null },\n slotKey: { default: null },\n slotLabel: { default: null },\n metadata: { default: null },\n };\n },\n\n parseHTML() {\n return [{ tag: 'span[data-type=\"mention-reference\"]' }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"span\",\n mergeAttributes({ \"data-type\": \"mention-reference\" }, HTMLAttributes),\n ];\n },\n\n renderText({ node }) {\n return `@${node.attrs.label}`;\n },\n\n addNodeView() {\n return ReactNodeViewRenderer(MentionReferenceComponent);\n },\n});\n"]}
@@ -1,3 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- export declare const SkillReference: Node<any, any>;
3
- //# sourceMappingURL=SkillReference.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SkillReference.d.ts","sourceRoot":"","sources":["../../../../src/client/composer/extensions/SkillReference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AAyBrD,eAAO,MAAM,cAAc,gBA6BzB,CAAC"}
@@ -1,40 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconStack2 } from "@tabler/icons-react";
3
- import { mergeAttributes, Node } from "@tiptap/core";
4
- import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
5
- const SkillReferenceComponent = ({ node }) => {
6
- const displayName = (node.attrs.name || node.attrs.path || "")
7
- .replace(/^(\.agents?\/)?skills\//, "")
8
- .replace(/\/SKILL\.md$/i, "")
9
- .replace(/\.md$/i, "")
10
- .split("/")
11
- .pop() || "skill";
12
- return (_jsx(NodeViewWrapper, { as: "span", className: "inline", children: _jsxs("span", { className: "inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[160px] select-none", title: node.attrs.path, children: [_jsx(IconStack2, { size: 14, className: "shrink-0 text-muted-foreground" }), _jsx("span", { className: "truncate", children: displayName })] }) }));
13
- };
14
- export const SkillReference = Node.create({
15
- name: "skillReference",
16
- group: "inline",
17
- inline: true,
18
- selectable: true,
19
- atom: true,
20
- addAttributes() {
21
- return {
22
- name: { default: null },
23
- path: { default: null },
24
- source: { default: "codebase" },
25
- };
26
- },
27
- parseHTML() {
28
- return [{ tag: 'span[data-type="skill-reference"]' }];
29
- },
30
- renderHTML({ HTMLAttributes }) {
31
- return [
32
- "span",
33
- mergeAttributes({ "data-type": "skill-reference" }, HTMLAttributes),
34
- ];
35
- },
36
- addNodeView() {
37
- return ReactNodeViewRenderer(SkillReferenceComponent);
38
- },
39
- });
40
- //# sourceMappingURL=SkillReference.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SkillReference.js","sourceRoot":"","sources":["../../../../src/client/composer/extensions/SkillReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,uBAAuB,GAAG,CAAC,EAAE,IAAI,EAAiB,EAAE,EAAE;IAC1D,MAAM,WAAW,GACf,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;SACvC,OAAO,CAAC,yBAAyB,EAAE,EAAE,CAAC;SACtC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,EAAE,IAAI,OAAO,CAAC;IAEtB,OAAO,CACL,KAAC,eAAe,IAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,YAC3C,gBACE,SAAS,EAAC,2KAA2K,EACrL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,aAEtB,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,gCAAgC,GAAG,EACnE,eAAM,SAAS,EAAC,UAAU,YAAE,WAAW,GAAQ,IAC1C,GACS,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IAEV,aAAa;QACX,OAAO;YACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACvB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACvB,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SAChC,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,EAAE,GAAG,EAAE,mCAAmC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO;YACL,MAAM;YACN,eAAe,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,cAAc,CAAC;SACpE,CAAC;IACJ,CAAC;IAED,WAAW;QACT,OAAO,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { IconStack2 } from \"@tabler/icons-react\";\nimport { mergeAttributes, Node } from \"@tiptap/core\";\nimport { NodeViewWrapper, ReactNodeViewRenderer } from \"@tiptap/react\";\n\nconst SkillReferenceComponent = ({ node }: { node: any }) => {\n const displayName =\n (node.attrs.name || node.attrs.path || \"\")\n .replace(/^(\\.agents?\\/)?skills\\//, \"\")\n .replace(/\\/SKILL\\.md$/i, \"\")\n .replace(/\\.md$/i, \"\")\n .split(\"/\")\n .pop() || \"skill\";\n\n return (\n <NodeViewWrapper as=\"span\" className=\"inline\">\n <span\n className=\"inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[160px] select-none\"\n title={node.attrs.path}\n >\n <IconStack2 size={14} className=\"shrink-0 text-muted-foreground\" />\n <span className=\"truncate\">{displayName}</span>\n </span>\n </NodeViewWrapper>\n );\n};\n\nexport const SkillReference = Node.create({\n name: \"skillReference\",\n group: \"inline\",\n inline: true,\n selectable: true,\n atom: true,\n\n addAttributes() {\n return {\n name: { default: null },\n path: { default: null },\n source: { default: \"codebase\" },\n };\n },\n\n parseHTML() {\n return [{ tag: 'span[data-type=\"skill-reference\"]' }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"span\",\n mergeAttributes({ \"data-type\": \"skill-reference\" }, HTMLAttributes),\n ];\n },\n\n addNodeView() {\n return ReactNodeViewRenderer(SkillReferenceComponent);\n },\n});\n"]}
@@ -1,31 +0,0 @@
1
- /** The clipboard flavors we care about for a paste. */
2
- export interface ClipboardPaste {
3
- /** `text/plain` flavor — used for size heuristics and as the default body. */
4
- text: string;
5
- /** `text/html` flavor when the source provided one. */
6
- html?: string;
7
- }
8
- /** Read the relevant clipboard flavors from a paste/drop DataTransfer. */
9
- export declare function readClipboardPaste(data: {
10
- getData(type: string): string;
11
- } | null | undefined): ClipboardPaste;
12
- export declare function shouldConvertPasteToAttachment(text: string): boolean;
13
- /**
14
- * Whether a clipboard paste is large enough to become a `Pasted text`
15
- * attachment chip. Mirrors `shouldConvertPasteToAttachment` but evaluates the
16
- * representation we'd actually store, so an HTML-only paste (empty text/plain)
17
- * still converts on the strength of its markup.
18
- */
19
- export declare function shouldConvertClipboardToAttachment(paste: ClipboardPaste): boolean;
20
- /**
21
- * Build the attachment File for a page-sized paste, preserving HTML markup when
22
- * the pasted content is an HTML document so it travels the same rail as an
23
- * uploaded .html file.
24
- */
25
- export declare function createPastedAttachmentFile(paste: ClipboardPaste): File;
26
- /** Back-compat helper for callers that only have plain text. */
27
- export declare function createPastedTextFile(text: string): File;
28
- export declare function isPastedTextAttachmentName(name: string | undefined): boolean;
29
- export declare function unwrapAttachmentEnvelope(text: string): string;
30
- export declare function countLines(text: string): number;
31
- //# sourceMappingURL=pasted-text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pasted-text.d.ts","sourceRoot":"","sources":["../../../src/client/composer/pasted-text.ts"],"names":[],"mappings":"AA4CA,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAChC,IAAI,EAAE;IAAE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GACzD,cAAc,CAIhB;AAmCD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWpE;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,cAAc,GACpB,OAAO,CAET;AAQD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAGtE;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE5E;AAKD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO/C"}
@@ -1,130 +0,0 @@
1
- // Page-sized pastes turn into a `Pasted text` attachment chip instead of being
2
- // dumped into the editor. Short paragraphs and everyday lists should stay
3
- // inline so the composer still feels like a normal text field.
4
- const PASTED_TEXT_MIN_CHARS = 3200;
5
- const PASTED_TEXT_MIN_LINES = 24;
6
- const PASTED_TEXT_FILENAME_PREFIX = "pasted-text-";
7
- // A copied HTML document/source is recognizable from its markup: a closing tag
8
- // (`</div>`), a doctype, or a common structural/element tag. We key off the
9
- // *content* the user actually pasted, not the clipboard's `text/html` flavor —
10
- // editors (VS Code) and rich-text apps (Google Docs) populate `text/html` with
11
- // syntax-highlight spans or formatting wrappers even when the real content is
12
- // plain code/prose, so trusting `text/html` blindly would mangle those pastes.
13
- const HTML_SOURCE_SIGNAL = /<!doctype\s+html|<html[\s>]|<\/[a-z][a-z0-9-]*\s*>|<(?:body|head|div|span|section|main|header|footer|nav|article|aside|ul|ol|li|table|thead|tbody|tr|td|th|h[1-6]|p|a|img|button|input|textarea|select|form|label|script|style|link|meta|svg|canvas|template)\b/i;
14
- // A real HTML *document* announces itself with a doctype / html / head / body.
15
- // When one of these is present we keep the HTML classification even if an inline
16
- // <script> contains JS keywords — it's a genuine page.
17
- const HTML_DOCUMENT_SIGNAL = /<!doctype\s+html|<html[\s>]|<head[\s>]|<body[\s>]/i;
18
- // JSX/TSX source contains the same `</div>`/`<span>` tags as an HTML document,
19
- // so the HTML tag signal alone misfiles a pasted React/TS component (even a bare
20
- // function component) as an `.html` artifact — the agent then mishandles it as a
21
- // hostable document instead of source. These markers appear in JS/TS/JSX source
22
- // but not in a plain HTML *fragment*: `className=` (JSX uses it; HTML uses
23
- // `class=`), ES module import/export, arrow functions, TS type/React annotations,
24
- // React hooks, and the basic JS declaration/return keywords that make up a
25
- // component body.
26
- const CODE_SOURCE_SIGNAL = /\bclassName=|\bimport\b|\bexport\b|=>|:\s*React\.|\buse[A-Z]\w*\(|\b(?:function|const|let|var|return|class|interface|type|enum)\b/;
27
- function looksLikeHtml(value) {
28
- if (!value || !HTML_SOURCE_SIGNAL.test(value))
29
- return false;
30
- // A self-announcing HTML document stays HTML even if it embeds a <script>.
31
- if (HTML_DOCUMENT_SIGNAL.test(value))
32
- return true;
33
- // Otherwise it's a bare fragment — if it carries JS/TS/JSX code signals,
34
- // treat it as source code, not an HTML attachment.
35
- if (CODE_SOURCE_SIGNAL.test(value))
36
- return false;
37
- return true;
38
- }
39
- /** Read the relevant clipboard flavors from a paste/drop DataTransfer. */
40
- export function readClipboardPaste(data) {
41
- const text = data?.getData("text/plain") ?? "";
42
- const html = data?.getData("text/html") ?? "";
43
- return { text, html: html.trim() ? html : undefined };
44
- }
45
- // Decide what to actually store for a paste. Preserving HTML markup means a
46
- // pasted HTML document behaves exactly like uploading that .html file: the agent
47
- // recognizes it as a hostable artifact and reads it verbatim via
48
- // `contentFromAttachment` instead of retyping it inline (which cuts off
49
- // mid-stream on large files and triggers a continuation loop / "spin").
50
- function selectPasteBody(paste) {
51
- const plain = paste.text ?? "";
52
- const html = paste.html ?? "";
53
- // 1) The pasted text is itself HTML source (copied from an editor, a file, or
54
- // view-source). The plain text *is* the markup, so keep it as .html.
55
- if (plain.trim() && looksLikeHtml(plain)) {
56
- return { body: plain, ext: "html", type: "text/html" };
57
- }
58
- // 2) No usable plain text, but a real HTML flavor exists (some apps only
59
- // expose text/html). Fall back to the markup so nothing is dropped.
60
- if (!plain.trim() && looksLikeHtml(html)) {
61
- return { body: html, ext: "html", type: "text/html" };
62
- }
63
- // 3) Default: keep the clean plain text. Avoids the syntax-highlight /
64
- // rich-text noise that lives in text/html when the plain text is already
65
- // the real content (code from an editor, prose from a doc).
66
- return { body: plain, ext: "txt", type: "text/plain" };
67
- }
68
- export function shouldConvertPasteToAttachment(text) {
69
- if (!text)
70
- return false;
71
- if (text.length >= PASTED_TEXT_MIN_CHARS)
72
- return true;
73
- let lines = 1;
74
- for (let i = 0; i < text.length; i++) {
75
- if (text.charCodeAt(i) === 10) {
76
- lines++;
77
- if (lines >= PASTED_TEXT_MIN_LINES)
78
- return true;
79
- }
80
- }
81
- return false;
82
- }
83
- /**
84
- * Whether a clipboard paste is large enough to become a `Pasted text`
85
- * attachment chip. Mirrors `shouldConvertPasteToAttachment` but evaluates the
86
- * representation we'd actually store, so an HTML-only paste (empty text/plain)
87
- * still converts on the strength of its markup.
88
- */
89
- export function shouldConvertClipboardToAttachment(paste) {
90
- return shouldConvertPasteToAttachment(selectPasteBody(paste).body);
91
- }
92
- function pastedAttachmentName(ext) {
93
- return `${PASTED_TEXT_FILENAME_PREFIX}${Date.now()}-${Math.random()
94
- .toString(36)
95
- .slice(2, 8)}.${ext}`;
96
- }
97
- /**
98
- * Build the attachment File for a page-sized paste, preserving HTML markup when
99
- * the pasted content is an HTML document so it travels the same rail as an
100
- * uploaded .html file.
101
- */
102
- export function createPastedAttachmentFile(paste) {
103
- const { body, ext, type } = selectPasteBody(paste);
104
- return new File([body], pastedAttachmentName(ext), { type });
105
- }
106
- /** Back-compat helper for callers that only have plain text. */
107
- export function createPastedTextFile(text) {
108
- return createPastedAttachmentFile({ text });
109
- }
110
- export function isPastedTextAttachmentName(name) {
111
- return !!name && name.startsWith(PASTED_TEXT_FILENAME_PREFIX);
112
- }
113
- // Strips the `<attachment name=...>\n` / `\n</attachment>` envelope that
114
- // SimpleTextAttachmentAdapter wraps the file body in when sending. Returns the
115
- // raw body for previewing.
116
- export function unwrapAttachmentEnvelope(text) {
117
- const match = text.match(/^<attachment\b[^>]*>\n([\s\S]*)\n<\/attachment>$/);
118
- return match ? match[1] : text;
119
- }
120
- export function countLines(text) {
121
- if (!text)
122
- return 0;
123
- let lines = 1;
124
- for (let i = 0; i < text.length; i++) {
125
- if (text.charCodeAt(i) === 10)
126
- lines++;
127
- }
128
- return lines;
129
- }
130
- //# sourceMappingURL=pasted-text.js.map