cognova 0.2.12 → 0.2.14

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 (398) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-mGU8_Hv.js +1 -0
  3. package/.output/public/_nuxt/0GqCtQ9S.js +1 -0
  4. package/.output/public/_nuxt/{CLfF6dSn.js → 1wCoXZ14.js} +1 -1
  5. package/.output/public/_nuxt/2J1KxdHv.js +1 -0
  6. package/.output/public/_nuxt/6VDUZECX.js +1 -0
  7. package/.output/public/_nuxt/{DEd2xVbS.js → 8WMJQbWG.js} +1 -1
  8. package/.output/public/_nuxt/9Rw88G6h.js +1 -0
  9. package/.output/public/_nuxt/{PP_4ebzl.js → B-yW4SD3.js} +1 -1
  10. package/.output/public/_nuxt/B20jNAhm.js +1 -0
  11. package/.output/public/_nuxt/B3OpTH_e.js +1 -0
  12. package/.output/public/_nuxt/B9Y3_B5G.js +1 -0
  13. package/.output/public/_nuxt/B9_vmatf.js +1 -0
  14. package/.output/public/_nuxt/B9o6sFST.js +1 -0
  15. package/.output/public/_nuxt/{D8M722pn.js → BAY3_Hrq.js} +1 -1
  16. package/.output/public/_nuxt/{0yk-pS3R.js → BD5rPkc2.js} +3 -3
  17. package/.output/public/_nuxt/BGYoW3kO.js +1 -0
  18. package/.output/public/_nuxt/BHUy5EAj.js +1 -0
  19. package/.output/public/_nuxt/BLdMRpJD.js +1 -0
  20. package/.output/public/_nuxt/{2dNDtTiv.js → BOCn_SGf.js} +12 -12
  21. package/.output/public/_nuxt/BQi8LIrn.js +1 -0
  22. package/.output/public/_nuxt/BS1t375R.js +1 -0
  23. package/.output/public/_nuxt/BTGeP1bA.js +1 -0
  24. package/.output/public/_nuxt/{4K03TkGA.js → BVYYP4eQ.js} +5 -5
  25. package/.output/public/_nuxt/BWQ7zE01.js +1 -0
  26. package/.output/public/_nuxt/BWqJInD3.js +1 -0
  27. package/.output/public/_nuxt/BXdQ9ASJ.js +1 -0
  28. package/.output/public/_nuxt/{BHtY0l0l.js → BXxZokD_.js} +2 -2
  29. package/.output/public/_nuxt/BZ7DAtPi.js +1 -0
  30. package/.output/public/_nuxt/BZm9w7en.js +1 -0
  31. package/.output/public/_nuxt/B_hNqC64.js +1 -0
  32. package/.output/public/_nuxt/Be47YE2L.js +1 -0
  33. package/.output/public/_nuxt/BgIS9_ti.js +39 -0
  34. package/.output/public/_nuxt/BgavRUl_.js +1 -0
  35. package/.output/public/_nuxt/Bh0yGTzr.js +1 -0
  36. package/.output/public/_nuxt/BhhMUror.js +1 -0
  37. package/.output/public/_nuxt/Bj5e7QPz.js +1 -0
  38. package/.output/public/_nuxt/{7oCGSglN.js → Bnn59-FS.js} +1 -1
  39. package/.output/public/_nuxt/BoCU3mWu.js +1 -0
  40. package/.output/public/_nuxt/Br6epbzY.js +1 -0
  41. package/.output/public/_nuxt/Br81Sr2R.js +1 -0
  42. package/.output/public/_nuxt/BrkEOLHu.js +9 -0
  43. package/.output/public/_nuxt/BtrNCc2S.js +1 -0
  44. package/.output/public/_nuxt/BxsQlbgl.js +1 -0
  45. package/.output/public/_nuxt/BzrhNhdT.js +1 -0
  46. package/.output/public/_nuxt/{CVqlefTY.js → C-78dDNd.js} +1 -1
  47. package/.output/public/_nuxt/C1oaoi1p.js +1 -0
  48. package/.output/public/_nuxt/C2-_hcwB.js +1 -0
  49. package/.output/public/_nuxt/{rfGRTJJW.js → C2Gh3qqr.js} +1 -1
  50. package/.output/public/_nuxt/C2OHaW6l.js +1 -0
  51. package/.output/public/_nuxt/C3szZmvA.js +1 -0
  52. package/.output/public/_nuxt/C3xzleKP.js +1 -0
  53. package/.output/public/_nuxt/C4sG6rdW.js +1 -0
  54. package/.output/public/_nuxt/C5Cu9Fx6.js +1 -0
  55. package/.output/public/_nuxt/{JX1oqJI9.js → C5gfF7J1.js} +1 -1
  56. package/.output/public/_nuxt/C6Eoiclo.js +1 -0
  57. package/.output/public/_nuxt/C7hFztZL.js +1 -0
  58. package/.output/public/_nuxt/CAVUAxNU.js +2 -0
  59. package/.output/public/_nuxt/{t8aDAkZ5.js → CCeM5lW2.js} +1 -1
  60. package/.output/public/_nuxt/CDcQ31Eh.js +1 -0
  61. package/.output/public/_nuxt/CHbHVtCy.js +1 -0
  62. package/.output/public/_nuxt/CHnVFnBW.js +1 -0
  63. package/.output/public/_nuxt/CLNcmNQS.js +1 -0
  64. package/.output/public/_nuxt/{EgKnQnf-.js → CPwCTHun.js} +1 -1
  65. package/.output/public/_nuxt/{ixlNW2So.js → CS8SdmH2.js} +1 -1
  66. package/.output/public/_nuxt/CTGm_mc8.js +1 -0
  67. package/.output/public/_nuxt/{CPutXj8l.js → CTQFGHjS.js} +1 -1
  68. package/.output/public/_nuxt/{BS2ZNXI1.js → CVVtVzXC.js} +1 -1
  69. package/.output/public/_nuxt/CZNOaqeX.js +1 -0
  70. package/.output/public/_nuxt/C_A_NkeC.js +2 -0
  71. package/.output/public/_nuxt/{gTrVszwd.js → C_doutX-.js} +1 -1
  72. package/.output/public/_nuxt/{CY-QVcA5.js → CbDLhrNA.js} +2 -2
  73. package/.output/public/_nuxt/CePKCqSb.js +1 -0
  74. package/.output/public/_nuxt/Cet4T_yO.js +1 -0
  75. package/.output/public/_nuxt/{fbyIeNkc.js → CjJPkhbc.js} +1 -1
  76. package/.output/public/_nuxt/CkZT4LGq.js +1 -0
  77. package/.output/public/_nuxt/CkrW8sGL.js +1 -0
  78. package/.output/public/_nuxt/Co0UxVsx.js +1 -0
  79. package/.output/public/_nuxt/CqS0zXYQ.js +1 -0
  80. package/.output/public/_nuxt/CskGv_Km.js +1 -0
  81. package/.output/public/_nuxt/{Bk6JUtIo.js → CuvkTsqs.js} +1 -1
  82. package/.output/public/_nuxt/{Db4KMnt8.js → CxMuZEwX.js} +1 -1
  83. package/.output/public/_nuxt/{vIOxcXKR.js → CxSijT71.js} +8 -8
  84. package/.output/public/_nuxt/Cywo6tZI.js +1 -0
  85. package/.output/public/_nuxt/D1reIfpX.js +1 -0
  86. package/.output/public/_nuxt/D1uV2uir.js +1 -0
  87. package/.output/public/_nuxt/{CuxrHsu-.js → D2edadpd.js} +1 -1
  88. package/.output/public/_nuxt/D3cEeQh7.js +1 -0
  89. package/.output/public/_nuxt/D41A2mE2.js +1 -0
  90. package/.output/public/_nuxt/D49P2RhG.js +1 -0
  91. package/.output/public/_nuxt/D867g6Ds.js +1 -0
  92. package/.output/public/_nuxt/DEFWIjWl.js +1 -0
  93. package/.output/public/_nuxt/DFTEBTzZ.js +1 -0
  94. package/.output/public/_nuxt/{DwY7rCd_.js → DHRexj9X.js} +2 -2
  95. package/.output/public/_nuxt/DL4EpgqQ.js +1 -0
  96. package/.output/public/_nuxt/DLHnP6tw.js +1 -0
  97. package/.output/public/_nuxt/DM20WaLq.js +1 -0
  98. package/.output/public/_nuxt/{BYHCP8x7.js → DNAMjHbb.js} +1 -1
  99. package/.output/public/_nuxt/{C6qKcgOY.js → DP8t9VWs.js} +26 -26
  100. package/.output/public/_nuxt/DTR31rjp.js +1 -0
  101. package/.output/public/_nuxt/{CZoEPC_Q.js → DTlSLSo1.js} +3 -3
  102. package/.output/public/_nuxt/{DtjjnHnt.js → DVdnhfXT.js} +1 -1
  103. package/.output/public/_nuxt/DZikIgHK.js +1 -0
  104. package/.output/public/_nuxt/D_YGqvw_.js +1 -0
  105. package/.output/public/_nuxt/D_k1YwXm.js +1 -0
  106. package/.output/public/_nuxt/Daf2MbWG.js +7 -0
  107. package/.output/public/_nuxt/DcJ0GstJ.js +1 -0
  108. package/.output/public/_nuxt/DcYKh6QA.js +1 -0
  109. package/.output/public/_nuxt/DhN3_DYH.js +1 -0
  110. package/.output/public/_nuxt/DhSvBSt3.js +1 -0
  111. package/.output/public/_nuxt/DhlIWT8K.js +1 -0
  112. package/.output/public/_nuxt/DjsqyRqt.js +1 -0
  113. package/.output/public/_nuxt/DpSM97eH.js +1 -0
  114. package/.output/public/_nuxt/DqR9SdeU.js +1 -0
  115. package/.output/public/_nuxt/DqmQtg6Y.js +1 -0
  116. package/.output/public/_nuxt/Dsuag_iW.js +1 -0
  117. package/.output/public/_nuxt/Dtr_0IbE.js +1 -0
  118. package/.output/public/_nuxt/DwrmFEZN.js +1 -0
  119. package/.output/public/_nuxt/DxE8r3r4.js +1 -0
  120. package/.output/public/_nuxt/G_CsVlOR.js +1 -0
  121. package/.output/public/_nuxt/Gyw_2f6x.js +1 -0
  122. package/.output/public/_nuxt/HStC1ZyE.js +1 -0
  123. package/.output/public/_nuxt/Hh9mv0Ek.js +1 -0
  124. package/.output/public/_nuxt/LR0kCjbe.js +1 -0
  125. package/.output/public/_nuxt/MYeLvJGV.js +1 -0
  126. package/.output/public/_nuxt/NKs0EGrh.js +1 -0
  127. package/.output/public/_nuxt/PY5EGujn.js +1 -0
  128. package/.output/public/_nuxt/PamJNol9.js +1 -0
  129. package/.output/public/_nuxt/RlvwEbHv.js +1 -0
  130. package/.output/public/_nuxt/{BKXg-alD.js → TNpdJOlc.js} +1 -1
  131. package/.output/public/_nuxt/TSYrPbLR.js +1 -0
  132. package/.output/public/_nuxt/U-eBrbR4.js +1 -0
  133. package/.output/public/_nuxt/UuqXScSw.js +1 -0
  134. package/.output/public/_nuxt/V04-MrLN.js +1 -0
  135. package/.output/public/_nuxt/X0o5GcBb.js +1 -0
  136. package/.output/public/_nuxt/XQNzmQy9.js +1 -0
  137. package/.output/public/_nuxt/Y59XKprr.js +1 -0
  138. package/.output/public/_nuxt/YZQjZgsH.js +1 -0
  139. package/.output/public/_nuxt/_-TGPiLQ.js +1 -0
  140. package/.output/public/_nuxt/builds/latest.json +1 -1
  141. package/.output/public/_nuxt/builds/meta/d7188f50-b42c-4d2c-afab-066d318f0af8.json +1 -0
  142. package/.output/public/_nuxt/dashboard.ByJQ-Wzh.css +1 -0
  143. package/.output/public/_nuxt/entry.ZJxWCrU6.css +1 -0
  144. package/.output/public/_nuxt/{DhI5cA_n.js → hCeWb_38.js} +1 -1
  145. package/.output/public/_nuxt/{CQqCBrXj.js → hrPTRWjM.js} +1 -1
  146. package/.output/public/_nuxt/jC4pIK1p.js +1 -0
  147. package/.output/public/_nuxt/jTT1R-Vz.js +1 -0
  148. package/.output/public/_nuxt/{BLnYhy_t.js → kkAMoB43.js} +1 -1
  149. package/.output/public/_nuxt/{DzGy77Vr.js → mzM4BGtv.js} +1 -1
  150. package/.output/public/_nuxt/o-s8JBm2.js +1 -0
  151. package/.output/public/_nuxt/pwJTkIQ4.js +1 -0
  152. package/.output/public/_nuxt/{BDyn4ApB.js → rIgg2Arf.js} +3 -3
  153. package/.output/public/_nuxt/subdxgSQ.js +1 -0
  154. package/.output/public/_nuxt/t8B72leH.js +1 -0
  155. package/.output/public/_nuxt/vCFAHwdt.js +1 -0
  156. package/.output/public/_nuxt/z-MP0bB7.js +1 -0
  157. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
  158. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
  159. package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs → EditorToolbar-B9OwSI5e.mjs} +3 -3
  160. package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs.map → EditorToolbar-B9OwSI5e.mjs.map} +1 -1
  161. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
  162. package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
  163. package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
  164. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
  165. package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
  166. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
  167. package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +1 -1
  168. package/.output/server/chunks/build/{_id_-DN00UDdO.mjs → _id_-CwBeklIM.mjs} +296 -430
  169. package/.output/server/chunks/build/_id_-CwBeklIM.mjs.map +1 -0
  170. package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs → _name_-D7MtW4Vu.mjs} +2 -2
  171. package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs.map → _name_-D7MtW4Vu.mjs.map} +1 -1
  172. package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs → _uuid_-lvG92ein.mjs} +4 -4
  173. package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs.map → _uuid_-lvG92ein.mjs.map} +1 -1
  174. package/.output/server/chunks/build/account-LDZ4TL6x.mjs +513 -0
  175. package/.output/server/chunks/build/account-LDZ4TL6x.mjs.map +1 -0
  176. package/.output/server/chunks/build/app-CGhRZPNT.mjs +252 -0
  177. package/.output/server/chunks/build/app-CGhRZPNT.mjs.map +1 -0
  178. package/.output/server/chunks/build/{chat-CR3JIVEq.mjs → chat-BphuYhvA.mjs} +532 -39
  179. package/.output/server/chunks/build/chat-BphuYhvA.mjs.map +1 -0
  180. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  181. package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
  182. package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs → dashboard-nDujDyOg.mjs} +55 -16
  183. package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs.map → dashboard-nDujDyOg.mjs.map} +1 -1
  184. package/.output/server/chunks/build/{docs-ChGwOPg5.mjs → docs-Bwucwp0r.mjs} +664 -592
  185. package/.output/server/chunks/build/docs-Bwucwp0r.mjs.map +1 -0
  186. package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
  187. package/.output/server/chunks/build/{hooks-D328DcO6.mjs → hooks-D6PmTth8.mjs} +19 -29
  188. package/.output/server/chunks/build/hooks-D6PmTth8.mjs.map +1 -0
  189. package/.output/server/chunks/build/{index-CAnGTRlu.mjs → index-CJkn2jiM.mjs} +2 -2
  190. package/.output/server/chunks/build/{index-CAnGTRlu.mjs.map → index-CJkn2jiM.mjs.map} +1 -1
  191. package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
  192. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs +723 -0
  193. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs.map +1 -0
  194. package/.output/server/chunks/build/index-hwhuKhuZ.mjs +76 -0
  195. package/.output/server/chunks/build/index-hwhuKhuZ.mjs.map +1 -0
  196. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs +1499 -0
  197. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs.map +1 -0
  198. package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs → library-DxRdgP6X.mjs} +2 -2
  199. package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs.map → library-DxRdgP6X.mjs.map} +1 -1
  200. package/.output/server/chunks/build/{login-DnnElTl2.mjs → login-BmER_VoU.mjs} +2 -2
  201. package/.output/server/chunks/build/{login-DnnElTl2.mjs.map → login-BmER_VoU.mjs.map} +1 -1
  202. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs +669 -0
  203. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs.map +1 -0
  204. package/.output/server/chunks/build/server.mjs +65 -34
  205. package/.output/server/chunks/build/server.mjs.map +1 -1
  206. package/.output/server/chunks/build/settings-neokAVE5.mjs +154 -0
  207. package/.output/server/chunks/build/settings-neokAVE5.mjs.map +1 -0
  208. package/.output/server/chunks/build/styles.mjs +2 -2
  209. package/.output/server/chunks/build/{tasks-DnAFqbtt.mjs → tasks-CnpIQNpS.mjs} +27 -37
  210. package/.output/server/chunks/build/tasks-CnpIQNpS.mjs.map +1 -0
  211. package/.output/server/chunks/build/{useAgents-DHEXiFSc.mjs → useAgents-nmbkB9-_.mjs} +5 -26
  212. package/.output/server/chunks/build/useAgents-nmbkB9-_.mjs.map +1 -0
  213. package/.output/server/chunks/build/{view-n2sYa4Zh.mjs → view-mb0ISqfM.mjs} +3 -3
  214. package/.output/server/chunks/build/{view-n2sYa4Zh.mjs.map → view-mb0ISqfM.mjs.map} +1 -1
  215. package/.output/server/chunks/nitro/nitro.mjs +1021 -867
  216. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  217. package/.output/server/chunks/routes/_ws/chat.mjs +39 -5
  218. package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
  219. package/.output/server/chunks/routes/api/index.get.mjs +17 -2
  220. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  221. package/.output/server/chunks/routes/api/index.get3.mjs +21 -3
  222. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
  223. package/.output/server/chunks/routes/api/index.get4.mjs +10 -9
  224. package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
  225. package/.output/server/chunks/routes/api/index.get9.mjs +10 -8
  226. package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -1
  227. package/.output/server/chunks/routes/api/memory/search.get.mjs +10 -5
  228. package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
  229. package/.output/server/chunks/routes/renderer.mjs +1 -1
  230. package/.output/server/index.mjs +1 -1
  231. package/.output/server/package.json +1 -1
  232. package/Claude/skills/_lib/api.py +3 -2
  233. package/app/components/AssistantPanel.client.vue +16 -314
  234. package/app/components/agents/AgentCard.vue +111 -0
  235. package/app/components/agents/AgentInfoCard.vue +54 -0
  236. package/app/components/agents/AgentRunHistory.vue +103 -0
  237. package/app/components/agents/AgentRunModal.vue +1 -24
  238. package/app/components/agents/AgentStatsCards.vue +1 -26
  239. package/app/components/assistant/AssistantChat.vue +156 -0
  240. package/app/components/assistant/AssistantTerminal.client.vue +178 -0
  241. package/app/components/chat/ChatInput.vue +133 -5
  242. package/app/components/chat/ConversationList.vue +2 -12
  243. package/app/components/chat/MessageBubble.vue +188 -6
  244. package/app/components/files/FileTree.vue +23 -202
  245. package/app/components/files/FileTreeModals.vue +226 -0
  246. package/app/components/hooks/HookStatsCards.vue +1 -6
  247. package/app/components/hooks/ToolBreakdownTable.vue +1 -6
  248. package/app/components/search/DashboardSearch.vue +38 -1
  249. package/app/components/tasks/TaskCard.vue +2 -7
  250. package/app/components/tasks/TaskDetail.vue +4 -9
  251. package/app/composables/useAttachments.ts +196 -0
  252. package/app/composables/useChat.ts +14 -2
  253. package/app/composables/useSearch.ts +21 -11
  254. package/app/layouts/dashboard.vue +1 -1
  255. package/app/pages/agents/[id].vue +6 -197
  256. package/app/pages/agents/index.vue +9 -142
  257. package/app/pages/chat.vue +4 -2
  258. package/app/pages/settings/account.vue +243 -0
  259. package/app/pages/settings/app.vue +230 -0
  260. package/app/pages/settings/index.vue +12 -0
  261. package/app/pages/settings/integrations.vue +794 -0
  262. package/app/pages/settings/manage-secrets.vue +295 -0
  263. package/app/pages/settings.vue +20 -1581
  264. package/dist/cli/index.js +26 -2
  265. package/package.json +1 -1
  266. package/server/api/agents/index.get.ts +20 -1
  267. package/server/api/conversations/index.get.ts +23 -5
  268. package/server/api/documents/index.get.ts +11 -9
  269. package/server/api/memory/search.get.ts +11 -6
  270. package/server/api/tasks/index.get.ts +11 -9
  271. package/server/bridge/adapters/imessage.ts +9 -2
  272. package/server/drizzle/migrations/0016_full_text_search.sql +127 -0
  273. package/server/drizzle/migrations/meta/_journal.json +7 -0
  274. package/server/routes/_ws/chat.ts +61 -7
  275. package/server/utils/chat-session-manager.ts +20 -2
  276. package/shared/types/index.ts +34 -2
  277. package/shared/utils/formatting.ts +105 -0
  278. package/.output/public/_nuxt/0NJ3PaRM.js +0 -1
  279. package/.output/public/_nuxt/10_wwHSz.js +0 -1
  280. package/.output/public/_nuxt/1zUTf4AP.js +0 -1
  281. package/.output/public/_nuxt/2nOqGUPr.js +0 -1
  282. package/.output/public/_nuxt/3jQMk_5H.js +0 -1
  283. package/.output/public/_nuxt/6boMs_nF.js +0 -1
  284. package/.output/public/_nuxt/8q5NepGW.js +0 -9
  285. package/.output/public/_nuxt/B93pdGAW.js +0 -1
  286. package/.output/public/_nuxt/BA_pRWwX.js +0 -1
  287. package/.output/public/_nuxt/BGgwYWjH.js +0 -1
  288. package/.output/public/_nuxt/BH0QDWEm.js +0 -1
  289. package/.output/public/_nuxt/BIXrSYwR.js +0 -1
  290. package/.output/public/_nuxt/BK8S2ony.js +0 -1
  291. package/.output/public/_nuxt/BR8bKz8h.js +0 -1
  292. package/.output/public/_nuxt/BUghTae1.js +0 -1
  293. package/.output/public/_nuxt/BXuWCWsJ.js +0 -1
  294. package/.output/public/_nuxt/BZrSPX0S.js +0 -1
  295. package/.output/public/_nuxt/B_wilgcd.js +0 -1
  296. package/.output/public/_nuxt/BaZwjF8o.js +0 -1
  297. package/.output/public/_nuxt/Bciqk4dX.js +0 -1
  298. package/.output/public/_nuxt/Beom-INj.js +0 -1
  299. package/.output/public/_nuxt/BfcLZ_fC.js +0 -1
  300. package/.output/public/_nuxt/BkfI94R8.js +0 -1
  301. package/.output/public/_nuxt/BmOtR1wX.js +0 -1
  302. package/.output/public/_nuxt/BmVLxnDU.js +0 -1
  303. package/.output/public/_nuxt/BtHQ1T0f.js +0 -1
  304. package/.output/public/_nuxt/ByYh0uRg.js +0 -1
  305. package/.output/public/_nuxt/C27WoGNZ.js +0 -1
  306. package/.output/public/_nuxt/C2FxZbO_.js +0 -1
  307. package/.output/public/_nuxt/C2vq6Te8.js +0 -1
  308. package/.output/public/_nuxt/C39dQ88F.js +0 -1
  309. package/.output/public/_nuxt/C3NST0BU.js +0 -1
  310. package/.output/public/_nuxt/C4mwL7SE.js +0 -7
  311. package/.output/public/_nuxt/C5R5QaCA.js +0 -1
  312. package/.output/public/_nuxt/C71_a1IX.js +0 -1
  313. package/.output/public/_nuxt/C9WIgRRL.js +0 -1
  314. package/.output/public/_nuxt/CBTkrk2M.js +0 -1
  315. package/.output/public/_nuxt/CEnSeCqn.js +0 -1
  316. package/.output/public/_nuxt/CKxSHyww.js +0 -1
  317. package/.output/public/_nuxt/CSKJ-Ahh.js +0 -1
  318. package/.output/public/_nuxt/CTCcEJU3.js +0 -1
  319. package/.output/public/_nuxt/CVFwOzbl.js +0 -1
  320. package/.output/public/_nuxt/CVdCqaby.js +0 -1
  321. package/.output/public/_nuxt/CWyMCJQH.js +0 -1
  322. package/.output/public/_nuxt/CY-cjAwJ.js +0 -1
  323. package/.output/public/_nuxt/CYPO5o_C.js +0 -1
  324. package/.output/public/_nuxt/CZRnNmU8.js +0 -1
  325. package/.output/public/_nuxt/CZVzFlpI.js +0 -1
  326. package/.output/public/_nuxt/Cc-2ziaZ.js +0 -1
  327. package/.output/public/_nuxt/ChcO9s3o.js +0 -1
  328. package/.output/public/_nuxt/Cl-LOSDV.js +0 -1
  329. package/.output/public/_nuxt/CobqYwkp.js +0 -1
  330. package/.output/public/_nuxt/CqNwHCpo.js +0 -1
  331. package/.output/public/_nuxt/CwPdIZ9J.js +0 -1
  332. package/.output/public/_nuxt/D0ifH682.js +0 -1
  333. package/.output/public/_nuxt/D3AZaldL.js +0 -1
  334. package/.output/public/_nuxt/D4UJwDQJ.js +0 -1
  335. package/.output/public/_nuxt/D5jZq8b3.js +0 -1
  336. package/.output/public/_nuxt/D5q8SnqE.js +0 -1
  337. package/.output/public/_nuxt/D8lwrAYS.js +0 -1
  338. package/.output/public/_nuxt/D9nmzBAw.js +0 -1
  339. package/.output/public/_nuxt/DC4idAGt.js +0 -1
  340. package/.output/public/_nuxt/DH4YkDAi.js +0 -1
  341. package/.output/public/_nuxt/DJTCT0bl.js +0 -1
  342. package/.output/public/_nuxt/DNP5E1bC.js +0 -39
  343. package/.output/public/_nuxt/DO9SFIh1.js +0 -1
  344. package/.output/public/_nuxt/DPklr_tJ.js +0 -2
  345. package/.output/public/_nuxt/DQM4eBdt.js +0 -1
  346. package/.output/public/_nuxt/DQh6I9z9.js +0 -1
  347. package/.output/public/_nuxt/DS2wStH1.js +0 -1
  348. package/.output/public/_nuxt/DTAStixR.js +0 -1
  349. package/.output/public/_nuxt/DTGenhcA.js +0 -1
  350. package/.output/public/_nuxt/DUAAXJ6Q.js +0 -1
  351. package/.output/public/_nuxt/DUVzIl3o.js +0 -1
  352. package/.output/public/_nuxt/DXdwpJ-I.js +0 -16
  353. package/.output/public/_nuxt/DY3uK7wM.js +0 -1
  354. package/.output/public/_nuxt/DYbZBZet.js +0 -1
  355. package/.output/public/_nuxt/D_4LPm1U.js +0 -1
  356. package/.output/public/_nuxt/DcJbYLTp.js +0 -1
  357. package/.output/public/_nuxt/DfF81NlA.js +0 -1
  358. package/.output/public/_nuxt/DhuOKJda.js +0 -1
  359. package/.output/public/_nuxt/Di-Nc75e.js +0 -1
  360. package/.output/public/_nuxt/Djs0Tlpa.js +0 -1
  361. package/.output/public/_nuxt/DmmdPt_5.js +0 -1
  362. package/.output/public/_nuxt/Dn5a-guE.js +0 -1
  363. package/.output/public/_nuxt/DuvzM-P1.js +0 -1
  364. package/.output/public/_nuxt/Dya5oK8u.js +0 -1
  365. package/.output/public/_nuxt/DzA58_Lm.js +0 -1
  366. package/.output/public/_nuxt/E3rXPwU8.js +0 -1
  367. package/.output/public/_nuxt/GtEM7xVU.js +0 -1
  368. package/.output/public/_nuxt/H6JbrRBU.js +0 -1
  369. package/.output/public/_nuxt/ILEvizzp.js +0 -1
  370. package/.output/public/_nuxt/JbHa4oXq.js +0 -1
  371. package/.output/public/_nuxt/Kw0zy3FG.js +0 -1
  372. package/.output/public/_nuxt/N5XtbYVD.js +0 -1
  373. package/.output/public/_nuxt/SrncdpaW.js +0 -1
  374. package/.output/public/_nuxt/U1MWjQMi.js +0 -1
  375. package/.output/public/_nuxt/Um1vPiAz.js +0 -1
  376. package/.output/public/_nuxt/XCjS70z4.js +0 -1
  377. package/.output/public/_nuxt/YX8avsvq.js +0 -2
  378. package/.output/public/_nuxt/_cy8R3nk.js +0 -1
  379. package/.output/public/_nuxt/apYB9dr5.js +0 -1
  380. package/.output/public/_nuxt/builds/meta/a892969f-e07d-4f44-8d7e-57a4b7f33d94.json +0 -1
  381. package/.output/public/_nuxt/dashboard.BxCOkJwt.css +0 -1
  382. package/.output/public/_nuxt/entry.NKPfH2kE.css +0 -1
  383. package/.output/public/_nuxt/g5MjDvm5.js +0 -1
  384. package/.output/public/_nuxt/nnQqD5pb.js +0 -1
  385. package/.output/public/_nuxt/vScW1Zgm.js +0 -1
  386. package/.output/public/_nuxt/wO6z2ugJ.js +0 -1
  387. package/.output/public/_nuxt/x6FRJ5ac.js +0 -1
  388. package/.output/public/_nuxt/zq-a1TeT.js +0 -1
  389. package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +0 -1
  390. package/.output/server/chunks/build/chat-CR3JIVEq.mjs.map +0 -1
  391. package/.output/server/chunks/build/docs-ChGwOPg5.mjs.map +0 -1
  392. package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +0 -1
  393. package/.output/server/chunks/build/index-C9PuieXh.mjs +0 -820
  394. package/.output/server/chunks/build/index-C9PuieXh.mjs.map +0 -1
  395. package/.output/server/chunks/build/settings-B2KXoGcz.mjs +0 -3232
  396. package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +0 -1
  397. package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +0 -1
  398. package/.output/server/chunks/build/useAgents-DHEXiFSc.mjs.map +0 -1
@@ -1,13 +1,28 @@
1
1
  import { _ as _sfc_main$1$1, a as _sfc_main$6 } from './DashboardNavbar-Cpq8yKA0.mjs';
2
- import { Q as useRoute, A as useRouter, g as _sfc_main$d, _ as _sfc_main$8 } from './server.mjs';
3
- import { defineComponent, ref, watch, nextTick, computed, mergeProps, withCtx, unref, createVNode, createBlock, createCommentVNode, openBlock, Fragment, renderList, createTextVNode, readonly, useSSRContext } from 'vue';
4
- import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderClass, ssrInterpolate, ssrIncludeBooleanAttr } from 'vue/server-renderer';
2
+ import { z as useRoute, Q as useRouter, g as _sfc_main$d, _ as _sfc_main$8, T as __nuxt_component_12, i as useToast } from './server.mjs';
3
+ import { defineComponent, ref, watch, nextTick, computed, mergeProps, withCtx, unref, createVNode, createBlock, createCommentVNode, openBlock, Fragment, renderList, createTextVNode, readonly, isRef, toDisplayString, useSSRContext } from 'vue';
4
+ import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderClass, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr } from 'vue/server-renderer';
5
+ import { ag as formatRelativeTime } from '../nitro/nitro.mjs';
5
6
  import { _ as _sfc_main$7 } from './Badge-C1RKkIgG.mjs';
6
7
  import { _ as _sfc_main$9 } from './MDC-Dx0YPDhe.mjs';
8
+ import { _ as _sfc_main$a } from './Modal-Z_SoWhh-.mjs';
7
9
  import './DashboardSidebarToggle-Chnqv04k.mjs';
8
10
  import '@vueuse/core';
9
11
  import './cookie-C_iulBi6.mjs';
10
- import '../nitro/nitro.mjs';
12
+ import './ssr-Bqnw2a-w.mjs';
13
+ import 'reka-ui';
14
+ import 'vue-router';
15
+ import 'tailwindcss/colors';
16
+ import '@iconify/vue';
17
+ import 'tailwind-variants';
18
+ import '@iconify/utils/lib/css/icon';
19
+ import 'perfect-debounce';
20
+ import '../routes/renderer.mjs';
21
+ import 'vue-bundle-renderer/runtime';
22
+ import 'unhead/server';
23
+ import 'devalue';
24
+ import 'unhead/plugins';
25
+ import 'unhead/utils';
11
26
  import '@anthropic-ai/claude-agent-sdk';
12
27
  import 'module';
13
28
  import 'path';
@@ -46,20 +61,6 @@ import 'util';
46
61
  import 'node:url';
47
62
  import '@iconify/utils';
48
63
  import 'consola';
49
- import './ssr-Bqnw2a-w.mjs';
50
- import 'reka-ui';
51
- import 'vue-router';
52
- import 'tailwindcss/colors';
53
- import '@iconify/vue';
54
- import 'tailwind-variants';
55
- import '@iconify/utils/lib/css/icon';
56
- import 'perfect-debounce';
57
- import '../routes/renderer.mjs';
58
- import 'vue-bundle-renderer/runtime';
59
- import 'unhead/server';
60
- import 'devalue';
61
- import 'unhead/plugins';
62
- import 'unhead/utils';
63
64
  import 'property-information';
64
65
  import './node-D32ZN4X1.mjs';
65
66
 
@@ -73,15 +74,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
73
74
  emits: ["select", "delete", "new"],
74
75
  setup(__props, { emit: __emit }) {
75
76
  const emit = __emit;
76
- function formatDate(date) {
77
- const d = new Date(date);
78
- const now = /* @__PURE__ */ new Date();
79
- const diff = now.getTime() - d.getTime();
80
- if (diff < 6e4) return "just now";
81
- if (diff < 36e5) return `${Math.floor(diff / 6e4)}m ago`;
82
- if (diff < 864e5) return `${Math.floor(diff / 36e5)}h ago`;
83
- return d.toLocaleDateString();
84
- }
85
77
  return (_ctx, _push, _parent, _attrs) => {
86
78
  const _component_UButton = _sfc_main$8;
87
79
  const _component_UIcon = _sfc_main$d;
@@ -124,7 +116,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
124
116
  } else {
125
117
  _push(`<!---->`);
126
118
  }
127
- _push(`</div><div class="flex items-center gap-2 mt-1 text-xs text-dimmed"><span>${ssrInterpolate(formatDate(conv.startedAt))}</span>`);
119
+ _push(`</div><div class="flex items-center gap-2 mt-1 text-xs text-dimmed"><span>${ssrInterpolate(unref(formatRelativeTime)(conv.startedAt))}</span>`);
128
120
  if (conv.messageCount) {
129
121
  _push(`<span>${ssrInterpolate(conv.messageCount)} msgs</span>`);
130
122
  } else {
@@ -260,6 +252,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
260
252
  function getTextContent(blocks) {
261
253
  return blocks.filter((b) => b.type === "text").map((b) => b.text).join("\n");
262
254
  }
255
+ function getImageBlocks(blocks) {
256
+ return blocks.filter((b) => b.type === "image");
257
+ }
258
+ function getDocumentBlocks(blocks) {
259
+ return blocks.filter((b) => b.type === "document");
260
+ }
263
261
  function getToolPairs(blocks) {
264
262
  const tools = [];
265
263
  for (const block of blocks) {
@@ -275,6 +273,78 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
275
273
  }
276
274
  return tools;
277
275
  }
276
+ function getDocIcon(doc) {
277
+ if (doc.source.media_type === "application/pdf") return "i-lucide-file-text";
278
+ return "i-lucide-file-code";
279
+ }
280
+ const previewImage = ref(null);
281
+ const previewOpen = computed({
282
+ get: () => previewImage.value !== null,
283
+ set: (v) => {
284
+ if (!v) previewImage.value = null;
285
+ }
286
+ });
287
+ const previewDoc = ref(null);
288
+ const codePreviewOpen = computed({
289
+ get: () => previewDoc.value !== null,
290
+ set: (v) => {
291
+ if (!v) previewDoc.value = null;
292
+ }
293
+ });
294
+ const codePreviewContent = computed(() => previewDoc.value?.source.data || "");
295
+ const extToLang = {
296
+ md: "markdown",
297
+ js: "javascript",
298
+ mjs: "javascript",
299
+ cjs: "javascript",
300
+ jsx: "javascript",
301
+ ts: "typescript",
302
+ tsx: "typescript",
303
+ mts: "typescript",
304
+ json: "json",
305
+ html: "html",
306
+ htm: "html",
307
+ css: "css",
308
+ scss: "css",
309
+ sass: "css",
310
+ less: "css",
311
+ vue: "vue",
312
+ svelte: "html",
313
+ py: "python",
314
+ sql: "sql",
315
+ yaml: "yaml",
316
+ yml: "yaml",
317
+ sh: "bash",
318
+ bash: "bash",
319
+ zsh: "bash",
320
+ fish: "bash",
321
+ go: "go",
322
+ rs: "rust",
323
+ dockerfile: "dockerfile",
324
+ java: "java",
325
+ kt: "java",
326
+ c: "cpp",
327
+ cpp: "cpp",
328
+ h: "cpp",
329
+ hpp: "cpp",
330
+ cs: "cpp",
331
+ xml: "xml",
332
+ graphql: "plaintext",
333
+ gql: "plaintext",
334
+ toml: "plaintext",
335
+ ini: "plaintext",
336
+ csv: "plaintext",
337
+ txt: "plaintext",
338
+ log: "plaintext",
339
+ env: "plaintext",
340
+ prisma: "plaintext",
341
+ proto: "plaintext"
342
+ };
343
+ const codePreviewLang = computed(() => {
344
+ if (!previewDoc.value?.title) return "plaintext";
345
+ const ext = previewDoc.value.title.split(".").pop()?.toLowerCase() || "";
346
+ return extToLang[ext] || "plaintext";
347
+ });
278
348
  const sourceIconMap = {
279
349
  telegram: "i-simple-icons-telegram",
280
350
  discord: "i-simple-icons-discord",
@@ -302,6 +372,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
302
372
  const _component_UIcon = _sfc_main$d;
303
373
  const _component_MDC = _sfc_main$9;
304
374
  const _component_ChatToolCallBlock = __nuxt_component_1;
375
+ const _component_UModal = _sfc_main$a;
376
+ const _component_EditorCodeEditor = __nuxt_component_12;
305
377
  _push(`<div${ssrRenderAttrs(mergeProps({
306
378
  class: ["flex", __props.message.role === "user" ? "justify-end" : "justify-start"]
307
379
  }, _attrs))}>`);
@@ -315,7 +387,45 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
315
387
  }
316
388
  _push(`<div class="${ssrRenderClass([__props.message.role === "user" ? "bg-primary/5 text-highlighted" : "bg-muted", "max-w-[85%] rounded-xl px-4 py-3"])}">`);
317
389
  if (__props.message.role === "user") {
318
- _push(`<div class="text-sm whitespace-pre-wrap">${ssrInterpolate(getTextContent(__props.message.content))}</div>`);
390
+ _push(`<div>`);
391
+ if (getImageBlocks(__props.message.content).length) {
392
+ _push(`<div class="flex flex-wrap gap-2 mb-2"><!--[-->`);
393
+ ssrRenderList(getImageBlocks(__props.message.content), (img, i) => {
394
+ _push(`<img${ssrRenderAttr("src", `data:${img.source.media_type};base64,${img.source.data}`)} class="max-w-48 max-h-48 rounded-lg object-contain cursor-pointer hover:opacity-80 transition-opacity">`);
395
+ });
396
+ _push(`<!--]--></div>`);
397
+ } else {
398
+ _push(`<!---->`);
399
+ }
400
+ if (getDocumentBlocks(__props.message.content).length) {
401
+ _push(`<div class="flex flex-wrap gap-2 mb-2"><!--[-->`);
402
+ ssrRenderList(getDocumentBlocks(__props.message.content), (doc, i) => {
403
+ _push(`<button class="flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg bg-elevated/50 border border-default text-xs hover:bg-elevated transition-colors cursor-pointer">`);
404
+ _push(ssrRenderComponent(_component_UIcon, {
405
+ name: getDocIcon(doc),
406
+ class: "size-3.5 text-dimmed shrink-0"
407
+ }, null, _parent));
408
+ _push(`<span class="truncate max-w-32">${ssrInterpolate(doc.title || "Document")}</span>`);
409
+ if (doc.source.media_type === "application/pdf") {
410
+ _push(ssrRenderComponent(_component_UIcon, {
411
+ name: "i-lucide-external-link",
412
+ class: "size-3 text-dimmed shrink-0"
413
+ }, null, _parent));
414
+ } else {
415
+ _push(`<!---->`);
416
+ }
417
+ _push(`</button>`);
418
+ });
419
+ _push(`<!--]--></div>`);
420
+ } else {
421
+ _push(`<!---->`);
422
+ }
423
+ if (getTextContent(__props.message.content)) {
424
+ _push(`<div class="text-sm whitespace-pre-wrap">${ssrInterpolate(getTextContent(__props.message.content))}</div>`);
425
+ } else {
426
+ _push(`<!---->`);
427
+ }
428
+ _push(`</div>`);
319
429
  } else {
320
430
  _push(`<!--[-->`);
321
431
  if (getTextContent(__props.message.content)) {
@@ -360,7 +470,87 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
360
470
  } else {
361
471
  _push(`<!---->`);
362
472
  }
363
- _push(`</div></div>`);
473
+ _push(`</div>`);
474
+ _push(ssrRenderComponent(_component_UModal, {
475
+ open: unref(previewOpen),
476
+ "onUpdate:open": ($event) => isRef(previewOpen) ? previewOpen.value = $event : null
477
+ }, {
478
+ content: withCtx((_, _push2, _parent2, _scopeId) => {
479
+ if (_push2) {
480
+ _push2(`<div class="flex items-center justify-center"${_scopeId}>`);
481
+ if (unref(previewImage)) {
482
+ _push2(`<img${ssrRenderAttr("src", `data:${unref(previewImage).source.media_type};base64,${unref(previewImage).source.data}`)} class="max-w-full max-h-[80vh] object-contain rounded-lg"${_scopeId}>`);
483
+ } else {
484
+ _push2(`<!---->`);
485
+ }
486
+ _push2(`</div>`);
487
+ } else {
488
+ return [
489
+ createVNode("div", { class: "flex items-center justify-center" }, [
490
+ unref(previewImage) ? (openBlock(), createBlock("img", {
491
+ key: 0,
492
+ src: `data:${unref(previewImage).source.media_type};base64,${unref(previewImage).source.data}`,
493
+ class: "max-w-full max-h-[80vh] object-contain rounded-lg"
494
+ }, null, 8, ["src"])) : createCommentVNode("", true)
495
+ ])
496
+ ];
497
+ }
498
+ }),
499
+ _: 1
500
+ }, _parent));
501
+ _push(ssrRenderComponent(_component_UModal, {
502
+ open: unref(codePreviewOpen),
503
+ "onUpdate:open": ($event) => isRef(codePreviewOpen) ? codePreviewOpen.value = $event : null
504
+ }, {
505
+ header: withCtx((_, _push2, _parent2, _scopeId) => {
506
+ if (_push2) {
507
+ _push2(`<div class="flex items-center gap-2"${_scopeId}>`);
508
+ _push2(ssrRenderComponent(_component_UIcon, {
509
+ name: "i-lucide-file-code",
510
+ class: "size-4 text-dimmed"
511
+ }, null, _parent2, _scopeId));
512
+ _push2(`<span class="text-sm font-medium truncate"${_scopeId}>${ssrInterpolate(unref(previewDoc)?.title || "File")}</span></div>`);
513
+ } else {
514
+ return [
515
+ createVNode("div", { class: "flex items-center gap-2" }, [
516
+ createVNode(_component_UIcon, {
517
+ name: "i-lucide-file-code",
518
+ class: "size-4 text-dimmed"
519
+ }),
520
+ createVNode("span", { class: "text-sm font-medium truncate" }, toDisplayString(unref(previewDoc)?.title || "File"), 1)
521
+ ])
522
+ ];
523
+ }
524
+ }),
525
+ body: withCtx((_, _push2, _parent2, _scopeId) => {
526
+ if (_push2) {
527
+ _push2(`<div class="h-[60vh] overflow-hidden rounded-lg border border-default"${_scopeId}>`);
528
+ if (unref(previewDoc)) {
529
+ _push2(ssrRenderComponent(_component_EditorCodeEditor, {
530
+ "model-value": unref(codePreviewContent),
531
+ language: unref(codePreviewLang),
532
+ "read-only": ""
533
+ }, null, _parent2, _scopeId));
534
+ } else {
535
+ _push2(`<!---->`);
536
+ }
537
+ _push2(`</div>`);
538
+ } else {
539
+ return [
540
+ createVNode("div", { class: "h-[60vh] overflow-hidden rounded-lg border border-default" }, [
541
+ unref(previewDoc) ? (openBlock(), createBlock(_component_EditorCodeEditor, {
542
+ key: 0,
543
+ "model-value": unref(codePreviewContent),
544
+ language: unref(codePreviewLang),
545
+ "read-only": ""
546
+ }, null, 8, ["model-value", "language"])) : createCommentVNode("", true)
547
+ ])
548
+ ];
549
+ }
550
+ }),
551
+ _: 1
552
+ }, _parent));
553
+ _push(`</div>`);
364
554
  };
365
555
  }
366
556
  });
@@ -411,6 +601,206 @@ _sfc_main$2.setup = (props, ctx) => {
411
601
  return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
412
602
  };
413
603
  const __nuxt_component_7 = Object.assign(_sfc_main$2, { __name: "ChatStreamingMessage" });
604
+ const IMAGE_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
605
+ const TEXT_MIME_TYPES = /* @__PURE__ */ new Set([
606
+ "application/json",
607
+ "application/javascript",
608
+ "application/typescript",
609
+ "application/xml",
610
+ "application/x-yaml",
611
+ "application/x-sh",
612
+ "application/sql",
613
+ "application/toml",
614
+ "application/x-httpd-php"
615
+ ]);
616
+ const MAX_FILE_SIZE = 20 * 1024 * 1024;
617
+ function generateId$1() {
618
+ if (typeof crypto !== "undefined" && crypto.randomUUID)
619
+ return crypto.randomUUID();
620
+ return Math.random().toString(36).slice(2);
621
+ }
622
+ function readFileAsBase64(file) {
623
+ return new Promise((resolve, reject) => {
624
+ const reader = new FileReader();
625
+ reader.onload = () => {
626
+ const result = reader.result;
627
+ const base64 = result.split(",")[1];
628
+ if (base64) resolve(base64);
629
+ else reject(new Error("Failed to read file as base64"));
630
+ };
631
+ reader.onerror = () => reject(reader.error);
632
+ reader.readAsDataURL(file);
633
+ });
634
+ }
635
+ function readFileAsText(file) {
636
+ return new Promise((resolve, reject) => {
637
+ const reader = new FileReader();
638
+ reader.onload = () => resolve(reader.result);
639
+ reader.onerror = () => reject(reader.error);
640
+ reader.readAsText(file);
641
+ });
642
+ }
643
+ function isImageType(mime) {
644
+ return IMAGE_TYPES.includes(mime);
645
+ }
646
+ function isTextType(mime) {
647
+ return mime.startsWith("text/") || TEXT_MIME_TYPES.has(mime);
648
+ }
649
+ function isPdfType(mime) {
650
+ return mime === "application/pdf";
651
+ }
652
+ function useAttachments() {
653
+ const attachments = ref([]);
654
+ const toast = useToast();
655
+ async function addFiles(files) {
656
+ for (const file of Array.from(files)) {
657
+ if (file.size > MAX_FILE_SIZE) {
658
+ toast.add({ title: "File too large", description: `${file.name} exceeds 20MB limit`, color: "error" });
659
+ continue;
660
+ }
661
+ const mime = file.type || "";
662
+ try {
663
+ if (isImageType(mime)) {
664
+ const base64 = await readFileAsBase64(file);
665
+ const previewUrl = URL.createObjectURL(file);
666
+ attachments.value.push({
667
+ id: generateId$1(),
668
+ kind: "image",
669
+ previewUrl,
670
+ base64,
671
+ mediaType: mime,
672
+ name: file.name
673
+ });
674
+ } else if (isPdfType(mime)) {
675
+ const base64 = await readFileAsBase64(file);
676
+ attachments.value.push({
677
+ id: generateId$1(),
678
+ kind: "document",
679
+ data: base64,
680
+ sourceType: "base64",
681
+ name: file.name
682
+ });
683
+ } else if (isTextType(mime) || isLikelyTextFile(file.name)) {
684
+ const text = await readFileAsText(file);
685
+ attachments.value.push({
686
+ id: generateId$1(),
687
+ kind: "document",
688
+ data: text,
689
+ sourceType: "text",
690
+ name: file.name
691
+ });
692
+ } else {
693
+ toast.add({ title: "Unsupported file type", description: `${file.name} (${mime || "unknown type"})`, color: "error" });
694
+ }
695
+ } catch {
696
+ toast.add({ title: "Failed to read file", description: file.name, color: "error" });
697
+ }
698
+ }
699
+ }
700
+ function removeAttachment(id) {
701
+ const idx = attachments.value.findIndex((a) => a.id === id);
702
+ if (idx !== -1) {
703
+ const att = attachments.value[idx];
704
+ if (att.kind === "image") URL.revokeObjectURL(att.previewUrl);
705
+ attachments.value.splice(idx, 1);
706
+ }
707
+ }
708
+ function clearAttachments() {
709
+ for (const att of attachments.value)
710
+ if (att.kind === "image") URL.revokeObjectURL(att.previewUrl);
711
+ attachments.value = [];
712
+ }
713
+ function toImageBlocks() {
714
+ return attachments.value.filter((a) => a.kind === "image").map((att) => ({
715
+ type: "image",
716
+ source: {
717
+ type: "base64",
718
+ media_type: att.mediaType,
719
+ data: att.base64
720
+ }
721
+ }));
722
+ }
723
+ function toDocumentBlocks() {
724
+ return attachments.value.filter((a) => a.kind === "document").map((att) => ({
725
+ type: "document",
726
+ source: att.sourceType === "base64" ? { type: "base64", media_type: "application/pdf", data: att.data } : { type: "text", media_type: "text/plain", data: att.data },
727
+ title: att.name
728
+ }));
729
+ }
730
+ return {
731
+ attachments: readonly(attachments),
732
+ addFiles,
733
+ removeAttachment,
734
+ clearAttachments,
735
+ toImageBlocks,
736
+ toDocumentBlocks
737
+ };
738
+ }
739
+ function isLikelyTextFile(name) {
740
+ const ext = name.split(".").pop()?.toLowerCase();
741
+ if (!ext) return false;
742
+ const textExtensions = /* @__PURE__ */ new Set([
743
+ "txt",
744
+ "md",
745
+ "js",
746
+ "ts",
747
+ "jsx",
748
+ "tsx",
749
+ "py",
750
+ "rb",
751
+ "rs",
752
+ "go",
753
+ "java",
754
+ "c",
755
+ "cpp",
756
+ "h",
757
+ "hpp",
758
+ "cs",
759
+ "swift",
760
+ "kt",
761
+ "scala",
762
+ "json",
763
+ "yaml",
764
+ "yml",
765
+ "toml",
766
+ "ini",
767
+ "cfg",
768
+ "conf",
769
+ "xml",
770
+ "html",
771
+ "htm",
772
+ "css",
773
+ "scss",
774
+ "sass",
775
+ "less",
776
+ "sh",
777
+ "bash",
778
+ "zsh",
779
+ "fish",
780
+ "ps1",
781
+ "bat",
782
+ "cmd",
783
+ "sql",
784
+ "graphql",
785
+ "gql",
786
+ "proto",
787
+ "csv",
788
+ "tsv",
789
+ "log",
790
+ "env",
791
+ "gitignore",
792
+ "dockerignore",
793
+ "vue",
794
+ "svelte",
795
+ "astro",
796
+ "prisma",
797
+ "tf",
798
+ "r",
799
+ "lua",
800
+ "dart"
801
+ ]);
802
+ return textExtensions.has(ext);
803
+ }
414
804
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
415
805
  __name: "ChatInput",
416
806
  __ssrInlineRender: true,
@@ -422,28 +812,123 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
422
812
  setup(__props, { emit: __emit }) {
423
813
  const props = __props;
424
814
  const emit = __emit;
815
+ const { attachments, clearAttachments, toImageBlocks, toDocumentBlocks } = useAttachments();
425
816
  const inputText = ref("");
426
817
  const textareaRef = ref(null);
818
+ const fileInputRef = ref(null);
819
+ const isDragging = ref(false);
427
820
  const isStreaming = computed(() => props.sessionStatus === "streaming");
428
821
  const isConnected = computed(() => props.connectionStatus === "connected");
429
- const canSend = computed(() => isConnected.value && !isStreaming.value && inputText.value.trim().length > 0);
822
+ const canSend = computed(
823
+ () => isConnected.value && !isStreaming.value && (inputText.value.trim().length > 0 || attachments.value.length > 0)
824
+ );
430
825
  function handleSend() {
431
826
  if (!canSend.value) return;
432
- emit("send", inputText.value.trim());
827
+ const images = toImageBlocks();
828
+ const docs = toDocumentBlocks();
829
+ emit(
830
+ "send",
831
+ inputText.value.trim(),
832
+ images.length > 0 ? images : void 0,
833
+ docs.length > 0 ? docs : void 0
834
+ );
433
835
  inputText.value = "";
836
+ clearAttachments();
434
837
  nextTick(() => {
435
838
  if (textareaRef.value) textareaRef.value.style.height = "auto";
436
839
  });
437
840
  }
841
+ const FILE_ACCEPT = [
842
+ "image/jpeg",
843
+ "image/png",
844
+ "image/gif",
845
+ "image/webp",
846
+ "application/pdf",
847
+ ".txt",
848
+ ".md",
849
+ ".js",
850
+ ".ts",
851
+ ".jsx",
852
+ ".tsx",
853
+ ".py",
854
+ ".rb",
855
+ ".rs",
856
+ ".go",
857
+ ".java",
858
+ ".c",
859
+ ".cpp",
860
+ ".h",
861
+ ".cs",
862
+ ".swift",
863
+ ".kt",
864
+ ".json",
865
+ ".yaml",
866
+ ".yml",
867
+ ".toml",
868
+ ".ini",
869
+ ".xml",
870
+ ".html",
871
+ ".css",
872
+ ".scss",
873
+ ".sh",
874
+ ".sql",
875
+ ".graphql",
876
+ ".csv",
877
+ ".log",
878
+ ".vue",
879
+ ".svelte",
880
+ ".prisma",
881
+ ".lua",
882
+ ".dart"
883
+ ].join(",");
438
884
  return (_ctx, _push, _parent, _attrs) => {
885
+ const _component_UIcon = _sfc_main$d;
439
886
  const _component_UButton = _sfc_main$8;
440
- _push(`<div${ssrRenderAttrs(mergeProps({ class: "border-t border-default p-4" }, _attrs))}>`);
887
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "border-t border-default p-4 relative" }, _attrs))}>`);
888
+ if (unref(isDragging)) {
889
+ _push(`<div class="absolute inset-0 bg-primary/10 border-2 border-dashed border-primary rounded-lg flex items-center justify-center z-10"><span class="text-sm text-primary font-medium">Drop files here</span></div>`);
890
+ } else {
891
+ _push(`<!---->`);
892
+ }
441
893
  if (!unref(isConnected)) {
442
894
  _push(`<div class="flex items-center gap-2 mb-2 text-xs text-dimmed"><span class="size-2 rounded-full bg-warning"></span><span>${ssrInterpolate(__props.connectionStatus === "connecting" ? "Connecting..." : "Disconnected")}</span></div>`);
443
895
  } else {
444
896
  _push(`<!---->`);
445
897
  }
446
- _push(`<div class="flex items-start gap-2"><textarea${ssrIncludeBooleanAttr(!unref(isConnected) || unref(isStreaming)) ? " disabled" : ""} placeholder="Send a message..." rows="1" class="flex-1 resize-none bg-elevated/50 border border-default rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50">${ssrInterpolate(unref(inputText))}</textarea>`);
898
+ if (unref(attachments).length) {
899
+ _push(`<div class="flex gap-2 mb-2 flex-wrap"><!--[-->`);
900
+ ssrRenderList(unref(attachments), (att) => {
901
+ _push(`<div class="${ssrRenderClass([att.kind === "image" ? "size-16" : "h-10 px-3 flex items-center gap-1.5 bg-elevated/50", "relative group rounded-lg overflow-hidden border border-default"])}">`);
902
+ if (att.kind === "image") {
903
+ _push(`<img${ssrRenderAttr("src", att.previewUrl)}${ssrRenderAttr("alt", att.name)} class="size-full object-cover">`);
904
+ } else {
905
+ _push(`<!--[-->`);
906
+ _push(ssrRenderComponent(_component_UIcon, {
907
+ name: att.name.endsWith(".pdf") ? "i-lucide-file-text" : "i-lucide-file-code",
908
+ class: "size-4 text-dimmed shrink-0"
909
+ }, null, _parent));
910
+ _push(`<span class="text-xs truncate max-w-24">${ssrInterpolate(att.name)}</span><!--]-->`);
911
+ }
912
+ _push(`<button class="absolute top-0 right-0 p-0.5 bg-error/80 rounded-bl-lg opacity-0 group-hover:opacity-100 transition-opacity">`);
913
+ _push(ssrRenderComponent(_component_UIcon, {
914
+ name: "i-lucide-x",
915
+ class: "size-3 text-white"
916
+ }, null, _parent));
917
+ _push(`</button></div>`);
918
+ });
919
+ _push(`<!--]--></div>`);
920
+ } else {
921
+ _push(`<!---->`);
922
+ }
923
+ _push(`<div class="flex items-start gap-2"><textarea${ssrIncludeBooleanAttr(!unref(isConnected) || unref(isStreaming)) ? " disabled" : ""} placeholder="Send a message..." rows="1" class="flex-1 resize-none bg-elevated/50 border border-default rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50">${ssrInterpolate(unref(inputText))}</textarea><input type="file"${ssrRenderAttr("accept", unref(FILE_ACCEPT))} multiple class="hidden">`);
924
+ _push(ssrRenderComponent(_component_UButton, {
925
+ icon: "i-lucide-paperclip",
926
+ variant: "ghost",
927
+ color: "neutral",
928
+ size: "md",
929
+ disabled: !unref(isConnected) || unref(isStreaming),
930
+ onClick: ($event) => unref(fileInputRef)?.click()
931
+ }, null, _parent));
447
932
  if (unref(isStreaming)) {
448
933
  _push(ssrRenderComponent(_component_UButton, {
449
934
  icon: "i-lucide-square",
@@ -504,18 +989,26 @@ function useChat() {
504
989
  }
505
990
  connectionStatus.value = "disconnected";
506
991
  }
507
- function sendMessage(message) {
992
+ function sendMessage(message, attachments, documents) {
508
993
  if (!ws.value || ws.value.readyState !== WebSocket.OPEN) return;
994
+ const content = [];
995
+ if (attachments?.length)
996
+ for (const img of attachments) content.push(img);
997
+ if (documents?.length)
998
+ for (const doc of documents) content.push(doc);
999
+ if (message) content.push({ type: "text", text: message });
509
1000
  messages.value.push({
510
1001
  id: generateId(),
511
1002
  conversationId: activeConversationId.value || "",
512
1003
  role: "user",
513
- content: [{ type: "text", text: message }],
1004
+ content,
514
1005
  createdAt: /* @__PURE__ */ new Date()
515
1006
  });
516
1007
  ws.value.send(JSON.stringify({
517
1008
  type: "chat:send",
518
1009
  message,
1010
+ attachments: attachments?.length ? attachments : void 0,
1011
+ documents: documents?.length ? documents : void 0,
519
1012
  conversationId: activeConversationId.value
520
1013
  }));
521
1014
  }
@@ -612,8 +1105,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
612
1105
  useRoute();
613
1106
  useRouter();
614
1107
  const messagesContainer = ref(null);
615
- function handleSend(message) {
616
- sendMessage(message);
1108
+ function handleSend(message, attachments, documents) {
1109
+ sendMessage(message, attachments, documents);
617
1110
  nextTick(scrollToBottom);
618
1111
  }
619
1112
  function scrollToBottom() {
@@ -847,4 +1340,4 @@ _sfc_main.setup = (props, ctx) => {
847
1340
  };
848
1341
 
849
1342
  export { _sfc_main as default };
850
- //# sourceMappingURL=chat-CR3JIVEq.mjs.map
1343
+ //# sourceMappingURL=chat-BphuYhvA.mjs.map