cognova 0.1.10 → 0.2.2
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/{BLIw7q7e.js → 4MiwzAAt.js} +2 -2
- package/.output/public/_nuxt/{B8gRcrNP.js → 5ZXA0Ckq.js} +1 -1
- package/.output/public/_nuxt/9IQmsEjr.js +1 -0
- package/.output/public/_nuxt/{DlmPGBGX.js → 9QnH0xQM.js} +1 -1
- package/.output/public/_nuxt/{Qi4Arc25.js → B1X4Bzcy.js} +1 -1
- package/.output/public/_nuxt/{kuWCWJ92.js → B3y_Qqox.js} +1 -1
- package/.output/public/_nuxt/{CJVO4EWp.js → B6S_ob86.js} +1 -1
- package/.output/public/_nuxt/{xdp-pGVh.js → BAIz-dEB.js} +1 -1
- package/.output/public/_nuxt/{DIF41aNz.js → BCtfQCzC.js} +1 -1
- package/.output/public/_nuxt/BIIJhjQO.js +1 -0
- package/.output/public/_nuxt/{QOhiCNXN.js → BIckl6wA.js} +1 -1
- package/.output/public/_nuxt/{CqsT2LL7.js → BJ3o57WW.js} +1 -1
- package/.output/public/_nuxt/BNetzZzF.js +1 -0
- package/.output/public/_nuxt/{C5jkgqcy.js → BOj6t-oo.js} +1 -1
- package/.output/public/_nuxt/BS0ofHJK.js +1 -0
- package/.output/public/_nuxt/{CdKHIoKZ.js → BWhMnjID.js} +1 -1
- package/.output/public/_nuxt/{BUjpjVNI.js → BYjadNrw.js} +1 -1
- package/.output/public/_nuxt/{DLkyutNs.js → BZXMQuYP.js} +1 -1
- package/.output/public/_nuxt/B_3_hrpn.js +1 -0
- package/.output/public/_nuxt/BaBZjmMC.js +1 -0
- package/.output/public/_nuxt/BaMqDm5u.js +1 -0
- package/.output/public/_nuxt/{DwSbu8wg.js → BasgsT_S.js} +1 -1
- package/.output/public/_nuxt/{B4nb4eka.js → BffWCM73.js} +1 -1
- package/.output/public/_nuxt/{BxaDmjPM.js → BhzMoffi.js} +1 -1
- package/.output/public/_nuxt/{DjzaeRs8.js → BjjCvHLT.js} +1 -1
- package/.output/public/_nuxt/{CtJTw_81.js → BlAZO7nq.js} +1 -1
- package/.output/public/_nuxt/{C6nLQFo5.js → BlhFigLL.js} +1 -1
- package/.output/public/_nuxt/{CiJs9fhO.js → Bm9LyG4F.js} +1 -1
- package/.output/public/_nuxt/BoIxv-gM.js +1 -0
- package/.output/public/_nuxt/{C8xYfk_L.js → BqKFIuRj.js} +1 -1
- package/.output/public/_nuxt/Br19oYkq.js +1 -0
- package/.output/public/_nuxt/{htEHZODo.js → BrNqhp1a.js} +3 -3
- package/.output/public/_nuxt/{DFKQfGt8.js → BsEZoHd1.js} +1 -1
- package/.output/public/_nuxt/{CmF_IsFj.js → BxXOsXrM.js} +3 -3
- package/.output/public/_nuxt/{q7M6chAB.js → BzOqrmGa.js} +3 -3
- package/.output/public/_nuxt/{DT_NtxcV.js → C0JKNMDO.js} +1 -1
- package/.output/public/_nuxt/{BOb3QiPL.js → C0kh_F7v.js} +1 -1
- package/.output/public/_nuxt/{D472oOJg.js → C3FxIITy.js} +1 -1
- package/.output/public/_nuxt/{Bh7WRSzZ.js → C4pxqdgg.js} +1 -1
- package/.output/public/_nuxt/{ByWk4RVe.js → C61KgSco.js} +1 -1
- package/.output/public/_nuxt/{TjI_tk0y.js → C69W7k2j.js} +1 -1
- package/.output/public/_nuxt/{uqOLgWHD.js → C6RC3lA1.js} +1 -1
- package/.output/public/_nuxt/{DvA5meSv.js → C6aqGHu1.js} +1 -1
- package/.output/public/_nuxt/{CQM_5Ht0.js → CJUdYEdO.js} +1 -1
- package/.output/public/_nuxt/{BzWvPP8W.js → CKkC3Ptm.js} +1 -1
- package/.output/public/_nuxt/CNnJrDvu.js +1 -0
- package/.output/public/_nuxt/{Bf2SSE6Q.js → CVJQGP1Q.js} +1 -1
- package/.output/public/_nuxt/{0p0wrrYN.js → CVgTJeSq.js} +1 -1
- package/.output/public/_nuxt/CWMUi89H.js +1 -0
- package/.output/public/_nuxt/{DUYrX_jl.js → CYP_MLH8.js} +1 -1
- package/.output/public/_nuxt/{DEDt4pMc.js → C_BdYLzz.js} +1 -1
- package/.output/public/_nuxt/{CU3_Ewk2.js → Cdt3I3Go.js} +1 -1
- package/.output/public/_nuxt/{DX5y-Dpt.js → Cdu2qGgq.js} +1 -1
- package/.output/public/_nuxt/{DQunOghN.js → CeIVm4A3.js} +1 -1
- package/.output/public/_nuxt/CeIu7z4p.js +1 -0
- package/.output/public/_nuxt/{B73gh0JS.js → Ci7UEZQh.js} +1 -1
- package/.output/public/_nuxt/{C7NKjT6R.js → CihWZmJe.js} +2 -2
- package/.output/public/_nuxt/{902fefRh.js → CitkKxhw.js} +1 -1
- package/.output/public/_nuxt/{DH_IrAcJ.js → CmzH6R-N.js} +2 -2
- package/.output/public/_nuxt/{CgPM54k_.js → Cp2MA0cm.js} +1 -1
- package/.output/public/_nuxt/{hfaTbWV_.js → CqU2XbzO.js} +1 -1
- package/.output/public/_nuxt/{CuxiR1jN.js → Cqy_L_ip.js} +1 -1
- package/.output/public/_nuxt/{BFmbqknL.js → Cr8ixbr1.js} +1 -1
- package/.output/public/_nuxt/{BkiRMhMm.js → CsJ9KhQ4.js} +1 -1
- package/.output/public/_nuxt/{Dhvv7eaa.js → CtYFj7k1.js} +1 -1
- package/.output/public/_nuxt/{DG0VCYsy.js → CtchsY6e.js} +1 -1
- package/.output/public/_nuxt/{pqmDf_cQ.js → Cvp7FI3T.js} +1 -1
- package/.output/public/_nuxt/{38G-HXi8.js → CxuZBC8n.js} +5 -5
- package/.output/public/_nuxt/D2689qk4.js +1 -0
- package/.output/public/_nuxt/{Dw5YM8ji.js → D31L7Ks6.js} +1 -1
- package/.output/public/_nuxt/{DYTkcgRd.js → D3RiUGdz.js} +1 -1
- package/.output/public/_nuxt/{Csa19Lyu.js → D3e44mCL.js} +1 -1
- package/.output/public/_nuxt/{DmXY_FiQ.js → D6t3dcTl.js} +1 -1
- package/.output/public/_nuxt/{ChNxcBlH.js → DAQhmSv4.js} +1 -1
- package/.output/public/_nuxt/{BFtDSgo7.js → DB359q8R.js} +1 -1
- package/.output/public/_nuxt/{CrUNulhU.js → DCzfkCGa.js} +1 -1
- package/.output/public/_nuxt/{Cn1H4f01.js → DG-T44jj.js} +1 -1
- package/.output/public/_nuxt/{CAGIVdiL.js → DGX0tzL8.js} +1 -1
- package/.output/public/_nuxt/DHG66LPS.js +1 -0
- package/.output/public/_nuxt/{BV0QyLX9.js → DHKLCQRG.js} +1 -1
- package/.output/public/_nuxt/{DFs-kxzi.js → DIoI0uJm.js} +1 -1
- package/.output/public/_nuxt/{koWn-xAZ.js → DJ5V-y_x.js} +1 -1
- package/.output/public/_nuxt/{HUnwr3r4.js → DJMS2og1.js} +1 -1
- package/.output/public/_nuxt/{CjfarCg3.js → DJjDvbZE.js} +1 -1
- package/.output/public/_nuxt/DK9jxJ0g.js +1 -0
- package/.output/public/_nuxt/{BjN5vE4c.js → DKZxeXDQ.js} +1 -1
- package/.output/public/_nuxt/{CcWl1F-m.js → DLETdGFL.js} +1 -1
- package/.output/public/_nuxt/DOICd-Ld.js +1 -0
- package/.output/public/_nuxt/{bX88p2Mb.js → DPEcH-gi.js} +3 -3
- package/.output/public/_nuxt/{DDqY0xzR.js → DSRrg8JT.js} +1 -1
- package/.output/public/_nuxt/{B67bSHkr.js → DTDgHTuh.js} +2 -2
- package/.output/public/_nuxt/{BYzrgyQu.js → D_3Rq1BS.js} +1 -1
- package/.output/public/_nuxt/{TQO0uTDM.js → Daz4MeL6.js} +1 -1
- package/.output/public/_nuxt/{DxkqpACx.js → Db2v8O7O.js} +1 -1
- package/.output/public/_nuxt/{CHa8PuBL.js → Db8-_gO7.js} +1 -1
- package/.output/public/_nuxt/{BUEnkhcM.js → DfQu3kEw.js} +1 -1
- package/.output/public/_nuxt/{hDpBJf9-.js → DgV-EDJ9.js} +1 -1
- package/.output/public/_nuxt/{D1CNUSvv.js → DnjGH3SQ.js} +1 -1
- package/.output/public/_nuxt/Dp2X5R2m.js +1 -0
- package/.output/public/_nuxt/DqB723Z0.js +1 -0
- package/.output/public/_nuxt/{DcIiuvW-.js → DyRelyfs.js} +1 -1
- package/.output/public/_nuxt/{sgWRawF5.js → Dy_Cq5LQ.js} +1 -1
- package/.output/public/_nuxt/{B4T7pJz5.js → DznawRFW.js} +1 -1
- package/.output/public/_nuxt/EuOqK1A6.js +1 -0
- package/.output/public/_nuxt/{Dn4PGlE2.js → FNC8XZTk.js} +1 -1
- package/.output/public/_nuxt/{ZToTf_46.js → Fukkqjkf.js} +1 -1
- package/.output/public/_nuxt/{D5aulRKh.js → FvlxxmNk.js} +2 -2
- package/.output/public/_nuxt/{C2IkB9Vg.js → IRSbVPIu.js} +1 -1
- package/.output/public/_nuxt/{QESaAMMF.js → JJ3634gV.js} +1 -1
- package/.output/public/_nuxt/{DGUr7xQ7.js → Jez9DHn7.js} +1 -1
- package/.output/public/_nuxt/{DPdR3tu5.js → KKK6HVeG.js} +1 -1
- package/.output/public/_nuxt/{D0bh5qKf.js → Lwdv_RKd.js} +1 -1
- package/.output/public/_nuxt/{BkRZ4-cg.js → Nb2jBtYT.js} +1 -1
- package/.output/public/_nuxt/Q8Ps7oN5.js +1 -0
- package/.output/public/_nuxt/SXTDhzp6.js +1 -0
- package/.output/public/_nuxt/{GC9cY_vb.js → Sg2Lwc46.js} +1 -1
- package/.output/public/_nuxt/{GI6TTFJt.js → YuTZB7sD.js} +1 -1
- package/.output/public/_nuxt/{D2_L0Ze1.js → _CYZi8HN.js} +1 -1
- package/.output/public/_nuxt/_J_7XIn-.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a1e9100c-1a4f-4f7e-bb53-9dbe0d07effb.json +1 -0
- package/.output/public/_nuxt/{DZNG1AbU.js → cABRLVee.js} +1 -1
- package/.output/public/_nuxt/eko-0FUm.js +1 -0
- package/.output/public/_nuxt/entry.CGxIBGAf.css +1 -0
- package/.output/public/_nuxt/{BIjt_cIY.js → g20UHUCv.js} +1 -1
- package/.output/public/_nuxt/{HIlTvc-2.js → gBC9k4Qj.js} +1 -1
- package/.output/public/_nuxt/{IQoLFBX8.js → ghuJ76mD.js} +1 -1
- package/.output/public/_nuxt/{BGYWH_3A.js → iBGCpHdw.js} +2 -2
- package/.output/public/_nuxt/{uUGV1V-6.js → inmzPrjz.js} +1 -1
- package/.output/public/_nuxt/{CgHipF8Q.js → m5kGCDpI.js} +1 -1
- package/.output/public/_nuxt/{Bj0OFhNx.js → nIU2F7ia.js} +3 -3
- package/.output/public/_nuxt/{Dcv_tyzb.js → oIX-ZDN6.js} +1 -1
- package/.output/public/_nuxt/{B7NSgclV.js → pcUI-zuY.js} +1 -1
- package/.output/public/_nuxt/{DpF6VoC4.js → sf57orEk.js} +1 -1
- package/.output/public/_nuxt/{DS_mF4Ol.js → wCGVE8_e.js} +1 -1
- package/.output/public/_nuxt/{KAzeBbaL.js → xuzLdW-o.js} +1 -1
- package/.output/public/_nuxt/{ytKsJZlj.js → yNrp2XvX.js} +1 -1
- package/.output/public/_nuxt/{B3mdl0Ae.js → yuf23kh9.js} +1 -1
- package/.output/server/chunks/build/{_uuid_-DAZ5CM0C.mjs → _uuid_-0UgdUhfY.mjs} +6 -5
- package/.output/server/chunks/build/{_uuid_-DAZ5CM0C.mjs.map → _uuid_-0UgdUhfY.mjs.map} +1 -1
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs +1109 -0
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs.map +1 -0
- package/.output/server/chunks/build/{docs-CFAI1clt.mjs → docs-Dk2JnYq3.mjs} +6 -5
- package/.output/server/chunks/build/{docs-CFAI1clt.mjs.map → docs-Dk2JnYq3.mjs.map} +1 -1
- package/.output/server/chunks/build/server.mjs +3 -3
- package/.output/server/chunks/build/settings-DdkKCJ00.mjs +1 -1
- package/.output/server/chunks/build/styles.mjs +4 -4
- package/.output/server/chunks/build/{CodeEditorFallback-DfYly7f5.mjs → useCopyToClipboard-vi6FYyyZ.mjs} +29 -2
- package/.output/server/chunks/build/useCopyToClipboard-vi6FYyyZ.mjs.map +1 -0
- package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +819 -824
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +149 -0
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/home.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get6.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get7.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get8.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/Claude/CLAUDE.md +9 -4
- package/Claude/skills/environment/SKILL.md +6 -0
- package/Claude/skills/memory/SKILL.md +6 -0
- package/Claude/skills/project/SKILL.md +6 -0
- package/Claude/skills/secret/SKILL.md +85 -0
- package/Claude/skills/secret/secret.py +146 -0
- package/Claude/skills/skill-creator/SKILL.md +30 -0
- package/Claude/skills/task/SKILL.md +6 -0
- package/app/components/dashboard/RecentChats.vue +93 -0
- package/app/components/dashboard/RecentDocs.vue +108 -0
- package/app/components/dashboard/StatCards.vue +82 -0
- package/app/components/dashboard/UpcomingTasks.vue +119 -0
- package/app/components/dashboard/UsageSummary.vue +94 -0
- package/app/components/editor/DocumentEditor.vue +5 -3
- package/app/components/skills/Card.vue +82 -0
- package/app/components/skills/CreateModal.vue +156 -0
- package/app/components/skills/Editor.vue +135 -0
- package/app/components/skills/FileTree.vue +336 -0
- package/app/components/skills/LibraryCard.vue +122 -0
- package/app/components/skills/RenameModal.vue +84 -0
- package/app/composables/useCopyToClipboard.ts +37 -0
- package/app/layouts/dashboard.vue +7 -0
- package/app/pages/chat.vue +11 -1
- package/app/pages/dashboard.vue +65 -64
- package/app/pages/skills/[name].vue +198 -0
- package/app/pages/skills/index.vue +157 -0
- package/app/pages/skills/library.vue +209 -0
- package/app/pages/view/[uuid].vue +4 -3
- package/dist/cli/index.js +23 -23
- package/nuxt.config.ts +9 -0
- package/package.json +1 -1
- package/server/api/dashboard/overview.get.ts +133 -0
- package/server/api/skills/[name]/files/create.post.ts +45 -0
- package/server/api/skills/[name]/files/delete.post.ts +45 -0
- package/server/api/skills/[name]/files/index.get.ts +28 -0
- package/server/api/skills/[name]/files/read.post.ts +41 -0
- package/server/api/skills/[name]/files/write.post.ts +42 -0
- package/server/api/skills/[name]/index.get.ts +54 -0
- package/server/api/skills/[name]/rename.post.ts +64 -0
- package/server/api/skills/[name]/toggle.post.ts +32 -0
- package/server/api/skills/create.post.ts +51 -0
- package/server/api/skills/generate.post.ts +126 -0
- package/server/api/skills/index.get.ts +57 -0
- package/server/api/skills/library/check-updates.get.ts +46 -0
- package/server/api/skills/library/index.get.ts +56 -0
- package/server/api/skills/library/install.post.ts +73 -0
- package/server/db/schema.ts +17 -0
- package/server/drizzle/migrations/0012_good_deadpool.sql +12 -0
- package/server/drizzle/migrations/0013_swift_snowbird.sql +1 -0
- package/server/drizzle/migrations/meta/0012_snapshot.json +1713 -0
- package/server/drizzle/migrations/meta/0013_snapshot.json +1720 -0
- package/server/drizzle/migrations/meta/_journal.json +14 -0
- package/server/middleware/auth.ts +0 -1
- package/server/plugins/05.skills-catalog.ts +105 -0
- package/server/utils/skills-path.ts +197 -0
- package/shared/types/index.ts +102 -0
- package/.output/public/_nuxt/BAWOIJ__.js +0 -1
- package/.output/public/_nuxt/B_paJhyq.js +0 -1
- package/.output/public/_nuxt/BdYiqlvd.js +0 -1
- package/.output/public/_nuxt/BpiqBbAF.js +0 -1
- package/.output/public/_nuxt/BqDfJ2hd.js +0 -1
- package/.output/public/_nuxt/BxgB0-mq.js +0 -1
- package/.output/public/_nuxt/C1hs5K_e.js +0 -1
- package/.output/public/_nuxt/C4Ncdd9K.js +0 -1
- package/.output/public/_nuxt/CAQ2bGHm.js +0 -1
- package/.output/public/_nuxt/CCpQAJpz.js +0 -1
- package/.output/public/_nuxt/CXXD-owe.js +0 -1
- package/.output/public/_nuxt/CcRijyCZ.js +0 -1
- package/.output/public/_nuxt/CoEfPCKj.js +0 -1
- package/.output/public/_nuxt/D08h2e32.js +0 -1
- package/.output/public/_nuxt/D_t_j6EB.js +0 -1
- package/.output/public/_nuxt/DaZy6Ki2.js +0 -1
- package/.output/public/_nuxt/DdrudNqf.js +0 -1
- package/.output/public/_nuxt/DdtmJxeb.js +0 -1
- package/.output/public/_nuxt/Dgv5fJ6Q.js +0 -1
- package/.output/public/_nuxt/DhIluGHO.js +0 -1
- package/.output/public/_nuxt/DuRk5Dc_.js +0 -1
- package/.output/public/_nuxt/VFwvl1mU.js +0 -1
- package/.output/public/_nuxt/builds/meta/555978fa-172f-4d0d-8238-88f8b610f712.json +0 -1
- package/.output/public/_nuxt/entry.DPbNaeQT.css +0 -1
- package/.output/public/_nuxt/hZV7Z8Ig.js +0 -1
- package/.output/public/_nuxt/lK0inMQ6.js +0 -1
- package/.output/server/chunks/build/CodeEditorFallback-DfYly7f5.mjs.map +0 -1
- package/.output/server/chunks/build/dashboard-DtbGchTa.mjs +0 -277
- package/.output/server/chunks/build/dashboard-DtbGchTa.mjs.map +0 -1
- /package/.output/public/_nuxt/{language-detection.Be_IvFWy.css → useCopyToClipboard.Be_IvFWy.css} +0 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TreeItem } from '~/composables/useFileTree'
|
|
3
|
+
import type { SkillFile } from '~~/shared/types'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
skillName: string
|
|
7
|
+
files: SkillFile[]
|
|
8
|
+
selectedPath?: string
|
|
9
|
+
}>()
|
|
10
|
+
|
|
11
|
+
const emit = defineEmits<{
|
|
12
|
+
select: [path: string]
|
|
13
|
+
refresh: []
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const toast = useToast()
|
|
17
|
+
|
|
18
|
+
// Convert SkillFile[] to TreeItem[] for UTree
|
|
19
|
+
function toTreeItems(files: SkillFile[], parentPath = ''): TreeItem[] {
|
|
20
|
+
return files.map((f) => {
|
|
21
|
+
const fullPath = parentPath ? `${parentPath}/${f.path}` : f.path
|
|
22
|
+
const item: TreeItem = {
|
|
23
|
+
id: fullPath,
|
|
24
|
+
label: f.name,
|
|
25
|
+
path: fullPath,
|
|
26
|
+
type: f.type,
|
|
27
|
+
defaultExpanded: true
|
|
28
|
+
}
|
|
29
|
+
if (f.type === 'directory') {
|
|
30
|
+
item.children = f.children ? toTreeItems(f.children, fullPath) : []
|
|
31
|
+
} else {
|
|
32
|
+
if (f.name.endsWith('.py')) item.icon = 'i-lucide-file-code'
|
|
33
|
+
else if (f.name.endsWith('.md')) item.icon = 'i-lucide-file-text'
|
|
34
|
+
else if (f.name.endsWith('.json')) item.icon = 'i-lucide-file-json'
|
|
35
|
+
else item.icon = 'i-lucide-file'
|
|
36
|
+
}
|
|
37
|
+
return item
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const treeItems = computed(() => toTreeItems(props.files))
|
|
42
|
+
|
|
43
|
+
const contextMenuTarget = ref<TreeItem | null>(null)
|
|
44
|
+
const showNewFileModal = ref(false)
|
|
45
|
+
const showNewFolderModal = ref(false)
|
|
46
|
+
const showDeleteConfirm = ref(false)
|
|
47
|
+
const newItemName = ref('')
|
|
48
|
+
|
|
49
|
+
const contextMenuItems = computed(() => [
|
|
50
|
+
[{
|
|
51
|
+
label: 'New File',
|
|
52
|
+
icon: 'i-lucide-file-plus',
|
|
53
|
+
onSelect: () => {
|
|
54
|
+
newItemName.value = ''
|
|
55
|
+
showNewFileModal.value = true
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
label: 'New Folder',
|
|
59
|
+
icon: 'i-lucide-folder-plus',
|
|
60
|
+
onSelect: () => {
|
|
61
|
+
newItemName.value = ''
|
|
62
|
+
showNewFolderModal.value = true
|
|
63
|
+
}
|
|
64
|
+
}],
|
|
65
|
+
[{
|
|
66
|
+
label: 'Delete',
|
|
67
|
+
icon: 'i-lucide-trash-2',
|
|
68
|
+
color: 'error' as const,
|
|
69
|
+
onSelect: () => {
|
|
70
|
+
if (contextMenuTarget.value && contextMenuTarget.value.label !== 'SKILL.md')
|
|
71
|
+
showDeleteConfirm.value = true
|
|
72
|
+
}
|
|
73
|
+
}]
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
function handleSelect(_e: unknown, item: TreeItem) {
|
|
77
|
+
if (item.type === 'file') {
|
|
78
|
+
emit('select', item.path)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function handleCreateFile() {
|
|
83
|
+
if (!newItemName.value.trim()) return
|
|
84
|
+
|
|
85
|
+
let filename = newItemName.value.trim()
|
|
86
|
+
if (!filename.includes('.')) filename += '.py'
|
|
87
|
+
|
|
88
|
+
const parentPath = contextMenuTarget.value?.type === 'directory'
|
|
89
|
+
? contextMenuTarget.value.path
|
|
90
|
+
: ''
|
|
91
|
+
|
|
92
|
+
const filePath = parentPath ? `${parentPath}/${filename}` : filename
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
await $fetch(`/api/skills/${props.skillName}/files/create`, {
|
|
96
|
+
method: 'POST',
|
|
97
|
+
body: { path: filePath, type: 'file' }
|
|
98
|
+
})
|
|
99
|
+
emit('refresh')
|
|
100
|
+
emit('select', filePath)
|
|
101
|
+
toast.add({ title: `Created ${filename}`, color: 'success' })
|
|
102
|
+
} catch {
|
|
103
|
+
toast.add({ title: 'Failed to create file', color: 'error' })
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
showNewFileModal.value = false
|
|
107
|
+
newItemName.value = ''
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
async function handleCreateFolder() {
|
|
111
|
+
if (!newItemName.value.trim()) return
|
|
112
|
+
|
|
113
|
+
const folderName = newItemName.value.trim()
|
|
114
|
+
const parentPath = contextMenuTarget.value?.type === 'directory'
|
|
115
|
+
? contextMenuTarget.value.path
|
|
116
|
+
: ''
|
|
117
|
+
|
|
118
|
+
const folderPath = parentPath ? `${parentPath}/${folderName}` : folderName
|
|
119
|
+
|
|
120
|
+
try {
|
|
121
|
+
await $fetch(`/api/skills/${props.skillName}/files/create`, {
|
|
122
|
+
method: 'POST',
|
|
123
|
+
body: { path: folderPath, type: 'directory' }
|
|
124
|
+
})
|
|
125
|
+
emit('refresh')
|
|
126
|
+
toast.add({ title: `Created ${folderName}/`, color: 'success' })
|
|
127
|
+
} catch {
|
|
128
|
+
toast.add({ title: 'Failed to create folder', color: 'error' })
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
showNewFolderModal.value = false
|
|
132
|
+
newItemName.value = ''
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async function handleDelete() {
|
|
136
|
+
if (!contextMenuTarget.value) return
|
|
137
|
+
|
|
138
|
+
try {
|
|
139
|
+
await $fetch(`/api/skills/${props.skillName}/files/delete`, {
|
|
140
|
+
method: 'POST',
|
|
141
|
+
body: { path: contextMenuTarget.value.path }
|
|
142
|
+
})
|
|
143
|
+
emit('refresh')
|
|
144
|
+
toast.add({ title: `Deleted ${contextMenuTarget.value.label}`, color: 'success' })
|
|
145
|
+
} catch {
|
|
146
|
+
toast.add({ title: 'Failed to delete', color: 'error' })
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
showDeleteConfirm.value = false
|
|
150
|
+
}
|
|
151
|
+
</script>
|
|
152
|
+
|
|
153
|
+
<template>
|
|
154
|
+
<div class="h-full flex flex-col">
|
|
155
|
+
<UContextMenu
|
|
156
|
+
:items="contextMenuItems"
|
|
157
|
+
>
|
|
158
|
+
<div
|
|
159
|
+
class="flex-1 h-full overflow-auto p-2"
|
|
160
|
+
@contextmenu.self="contextMenuTarget = null"
|
|
161
|
+
>
|
|
162
|
+
<div
|
|
163
|
+
v-if="files.length === 0"
|
|
164
|
+
class="h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"
|
|
165
|
+
>
|
|
166
|
+
<UIcon
|
|
167
|
+
name="i-lucide-folder-open"
|
|
168
|
+
class="size-8 mx-auto mb-2 opacity-50"
|
|
169
|
+
/>
|
|
170
|
+
<p>No files found</p>
|
|
171
|
+
<p class="text-xs mt-1">
|
|
172
|
+
Right-click to create a file
|
|
173
|
+
</p>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<UTree
|
|
177
|
+
v-else
|
|
178
|
+
:items="treeItems"
|
|
179
|
+
:get-key="(item: TreeItem) => item.id"
|
|
180
|
+
color="primary"
|
|
181
|
+
expanded-icon="i-lucide-folder-open"
|
|
182
|
+
collapsed-icon="i-lucide-folder"
|
|
183
|
+
@select="handleSelect"
|
|
184
|
+
>
|
|
185
|
+
<template #item="{ item, expanded }">
|
|
186
|
+
<div
|
|
187
|
+
class="flex items-center gap-2 w-full"
|
|
188
|
+
@contextmenu="contextMenuTarget = item"
|
|
189
|
+
>
|
|
190
|
+
<UIcon
|
|
191
|
+
v-if="item.children?.length"
|
|
192
|
+
:name="expanded ? 'i-lucide-folder-open' : 'i-lucide-folder'"
|
|
193
|
+
class="size-4 shrink-0 text-dimmed"
|
|
194
|
+
/>
|
|
195
|
+
<UIcon
|
|
196
|
+
v-else-if="item.icon"
|
|
197
|
+
:name="item.icon"
|
|
198
|
+
class="size-4 shrink-0 text-dimmed"
|
|
199
|
+
/>
|
|
200
|
+
<UIcon
|
|
201
|
+
v-else
|
|
202
|
+
name="i-lucide-file"
|
|
203
|
+
class="size-4 shrink-0 text-dimmed"
|
|
204
|
+
/>
|
|
205
|
+
<span class="truncate">{{ item.label }}</span>
|
|
206
|
+
</div>
|
|
207
|
+
</template>
|
|
208
|
+
</UTree>
|
|
209
|
+
</div>
|
|
210
|
+
</UContextMenu>
|
|
211
|
+
|
|
212
|
+
<!-- New File Modal -->
|
|
213
|
+
<UModal v-model:open="showNewFileModal">
|
|
214
|
+
<template #content>
|
|
215
|
+
<UCard>
|
|
216
|
+
<template #header>
|
|
217
|
+
<div class="flex items-center gap-2">
|
|
218
|
+
<UIcon
|
|
219
|
+
name="i-lucide-file-plus"
|
|
220
|
+
class="size-5"
|
|
221
|
+
/>
|
|
222
|
+
<span class="font-semibold">New File</span>
|
|
223
|
+
</div>
|
|
224
|
+
</template>
|
|
225
|
+
|
|
226
|
+
<UInput
|
|
227
|
+
v-model="newItemName"
|
|
228
|
+
placeholder="filename.py"
|
|
229
|
+
autofocus
|
|
230
|
+
@keyup.enter="handleCreateFile"
|
|
231
|
+
/>
|
|
232
|
+
|
|
233
|
+
<template #footer>
|
|
234
|
+
<div class="flex justify-end gap-2">
|
|
235
|
+
<UButton
|
|
236
|
+
color="neutral"
|
|
237
|
+
variant="ghost"
|
|
238
|
+
@click="showNewFileModal = false"
|
|
239
|
+
>
|
|
240
|
+
Cancel
|
|
241
|
+
</UButton>
|
|
242
|
+
<UButton @click="handleCreateFile">
|
|
243
|
+
Create
|
|
244
|
+
</UButton>
|
|
245
|
+
</div>
|
|
246
|
+
</template>
|
|
247
|
+
</UCard>
|
|
248
|
+
</template>
|
|
249
|
+
</UModal>
|
|
250
|
+
|
|
251
|
+
<!-- New Folder Modal -->
|
|
252
|
+
<UModal v-model:open="showNewFolderModal">
|
|
253
|
+
<template #content>
|
|
254
|
+
<UCard>
|
|
255
|
+
<template #header>
|
|
256
|
+
<div class="flex items-center gap-2">
|
|
257
|
+
<UIcon
|
|
258
|
+
name="i-lucide-folder-plus"
|
|
259
|
+
class="size-5"
|
|
260
|
+
/>
|
|
261
|
+
<span class="font-semibold">New Folder</span>
|
|
262
|
+
</div>
|
|
263
|
+
</template>
|
|
264
|
+
|
|
265
|
+
<UInput
|
|
266
|
+
v-model="newItemName"
|
|
267
|
+
placeholder="folder-name"
|
|
268
|
+
autofocus
|
|
269
|
+
@keyup.enter="handleCreateFolder"
|
|
270
|
+
/>
|
|
271
|
+
|
|
272
|
+
<template #footer>
|
|
273
|
+
<div class="flex justify-end gap-2">
|
|
274
|
+
<UButton
|
|
275
|
+
color="neutral"
|
|
276
|
+
variant="ghost"
|
|
277
|
+
@click="showNewFolderModal = false"
|
|
278
|
+
>
|
|
279
|
+
Cancel
|
|
280
|
+
</UButton>
|
|
281
|
+
<UButton @click="handleCreateFolder">
|
|
282
|
+
Create
|
|
283
|
+
</UButton>
|
|
284
|
+
</div>
|
|
285
|
+
</template>
|
|
286
|
+
</UCard>
|
|
287
|
+
</template>
|
|
288
|
+
</UModal>
|
|
289
|
+
|
|
290
|
+
<!-- Delete Confirmation -->
|
|
291
|
+
<UModal v-model:open="showDeleteConfirm">
|
|
292
|
+
<template #content>
|
|
293
|
+
<UCard>
|
|
294
|
+
<template #header>
|
|
295
|
+
<div class="flex items-center gap-2 text-error">
|
|
296
|
+
<UIcon
|
|
297
|
+
name="i-lucide-trash-2"
|
|
298
|
+
class="size-5"
|
|
299
|
+
/>
|
|
300
|
+
<span class="font-semibold">Delete</span>
|
|
301
|
+
</div>
|
|
302
|
+
</template>
|
|
303
|
+
|
|
304
|
+
<p>
|
|
305
|
+
Are you sure you want to delete
|
|
306
|
+
<strong>{{ contextMenuTarget?.label }}</strong>?
|
|
307
|
+
</p>
|
|
308
|
+
<p
|
|
309
|
+
v-if="contextMenuTarget?.type === 'directory'"
|
|
310
|
+
class="text-sm text-dimmed mt-1"
|
|
311
|
+
>
|
|
312
|
+
This will delete all files and folders inside.
|
|
313
|
+
</p>
|
|
314
|
+
|
|
315
|
+
<template #footer>
|
|
316
|
+
<div class="flex justify-end gap-2">
|
|
317
|
+
<UButton
|
|
318
|
+
color="neutral"
|
|
319
|
+
variant="ghost"
|
|
320
|
+
@click="showDeleteConfirm = false"
|
|
321
|
+
>
|
|
322
|
+
Cancel
|
|
323
|
+
</UButton>
|
|
324
|
+
<UButton
|
|
325
|
+
color="error"
|
|
326
|
+
@click="handleDelete"
|
|
327
|
+
>
|
|
328
|
+
Delete
|
|
329
|
+
</UButton>
|
|
330
|
+
</div>
|
|
331
|
+
</template>
|
|
332
|
+
</UCard>
|
|
333
|
+
</template>
|
|
334
|
+
</UModal>
|
|
335
|
+
</div>
|
|
336
|
+
</template>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SkillCatalogItem } from '~~/shared/types'
|
|
3
|
+
|
|
4
|
+
defineProps<{
|
|
5
|
+
skill: SkillCatalogItem
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const emit = defineEmits<{
|
|
9
|
+
install: [name: string]
|
|
10
|
+
update: [name: string]
|
|
11
|
+
}>()
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="p-4 rounded-lg border border-default bg-elevated/50 hover:bg-elevated transition-colors">
|
|
16
|
+
<div class="flex items-start justify-between gap-2 mb-2">
|
|
17
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
18
|
+
<UIcon
|
|
19
|
+
name="i-lucide-puzzle"
|
|
20
|
+
class="size-4 shrink-0 text-primary"
|
|
21
|
+
/>
|
|
22
|
+
<span class="font-medium truncate">{{ skill.name }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="flex items-center gap-1.5 shrink-0">
|
|
25
|
+
<UBadge
|
|
26
|
+
v-if="skill.installed && !skill.hasUpdate"
|
|
27
|
+
variant="subtle"
|
|
28
|
+
color="success"
|
|
29
|
+
size="xs"
|
|
30
|
+
>
|
|
31
|
+
Installed
|
|
32
|
+
</UBadge>
|
|
33
|
+
<UBadge
|
|
34
|
+
v-if="skill.hasUpdate"
|
|
35
|
+
variant="subtle"
|
|
36
|
+
color="warning"
|
|
37
|
+
size="xs"
|
|
38
|
+
>
|
|
39
|
+
Update available
|
|
40
|
+
</UBadge>
|
|
41
|
+
<UBadge
|
|
42
|
+
variant="subtle"
|
|
43
|
+
color="neutral"
|
|
44
|
+
size="xs"
|
|
45
|
+
>
|
|
46
|
+
v{{ skill.version }}
|
|
47
|
+
</UBadge>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<p class="text-sm text-muted line-clamp-2 mb-3">
|
|
52
|
+
{{ skill.description }}
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
<div
|
|
56
|
+
v-if="skill.tags.length > 0"
|
|
57
|
+
class="flex flex-wrap gap-1 mb-3"
|
|
58
|
+
>
|
|
59
|
+
<UBadge
|
|
60
|
+
v-for="tag in skill.tags"
|
|
61
|
+
:key="tag"
|
|
62
|
+
variant="subtle"
|
|
63
|
+
:color="tag === 'official' ? 'primary' : 'neutral'"
|
|
64
|
+
size="xs"
|
|
65
|
+
>
|
|
66
|
+
{{ tag }}
|
|
67
|
+
</UBadge>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div
|
|
71
|
+
v-if="skill.requiresSecrets.length > 0"
|
|
72
|
+
class="flex items-center gap-1 mb-3 text-xs text-dimmed"
|
|
73
|
+
>
|
|
74
|
+
<UIcon
|
|
75
|
+
name="i-lucide-key-round"
|
|
76
|
+
class="size-3 shrink-0"
|
|
77
|
+
/>
|
|
78
|
+
<span>Requires: {{ skill.requiresSecrets.join(', ') }}</span>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div class="flex items-center justify-between">
|
|
82
|
+
<span
|
|
83
|
+
v-if="skill.author"
|
|
84
|
+
class="text-xs text-dimmed"
|
|
85
|
+
>
|
|
86
|
+
by {{ skill.author }}
|
|
87
|
+
</span>
|
|
88
|
+
<span v-else />
|
|
89
|
+
|
|
90
|
+
<div class="flex items-center gap-1.5">
|
|
91
|
+
<UButton
|
|
92
|
+
size="xs"
|
|
93
|
+
variant="ghost"
|
|
94
|
+
color="neutral"
|
|
95
|
+
icon="i-lucide-external-link"
|
|
96
|
+
:to="`https://github.com/Patrity/cognova-skills/tree/main/${skill.name}`"
|
|
97
|
+
target="_blank"
|
|
98
|
+
>
|
|
99
|
+
View
|
|
100
|
+
</UButton>
|
|
101
|
+
<UButton
|
|
102
|
+
v-if="!skill.installed"
|
|
103
|
+
size="xs"
|
|
104
|
+
icon="i-lucide-download"
|
|
105
|
+
@click="emit('install', skill.name)"
|
|
106
|
+
>
|
|
107
|
+
Install
|
|
108
|
+
</UButton>
|
|
109
|
+
<UButton
|
|
110
|
+
v-else-if="skill.hasUpdate"
|
|
111
|
+
size="xs"
|
|
112
|
+
color="warning"
|
|
113
|
+
variant="soft"
|
|
114
|
+
icon="i-lucide-refresh-cw"
|
|
115
|
+
@click="emit('update', skill.name)"
|
|
116
|
+
>
|
|
117
|
+
Update
|
|
118
|
+
</UButton>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</template>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
open: boolean
|
|
4
|
+
currentName: string
|
|
5
|
+
}>()
|
|
6
|
+
|
|
7
|
+
const emit = defineEmits<{
|
|
8
|
+
'update:open': [value: boolean]
|
|
9
|
+
'renamed': [newName: string]
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const toast = useToast()
|
|
13
|
+
const newName = ref(props.currentName)
|
|
14
|
+
const loading = ref(false)
|
|
15
|
+
|
|
16
|
+
watch(() => props.currentName, (val) => {
|
|
17
|
+
newName.value = val
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
function close() {
|
|
21
|
+
emit('update:open', false)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function handleRename() {
|
|
25
|
+
if (!newName.value.trim() || newName.value.trim() === props.currentName) return
|
|
26
|
+
|
|
27
|
+
loading.value = true
|
|
28
|
+
try {
|
|
29
|
+
await $fetch(`/api/skills/${props.currentName}/rename`, {
|
|
30
|
+
method: 'POST',
|
|
31
|
+
body: { newName: newName.value.trim() }
|
|
32
|
+
})
|
|
33
|
+
toast.add({ title: `Skill renamed to '${newName.value.trim()}'`, color: 'success' })
|
|
34
|
+
emit('renamed', newName.value.trim())
|
|
35
|
+
close()
|
|
36
|
+
} catch (e: unknown) {
|
|
37
|
+
const message = e instanceof Error ? e.message : 'Failed to rename skill'
|
|
38
|
+
toast.add({ title: message, color: 'error' })
|
|
39
|
+
} finally {
|
|
40
|
+
loading.value = false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<UModal
|
|
47
|
+
:open="props.open"
|
|
48
|
+
@update:open="emit('update:open', $event)"
|
|
49
|
+
>
|
|
50
|
+
<template #header>
|
|
51
|
+
<span class="font-semibold">Rename Skill</span>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<template #body>
|
|
55
|
+
<UFormField label="New Name">
|
|
56
|
+
<UInput
|
|
57
|
+
v-model="newName"
|
|
58
|
+
placeholder="my-skill"
|
|
59
|
+
:disabled="loading"
|
|
60
|
+
/>
|
|
61
|
+
</UFormField>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<template #footer>
|
|
65
|
+
<div class="flex justify-end gap-2">
|
|
66
|
+
<UButton
|
|
67
|
+
variant="ghost"
|
|
68
|
+
color="neutral"
|
|
69
|
+
:disabled="loading"
|
|
70
|
+
@click="close"
|
|
71
|
+
>
|
|
72
|
+
Cancel
|
|
73
|
+
</UButton>
|
|
74
|
+
<UButton
|
|
75
|
+
:loading="loading"
|
|
76
|
+
:disabled="!newName.trim() || newName.trim() === currentName"
|
|
77
|
+
@click="handleRename"
|
|
78
|
+
>
|
|
79
|
+
Rename
|
|
80
|
+
</UButton>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
</UModal>
|
|
84
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy text to clipboard with fallback for non-secure contexts (HTTP).
|
|
3
|
+
* navigator.clipboard.writeText() requires HTTPS or localhost.
|
|
4
|
+
* The fallback uses a hidden textarea + execCommand('copy').
|
|
5
|
+
*/
|
|
6
|
+
export function useCopyToClipboard() {
|
|
7
|
+
async function copy(text: string): Promise<boolean> {
|
|
8
|
+
// Try modern clipboard API first (works on HTTPS / localhost)
|
|
9
|
+
if (navigator.clipboard?.writeText) {
|
|
10
|
+
try {
|
|
11
|
+
await navigator.clipboard.writeText(text)
|
|
12
|
+
return true
|
|
13
|
+
} catch {
|
|
14
|
+
// Fall through to legacy method
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Legacy fallback for HTTP / non-secure contexts
|
|
19
|
+
try {
|
|
20
|
+
const textarea = document.createElement('textarea')
|
|
21
|
+
textarea.value = text
|
|
22
|
+
textarea.style.position = 'fixed'
|
|
23
|
+
textarea.style.left = '-9999px'
|
|
24
|
+
textarea.style.top = '-9999px'
|
|
25
|
+
document.body.appendChild(textarea)
|
|
26
|
+
textarea.focus()
|
|
27
|
+
textarea.select()
|
|
28
|
+
const ok = document.execCommand('copy')
|
|
29
|
+
document.body.removeChild(textarea)
|
|
30
|
+
return ok
|
|
31
|
+
} catch {
|
|
32
|
+
return false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return { copy }
|
|
37
|
+
}
|
package/app/pages/chat.vue
CHANGED
|
@@ -29,8 +29,18 @@ onMounted(() => {
|
|
|
29
29
|
connect()
|
|
30
30
|
loadConversations()
|
|
31
31
|
|
|
32
|
+
// Load specific conversation from URL param (e.g., from dashboard)
|
|
33
|
+
if (route.query.conversation) {
|
|
34
|
+
const conversationId = route.query.conversation as string
|
|
35
|
+
const stop = watch(connectionStatus, (status) => {
|
|
36
|
+
if (status === 'connected') {
|
|
37
|
+
stop()
|
|
38
|
+
loadConversation(conversationId)
|
|
39
|
+
router.replace({ query: {} })
|
|
40
|
+
}
|
|
41
|
+
}, { immediate: true })
|
|
42
|
+
} else if (route.query.onboarding) {
|
|
32
43
|
// Auto-send greeting when arriving from onboarding modal
|
|
33
|
-
if (route.query.onboarding) {
|
|
34
44
|
const stop = watch(connectionStatus, (status) => {
|
|
35
45
|
if (status === 'connected') {
|
|
36
46
|
stop()
|