@docyrus/ui-pro-ai-assistant 0.0.2 → 0.0.5

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 (314) hide show
  1. package/dist/components/assistant-animations.d.ts +3 -3
  2. package/dist/docy-assistant.d.ts +1 -1
  3. package/dist/index.js +74 -47
  4. package/dist/index.js.map +1 -1
  5. package/dist/styles.css +5137 -0
  6. package/dist/types/index.d.ts +3 -3
  7. package/dist/views/assistant-view.d.ts +2 -2
  8. package/package.json +38 -36
  9. package/src/components/assistant-animations.tsx +0 -29
  10. package/src/components/assistant-dialogs.tsx +0 -235
  11. package/src/components/code-view.tsx +0 -278
  12. package/src/components/create-agent-task.tsx +0 -104
  13. package/src/components/create-new-work-version.tsx +0 -30
  14. package/src/components/extract-web.tsx +0 -160
  15. package/src/components/forward-to-agent.tsx +0 -90
  16. package/src/components/generate-chart.tsx +0 -101
  17. package/src/components/generative-action-button.tsx +0 -122
  18. package/src/components/generative-tool.tsx +0 -685
  19. package/src/components/generative-ui-object.tsx +0 -210
  20. package/src/components/input-area.tsx +0 -1209
  21. package/src/components/json-schema-layout.tsx +0 -326
  22. package/src/components/list-item-card.tsx +0 -92
  23. package/src/components/mermaid-diagram.tsx +0 -192
  24. package/src/components/preview-image.tsx +0 -47
  25. package/src/components/request-approval.tsx +0 -48
  26. package/src/components/request-user-input.tsx +0 -270
  27. package/src/components/search-web.tsx +0 -319
  28. package/src/components/sheet-command.tsx +0 -88
  29. package/src/components/shell-canvas.tsx +0 -122
  30. package/src/components/show-advanced-data-table.tsx +0 -352
  31. package/src/components/show-generated-content-options.tsx +0 -93
  32. package/src/components/show-people-cards.tsx +0 -180
  33. package/src/components/subagent-tool.tsx +0 -180
  34. package/src/components/text-editor-tool.tsx +0 -328
  35. package/src/components/work-canvas.tsx +0 -88
  36. package/src/components/work-card.tsx +0 -42
  37. package/src/declarations.d.ts +0 -1
  38. package/src/docy-assistant.tsx +0 -1962
  39. package/src/hooks/index.ts +0 -7
  40. package/src/hooks/use-assistant-api.ts +0 -507
  41. package/src/hooks/use-deployment-data.ts +0 -162
  42. package/src/hooks/use-project-state.ts +0 -347
  43. package/src/hooks/use-session-state.ts +0 -207
  44. package/src/hooks/use-speech-recognition.ts +0 -137
  45. package/src/hooks/use-ui-state.ts +0 -185
  46. package/src/hooks/use-works-state.ts +0 -146
  47. package/src/i18n/context.tsx +0 -253
  48. package/src/i18n/index.ts +0 -19
  49. package/src/i18n/locales/de.json +0 -198
  50. package/src/i18n/locales/el.json +0 -198
  51. package/src/i18n/locales/en.json +0 -226
  52. package/src/i18n/locales/es.json +0 -198
  53. package/src/i18n/locales/fr.json +0 -198
  54. package/src/i18n/locales/it.json +0 -198
  55. package/src/i18n/locales/pt.json +0 -198
  56. package/src/i18n/locales/sl.json +0 -198
  57. package/src/i18n/locales/tr.json +0 -211
  58. package/src/i18n/types.ts +0 -23
  59. package/src/i18n/use-translation.ts +0 -17
  60. package/src/index.ts +0 -18
  61. package/src/internal/plate-editor/editor/auth-context.ts +0 -11
  62. package/src/internal/plate-editor/editor/editor-base-kit.tsx +0 -39
  63. package/src/internal/plate-editor/editor/editor-kit.tsx +0 -89
  64. package/src/internal/plate-editor/editor/plate-editor.tsx +0 -75
  65. package/src/internal/plate-editor/editor/plate-types.ts +0 -126
  66. package/src/internal/plate-editor/editor/plugins/ai-kit.tsx +0 -172
  67. package/src/internal/plate-editor/editor/plugins/autoformat-kit.tsx +0 -211
  68. package/src/internal/plate-editor/editor/plugins/basic-blocks-base-kit.tsx +0 -26
  69. package/src/internal/plate-editor/editor/plugins/basic-blocks-kit.tsx +0 -51
  70. package/src/internal/plate-editor/editor/plugins/basic-marks-base-kit.tsx +0 -24
  71. package/src/internal/plate-editor/editor/plugins/basic-marks-kit.tsx +0 -38
  72. package/src/internal/plate-editor/editor/plugins/basic-nodes-kit.tsx +0 -6
  73. package/src/internal/plate-editor/editor/plugins/block-menu-kit.tsx +0 -14
  74. package/src/internal/plate-editor/editor/plugins/block-placeholder-kit.tsx +0 -17
  75. package/src/internal/plate-editor/editor/plugins/block-selection-kit.tsx +0 -31
  76. package/src/internal/plate-editor/editor/plugins/callout-base-kit.tsx +0 -5
  77. package/src/internal/plate-editor/editor/plugins/callout-kit.tsx +0 -7
  78. package/src/internal/plate-editor/editor/plugins/code-block-base-kit.tsx +0 -23
  79. package/src/internal/plate-editor/editor/plugins/code-block-kit.tsx +0 -26
  80. package/src/internal/plate-editor/editor/plugins/column-base-kit.tsx +0 -8
  81. package/src/internal/plate-editor/editor/plugins/column-kit.tsx +0 -7
  82. package/src/internal/plate-editor/editor/plugins/comment-base-kit.tsx +0 -5
  83. package/src/internal/plate-editor/editor/plugins/comment-kit.tsx +0 -174
  84. package/src/internal/plate-editor/editor/plugins/copilot-kit.tsx +0 -68
  85. package/src/internal/plate-editor/editor/plugins/cursor-overlay-kit.tsx +0 -13
  86. package/src/internal/plate-editor/editor/plugins/date-base-kit.tsx +0 -5
  87. package/src/internal/plate-editor/editor/plugins/date-kit.tsx +0 -7
  88. package/src/internal/plate-editor/editor/plugins/discussion-kit.tsx +0 -36
  89. package/src/internal/plate-editor/editor/plugins/dnd-kit.tsx +0 -27
  90. package/src/internal/plate-editor/editor/plugins/docx-export-kit.tsx +0 -43
  91. package/src/internal/plate-editor/editor/plugins/docx-kit.tsx +0 -6
  92. package/src/internal/plate-editor/editor/plugins/emoji-kit.tsx +0 -15
  93. package/src/internal/plate-editor/editor/plugins/exit-break-kit.tsx +0 -12
  94. package/src/internal/plate-editor/editor/plugins/floating-toolbar-kit.tsx +0 -19
  95. package/src/internal/plate-editor/editor/plugins/font-base-kit.tsx +0 -36
  96. package/src/internal/plate-editor/editor/plugins/font-kit.tsx +0 -47
  97. package/src/internal/plate-editor/editor/plugins/indent-base-kit.tsx +0 -19
  98. package/src/internal/plate-editor/editor/plugins/indent-kit.tsx +0 -22
  99. package/src/internal/plate-editor/editor/plugins/link-base-kit.tsx +0 -5
  100. package/src/internal/plate-editor/editor/plugins/link-kit.tsx +0 -35
  101. package/src/internal/plate-editor/editor/plugins/list-base-kit.tsx +0 -24
  102. package/src/internal/plate-editor/editor/plugins/list-kit.tsx +0 -27
  103. package/src/internal/plate-editor/editor/plugins/markdown-kit.tsx +0 -18
  104. package/src/internal/plate-editor/editor/plugins/math-base-kit.tsx +0 -8
  105. package/src/internal/plate-editor/editor/plugins/math-kit.tsx +0 -10
  106. package/src/internal/plate-editor/editor/plugins/media-base-kit.tsx +0 -37
  107. package/src/internal/plate-editor/editor/plugins/media-kit.tsx +0 -53
  108. package/src/internal/plate-editor/editor/plugins/mention-base-kit.tsx +0 -5
  109. package/src/internal/plate-editor/editor/plugins/mention-kit.tsx +0 -36
  110. package/src/internal/plate-editor/editor/plugins/slash-kit.tsx +0 -17
  111. package/src/internal/plate-editor/editor/plugins/suggestion-base-kit.tsx +0 -5
  112. package/src/internal/plate-editor/editor/plugins/suggestion-kit.tsx +0 -95
  113. package/src/internal/plate-editor/editor/plugins/table-base-kit.tsx +0 -20
  114. package/src/internal/plate-editor/editor/plugins/table-kit.tsx +0 -22
  115. package/src/internal/plate-editor/editor/plugins/toc-base-kit.tsx +0 -5
  116. package/src/internal/plate-editor/editor/plugins/toc-kit.tsx +0 -14
  117. package/src/internal/plate-editor/editor/plugins/toggle-base-kit.tsx +0 -5
  118. package/src/internal/plate-editor/editor/plugins/toggle-kit.tsx +0 -9
  119. package/src/internal/plate-editor/editor/transforms.ts +0 -165
  120. package/src/internal/plate-editor/editor/use-chat.ts +0 -152
  121. package/src/internal/plate-editor/hooks/index.ts +0 -3
  122. package/src/internal/plate-editor/hooks/use-copy-to-clipboard.ts +0 -31
  123. package/src/internal/plate-editor/hooks/use-is-touch-device.ts +0 -26
  124. package/src/internal/plate-editor/hooks/use-lock-scroll.ts +0 -21
  125. package/src/internal/plate-editor/hooks/use-media-query.ts +0 -44
  126. package/src/internal/plate-editor/hooks/use-mounted.ts +0 -18
  127. package/src/internal/plate-editor/hooks/use-on-click-outside.ts +0 -114
  128. package/src/internal/plate-editor/hooks/use-upload-file.ts +0 -81
  129. package/src/internal/plate-editor/i18n/context.tsx +0 -58
  130. package/src/internal/plate-editor/i18n/index.ts +0 -3
  131. package/src/internal/plate-editor/i18n/locales/de.json +0 -57
  132. package/src/internal/plate-editor/i18n/locales/el.json +0 -57
  133. package/src/internal/plate-editor/i18n/locales/en.json +0 -57
  134. package/src/internal/plate-editor/i18n/locales/es.json +0 -57
  135. package/src/internal/plate-editor/i18n/locales/fr.json +0 -57
  136. package/src/internal/plate-editor/i18n/locales/it.json +0 -57
  137. package/src/internal/plate-editor/i18n/locales/pt.json +0 -57
  138. package/src/internal/plate-editor/i18n/locales/sl.json +0 -57
  139. package/src/internal/plate-editor/i18n/locales/tr.json +0 -57
  140. package/src/internal/plate-editor/i18n/types.ts +0 -59
  141. package/src/internal/plate-editor/i18n/use-translation.ts +0 -22
  142. package/src/internal/plate-editor/index.ts +0 -39
  143. package/src/internal/plate-editor/lib/ai-output-converter.ts +0 -153
  144. package/src/internal/plate-editor/lib/download-file.ts +0 -17
  145. package/src/internal/plate-editor/plate-ui/ai-chat-editor.tsx +0 -24
  146. package/src/internal/plate-editor/plate-ui/ai-menu.tsx +0 -828
  147. package/src/internal/plate-editor/plate-ui/ai-node.tsx +0 -41
  148. package/src/internal/plate-editor/plate-ui/ai-toolbar-button.tsx +0 -25
  149. package/src/internal/plate-editor/plate-ui/alert-dialog.tsx +0 -145
  150. package/src/internal/plate-editor/plate-ui/align-toolbar-button.tsx +0 -88
  151. package/src/internal/plate-editor/plate-ui/avatar.tsx +0 -3
  152. package/src/internal/plate-editor/plate-ui/block-context-menu.tsx +0 -104
  153. package/src/internal/plate-editor/plate-ui/block-discussion.tsx +0 -364
  154. package/src/internal/plate-editor/plate-ui/block-draggable.tsx +0 -557
  155. package/src/internal/plate-editor/plate-ui/block-list-static.tsx +0 -77
  156. package/src/internal/plate-editor/plate-ui/block-list.tsx +0 -85
  157. package/src/internal/plate-editor/plate-ui/block-menu.tsx +0 -555
  158. package/src/internal/plate-editor/plate-ui/block-selection.tsx +0 -47
  159. package/src/internal/plate-editor/plate-ui/block-suggestion.tsx +0 -469
  160. package/src/internal/plate-editor/plate-ui/blockquote-node-static.tsx +0 -10
  161. package/src/internal/plate-editor/plate-ui/blockquote-node.tsx +0 -11
  162. package/src/internal/plate-editor/plate-ui/button.tsx +0 -201
  163. package/src/internal/plate-editor/plate-ui/calendar.tsx +0 -3
  164. package/src/internal/plate-editor/plate-ui/callout-node-static.tsx +0 -76
  165. package/src/internal/plate-editor/plate-ui/callout-node.tsx +0 -54
  166. package/src/internal/plate-editor/plate-ui/caption.tsx +0 -47
  167. package/src/internal/plate-editor/plate-ui/checkbox.tsx +0 -3
  168. package/src/internal/plate-editor/plate-ui/code-block-node-static.tsx +0 -172
  169. package/src/internal/plate-editor/plate-ui/code-block-node.tsx +0 -226
  170. package/src/internal/plate-editor/plate-ui/code-node-static.tsx +0 -11
  171. package/src/internal/plate-editor/plate-ui/code-node.tsx +0 -12
  172. package/src/internal/plate-editor/plate-ui/column-node-static.tsx +0 -65
  173. package/src/internal/plate-editor/plate-ui/column-node.tsx +0 -24
  174. package/src/internal/plate-editor/plate-ui/command.tsx +0 -202
  175. package/src/internal/plate-editor/plate-ui/comment-node-static.tsx +0 -12
  176. package/src/internal/plate-editor/plate-ui/comment-node.tsx +0 -45
  177. package/src/internal/plate-editor/plate-ui/comment-toolbar-button.tsx +0 -24
  178. package/src/internal/plate-editor/plate-ui/comment.tsx +0 -619
  179. package/src/internal/plate-editor/plate-ui/cursor-overlay.tsx +0 -85
  180. package/src/internal/plate-editor/plate-ui/date-node-static.tsx +0 -43
  181. package/src/internal/plate-editor/plate-ui/date-node.tsx +0 -54
  182. package/src/internal/plate-editor/plate-ui/dialog.tsx +0 -445
  183. package/src/internal/plate-editor/plate-ui/dropdown-menu.tsx +0 -264
  184. package/src/internal/plate-editor/plate-ui/editor-static.tsx +0 -40
  185. package/src/internal/plate-editor/plate-ui/editor.tsx +0 -146
  186. package/src/internal/plate-editor/plate-ui/emoji-node.tsx +0 -48
  187. package/src/internal/plate-editor/plate-ui/emoji-toolbar-button.tsx +0 -626
  188. package/src/internal/plate-editor/plate-ui/equation-node-static.tsx +0 -155
  189. package/src/internal/plate-editor/plate-ui/equation-node.tsx +0 -226
  190. package/src/internal/plate-editor/plate-ui/equation-toolbar-button.tsx +0 -26
  191. package/src/internal/plate-editor/plate-ui/export-toolbar-button.tsx +0 -206
  192. package/src/internal/plate-editor/plate-ui/fixed-toolbar-buttons.tsx +0 -157
  193. package/src/internal/plate-editor/plate-ui/fixed-toolbar.tsx +0 -25
  194. package/src/internal/plate-editor/plate-ui/floating-discussion.tsx +0 -1129
  195. package/src/internal/plate-editor/plate-ui/floating-toolbar-buttons.tsx +0 -129
  196. package/src/internal/plate-editor/plate-ui/floating-toolbar.tsx +0 -97
  197. package/src/internal/plate-editor/plate-ui/font-color-toolbar-button.tsx +0 -209
  198. package/src/internal/plate-editor/plate-ui/font-size-toolbar-button.tsx +0 -152
  199. package/src/internal/plate-editor/plate-ui/ghost-text.tsx +0 -20
  200. package/src/internal/plate-editor/plate-ui/heading-node-static.tsx +0 -52
  201. package/src/internal/plate-editor/plate-ui/heading-node.tsx +0 -56
  202. package/src/internal/plate-editor/plate-ui/highlight-node-static.tsx +0 -9
  203. package/src/internal/plate-editor/plate-ui/highlight-node.tsx +0 -11
  204. package/src/internal/plate-editor/plate-ui/history-toolbar-button.tsx +0 -50
  205. package/src/internal/plate-editor/plate-ui/hover-card.tsx +0 -7
  206. package/src/internal/plate-editor/plate-ui/hr-node-static.tsx +0 -18
  207. package/src/internal/plate-editor/plate-ui/hr-node.tsx +0 -28
  208. package/src/internal/plate-editor/plate-ui/import-toolbar-button.tsx +0 -122
  209. package/src/internal/plate-editor/plate-ui/indent-toolbar-button.tsx +0 -32
  210. package/src/internal/plate-editor/plate-ui/inline-combobox.tsx +0 -409
  211. package/src/internal/plate-editor/plate-ui/input.tsx +0 -37
  212. package/src/internal/plate-editor/plate-ui/insert-toolbar-button.tsx +0 -258
  213. package/src/internal/plate-editor/plate-ui/label.tsx +0 -1
  214. package/src/internal/plate-editor/plate-ui/line-height-toolbar-button.tsx +0 -69
  215. package/src/internal/plate-editor/plate-ui/link-node-static.tsx +0 -15
  216. package/src/internal/plate-editor/plate-ui/link-node.tsx +0 -33
  217. package/src/internal/plate-editor/plate-ui/link-toolbar-button.tsx +0 -28
  218. package/src/internal/plate-editor/plate-ui/link-toolbar.tsx +0 -147
  219. package/src/internal/plate-editor/plate-ui/list-toolbar-button.tsx +0 -177
  220. package/src/internal/plate-editor/plate-ui/mark-toolbar-button.tsx +0 -34
  221. package/src/internal/plate-editor/plate-ui/media-audio-node-static.tsx +0 -21
  222. package/src/internal/plate-editor/plate-ui/media-audio-node.tsx +0 -32
  223. package/src/internal/plate-editor/plate-ui/media-embed-node.tsx +0 -103
  224. package/src/internal/plate-editor/plate-ui/media-file-node-static.tsx +0 -30
  225. package/src/internal/plate-editor/plate-ui/media-file-node.tsx +0 -52
  226. package/src/internal/plate-editor/plate-ui/media-image-node-static.tsx +0 -37
  227. package/src/internal/plate-editor/plate-ui/media-image-node.tsx +0 -183
  228. package/src/internal/plate-editor/plate-ui/media-placeholder-node.tsx +0 -441
  229. package/src/internal/plate-editor/plate-ui/media-preview-dialog.tsx +0 -127
  230. package/src/internal/plate-editor/plate-ui/media-toolbar-button.tsx +0 -227
  231. package/src/internal/plate-editor/plate-ui/media-toolbar.tsx +0 -214
  232. package/src/internal/plate-editor/plate-ui/media-upload-toast.tsx +0 -73
  233. package/src/internal/plate-editor/plate-ui/media-video-node-static.tsx +0 -35
  234. package/src/internal/plate-editor/plate-ui/media-video-node.tsx +0 -119
  235. package/src/internal/plate-editor/plate-ui/mention-node-static.tsx +0 -46
  236. package/src/internal/plate-editor/plate-ui/mention-node.tsx +0 -79
  237. package/src/internal/plate-editor/plate-ui/menu.tsx +0 -539
  238. package/src/internal/plate-editor/plate-ui/mode-toolbar-button.tsx +0 -124
  239. package/src/internal/plate-editor/plate-ui/more-toolbar-button.tsx +0 -34
  240. package/src/internal/plate-editor/plate-ui/paragraph-node-static.tsx +0 -15
  241. package/src/internal/plate-editor/plate-ui/paragraph-node.tsx +0 -16
  242. package/src/internal/plate-editor/plate-ui/popover.tsx +0 -75
  243. package/src/internal/plate-editor/plate-ui/progress.tsx +0 -1
  244. package/src/internal/plate-editor/plate-ui/remote-cursor-overlay.tsx +0 -79
  245. package/src/internal/plate-editor/plate-ui/resize-handle.tsx +0 -86
  246. package/src/internal/plate-editor/plate-ui/separator.tsx +0 -41
  247. package/src/internal/plate-editor/plate-ui/slash-node.tsx +0 -433
  248. package/src/internal/plate-editor/plate-ui/spinner.tsx +0 -1
  249. package/src/internal/plate-editor/plate-ui/suggestion-node-static.tsx +0 -35
  250. package/src/internal/plate-editor/plate-ui/suggestion-node.tsx +0 -166
  251. package/src/internal/plate-editor/plate-ui/suggestion-toolbar-button.tsx +0 -24
  252. package/src/internal/plate-editor/plate-ui/table-node-static.tsx +0 -84
  253. package/src/internal/plate-editor/plate-ui/table-node.tsx +0 -283
  254. package/src/internal/plate-editor/plate-ui/table-toolbar-button.tsx +0 -252
  255. package/src/internal/plate-editor/plate-ui/tabs.tsx +0 -3
  256. package/src/internal/plate-editor/plate-ui/textarea.tsx +0 -57
  257. package/src/internal/plate-editor/plate-ui/toc-node-static.tsx +0 -142
  258. package/src/internal/plate-editor/plate-ui/toc-node.tsx +0 -57
  259. package/src/internal/plate-editor/plate-ui/toc-sidebar.tsx +0 -48
  260. package/src/internal/plate-editor/plate-ui/toggle-node-static.tsx +0 -18
  261. package/src/internal/plate-editor/plate-ui/toggle-node.tsx +0 -33
  262. package/src/internal/plate-editor/plate-ui/toggle-toolbar-button.tsx +0 -24
  263. package/src/internal/plate-editor/plate-ui/toggle.tsx +0 -3
  264. package/src/internal/plate-editor/plate-ui/toolbar.tsx +0 -378
  265. package/src/internal/plate-editor/plate-ui/tooltip.tsx +0 -148
  266. package/src/internal/plate-editor/plate-ui/turn-into-toolbar-button.tsx +0 -175
  267. package/src/internal/plate-editor/types/index.ts +0 -22
  268. package/src/internal/plate-editor/vite.ts +0 -284
  269. package/src/internal/sheets/components/univer-sheets.tsx +0 -1104
  270. package/src/internal/sheets/i18n/context.tsx +0 -183
  271. package/src/internal/sheets/i18n/index.ts +0 -19
  272. package/src/internal/sheets/i18n/locales/de.json +0 -21
  273. package/src/internal/sheets/i18n/locales/el.json +0 -21
  274. package/src/internal/sheets/i18n/locales/en.json +0 -21
  275. package/src/internal/sheets/i18n/locales/es.json +0 -21
  276. package/src/internal/sheets/i18n/locales/fr.json +0 -21
  277. package/src/internal/sheets/i18n/locales/it.json +0 -21
  278. package/src/internal/sheets/i18n/locales/pt.json +0 -21
  279. package/src/internal/sheets/i18n/locales/sl.json +0 -21
  280. package/src/internal/sheets/i18n/locales/tr.json +0 -21
  281. package/src/internal/sheets/i18n/types.ts +0 -23
  282. package/src/internal/sheets/i18n/use-translation.ts +0 -17
  283. package/src/internal/sheets/index.ts +0 -14
  284. package/src/internal/sheets/types/css.d.ts +0 -11
  285. package/src/internal/sheets/types/index.ts +0 -260
  286. package/src/internal/sheets/xlsx.ts +0 -1169
  287. package/src/lib/api-client.ts +0 -77
  288. package/src/lib/assistant-api-actions.ts +0 -549
  289. package/src/lib/assistant-config.tsx +0 -75
  290. package/src/lib/class-utils.ts +0 -40
  291. package/src/lib/index.ts +0 -7
  292. package/src/lib/message-utils.ts +0 -131
  293. package/src/tools/tools-schema.json +0 -512
  294. package/src/types/index.ts +0 -235
  295. package/src/views/assistant-view.tsx +0 -1137
  296. package/src/views/canvas-app.tsx +0 -839
  297. package/src/views/canvas-code.tsx +0 -93
  298. package/src/views/canvas-deep-research.tsx +0 -44
  299. package/src/views/canvas-image.tsx +0 -25
  300. package/src/views/canvas-record-view.tsx +0 -285
  301. package/src/views/canvas-spreadsheet.tsx +0 -125
  302. package/src/views/canvas-text.tsx +0 -52
  303. package/src/views/canvas.tsx +0 -274
  304. package/src/views/chat-panel.tsx +0 -149
  305. package/src/views/index.ts +0 -20
  306. package/src/views/memories-panel.tsx +0 -365
  307. package/src/views/message-list.tsx +0 -370
  308. package/src/views/project-detail.tsx +0 -257
  309. package/src/views/projects-panel.tsx +0 -131
  310. package/src/views/sessions-list.tsx +0 -98
  311. package/src/views/sidebar-content.tsx +0 -256
  312. package/src/views/work-detail.tsx +0 -98
  313. package/src/vite.ts +0 -64
  314. package/src/worker.ts +0 -203
@@ -1,40 +0,0 @@
1
- /**
2
- * CSS class utility functions for assistant dialog/container styling
3
- */
4
-
5
- interface DialogClassOptions {
6
- isExpanded: boolean;
7
- isDocked: boolean;
8
- }
9
-
10
- interface ContainerClassOptions {
11
- isExpanded: boolean;
12
- isDocked: boolean;
13
- }
14
-
15
- /**
16
- * Returns the appropriate className for the dialog based on its state
17
- * Handles expanded, docked, and default states
18
- */
19
- export function getDialogClassName({ isExpanded, isDocked }: DialogClassOptions): string {
20
- const baseClass = 'p-0 border-0 max-w-none bg-transparent transition-all duration-300 ease-out';
21
-
22
- if (isExpanded) {
23
- return `${baseClass} w-screen h-screen fixed inset-0 translate-x-0 translate-y-0`;
24
- } else if (isDocked) {
25
- return `${baseClass} w-[700px] h-screen fixed top-0 left-0 translate-x-0 translate-y-0`;
26
- } else {
27
- return `${baseClass} w-[80vw] h-[95vh] min-w-[80vw] max-w-none max-h-none fixed top-1/2 left-1/2 translate-x-[-50%] translate-y-[-50%]`;
28
- }
29
- }
30
-
31
- /**
32
- * Returns the appropriate className for the container based on its state
33
- * Handles rounded corners and overflow for different display modes
34
- */
35
- export function getContainerClassName({ isExpanded, isDocked }: ContainerClassOptions): string {
36
- const baseClass = 'relative flex h-full bg-background text-foreground w-full shadow-xl border border-border';
37
-
38
- // Keep overflow-hidden for main container to maintain chat scrolling
39
- return `${baseClass} overflow-hidden ${isExpanded || isDocked ? 'rounded-none' : 'rounded-2xl'}`;
40
- }
package/src/lib/index.ts DELETED
@@ -1,7 +0,0 @@
1
- export { useApiClient } from './api-client';
2
- export type { ApiResponse } from './api-client';
3
- export { AssistantProvider, useAssistantConfig } from './assistant-config';
4
- export type { AssistantConfig, AssistantProviderProps, AssistantUser } from './assistant-config';
5
- export { getContainerClassName, getDialogClassName } from './class-utils';
6
- export { processMessagesData } from './message-utils';
7
- export type { ProcessedMessage } from './message-utils';
@@ -1,131 +0,0 @@
1
- /**
2
- * Message processing utilities for AI SDK format conversion
3
- */
4
-
5
- interface RawMessage {
6
- id?: string;
7
- body_json?: string | object;
8
- body_text?: string;
9
- body?: string;
10
- role?: 'user' | 'assistant';
11
- sender_name?: string;
12
- tool_calls?: ToolCall[];
13
- created_on: string | Date;
14
- }
15
-
16
- interface ToolCall {
17
- id: string;
18
- type?: string;
19
- function?: {
20
- name?: string;
21
- arguments?: string | object;
22
- };
23
- }
24
-
25
- interface MessagePart {
26
- type: string;
27
- text?: string;
28
- toolCallId?: string;
29
- toolName?: string;
30
- args?: object;
31
- }
32
-
33
- export interface ProcessedMessage {
34
- id: string;
35
- role: 'user' | 'assistant';
36
- content: string;
37
- parts: MessagePart[];
38
- }
39
-
40
- /**
41
- * Processes raw message data from the API into AI SDK message format
42
- * Handles various message formats including tool calls and parts structure
43
- */
44
- export function processMessagesData(rawData: RawMessage[]): ProcessedMessage[] {
45
- // Sort messages by created_on in ascending order
46
- const sortedData = [...rawData].sort((a, b) => {
47
- const dateA = new Date(a.created_on).getTime();
48
- const dateB = new Date(b.created_on).getTime();
49
-
50
- return dateA - dateB;
51
- });
52
-
53
- // Convert to AI SDK message format
54
- return sortedData
55
- .map((messageData: RawMessage, index: number) => {
56
- if (messageData.body_json || messageData.tool_calls) {
57
- let messageContent = messageData.body_json;
58
-
59
- // If body_json is a string, parse it
60
- if (typeof messageContent === 'string') {
61
- try {
62
- messageContent = JSON.parse(messageContent);
63
- } catch (parseError) {
64
- console.error('Error parsing message body_json:', parseError);
65
- messageContent = { type: 'text', text: messageContent };
66
- }
67
- }
68
-
69
- // Use role field directly from the API or infer from sender
70
- const role: 'user' | 'assistant' = messageData.role || (messageData.sender_name === 'Assistant' ? 'assistant' : 'user');
71
- const content = messageData.body_text || messageData.body || '';
72
- let parts: MessagePart[] = [];
73
-
74
- // Handle message with parts structure
75
- const contentObj = messageContent as { parts?: MessagePart[]; type?: string; toolCalls?: ToolCall[] };
76
-
77
- if (contentObj && contentObj.parts && Array.isArray(contentObj.parts)) {
78
- ({ parts } = contentObj);
79
- } else if (contentObj && contentObj.type === 'toolCalls' && contentObj.toolCalls) {
80
- // Handle tool calls format from your backend
81
- parts = [
82
- {
83
- type: 'text',
84
- text: content
85
- },
86
- ...contentObj.toolCalls.map((tc: ToolCall) => ({
87
- type: 'tool-call',
88
- toolCallId: tc.id,
89
- toolName: tc.function?.name || tc.type,
90
- args: tc.function?.arguments ? typeof tc.function.arguments === 'string' ? JSON.parse(tc.function.arguments) : tc.function.arguments : {}
91
- }))
92
- ];
93
- } else if (Array.isArray(messageContent)) {
94
- // Direct content array (fallback)
95
- parts = messageContent as MessagePart[];
96
- } else if (content) {
97
- // Simple text message
98
- parts = [{ type: 'text', text: content }];
99
- }
100
-
101
- // Also handle tool_calls array at message level (legacy format)
102
- if (messageData.tool_calls && Array.isArray(messageData.tool_calls)) {
103
- // Add tool calls to parts if not already present
104
- const toolCallParts = messageData.tool_calls.map((tc: ToolCall) => ({
105
- type: 'tool-call',
106
- toolCallId: tc.id,
107
- toolName: tc.function?.name || tc.type,
108
- args: tc.function?.arguments ? typeof tc.function.arguments === 'string' ? JSON.parse(tc.function.arguments) : tc.function.arguments : {}
109
- }));
110
-
111
- // If parts only has text, add tool calls
112
- if (parts.length === 1 && parts[0].type === 'text') {
113
- parts = [...parts, ...toolCallParts];
114
- } else if (parts.length === 0) {
115
- parts = [{ type: 'text', text: content }, ...toolCallParts];
116
- }
117
- }
118
-
119
- // UIMessage format for AI SDK v5
120
- return {
121
- id: messageData.id || `msg-${index}`,
122
- role,
123
- content, // Add content field for easy access
124
- parts
125
- };
126
- }
127
-
128
- return null;
129
- })
130
- .filter((msg): msg is ProcessedMessage => msg !== null);
131
- }
@@ -1,512 +0,0 @@
1
- [
2
- {
3
- "name": "getDataSourceList",
4
- "description": "Gets the list of available data sources",
5
- "userMessage": "Getting data source list...",
6
- "requestsUserInput": false,
7
- "parameters": {
8
- "$schema": "http://json-schema.org/draft-07/schema#",
9
- "type": "object",
10
- "additionalProperties": false,
11
- "properties": {}
12
- }
13
- },
14
- {
15
- "name": "getDataSourceMetadata",
16
- "description": "Gets the metadata and columns of a data source by ID",
17
- "userMessage": "Getting data source metadata...",
18
- "requestsUserInput": false,
19
- "parameters": {
20
- "$schema": "http://json-schema.org/draft-07/schema#",
21
- "type": "object",
22
- "required": ["data_source_id"],
23
- "additionalProperties": false,
24
- "properties": {
25
- "data_source_id": {
26
- "type": "string",
27
- "description": "The ID of the data source to get metadata for"
28
- }
29
- }
30
- }
31
- },
32
- {
33
- "name": "queryDatabase",
34
- "description": "Runs an SQL query in database and returns the result set",
35
- "userMessage": "Executing SQL query...",
36
- "requestsUserInput": false,
37
- "parameters": {
38
- "$schema": "http://json-schema.org/draft-07/schema#",
39
- "type": "object",
40
- "required": ["sql_query"],
41
- "additionalProperties": false,
42
- "properties": {
43
- "sql_query": {
44
- "type": "string",
45
- "description": "The SQL query to execute"
46
- }
47
- }
48
- }
49
- },
50
- {
51
- "name": "readDataFromDataSource",
52
- "description": "Reads data from a specific data source with filtering, sorting, and pagination options",
53
- "userMessage": "Reading data from data source...",
54
- "requestsUserInput": false,
55
- "parameters": {
56
- "$schema": "http://json-schema.org/draft-07/schema#",
57
- "type": "object",
58
- "required": ["dataSourceId"],
59
- "additionalProperties": false,
60
- "properties": {
61
- "dataSourceId": {
62
- "type": "string",
63
- "description": "The ID of the data source to read from"
64
- },
65
- "recordId": {
66
- "type": "string",
67
- "description": "Specific record ID to fetch"
68
- },
69
- "columns": {
70
- "type": "array",
71
- "items": {
72
- "type": "string"
73
- },
74
- "description": "Columns to select"
75
- },
76
- "filters": {
77
- "type": "object",
78
- "description": "Filter conditions for the query"
79
- },
80
- "filterKeyword": {
81
- "type": "string",
82
- "description": "Keyword to filter by"
83
- },
84
- "limit": {
85
- "type": "number",
86
- "description": "Maximum number of records to return"
87
- },
88
- "offset": {
89
- "type": "number",
90
- "description": "Number of records to skip"
91
- },
92
- "orderBy": {
93
- "type": "array",
94
- "items": {
95
- "type": "object",
96
- "properties": {
97
- "field": {
98
- "type": "string"
99
- },
100
- "direction": {
101
- "type": "string",
102
- "enum": ["asc", "desc"]
103
- }
104
- }
105
- },
106
- "description": "Sort criteria"
107
- },
108
- "fullCount": {
109
- "type": "boolean",
110
- "description": "Whether to return full count of records"
111
- }
112
- }
113
- }
114
- },
115
- {
116
- "name": "showDataTable",
117
- "description": "Shows data in a data table to the user",
118
- "userMessage": "Displaying data table...",
119
- "requestsUserInput": false,
120
- "parameters": {
121
- "$schema": "http://json-schema.org/draft-07/schema#",
122
- "type": "object",
123
- "required": ["title", "columns", "data"],
124
- "additionalProperties": false,
125
- "properties": {
126
- "title": {
127
- "type": "string",
128
- "description": "Title of the data table"
129
- },
130
- "description": {
131
- "type": "string",
132
- "description": "Description of the data table"
133
- },
134
- "columns": {
135
- "type": "array",
136
- "items": {
137
- "type": "string"
138
- },
139
- "description": "Columns of the data table"
140
- },
141
- "data": {
142
- "type": "string",
143
- "description": "JSON string of data array"
144
- },
145
- "additionalComments": {
146
- "type": "string",
147
- "description": "Additional comments to be shown to the user"
148
- }
149
- }
150
- }
151
- },
152
- {
153
- "name": "showCreateRecordForm",
154
- "description": "Opens a form to create a new record",
155
- "userMessage": "Opening create record form...",
156
- "requestsUserInput": true,
157
- "parameters": {
158
- "$schema": "http://json-schema.org/draft-07/schema#",
159
- "type": "object",
160
- "required": ["dataSourceId"],
161
- "additionalProperties": false,
162
- "properties": {
163
- "dataSourceId": {
164
- "type": "string",
165
- "description": "ID value of the database table to use as a data source"
166
- },
167
- "defaultValues": {
168
- "type": "string",
169
- "description": "JSON string of default values. Keys are slugs of data source columns"
170
- }
171
- }
172
- }
173
- },
174
- {
175
- "name": "showRecordDetailsForm",
176
- "description": "Opens a form to view a record",
177
- "userMessage": "Opening record details form...",
178
- "requestsUserInput": false,
179
- "parameters": {
180
- "$schema": "http://json-schema.org/draft-07/schema#",
181
- "type": "object",
182
- "required": ["dataSourceId", "recordId"],
183
- "additionalProperties": false,
184
- "properties": {
185
- "dataSourceId": {
186
- "type": "string",
187
- "description": "ID value of the database table to use as a data source"
188
- },
189
- "recordId": {
190
- "type": "string",
191
- "description": "ID value of the record to view"
192
- }
193
- }
194
- }
195
- },
196
- {
197
- "name": "showChart",
198
- "description": "Shows a chart to the user",
199
- "userMessage": "Displaying chart...",
200
- "requestsUserInput": false,
201
- "parameters": {
202
- "$schema": "http://json-schema.org/draft-07/schema#",
203
- "type": "object",
204
- "required": ["dataSourceId", "title", "chartType", "categoryColumns", "valueColumn", "aggregateFunction"],
205
- "additionalProperties": false,
206
- "properties": {
207
- "dataSourceId": {
208
- "type": "string",
209
- "description": "ID value of the database table to use as a data source"
210
- },
211
- "title": {
212
- "type": "string",
213
- "description": "Title of the chart"
214
- },
215
- "description": {
216
- "type": "string",
217
- "description": "Description of the chart"
218
- },
219
- "chartType": {
220
- "type": "string",
221
- "enum": ["bar", "pie", "line"],
222
- "description": "Type of the chart"
223
- },
224
- "categoryColumns": {
225
- "type": "array",
226
- "items": {
227
- "type": "string"
228
- },
229
- "description": "Columns to use as category in chart drawing"
230
- },
231
- "valueColumn": {
232
- "type": "string",
233
- "description": "Column name to use as value in chart drawing"
234
- },
235
- "aggregateFunction": {
236
- "type": "string",
237
- "enum": ["COUNT", "MIN", "MAX", "AVG", "SUM"],
238
- "description": "Name of the aggregate function"
239
- },
240
- "additionalComments": {
241
- "type": "string",
242
- "description": "Additional comments to be shown to the user"
243
- }
244
- }
245
- }
246
- },
247
- {
248
- "name": "showImage",
249
- "description": "Shows an image to the user",
250
- "userMessage": "Displaying image...",
251
- "requestsUserInput": false,
252
- "parameters": {
253
- "$schema": "http://json-schema.org/draft-07/schema#",
254
- "type": "object",
255
- "required": ["imageUrl"],
256
- "additionalProperties": false,
257
- "properties": {
258
- "imageUrl": {
259
- "type": "string",
260
- "description": "URL of the image to show"
261
- },
262
- "additionalComments": {
263
- "type": "string",
264
- "description": "Additional comments to be shown to the user"
265
- }
266
- }
267
- }
268
- },
269
- {
270
- "name": "drawChart",
271
- "description": "Generates JSON configuration of charting library to draw a chart",
272
- "userMessage": "Generating chart configuration...",
273
- "requestsUserInput": false,
274
- "parameters": {
275
- "$schema": "http://json-schema.org/draft-07/schema#",
276
- "type": "object",
277
- "required": ["chart_type", "category_columns", "value_column", "aggregate_function", "data_source_id"],
278
- "additionalProperties": false,
279
- "properties": {
280
- "chart_type": {
281
- "type": "string",
282
- "enum": ["bar", "pie", "line"],
283
- "description": "Type of chart to generate"
284
- },
285
- "category_columns": {
286
- "type": "array",
287
- "items": {
288
- "type": "string"
289
- },
290
- "description": "Columns to use as categories"
291
- },
292
- "value_column": {
293
- "type": "string",
294
- "description": "Column to use for values"
295
- },
296
- "aggregate_function": {
297
- "type": "string",
298
- "enum": ["COUNT", "MIN", "MAX", "AVG", "SUM"],
299
- "description": "Aggregation function to apply"
300
- },
301
- "data_source_id": {
302
- "type": "string",
303
- "description": "ID of the data source to use"
304
- }
305
- }
306
- }
307
- },
308
- {
309
- "name": "getWeatherInfo",
310
- "description": "Fetches the current weather information for a given city",
311
- "userMessage": "Getting weather information...",
312
- "requestsUserInput": false,
313
- "parameters": {
314
- "$schema": "http://json-schema.org/draft-07/schema#",
315
- "type": "object",
316
- "required": ["city"],
317
- "additionalProperties": false,
318
- "properties": {
319
- "city": {
320
- "type": "string",
321
- "description": "Name of the city to get weather information for"
322
- }
323
- }
324
- }
325
- },
326
- {
327
- "name": "readDocumentAtURL",
328
- "description": "Fetches a document from the given URL and extracts text content as markdown",
329
- "userMessage": "Reading document from URL...",
330
- "requestsUserInput": false,
331
- "parameters": {
332
- "$schema": "http://json-schema.org/draft-07/schema#",
333
- "type": "object",
334
- "required": ["url"],
335
- "additionalProperties": false,
336
- "properties": {
337
- "url": {
338
- "type": "string",
339
- "format": "uri",
340
- "description": "URL of the document to read"
341
- }
342
- }
343
- }
344
- },
345
- {
346
- "name": "readDOCX",
347
- "description": "Fetches a DOCX file from the given URL and extracts text content as markdown",
348
- "userMessage": "Reading DOCX file...",
349
- "requestsUserInput": false,
350
- "parameters": {
351
- "$schema": "http://json-schema.org/draft-07/schema#",
352
- "type": "object",
353
- "required": ["url"],
354
- "additionalProperties": false,
355
- "properties": {
356
- "url": {
357
- "type": "string",
358
- "format": "uri",
359
- "description": "URL of the DOCX file to read"
360
- }
361
- }
362
- }
363
- },
364
- {
365
- "name": "readPDF",
366
- "description": "Fetches a PDF file from the given URL and extracts text content, file info and metadata",
367
- "userMessage": "Reading PDF file...",
368
- "requestsUserInput": false,
369
- "parameters": {
370
- "$schema": "http://json-schema.org/draft-07/schema#",
371
- "type": "object",
372
- "required": ["url"],
373
- "additionalProperties": false,
374
- "properties": {
375
- "url": {
376
- "type": "string",
377
- "format": "uri",
378
- "description": "URL of the PDF file to read"
379
- }
380
- }
381
- }
382
- },
383
- {
384
- "name": "readWebPage",
385
- "description": "Fetches a web page from the given URL and extracts text content in markdown format along with metatags in YAML format",
386
- "userMessage": "Reading web page content...",
387
- "requestsUserInput": false,
388
- "parameters": {
389
- "$schema": "http://json-schema.org/draft-07/schema#",
390
- "type": "object",
391
- "required": ["url"],
392
- "additionalProperties": false,
393
- "properties": {
394
- "url": {
395
- "type": "string",
396
- "format": "uri",
397
- "description": "URL of the web page to read"
398
- }
399
- }
400
- }
401
- },
402
- {
403
- "name": "searchKnowledgeBase",
404
- "description": "Searches the knowledge base for relevant documents using vector search",
405
- "userMessage": "Searching knowledge base...",
406
- "requestsUserInput": false,
407
- "parameters": {
408
- "$schema": "http://json-schema.org/draft-07/schema#",
409
- "type": "object",
410
- "required": ["query"],
411
- "additionalProperties": false,
412
- "properties": {
413
- "query": {
414
- "type": "string",
415
- "description": "Search query to find relevant documents"
416
- }
417
- }
418
- }
419
- },
420
- {
421
- "name": "requestApproval",
422
- "description": "Ask the end user to approve/deny a specific action",
423
- "userMessage": "Requesting approval for: {{action}}",
424
- "requestsUserInput": true,
425
- "parameters": {
426
- "$schema": "http://json-schema.org/draft-07/schema#",
427
- "type": "object",
428
- "required": ["action"],
429
- "additionalProperties": false,
430
- "properties": {
431
- "action": {
432
- "type": "string",
433
- "description": "Short name of the action that needs approval"
434
- },
435
- "details": {
436
- "type": "string",
437
- "description": "Optional extra info shown to user"
438
- }
439
- }
440
- }
441
- },
442
- {
443
- "name": "searchWeb",
444
- "description": "Fetches data from duckduckgo search engine for a given query",
445
- "userMessage": "Searching the web...",
446
- "requestsUserInput": false,
447
- "parameters": {
448
- "$schema": "http://json-schema.org/draft-07/schema#",
449
- "type": "object",
450
- "required": ["query"],
451
- "additionalProperties": false,
452
- "properties": {
453
- "query": {
454
- "type": "string",
455
- "description": "Search query"
456
- },
457
- "region": {
458
- "type": "string",
459
- "description": "Region code for search results"
460
- }
461
- }
462
- }
463
- },
464
- {
465
- "name": "previewCode",
466
- "description": "Previews code to the user in a code viewer and runs the code in a sandboxed environment",
467
- "icon": "fal code",
468
- "userMessage": "Previewing code...",
469
- "requestsUserInput": false,
470
- "work": true,
471
- "parameters": {
472
- "$schema": "http://json-schema.org/draft-07/schema#",
473
- "type": "object",
474
- "required": ["title", "code"],
475
- "additionalProperties": false,
476
- "properties": {
477
- "title": {
478
- "type": "string",
479
- "description": "A title for the code snippet"
480
- },
481
- "code": {
482
- "type": "string",
483
- "description": "The code to preview and run"
484
- }
485
- }
486
- }
487
- },
488
- {
489
- "name": "generateImage",
490
- "description": "Generates an image based on the given prompt",
491
- "icon": "fal image",
492
- "userMessage": "Generating image...",
493
- "requestsUserInput": false,
494
- "work": true,
495
- "parameters": {
496
- "$schema": "http://json-schema.org/draft-07/schema#",
497
- "type": "object",
498
- "required": ["title", "src"],
499
- "additionalProperties": false,
500
- "properties": {
501
- "title": {
502
- "type": "string",
503
- "description": "A title for the image"
504
- },
505
- "src": {
506
- "type": "string",
507
- "description": "The image URL"
508
- }
509
- }
510
- }
511
- }
512
- ]