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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/-mGU8_Hv.js +1 -0
- package/.output/public/_nuxt/0GqCtQ9S.js +1 -0
- package/.output/public/_nuxt/{CLfF6dSn.js → 1wCoXZ14.js} +1 -1
- package/.output/public/_nuxt/2J1KxdHv.js +1 -0
- package/.output/public/_nuxt/6VDUZECX.js +1 -0
- package/.output/public/_nuxt/{DEd2xVbS.js → 8WMJQbWG.js} +1 -1
- package/.output/public/_nuxt/9Rw88G6h.js +1 -0
- package/.output/public/_nuxt/{PP_4ebzl.js → B-yW4SD3.js} +1 -1
- package/.output/public/_nuxt/B20jNAhm.js +1 -0
- package/.output/public/_nuxt/B3OpTH_e.js +1 -0
- package/.output/public/_nuxt/B9Y3_B5G.js +1 -0
- package/.output/public/_nuxt/B9_vmatf.js +1 -0
- package/.output/public/_nuxt/B9o6sFST.js +1 -0
- package/.output/public/_nuxt/{D8M722pn.js → BAY3_Hrq.js} +1 -1
- package/.output/public/_nuxt/{0yk-pS3R.js → BD5rPkc2.js} +3 -3
- package/.output/public/_nuxt/BGYoW3kO.js +1 -0
- package/.output/public/_nuxt/BHUy5EAj.js +1 -0
- package/.output/public/_nuxt/BLdMRpJD.js +1 -0
- package/.output/public/_nuxt/{2dNDtTiv.js → BOCn_SGf.js} +12 -12
- package/.output/public/_nuxt/BQi8LIrn.js +1 -0
- package/.output/public/_nuxt/BS1t375R.js +1 -0
- package/.output/public/_nuxt/BTGeP1bA.js +1 -0
- package/.output/public/_nuxt/{4K03TkGA.js → BVYYP4eQ.js} +5 -5
- package/.output/public/_nuxt/BWQ7zE01.js +1 -0
- package/.output/public/_nuxt/BWqJInD3.js +1 -0
- package/.output/public/_nuxt/BXdQ9ASJ.js +1 -0
- package/.output/public/_nuxt/{BHtY0l0l.js → BXxZokD_.js} +2 -2
- package/.output/public/_nuxt/BZ7DAtPi.js +1 -0
- package/.output/public/_nuxt/BZm9w7en.js +1 -0
- package/.output/public/_nuxt/B_hNqC64.js +1 -0
- package/.output/public/_nuxt/Be47YE2L.js +1 -0
- package/.output/public/_nuxt/BgIS9_ti.js +39 -0
- package/.output/public/_nuxt/BgavRUl_.js +1 -0
- package/.output/public/_nuxt/Bh0yGTzr.js +1 -0
- package/.output/public/_nuxt/BhhMUror.js +1 -0
- package/.output/public/_nuxt/Bj5e7QPz.js +1 -0
- package/.output/public/_nuxt/{7oCGSglN.js → Bnn59-FS.js} +1 -1
- package/.output/public/_nuxt/BoCU3mWu.js +1 -0
- package/.output/public/_nuxt/Br6epbzY.js +1 -0
- package/.output/public/_nuxt/Br81Sr2R.js +1 -0
- package/.output/public/_nuxt/BrkEOLHu.js +9 -0
- package/.output/public/_nuxt/BtrNCc2S.js +1 -0
- package/.output/public/_nuxt/BxsQlbgl.js +1 -0
- package/.output/public/_nuxt/BzrhNhdT.js +1 -0
- package/.output/public/_nuxt/{CVqlefTY.js → C-78dDNd.js} +1 -1
- package/.output/public/_nuxt/C1oaoi1p.js +1 -0
- package/.output/public/_nuxt/C2-_hcwB.js +1 -0
- package/.output/public/_nuxt/{rfGRTJJW.js → C2Gh3qqr.js} +1 -1
- package/.output/public/_nuxt/C2OHaW6l.js +1 -0
- package/.output/public/_nuxt/C3szZmvA.js +1 -0
- package/.output/public/_nuxt/C3xzleKP.js +1 -0
- package/.output/public/_nuxt/C4sG6rdW.js +1 -0
- package/.output/public/_nuxt/C5Cu9Fx6.js +1 -0
- package/.output/public/_nuxt/{JX1oqJI9.js → C5gfF7J1.js} +1 -1
- package/.output/public/_nuxt/C6Eoiclo.js +1 -0
- package/.output/public/_nuxt/C7hFztZL.js +1 -0
- package/.output/public/_nuxt/CAVUAxNU.js +2 -0
- package/.output/public/_nuxt/{t8aDAkZ5.js → CCeM5lW2.js} +1 -1
- package/.output/public/_nuxt/CDcQ31Eh.js +1 -0
- package/.output/public/_nuxt/CHbHVtCy.js +1 -0
- package/.output/public/_nuxt/CHnVFnBW.js +1 -0
- package/.output/public/_nuxt/CLNcmNQS.js +1 -0
- package/.output/public/_nuxt/{EgKnQnf-.js → CPwCTHun.js} +1 -1
- package/.output/public/_nuxt/{ixlNW2So.js → CS8SdmH2.js} +1 -1
- package/.output/public/_nuxt/CTGm_mc8.js +1 -0
- package/.output/public/_nuxt/{CPutXj8l.js → CTQFGHjS.js} +1 -1
- package/.output/public/_nuxt/{BS2ZNXI1.js → CVVtVzXC.js} +1 -1
- package/.output/public/_nuxt/CZNOaqeX.js +1 -0
- package/.output/public/_nuxt/C_A_NkeC.js +2 -0
- package/.output/public/_nuxt/{gTrVszwd.js → C_doutX-.js} +1 -1
- package/.output/public/_nuxt/{CY-QVcA5.js → CbDLhrNA.js} +2 -2
- package/.output/public/_nuxt/CePKCqSb.js +1 -0
- package/.output/public/_nuxt/Cet4T_yO.js +1 -0
- package/.output/public/_nuxt/{fbyIeNkc.js → CjJPkhbc.js} +1 -1
- package/.output/public/_nuxt/CkZT4LGq.js +1 -0
- package/.output/public/_nuxt/CkrW8sGL.js +1 -0
- package/.output/public/_nuxt/Co0UxVsx.js +1 -0
- package/.output/public/_nuxt/CqS0zXYQ.js +1 -0
- package/.output/public/_nuxt/CskGv_Km.js +1 -0
- package/.output/public/_nuxt/{Bk6JUtIo.js → CuvkTsqs.js} +1 -1
- package/.output/public/_nuxt/{Db4KMnt8.js → CxMuZEwX.js} +1 -1
- package/.output/public/_nuxt/{vIOxcXKR.js → CxSijT71.js} +8 -8
- package/.output/public/_nuxt/Cywo6tZI.js +1 -0
- package/.output/public/_nuxt/D1reIfpX.js +1 -0
- package/.output/public/_nuxt/D1uV2uir.js +1 -0
- package/.output/public/_nuxt/{CuxrHsu-.js → D2edadpd.js} +1 -1
- package/.output/public/_nuxt/D3cEeQh7.js +1 -0
- package/.output/public/_nuxt/D41A2mE2.js +1 -0
- package/.output/public/_nuxt/D49P2RhG.js +1 -0
- package/.output/public/_nuxt/D867g6Ds.js +1 -0
- package/.output/public/_nuxt/DEFWIjWl.js +1 -0
- package/.output/public/_nuxt/DFTEBTzZ.js +1 -0
- package/.output/public/_nuxt/{DwY7rCd_.js → DHRexj9X.js} +2 -2
- package/.output/public/_nuxt/DL4EpgqQ.js +1 -0
- package/.output/public/_nuxt/DLHnP6tw.js +1 -0
- package/.output/public/_nuxt/DM20WaLq.js +1 -0
- package/.output/public/_nuxt/{BYHCP8x7.js → DNAMjHbb.js} +1 -1
- package/.output/public/_nuxt/{C6qKcgOY.js → DP8t9VWs.js} +26 -26
- package/.output/public/_nuxt/DTR31rjp.js +1 -0
- package/.output/public/_nuxt/{CZoEPC_Q.js → DTlSLSo1.js} +3 -3
- package/.output/public/_nuxt/{DtjjnHnt.js → DVdnhfXT.js} +1 -1
- package/.output/public/_nuxt/DZikIgHK.js +1 -0
- package/.output/public/_nuxt/D_YGqvw_.js +1 -0
- package/.output/public/_nuxt/D_k1YwXm.js +1 -0
- package/.output/public/_nuxt/Daf2MbWG.js +7 -0
- package/.output/public/_nuxt/DcJ0GstJ.js +1 -0
- package/.output/public/_nuxt/DcYKh6QA.js +1 -0
- package/.output/public/_nuxt/DhN3_DYH.js +1 -0
- package/.output/public/_nuxt/DhSvBSt3.js +1 -0
- package/.output/public/_nuxt/DhlIWT8K.js +1 -0
- package/.output/public/_nuxt/DjsqyRqt.js +1 -0
- package/.output/public/_nuxt/DpSM97eH.js +1 -0
- package/.output/public/_nuxt/DqR9SdeU.js +1 -0
- package/.output/public/_nuxt/DqmQtg6Y.js +1 -0
- package/.output/public/_nuxt/Dsuag_iW.js +1 -0
- package/.output/public/_nuxt/Dtr_0IbE.js +1 -0
- package/.output/public/_nuxt/DwrmFEZN.js +1 -0
- package/.output/public/_nuxt/DxE8r3r4.js +1 -0
- package/.output/public/_nuxt/G_CsVlOR.js +1 -0
- package/.output/public/_nuxt/Gyw_2f6x.js +1 -0
- package/.output/public/_nuxt/HStC1ZyE.js +1 -0
- package/.output/public/_nuxt/Hh9mv0Ek.js +1 -0
- package/.output/public/_nuxt/LR0kCjbe.js +1 -0
- package/.output/public/_nuxt/MYeLvJGV.js +1 -0
- package/.output/public/_nuxt/NKs0EGrh.js +1 -0
- package/.output/public/_nuxt/PY5EGujn.js +1 -0
- package/.output/public/_nuxt/PamJNol9.js +1 -0
- package/.output/public/_nuxt/RlvwEbHv.js +1 -0
- package/.output/public/_nuxt/{BKXg-alD.js → TNpdJOlc.js} +1 -1
- package/.output/public/_nuxt/TSYrPbLR.js +1 -0
- package/.output/public/_nuxt/U-eBrbR4.js +1 -0
- package/.output/public/_nuxt/UuqXScSw.js +1 -0
- package/.output/public/_nuxt/V04-MrLN.js +1 -0
- package/.output/public/_nuxt/X0o5GcBb.js +1 -0
- package/.output/public/_nuxt/XQNzmQy9.js +1 -0
- package/.output/public/_nuxt/Y59XKprr.js +1 -0
- package/.output/public/_nuxt/YZQjZgsH.js +1 -0
- package/.output/public/_nuxt/_-TGPiLQ.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/d7188f50-b42c-4d2c-afab-066d318f0af8.json +1 -0
- package/.output/public/_nuxt/dashboard.ByJQ-Wzh.css +1 -0
- package/.output/public/_nuxt/entry.ZJxWCrU6.css +1 -0
- package/.output/public/_nuxt/{DhI5cA_n.js → hCeWb_38.js} +1 -1
- package/.output/public/_nuxt/{CQqCBrXj.js → hrPTRWjM.js} +1 -1
- package/.output/public/_nuxt/jC4pIK1p.js +1 -0
- package/.output/public/_nuxt/jTT1R-Vz.js +1 -0
- package/.output/public/_nuxt/{BLnYhy_t.js → kkAMoB43.js} +1 -1
- package/.output/public/_nuxt/{DzGy77Vr.js → mzM4BGtv.js} +1 -1
- package/.output/public/_nuxt/o-s8JBm2.js +1 -0
- package/.output/public/_nuxt/pwJTkIQ4.js +1 -0
- package/.output/public/_nuxt/{BDyn4ApB.js → rIgg2Arf.js} +3 -3
- package/.output/public/_nuxt/subdxgSQ.js +1 -0
- package/.output/public/_nuxt/t8B72leH.js +1 -0
- package/.output/public/_nuxt/vCFAHwdt.js +1 -0
- package/.output/public/_nuxt/z-MP0bB7.js +1 -0
- package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
- package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
- package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs → EditorToolbar-B9OwSI5e.mjs} +3 -3
- package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs.map → EditorToolbar-B9OwSI5e.mjs.map} +1 -1
- package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
- package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
- package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
- package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
- package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
- package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
- package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +1 -1
- package/.output/server/chunks/build/{_id_-DN00UDdO.mjs → _id_-CwBeklIM.mjs} +296 -430
- package/.output/server/chunks/build/_id_-CwBeklIM.mjs.map +1 -0
- package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs → _name_-D7MtW4Vu.mjs} +2 -2
- package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs.map → _name_-D7MtW4Vu.mjs.map} +1 -1
- package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs → _uuid_-lvG92ein.mjs} +4 -4
- package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs.map → _uuid_-lvG92ein.mjs.map} +1 -1
- package/.output/server/chunks/build/account-LDZ4TL6x.mjs +513 -0
- package/.output/server/chunks/build/account-LDZ4TL6x.mjs.map +1 -0
- package/.output/server/chunks/build/app-CGhRZPNT.mjs +252 -0
- package/.output/server/chunks/build/app-CGhRZPNT.mjs.map +1 -0
- package/.output/server/chunks/build/{chat-CR3JIVEq.mjs → chat-BphuYhvA.mjs} +532 -39
- package/.output/server/chunks/build/chat-BphuYhvA.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
- package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs → dashboard-nDujDyOg.mjs} +55 -16
- package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs.map → dashboard-nDujDyOg.mjs.map} +1 -1
- package/.output/server/chunks/build/{docs-ChGwOPg5.mjs → docs-Bwucwp0r.mjs} +664 -592
- package/.output/server/chunks/build/docs-Bwucwp0r.mjs.map +1 -0
- package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
- package/.output/server/chunks/build/{hooks-D328DcO6.mjs → hooks-D6PmTth8.mjs} +19 -29
- package/.output/server/chunks/build/hooks-D6PmTth8.mjs.map +1 -0
- package/.output/server/chunks/build/{index-CAnGTRlu.mjs → index-CJkn2jiM.mjs} +2 -2
- package/.output/server/chunks/build/{index-CAnGTRlu.mjs.map → index-CJkn2jiM.mjs.map} +1 -1
- package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
- package/.output/server/chunks/build/index-Cz9Y6NwN.mjs +723 -0
- package/.output/server/chunks/build/index-Cz9Y6NwN.mjs.map +1 -0
- package/.output/server/chunks/build/index-hwhuKhuZ.mjs +76 -0
- package/.output/server/chunks/build/index-hwhuKhuZ.mjs.map +1 -0
- package/.output/server/chunks/build/integrations-D5JWURiJ.mjs +1499 -0
- package/.output/server/chunks/build/integrations-D5JWURiJ.mjs.map +1 -0
- package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs → library-DxRdgP6X.mjs} +2 -2
- package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs.map → library-DxRdgP6X.mjs.map} +1 -1
- package/.output/server/chunks/build/{login-DnnElTl2.mjs → login-BmER_VoU.mjs} +2 -2
- package/.output/server/chunks/build/{login-DnnElTl2.mjs.map → login-BmER_VoU.mjs.map} +1 -1
- package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs +669 -0
- package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +65 -34
- package/.output/server/chunks/build/server.mjs.map +1 -1
- package/.output/server/chunks/build/settings-neokAVE5.mjs +154 -0
- package/.output/server/chunks/build/settings-neokAVE5.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/{tasks-DnAFqbtt.mjs → tasks-CnpIQNpS.mjs} +27 -37
- package/.output/server/chunks/build/tasks-CnpIQNpS.mjs.map +1 -0
- package/.output/server/chunks/build/{useAgents-DHEXiFSc.mjs → useAgents-nmbkB9-_.mjs} +5 -26
- package/.output/server/chunks/build/useAgents-nmbkB9-_.mjs.map +1 -0
- package/.output/server/chunks/build/{view-n2sYa4Zh.mjs → view-mb0ISqfM.mjs} +3 -3
- package/.output/server/chunks/build/{view-n2sYa4Zh.mjs.map → view-mb0ISqfM.mjs.map} +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +1021 -867
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws/chat.mjs +39 -5
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +17 -2
- package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +21 -3
- package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +10 -9
- package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get9.mjs +10 -8
- package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +10 -5
- package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/Claude/skills/_lib/api.py +3 -2
- package/app/components/AssistantPanel.client.vue +16 -314
- package/app/components/agents/AgentCard.vue +111 -0
- package/app/components/agents/AgentInfoCard.vue +54 -0
- package/app/components/agents/AgentRunHistory.vue +103 -0
- package/app/components/agents/AgentRunModal.vue +1 -24
- package/app/components/agents/AgentStatsCards.vue +1 -26
- package/app/components/assistant/AssistantChat.vue +156 -0
- package/app/components/assistant/AssistantTerminal.client.vue +178 -0
- package/app/components/chat/ChatInput.vue +133 -5
- package/app/components/chat/ConversationList.vue +2 -12
- package/app/components/chat/MessageBubble.vue +188 -6
- package/app/components/files/FileTree.vue +23 -202
- package/app/components/files/FileTreeModals.vue +226 -0
- package/app/components/hooks/HookStatsCards.vue +1 -6
- package/app/components/hooks/ToolBreakdownTable.vue +1 -6
- package/app/components/search/DashboardSearch.vue +38 -1
- package/app/components/tasks/TaskCard.vue +2 -7
- package/app/components/tasks/TaskDetail.vue +4 -9
- package/app/composables/useAttachments.ts +196 -0
- package/app/composables/useChat.ts +14 -2
- package/app/composables/useSearch.ts +21 -11
- package/app/layouts/dashboard.vue +1 -1
- package/app/pages/agents/[id].vue +6 -197
- package/app/pages/agents/index.vue +9 -142
- package/app/pages/chat.vue +4 -2
- package/app/pages/settings/account.vue +243 -0
- package/app/pages/settings/app.vue +230 -0
- package/app/pages/settings/index.vue +12 -0
- package/app/pages/settings/integrations.vue +794 -0
- package/app/pages/settings/manage-secrets.vue +295 -0
- package/app/pages/settings.vue +20 -1581
- package/dist/cli/index.js +26 -2
- package/package.json +1 -1
- package/server/api/agents/index.get.ts +20 -1
- package/server/api/conversations/index.get.ts +23 -5
- package/server/api/documents/index.get.ts +11 -9
- package/server/api/memory/search.get.ts +11 -6
- package/server/api/tasks/index.get.ts +11 -9
- package/server/bridge/adapters/imessage.ts +9 -2
- package/server/drizzle/migrations/0016_full_text_search.sql +127 -0
- package/server/drizzle/migrations/meta/_journal.json +7 -0
- package/server/routes/_ws/chat.ts +61 -7
- package/server/utils/chat-session-manager.ts +20 -2
- package/shared/types/index.ts +34 -2
- package/shared/utils/formatting.ts +105 -0
- package/.output/public/_nuxt/0NJ3PaRM.js +0 -1
- package/.output/public/_nuxt/10_wwHSz.js +0 -1
- package/.output/public/_nuxt/1zUTf4AP.js +0 -1
- package/.output/public/_nuxt/2nOqGUPr.js +0 -1
- package/.output/public/_nuxt/3jQMk_5H.js +0 -1
- package/.output/public/_nuxt/6boMs_nF.js +0 -1
- package/.output/public/_nuxt/8q5NepGW.js +0 -9
- package/.output/public/_nuxt/B93pdGAW.js +0 -1
- package/.output/public/_nuxt/BA_pRWwX.js +0 -1
- package/.output/public/_nuxt/BGgwYWjH.js +0 -1
- package/.output/public/_nuxt/BH0QDWEm.js +0 -1
- package/.output/public/_nuxt/BIXrSYwR.js +0 -1
- package/.output/public/_nuxt/BK8S2ony.js +0 -1
- package/.output/public/_nuxt/BR8bKz8h.js +0 -1
- package/.output/public/_nuxt/BUghTae1.js +0 -1
- package/.output/public/_nuxt/BXuWCWsJ.js +0 -1
- package/.output/public/_nuxt/BZrSPX0S.js +0 -1
- package/.output/public/_nuxt/B_wilgcd.js +0 -1
- package/.output/public/_nuxt/BaZwjF8o.js +0 -1
- package/.output/public/_nuxt/Bciqk4dX.js +0 -1
- package/.output/public/_nuxt/Beom-INj.js +0 -1
- package/.output/public/_nuxt/BfcLZ_fC.js +0 -1
- package/.output/public/_nuxt/BkfI94R8.js +0 -1
- package/.output/public/_nuxt/BmOtR1wX.js +0 -1
- package/.output/public/_nuxt/BmVLxnDU.js +0 -1
- package/.output/public/_nuxt/BtHQ1T0f.js +0 -1
- package/.output/public/_nuxt/ByYh0uRg.js +0 -1
- package/.output/public/_nuxt/C27WoGNZ.js +0 -1
- package/.output/public/_nuxt/C2FxZbO_.js +0 -1
- package/.output/public/_nuxt/C2vq6Te8.js +0 -1
- package/.output/public/_nuxt/C39dQ88F.js +0 -1
- package/.output/public/_nuxt/C3NST0BU.js +0 -1
- package/.output/public/_nuxt/C4mwL7SE.js +0 -7
- package/.output/public/_nuxt/C5R5QaCA.js +0 -1
- package/.output/public/_nuxt/C71_a1IX.js +0 -1
- package/.output/public/_nuxt/C9WIgRRL.js +0 -1
- package/.output/public/_nuxt/CBTkrk2M.js +0 -1
- package/.output/public/_nuxt/CEnSeCqn.js +0 -1
- package/.output/public/_nuxt/CKxSHyww.js +0 -1
- package/.output/public/_nuxt/CSKJ-Ahh.js +0 -1
- package/.output/public/_nuxt/CTCcEJU3.js +0 -1
- package/.output/public/_nuxt/CVFwOzbl.js +0 -1
- package/.output/public/_nuxt/CVdCqaby.js +0 -1
- package/.output/public/_nuxt/CWyMCJQH.js +0 -1
- package/.output/public/_nuxt/CY-cjAwJ.js +0 -1
- package/.output/public/_nuxt/CYPO5o_C.js +0 -1
- package/.output/public/_nuxt/CZRnNmU8.js +0 -1
- package/.output/public/_nuxt/CZVzFlpI.js +0 -1
- package/.output/public/_nuxt/Cc-2ziaZ.js +0 -1
- package/.output/public/_nuxt/ChcO9s3o.js +0 -1
- package/.output/public/_nuxt/Cl-LOSDV.js +0 -1
- package/.output/public/_nuxt/CobqYwkp.js +0 -1
- package/.output/public/_nuxt/CqNwHCpo.js +0 -1
- package/.output/public/_nuxt/CwPdIZ9J.js +0 -1
- package/.output/public/_nuxt/D0ifH682.js +0 -1
- package/.output/public/_nuxt/D3AZaldL.js +0 -1
- package/.output/public/_nuxt/D4UJwDQJ.js +0 -1
- package/.output/public/_nuxt/D5jZq8b3.js +0 -1
- package/.output/public/_nuxt/D5q8SnqE.js +0 -1
- package/.output/public/_nuxt/D8lwrAYS.js +0 -1
- package/.output/public/_nuxt/D9nmzBAw.js +0 -1
- package/.output/public/_nuxt/DC4idAGt.js +0 -1
- package/.output/public/_nuxt/DH4YkDAi.js +0 -1
- package/.output/public/_nuxt/DJTCT0bl.js +0 -1
- package/.output/public/_nuxt/DNP5E1bC.js +0 -39
- package/.output/public/_nuxt/DO9SFIh1.js +0 -1
- package/.output/public/_nuxt/DPklr_tJ.js +0 -2
- package/.output/public/_nuxt/DQM4eBdt.js +0 -1
- package/.output/public/_nuxt/DQh6I9z9.js +0 -1
- package/.output/public/_nuxt/DS2wStH1.js +0 -1
- package/.output/public/_nuxt/DTAStixR.js +0 -1
- package/.output/public/_nuxt/DTGenhcA.js +0 -1
- package/.output/public/_nuxt/DUAAXJ6Q.js +0 -1
- package/.output/public/_nuxt/DUVzIl3o.js +0 -1
- package/.output/public/_nuxt/DXdwpJ-I.js +0 -16
- package/.output/public/_nuxt/DY3uK7wM.js +0 -1
- package/.output/public/_nuxt/DYbZBZet.js +0 -1
- package/.output/public/_nuxt/D_4LPm1U.js +0 -1
- package/.output/public/_nuxt/DcJbYLTp.js +0 -1
- package/.output/public/_nuxt/DfF81NlA.js +0 -1
- package/.output/public/_nuxt/DhuOKJda.js +0 -1
- package/.output/public/_nuxt/Di-Nc75e.js +0 -1
- package/.output/public/_nuxt/Djs0Tlpa.js +0 -1
- package/.output/public/_nuxt/DmmdPt_5.js +0 -1
- package/.output/public/_nuxt/Dn5a-guE.js +0 -1
- package/.output/public/_nuxt/DuvzM-P1.js +0 -1
- package/.output/public/_nuxt/Dya5oK8u.js +0 -1
- package/.output/public/_nuxt/DzA58_Lm.js +0 -1
- package/.output/public/_nuxt/E3rXPwU8.js +0 -1
- package/.output/public/_nuxt/GtEM7xVU.js +0 -1
- package/.output/public/_nuxt/H6JbrRBU.js +0 -1
- package/.output/public/_nuxt/ILEvizzp.js +0 -1
- package/.output/public/_nuxt/JbHa4oXq.js +0 -1
- package/.output/public/_nuxt/Kw0zy3FG.js +0 -1
- package/.output/public/_nuxt/N5XtbYVD.js +0 -1
- package/.output/public/_nuxt/SrncdpaW.js +0 -1
- package/.output/public/_nuxt/U1MWjQMi.js +0 -1
- package/.output/public/_nuxt/Um1vPiAz.js +0 -1
- package/.output/public/_nuxt/XCjS70z4.js +0 -1
- package/.output/public/_nuxt/YX8avsvq.js +0 -2
- package/.output/public/_nuxt/_cy8R3nk.js +0 -1
- package/.output/public/_nuxt/apYB9dr5.js +0 -1
- package/.output/public/_nuxt/builds/meta/a892969f-e07d-4f44-8d7e-57a4b7f33d94.json +0 -1
- package/.output/public/_nuxt/dashboard.BxCOkJwt.css +0 -1
- package/.output/public/_nuxt/entry.NKPfH2kE.css +0 -1
- package/.output/public/_nuxt/g5MjDvm5.js +0 -1
- package/.output/public/_nuxt/nnQqD5pb.js +0 -1
- package/.output/public/_nuxt/vScW1Zgm.js +0 -1
- package/.output/public/_nuxt/wO6z2ugJ.js +0 -1
- package/.output/public/_nuxt/x6FRJ5ac.js +0 -1
- package/.output/public/_nuxt/zq-a1TeT.js +0 -1
- package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +0 -1
- package/.output/server/chunks/build/chat-CR3JIVEq.mjs.map +0 -1
- package/.output/server/chunks/build/docs-ChGwOPg5.mjs.map +0 -1
- package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +0 -1
- package/.output/server/chunks/build/index-C9PuieXh.mjs +0 -820
- package/.output/server/chunks/build/index-C9PuieXh.mjs.map +0 -1
- package/.output/server/chunks/build/settings-B2KXoGcz.mjs +0 -3232
- package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +0 -1
- package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +0 -1
- package/.output/server/chunks/build/useAgents-DHEXiFSc.mjs.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { AgentGlobalStats, AgentDetailStats } from '~~/shared/types'
|
|
3
|
+
import { formatCurrency, formatDuration, formatRelativeTime } from '~~/shared/utils/formatting'
|
|
3
4
|
|
|
4
5
|
const props = defineProps<{
|
|
5
6
|
stats: AgentGlobalStats | AgentDetailStats | null
|
|
@@ -7,32 +8,6 @@ const props = defineProps<{
|
|
|
7
8
|
loading?: boolean
|
|
8
9
|
}>()
|
|
9
10
|
|
|
10
|
-
function formatCurrency(value: number): string {
|
|
11
|
-
if (value < 0.01) return '<$0.01'
|
|
12
|
-
return `$${value.toFixed(2)}`
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function formatDuration(ms: number): string {
|
|
16
|
-
if (ms < 1000) return `${ms}ms`
|
|
17
|
-
if (ms < 60000) return `${(ms / 1000).toFixed(1)}s`
|
|
18
|
-
return `${(ms / 60000).toFixed(1)}m`
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function formatRelativeTime(dateStr: string | null): string {
|
|
22
|
-
if (!dateStr) return 'Never'
|
|
23
|
-
const date = new Date(dateStr)
|
|
24
|
-
const now = new Date()
|
|
25
|
-
const diff = now.getTime() - date.getTime()
|
|
26
|
-
const minutes = Math.floor(diff / 60000)
|
|
27
|
-
const hours = Math.floor(diff / 3600000)
|
|
28
|
-
const days = Math.floor(diff / 86400000)
|
|
29
|
-
|
|
30
|
-
if (minutes < 1) return 'Just now'
|
|
31
|
-
if (minutes < 60) return `${minutes}m ago`
|
|
32
|
-
if (hours < 24) return `${hours}h ago`
|
|
33
|
-
return `${days}d ago`
|
|
34
|
-
}
|
|
35
|
-
|
|
36
11
|
const globalStats = computed(() => {
|
|
37
12
|
if (props.variant !== 'global' || !props.stats) return []
|
|
38
13
|
const s = props.stats as AgentGlobalStats
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
active: boolean
|
|
4
|
+
}>()
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
assistantLastConversationId
|
|
8
|
+
} = usePreferences()
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
connectionStatus,
|
|
12
|
+
sessionStatus,
|
|
13
|
+
activeConversationId,
|
|
14
|
+
messages,
|
|
15
|
+
conversations,
|
|
16
|
+
streamingText,
|
|
17
|
+
streamingToolCalls,
|
|
18
|
+
loading,
|
|
19
|
+
connect,
|
|
20
|
+
sendMessage,
|
|
21
|
+
interrupt,
|
|
22
|
+
startNewConversation,
|
|
23
|
+
loadConversation,
|
|
24
|
+
loadConversations
|
|
25
|
+
} = useChat()
|
|
26
|
+
|
|
27
|
+
const messagesContainer = ref<HTMLElement | null>(null)
|
|
28
|
+
|
|
29
|
+
const conversationItems = computed(() =>
|
|
30
|
+
conversations.value.map(c => ({
|
|
31
|
+
label: c.title || `Chat ${new Date(c.startedAt).toLocaleDateString()}`,
|
|
32
|
+
value: c.id
|
|
33
|
+
}))
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
const selectedConversationId = ref<string | undefined>(
|
|
37
|
+
assistantLastConversationId.value ?? undefined
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
// Sync selection to preference cookie, only load if user picked a different conversation
|
|
41
|
+
watch(selectedConversationId, (id) => {
|
|
42
|
+
assistantLastConversationId.value = id ?? null
|
|
43
|
+
if (id && id !== activeConversationId.value)
|
|
44
|
+
loadConversation(id)
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
// Sync when a new conversation is created via chat:session_created
|
|
48
|
+
watch(activeConversationId, (id) => {
|
|
49
|
+
if (id) selectedConversationId.value = id
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
function handleSend(message: string) {
|
|
53
|
+
sendMessage(message)
|
|
54
|
+
nextTick(scrollToBottom)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function handleNewChat() {
|
|
58
|
+
startNewConversation()
|
|
59
|
+
selectedConversationId.value = undefined
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function scrollToBottom() {
|
|
63
|
+
if (messagesContainer.value)
|
|
64
|
+
messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
watch(streamingText, () => nextTick(scrollToBottom))
|
|
68
|
+
watch(() => messages.value.length, () => nextTick(scrollToBottom))
|
|
69
|
+
|
|
70
|
+
function setup() {
|
|
71
|
+
connect()
|
|
72
|
+
loadConversations()
|
|
73
|
+
if (assistantLastConversationId.value && !activeConversationId.value)
|
|
74
|
+
loadConversation(assistantLastConversationId.value)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
watch(() => props.active, (active) => {
|
|
78
|
+
if (active) setup()
|
|
79
|
+
}, { immediate: true })
|
|
80
|
+
|
|
81
|
+
defineExpose({ connectionStatus })
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<template>
|
|
85
|
+
<div class="flex flex-col flex-1 min-h-0">
|
|
86
|
+
<!-- Conversation selector -->
|
|
87
|
+
<div class="flex items-center gap-2 px-3 py-2 border-b border-default">
|
|
88
|
+
<USelectMenu
|
|
89
|
+
v-model="selectedConversationId"
|
|
90
|
+
:items="conversationItems"
|
|
91
|
+
value-key="value"
|
|
92
|
+
placeholder="New conversation"
|
|
93
|
+
size="xs"
|
|
94
|
+
class="flex-1"
|
|
95
|
+
icon="i-lucide-messages-square"
|
|
96
|
+
/>
|
|
97
|
+
<UButton
|
|
98
|
+
icon="i-lucide-plus"
|
|
99
|
+
size="xs"
|
|
100
|
+
color="primary"
|
|
101
|
+
variant="soft"
|
|
102
|
+
@click="handleNewChat"
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<!-- Messages -->
|
|
107
|
+
<div
|
|
108
|
+
ref="messagesContainer"
|
|
109
|
+
class="relative flex-1 overflow-y-auto p-3 space-y-3"
|
|
110
|
+
>
|
|
111
|
+
<!-- Loading overlay -->
|
|
112
|
+
<div
|
|
113
|
+
v-if="loading"
|
|
114
|
+
class="absolute inset-0 flex items-center justify-center bg-elevated/80 z-10"
|
|
115
|
+
>
|
|
116
|
+
<UIcon
|
|
117
|
+
name="i-lucide-loader-2"
|
|
118
|
+
class="size-6 animate-spin text-primary"
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<div
|
|
123
|
+
v-if="messages.length === 0 && sessionStatus !== 'streaming' && !loading"
|
|
124
|
+
class="flex flex-col items-center justify-center h-full text-dimmed"
|
|
125
|
+
>
|
|
126
|
+
<UIcon
|
|
127
|
+
name="i-lucide-message-square"
|
|
128
|
+
class="size-8 mb-2"
|
|
129
|
+
/>
|
|
130
|
+
<p class="text-sm">
|
|
131
|
+
Send a message to start chatting
|
|
132
|
+
</p>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<ChatMessageBubble
|
|
136
|
+
v-for="msg in messages"
|
|
137
|
+
:key="msg.id"
|
|
138
|
+
:message="msg"
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
<ChatStreamingMessage
|
|
142
|
+
v-if="sessionStatus === 'streaming'"
|
|
143
|
+
:text="streamingText"
|
|
144
|
+
:tool-calls="streamingToolCalls"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<!-- Input -->
|
|
149
|
+
<ChatInput
|
|
150
|
+
:session-status="sessionStatus"
|
|
151
|
+
:connection-status="connectionStatus"
|
|
152
|
+
@send="handleSend"
|
|
153
|
+
@interrupt="interrupt"
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
156
|
+
</template>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Terminal } from '@xterm/xterm'
|
|
3
|
+
import { FitAddon } from '@xterm/addon-fit'
|
|
4
|
+
import { WebLinksAddon } from '@xterm/addon-web-links'
|
|
5
|
+
import '@xterm/xterm/css/xterm.css'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
active: boolean
|
|
9
|
+
}>()
|
|
10
|
+
|
|
11
|
+
const terminalRef = ref<HTMLDivElement | null>(null)
|
|
12
|
+
const terminal = ref<Terminal | null>(null)
|
|
13
|
+
const fitAddon = ref<FitAddon | null>(null)
|
|
14
|
+
const terminalInitialized = ref(false)
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
status,
|
|
18
|
+
connect,
|
|
19
|
+
disconnect,
|
|
20
|
+
sendInput,
|
|
21
|
+
sendResize,
|
|
22
|
+
startPingInterval,
|
|
23
|
+
stopPingInterval
|
|
24
|
+
} = useTerminal()
|
|
25
|
+
|
|
26
|
+
const statusIcon = computed(() => {
|
|
27
|
+
switch (status.value) {
|
|
28
|
+
case 'connected': return 'i-lucide-wifi'
|
|
29
|
+
case 'connecting': return 'i-lucide-loader-2'
|
|
30
|
+
default: return 'i-lucide-wifi-off'
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
function statusClasses(s: string) {
|
|
35
|
+
return [
|
|
36
|
+
s === 'connecting' && 'animate-spin',
|
|
37
|
+
s === 'connected' && 'text-success',
|
|
38
|
+
(s === 'error' || s === 'disconnected') && 'text-muted'
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function initTerminal() {
|
|
43
|
+
if (!terminalRef.value || terminalInitialized.value) return
|
|
44
|
+
|
|
45
|
+
const term = new Terminal({
|
|
46
|
+
cursorBlink: true,
|
|
47
|
+
fontSize: 14,
|
|
48
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
|
|
49
|
+
theme: {
|
|
50
|
+
background: '#1a1a1a',
|
|
51
|
+
foreground: '#e5e5e5',
|
|
52
|
+
cursor: '#e5e5e5',
|
|
53
|
+
cursorAccent: '#1a1a1a',
|
|
54
|
+
selectionBackground: '#3b3b3b',
|
|
55
|
+
black: '#1a1a1a',
|
|
56
|
+
red: '#ff5555',
|
|
57
|
+
green: '#50fa7b',
|
|
58
|
+
yellow: '#f1fa8c',
|
|
59
|
+
blue: '#6272a4',
|
|
60
|
+
magenta: '#ff79c6',
|
|
61
|
+
cyan: '#8be9fd',
|
|
62
|
+
white: '#e5e5e5',
|
|
63
|
+
brightBlack: '#4d4d4d',
|
|
64
|
+
brightRed: '#ff6e6e',
|
|
65
|
+
brightGreen: '#69ff94',
|
|
66
|
+
brightYellow: '#ffffa5',
|
|
67
|
+
brightBlue: '#d6acff',
|
|
68
|
+
brightMagenta: '#ff92df',
|
|
69
|
+
brightCyan: '#a4ffff',
|
|
70
|
+
brightWhite: '#ffffff'
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
const fit = new FitAddon()
|
|
75
|
+
fitAddon.value = fit
|
|
76
|
+
|
|
77
|
+
term.loadAddon(fit)
|
|
78
|
+
term.loadAddon(new WebLinksAddon())
|
|
79
|
+
|
|
80
|
+
term.open(terminalRef.value)
|
|
81
|
+
fit.fit()
|
|
82
|
+
|
|
83
|
+
terminal.value = term
|
|
84
|
+
terminalInitialized.value = true
|
|
85
|
+
|
|
86
|
+
term.onData((data) => {
|
|
87
|
+
sendInput(data)
|
|
88
|
+
})
|
|
89
|
+
term.onResize(({ cols, rows }) => {
|
|
90
|
+
sendResize(cols, rows)
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
connect(term)
|
|
94
|
+
startPingInterval()
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function handleResize() {
|
|
98
|
+
if (fitAddon.value && terminal.value)
|
|
99
|
+
fitAddon.value.fit()
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function handleReconnect() {
|
|
103
|
+
if (status.value === 'connecting') return
|
|
104
|
+
if (!terminalInitialized.value) {
|
|
105
|
+
nextTick(initTerminal)
|
|
106
|
+
return
|
|
107
|
+
}
|
|
108
|
+
if (terminal.value)
|
|
109
|
+
connect(terminal.value)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let resizeObserver: ResizeObserver | null = null
|
|
113
|
+
|
|
114
|
+
function setup() {
|
|
115
|
+
if (!terminalInitialized.value) {
|
|
116
|
+
initTerminal()
|
|
117
|
+
if (terminalRef.value) {
|
|
118
|
+
resizeObserver = new ResizeObserver(() => handleResize())
|
|
119
|
+
resizeObserver.observe(terminalRef.value)
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
handleResize()
|
|
123
|
+
terminal.value?.focus()
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
watch(() => props.active, (active) => {
|
|
128
|
+
if (active) nextTick(setup)
|
|
129
|
+
}, { immediate: true })
|
|
130
|
+
|
|
131
|
+
onUnmounted(() => {
|
|
132
|
+
stopPingInterval()
|
|
133
|
+
disconnect()
|
|
134
|
+
if (resizeObserver) resizeObserver.disconnect()
|
|
135
|
+
if (terminal.value) terminal.value.dispose()
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
defineExpose({ status })
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<template>
|
|
142
|
+
<div class="flex flex-col flex-1 min-h-0">
|
|
143
|
+
<div class="flex items-center justify-between px-3 py-1.5 border-b border-default text-sm bg-muted/50">
|
|
144
|
+
<div class="flex items-center gap-2 text-muted text-xs">
|
|
145
|
+
<UIcon
|
|
146
|
+
:name="statusIcon"
|
|
147
|
+
:class="['size-3.5', ...statusClasses(status)]"
|
|
148
|
+
/>
|
|
149
|
+
<span>{{ status === 'connected' ? 'Connected' : status === 'connecting' ? 'Connecting...' : status === 'error' ? 'Connection error' : 'Disconnected' }}</span>
|
|
150
|
+
</div>
|
|
151
|
+
<UButton
|
|
152
|
+
v-if="status === 'disconnected' || status === 'error'"
|
|
153
|
+
size="xs"
|
|
154
|
+
color="neutral"
|
|
155
|
+
variant="ghost"
|
|
156
|
+
icon="i-lucide-refresh-cw"
|
|
157
|
+
@click="handleReconnect"
|
|
158
|
+
>
|
|
159
|
+
Reconnect
|
|
160
|
+
</UButton>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<div
|
|
164
|
+
ref="terminalRef"
|
|
165
|
+
class="flex-1 p-1 bg-[#1a1a1a]"
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</template>
|
|
169
|
+
|
|
170
|
+
<style>
|
|
171
|
+
.xterm {
|
|
172
|
+
height: 100%;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.xterm-viewport {
|
|
176
|
+
overflow-y: auto !important;
|
|
177
|
+
}
|
|
178
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { ChatSessionStatus, ChatConnectionStatus } from '~~/shared/types'
|
|
2
|
+
import type { ChatSessionStatus, ChatConnectionStatus, ChatImageBlock, ChatDocumentBlock } from '~~/shared/types'
|
|
3
3
|
|
|
4
4
|
const props = defineProps<{
|
|
5
5
|
sessionStatus: ChatSessionStatus
|
|
@@ -7,16 +7,24 @@ const props = defineProps<{
|
|
|
7
7
|
}>()
|
|
8
8
|
|
|
9
9
|
const emit = defineEmits<{
|
|
10
|
-
send: [message: string]
|
|
10
|
+
send: [message: string, attachments?: ChatImageBlock[], documents?: ChatDocumentBlock[]]
|
|
11
11
|
interrupt: []
|
|
12
12
|
}>()
|
|
13
13
|
|
|
14
|
+
const { attachments, addFiles, removeAttachment, clearAttachments, toImageBlocks, toDocumentBlocks } = useAttachments()
|
|
15
|
+
|
|
14
16
|
const inputText = ref('')
|
|
15
17
|
const textareaRef = ref<HTMLTextAreaElement | null>(null)
|
|
18
|
+
const fileInputRef = ref<HTMLInputElement | null>(null)
|
|
19
|
+
const isDragging = ref(false)
|
|
16
20
|
|
|
17
21
|
const isStreaming = computed(() => props.sessionStatus === 'streaming')
|
|
18
22
|
const isConnected = computed(() => props.connectionStatus === 'connected')
|
|
19
|
-
const canSend = computed(() =>
|
|
23
|
+
const canSend = computed(() =>
|
|
24
|
+
isConnected.value
|
|
25
|
+
&& !isStreaming.value
|
|
26
|
+
&& (inputText.value.trim().length > 0 || attachments.value.length > 0)
|
|
27
|
+
)
|
|
20
28
|
|
|
21
29
|
function handleKeydown(e: KeyboardEvent) {
|
|
22
30
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
@@ -27,8 +35,16 @@ function handleKeydown(e: KeyboardEvent) {
|
|
|
27
35
|
|
|
28
36
|
function handleSend() {
|
|
29
37
|
if (!canSend.value) return
|
|
30
|
-
|
|
38
|
+
const images = toImageBlocks()
|
|
39
|
+
const docs = toDocumentBlocks()
|
|
40
|
+
emit(
|
|
41
|
+
'send',
|
|
42
|
+
inputText.value.trim(),
|
|
43
|
+
images.length > 0 ? images : undefined,
|
|
44
|
+
docs.length > 0 ? docs : undefined
|
|
45
|
+
)
|
|
31
46
|
inputText.value = ''
|
|
47
|
+
clearAttachments()
|
|
32
48
|
nextTick(() => {
|
|
33
49
|
if (textareaRef.value) textareaRef.value.style.height = 'auto'
|
|
34
50
|
})
|
|
@@ -39,10 +55,64 @@ function autoResize(e: Event) {
|
|
|
39
55
|
target.style.height = 'auto'
|
|
40
56
|
target.style.height = Math.min(target.scrollHeight, 200) + 'px'
|
|
41
57
|
}
|
|
58
|
+
|
|
59
|
+
function handlePaste(e: ClipboardEvent) {
|
|
60
|
+
const files = Array.from(e.clipboardData?.files || [])
|
|
61
|
+
if (files.length > 0) {
|
|
62
|
+
e.preventDefault()
|
|
63
|
+
addFiles(files)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function handleDragOver(e: DragEvent) {
|
|
68
|
+
e.preventDefault()
|
|
69
|
+
isDragging.value = true
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function handleDragLeave() {
|
|
73
|
+
isDragging.value = false
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function handleDrop(e: DragEvent) {
|
|
77
|
+
e.preventDefault()
|
|
78
|
+
isDragging.value = false
|
|
79
|
+
const files = Array.from(e.dataTransfer?.files || [])
|
|
80
|
+
if (files.length > 0) addFiles(files)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function handleFileSelect(e: Event) {
|
|
84
|
+
const input = e.target as HTMLInputElement
|
|
85
|
+
if (input.files?.length) addFiles(input.files)
|
|
86
|
+
input.value = ''
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const FILE_ACCEPT = [
|
|
90
|
+
'image/jpeg', 'image/png', 'image/gif', 'image/webp',
|
|
91
|
+
'application/pdf',
|
|
92
|
+
'.txt', '.md', '.js', '.ts', '.jsx', '.tsx', '.py', '.rb', '.rs', '.go',
|
|
93
|
+
'.java', '.c', '.cpp', '.h', '.cs', '.swift', '.kt',
|
|
94
|
+
'.json', '.yaml', '.yml', '.toml', '.ini',
|
|
95
|
+
'.xml', '.html', '.css', '.scss',
|
|
96
|
+
'.sh', '.sql', '.graphql', '.csv', '.log',
|
|
97
|
+
'.vue', '.svelte', '.prisma', '.lua', '.dart'
|
|
98
|
+
].join(',')
|
|
42
99
|
</script>
|
|
43
100
|
|
|
44
101
|
<template>
|
|
45
|
-
<div
|
|
102
|
+
<div
|
|
103
|
+
class="border-t border-default p-4 relative"
|
|
104
|
+
@dragover="handleDragOver"
|
|
105
|
+
@dragleave="handleDragLeave"
|
|
106
|
+
@drop="handleDrop"
|
|
107
|
+
>
|
|
108
|
+
<!-- Drag overlay -->
|
|
109
|
+
<div
|
|
110
|
+
v-if="isDragging"
|
|
111
|
+
class="absolute inset-0 bg-primary/10 border-2 border-dashed border-primary rounded-lg flex items-center justify-center z-10"
|
|
112
|
+
>
|
|
113
|
+
<span class="text-sm text-primary font-medium">Drop files here</span>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
46
116
|
<!-- Connection status -->
|
|
47
117
|
<div
|
|
48
118
|
v-if="!isConnected"
|
|
@@ -52,6 +122,45 @@ function autoResize(e: Event) {
|
|
|
52
122
|
<span>{{ connectionStatus === 'connecting' ? 'Connecting...' : 'Disconnected' }}</span>
|
|
53
123
|
</div>
|
|
54
124
|
|
|
125
|
+
<!-- Attachment preview strip -->
|
|
126
|
+
<div
|
|
127
|
+
v-if="attachments.length"
|
|
128
|
+
class="flex gap-2 mb-2 flex-wrap"
|
|
129
|
+
>
|
|
130
|
+
<div
|
|
131
|
+
v-for="att in attachments"
|
|
132
|
+
:key="att.id"
|
|
133
|
+
class="relative group rounded-lg overflow-hidden border border-default"
|
|
134
|
+
:class="att.kind === 'image' ? 'size-16' : 'h-10 px-3 flex items-center gap-1.5 bg-elevated/50'"
|
|
135
|
+
>
|
|
136
|
+
<!-- Image thumbnail -->
|
|
137
|
+
<img
|
|
138
|
+
v-if="att.kind === 'image'"
|
|
139
|
+
:src="att.previewUrl"
|
|
140
|
+
:alt="att.name"
|
|
141
|
+
class="size-full object-cover"
|
|
142
|
+
>
|
|
143
|
+
<!-- Document chip -->
|
|
144
|
+
<template v-else>
|
|
145
|
+
<UIcon
|
|
146
|
+
:name="att.name.endsWith('.pdf') ? 'i-lucide-file-text' : 'i-lucide-file-code'"
|
|
147
|
+
class="size-4 text-dimmed shrink-0"
|
|
148
|
+
/>
|
|
149
|
+
<span class="text-xs truncate max-w-24">{{ att.name }}</span>
|
|
150
|
+
</template>
|
|
151
|
+
|
|
152
|
+
<button
|
|
153
|
+
class="absolute top-0 right-0 p-0.5 bg-error/80 rounded-bl-lg opacity-0 group-hover:opacity-100 transition-opacity"
|
|
154
|
+
@click="removeAttachment(att.id)"
|
|
155
|
+
>
|
|
156
|
+
<UIcon
|
|
157
|
+
name="i-lucide-x"
|
|
158
|
+
class="size-3 text-white"
|
|
159
|
+
/>
|
|
160
|
+
</button>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
55
164
|
<div class="flex items-start gap-2">
|
|
56
165
|
<textarea
|
|
57
166
|
ref="textareaRef"
|
|
@@ -62,6 +171,25 @@ function autoResize(e: Event) {
|
|
|
62
171
|
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"
|
|
63
172
|
@keydown="handleKeydown"
|
|
64
173
|
@input="autoResize"
|
|
174
|
+
@paste="handlePaste"
|
|
175
|
+
/>
|
|
176
|
+
|
|
177
|
+
<input
|
|
178
|
+
ref="fileInputRef"
|
|
179
|
+
type="file"
|
|
180
|
+
:accept="FILE_ACCEPT"
|
|
181
|
+
multiple
|
|
182
|
+
class="hidden"
|
|
183
|
+
@change="handleFileSelect"
|
|
184
|
+
>
|
|
185
|
+
|
|
186
|
+
<UButton
|
|
187
|
+
icon="i-lucide-paperclip"
|
|
188
|
+
variant="ghost"
|
|
189
|
+
color="neutral"
|
|
190
|
+
size="md"
|
|
191
|
+
:disabled="!isConnected || isStreaming"
|
|
192
|
+
@click="fileInputRef?.click()"
|
|
65
193
|
/>
|
|
66
194
|
|
|
67
195
|
<UButton
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { ChatConversation } from '~~/shared/types'
|
|
3
|
+
import { formatRelativeTime } from '~~/shared/utils/formatting'
|
|
3
4
|
|
|
4
5
|
defineProps<{
|
|
5
6
|
conversations: ChatConversation[]
|
|
@@ -11,17 +12,6 @@ const emit = defineEmits<{
|
|
|
11
12
|
delete: [id: string]
|
|
12
13
|
new: []
|
|
13
14
|
}>()
|
|
14
|
-
|
|
15
|
-
function formatDate(date: Date | string) {
|
|
16
|
-
const d = new Date(date)
|
|
17
|
-
const now = new Date()
|
|
18
|
-
const diff = now.getTime() - d.getTime()
|
|
19
|
-
|
|
20
|
-
if (diff < 60000) return 'just now'
|
|
21
|
-
if (diff < 3600000) return `${Math.floor(diff / 60000)}m ago`
|
|
22
|
-
if (diff < 86400000) return `${Math.floor(diff / 3600000)}h ago`
|
|
23
|
-
return d.toLocaleDateString()
|
|
24
|
-
}
|
|
25
15
|
</script>
|
|
26
16
|
|
|
27
17
|
<template>
|
|
@@ -74,7 +64,7 @@ function formatDate(date: Date | string) {
|
|
|
74
64
|
/>
|
|
75
65
|
</div>
|
|
76
66
|
<div class="flex items-center gap-2 mt-1 text-xs text-dimmed">
|
|
77
|
-
<span>{{
|
|
67
|
+
<span>{{ formatRelativeTime(conv.startedAt) }}</span>
|
|
78
68
|
<span v-if="conv.messageCount">{{ conv.messageCount }} msgs</span>
|
|
79
69
|
<span v-if="conv.totalCostUsd > 0">${{ conv.totalCostUsd.toFixed(4) }}</span>
|
|
80
70
|
</div>
|