orc-ai 0.1.41 → 0.1.42
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/dist/index.js +243 -243
- package/dist/web/assets/{Agents-1lX_DRrR.js → Agents-DMZUyfx-.js} +1 -1
- package/dist/web/assets/{Audit-DnRP9Ivm.js → Audit-BaUbr3dy.js} +1 -1
- package/dist/web/assets/{Dashboard-bT5SABu_.js → Dashboard-CCHyTraG.js} +1 -1
- package/dist/web/assets/{DocumentWorkspace-BI4JWVsO.js → DocumentWorkspace-C60YtNG4.js} +1 -1
- package/dist/web/assets/{FileEditor-Cb8uXr6e.js → FileEditor-DWAo3hFQ.js} +1 -1
- package/dist/web/assets/{JobWebhooks-CYE2UA0V.js → JobWebhooks-DXMJx6Vg.js} +1 -1
- package/dist/web/assets/{Jobs-Fyd46CkI.js → Jobs-CnIb01Q-.js} +1 -1
- package/dist/web/assets/{Knowledge-prZWODFP.js → Knowledge-BJeg1H2L.js} +1 -1
- package/dist/web/assets/{PackageCatalog-R8kcGP28.js → PackageCatalog-B_F-2OB9.js} +1 -1
- package/dist/web/assets/{Pager-urh4-P2a.js → Pager-3eTvdbPp.js} +1 -1
- package/dist/web/assets/{Rules-if9ZzABl.js → Rules-XTfdYYIQ.js} +1 -1
- package/dist/web/assets/{Sessions-AfC-wZoj.js → Sessions-BGqkbI_5.js} +1 -1
- package/dist/web/assets/{Settings-CNPE54fO.js → Settings-C-WdIIZl.js} +1 -1
- package/dist/web/assets/{Skills-BJcE6uiQ.js → Skills-9IRJz7yf.js} +1 -1
- package/dist/web/assets/{SourceEditor-a2_IdCoT.js → SourceEditor-DirTkvpJ.js} +1 -1
- package/dist/web/assets/{Tasks-COQCj4HF.js → Tasks-C2S9EHdM.js} +1 -1
- package/dist/web/assets/{Terminals-D4K_u_ch.js → Terminals-pR-zIUhP.js} +3 -3
- package/dist/web/assets/{Webhooks-DvsCfbZY.js → Webhooks-AE5GTXKu.js} +1 -1
- package/dist/web/assets/{abnfDiagram-VCTEODGH-C1g9AmGT.js → abnfDiagram-VCTEODGH-CET0l4vn.js} +1 -1
- package/dist/web/assets/{arc-BX1-afFK.js → arc-BJZ7jXHu.js} +1 -1
- package/dist/web/assets/{architectureDiagram-5GKGNRK7-DTDe767x.js → architectureDiagram-5GKGNRK7-BGJ6Owke.js} +1 -1
- package/dist/web/assets/{blockDiagram-I7D4REHJ-DJnvrUZM.js → blockDiagram-I7D4REHJ-BM7_b0sG.js} +1 -1
- package/dist/web/assets/{c4Diagram-7LVT6UL2-rpXv4dc9.js → c4Diagram-7LVT6UL2-D2JD9Oo9.js} +1 -1
- package/dist/web/assets/channel-DjYQ7f5P.js +1 -0
- package/dist/web/assets/{chunk-2Q5K7J3B-BEq6zYAO.js → chunk-2Q5K7J3B-DyUnnS0X.js} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-kAS1IBM0.js → chunk-5VM5RSS4-ChIDAmzA.js} +1 -1
- package/dist/web/assets/{chunk-F27PBJKO-BtG5IndH.js → chunk-F27PBJKO-K6TR65oH.js} +1 -1
- package/dist/web/assets/{chunk-IMKFNOWR-C-NO8OSz.js → chunk-IMKFNOWR-B7PscaPp.js} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-2IhqyMft.js → chunk-JWPE2WC7-BPpeIucG.js} +1 -1
- package/dist/web/assets/{chunk-POPQ4Y6H-DmxK4niw.js → chunk-POPQ4Y6H-DfwkORNF.js} +1 -1
- package/dist/web/assets/{chunk-SVP7TREG-BkVeMS09.js → chunk-SVP7TREG-7WtYNRSy.js} +1 -1
- package/dist/web/assets/{chunk-TICWLB2K-DzlMwg1V.js → chunk-TICWLB2K-Cc23IhdQ.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-ttUQmtBw.js → chunk-XXDRQBXY-Bda6e8ui.js} +1 -1
- package/dist/web/assets/classDiagram-ZZMXUADV-WOxK4nwc.js +1 -0
- package/dist/web/assets/classDiagram-v2-VYDZK3BY-WOxK4nwc.js +1 -0
- package/dist/web/assets/{cose-bilkent-JH36ORCC-yhoqj6vM.js → cose-bilkent-JH36ORCC-ttd4q89A.js} +1 -1
- package/dist/web/assets/{cynefin-OW5HDTMX-CQZuSJ5b.js → cynefin-OW5HDTMX-BM0ED8Fk.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-5FMLGOSQ-Dz-2nuEW.js → cynefinDiagram-5FMLGOSQ-CcuWmaB5.js} +1 -1
- package/dist/web/assets/{dagre-GXQ25YYZ-DZJid-R_.js → dagre-GXQ25YYZ-skrymZ1R.js} +1 -1
- package/dist/web/assets/{diagram-S7CK7UJ4-DB-Uzpn6.js → diagram-S7CK7UJ4-DSKnXc2Z.js} +1 -1
- package/dist/web/assets/{diagram-UQ7AKVKN-BjIgjC39.js → diagram-UQ7AKVKN-DH-4v8Lr.js} +1 -1
- package/dist/web/assets/{diagram-VSXAHHWV-CjFlgbiX.js → diagram-VSXAHHWV-D5cD7ma_.js} +1 -1
- package/dist/web/assets/{diagram-VX7I27RA-BlfR5PYu.js → diagram-VX7I27RA-idqpsDov.js} +1 -1
- package/dist/web/assets/{diagram-Z3DM3KII-DL6_QJQh.js → diagram-Z3DM3KII-CZkIEAyj.js} +1 -1
- package/dist/web/assets/{download-CK_EusLu.js → download-C_GjdMEk.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-PWID7BFC-BjdizMG0.js → ebnfDiagram-PWID7BFC-w-P_ObfV.js} +1 -1
- package/dist/web/assets/{erDiagram-RLTQ6QDP-BxMzPgpM.js → erDiagram-RLTQ6QDP-CvcjlPfG.js} +1 -1
- package/dist/web/assets/{flowDiagram-HODETNUW-C-HgPS9G.js → flowDiagram-HODETNUW-Bdr2jWsR.js} +1 -1
- package/dist/web/assets/{folder-open-Bcqha5Pu.js → folder-open-Dcx7w9v0.js} +1 -1
- package/dist/web/assets/{ganttDiagram-EL5Y4UJY-BEx6HKx_.js → ganttDiagram-EL5Y4UJY-DARDJrXR.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-WWUBYQGX-D9yMgjsA.js → gitGraphDiagram-WWUBYQGX-Bte-9ecA.js} +1 -1
- package/dist/web/assets/{highlighted-body-KPVGNVTW-Cdq0W8LG.js → highlighted-body-KPVGNVTW-BJEmQeiK.js} +1 -1
- package/dist/web/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/dist/web/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-700-normal-D_uavGvn.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-700-normal-RFb1v-CK.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-700-normal-BmRLXWpJ.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-cyrillic-ext-700-normal-DCQwxkRk.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-700-normal-CkZN0sRy.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-greek-700-normal-wyJ6jzdA.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-700-normal-Bth3BMcD.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-700-normal-Bxkt5Cjx.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-700-normal-DZH6Xh-4.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-latin-ext-700-normal-aMgXseD4.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-700-normal-BV5B8Are.woff +0 -0
- package/dist/web/assets/ibm-plex-sans-vietnamese-700-normal-CkEo6LDy.woff2 +0 -0
- package/dist/web/assets/{index-BqQDBYwx.js → index-Q1wl04d6.js} +5 -5
- package/dist/web/assets/index-sd04m1Ya.css +1 -0
- package/dist/web/assets/{infoDiagram-27XIBGKW-e_LgGqFP.js → infoDiagram-27XIBGKW-BYYWdTHu.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-5VMMS53U-jOCokdCr.js → ishikawaDiagram-5VMMS53U-BH9Jw7vg.js} +1 -1
- package/dist/web/assets/{journeyDiagram-3NMN7TZE-DfyXRW30.js → journeyDiagram-3NMN7TZE-CtHza61v.js} +1 -1
- package/dist/web/assets/{kanban-definition-UXKFOSKX-D6Mgx6_N.js → kanban-definition-UXKFOSKX-D7E5kRVT.js} +1 -1
- package/dist/web/assets/{layout-BFQQ8SSL.js → layout-CZ5Vm6un.js} +1 -1
- package/dist/web/assets/{linear-C251cMFR.js → linear-BYj6vEOo.js} +1 -1
- package/dist/web/assets/{list-BnZDr6iH.js → list-vYJbA_Kh.js} +1 -1
- package/dist/web/assets/{mermaid-HWGCJPDP-DE8bnMel.js → mermaid-HWGCJPDP-CE7UOv0K.js} +6 -6
- package/dist/web/assets/{mindmap-definition-YA3MSWOX-hX6YQE6d.js → mindmap-definition-YA3MSWOX-B1JzrTl8.js} +1 -1
- package/dist/web/assets/{pegDiagram-XKGWAZYB-DRRv8KEz.js → pegDiagram-XKGWAZYB-P-cr84oB.js} +1 -1
- package/dist/web/assets/{pencil-ClEwbF1x.js → pencil-D6eVnvqS.js} +1 -1
- package/dist/web/assets/{pieDiagram-E7YTZNPT-DwRQy5kr.js → pieDiagram-E7YTZNPT-5XD8NxKG.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-AXDQQJYC-u-NZRX9E.js → quadrantDiagram-AXDQQJYC-Ct4CM_Yf.js} +1 -1
- package/dist/web/assets/{railroadDiagram-O6MQD6OU-DsGn0lJc.js → railroadDiagram-O6MQD6OU-Dg8fmmnb.js} +1 -1
- package/dist/web/assets/{refresh-cw-BGtNOi70.js → refresh-cw-D-hq8eog.js} +1 -1
- package/dist/web/assets/{requirementDiagram-BXWQKSXE-Bak7hmyH.js → requirementDiagram-BXWQKSXE-DQmpN_sn.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-P5KCCOFB-Bx5Wxkio.js → sankeyDiagram-P5KCCOFB-CRImYDlK.js} +1 -1
- package/dist/web/assets/{save-ChNqW56W.js → save-BuI4O_ZA.js} +1 -1
- package/dist/web/assets/{scroll-area-YSA2ORI8.js → scroll-area-TAX36AkX.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-WJ2MYXX4-CyWelz_H.js → sequenceDiagram-WJ2MYXX4-C8QOBGQV.js} +1 -1
- package/dist/web/assets/{sizeCapture-INFHLROL-BCzEf-8B.js → sizeCapture-INFHLROL-BHarbPmW.js} +1 -1
- package/dist/web/assets/{stateDiagram-D77RDMKH-BkqZfGYQ.js → stateDiagram-D77RDMKH-C-qNQnNK.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-MP3YSRHH-BQViz8B-.js +1 -0
- package/dist/web/assets/{swimlanes-42K2YHIH-BMYDAy8X.js → swimlanes-42K2YHIH-Cuhl1VXn.js} +1 -1
- package/dist/web/assets/swimlanesDiagram-VR7AAH4N-GBD6I18c.js +8 -0
- package/dist/web/assets/{timeline-definition-24CTP7MA-BrGykZXB.js → timeline-definition-24CTP7MA-BsGnXh2k.js} +1 -1
- package/dist/web/assets/{upload-waJ36Q68.js → upload-CrFhuhaP.js} +1 -1
- package/dist/web/assets/{useJobs-By4K4BjX.js → useJobs-guqFEkan.js} +1 -1
- package/dist/web/assets/{useKnowledge-DMSoPz-b.js → useKnowledge-CfBdZLAo.js} +1 -1
- package/dist/web/assets/{useMemories-bv4XvbzQ.js → useMemories-Bo0cv-Jb.js} +1 -1
- package/dist/web/assets/useProjectScope-CNZ2Ry3s.js +1 -0
- package/dist/web/assets/{vennDiagram-4TSXK5OY-CkLSasvk.js → vennDiagram-4TSXK5OY-BoT2m-ST.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-VM6X3IG4-DfPte2eh.js → wardleyDiagram-VM6X3IG4-y6VyAdro.js} +1 -1
- package/dist/web/assets/{xychartDiagram-S5SC5T6Z-ClFkeona.js → xychartDiagram-S5SC5T6Z-CJbG9_RB.js} +1 -1
- package/dist/web/ibm-plex-mono-LICENSE.txt +93 -0
- package/dist/web/ibm-plex-sans-LICENSE.txt +93 -0
- package/dist/web/index.html +2 -8
- package/package.json +1 -1
- package/dist/checksums.txt +0 -5
- package/dist/web/assets/channel-DsRXlXQz.js +0 -1
- package/dist/web/assets/classDiagram-ZZMXUADV-CZXMGXM8.js +0 -1
- package/dist/web/assets/classDiagram-v2-VYDZK3BY-CZXMGXM8.js +0 -1
- package/dist/web/assets/index-D1sNa9P-.css +0 -1
- package/dist/web/assets/stateDiagram-v2-MP3YSRHH-PLwI4Xlh.js +0 -1
- package/dist/web/assets/swimlanesDiagram-VR7AAH4N-BEGqjIIe.js +0 -8
- package/dist/web/assets/useProjectScope-BvcpSOql.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,j as e,U as J,W as X,X as Z,Y as M,Z as B,B as k,k as I,_ as ee,$ as K,a as te,u as U,a0 as ae,b as T,E as G,V as ne,L as se,a1 as re,a2 as ie,a3 as oe,a4 as de,a5 as le,a6 as ce,a7 as ue,a8 as W,d as D}from"./index-
|
|
1
|
+
import{r as b,j as e,U as J,W as X,X as Z,Y as M,Z as B,B as k,k as I,_ as ee,$ as K,a as te,u as U,a0 as ae,b as T,E as G,V as ne,L as se,a1 as re,a2 as ie,a3 as oe,a4 as de,a5 as le,a6 as ce,a7 as ue,a8 as W,d as D}from"./index-Q1wl04d6.js";import{p as ge,i as q}from"./public-api-BvD4z7ja.js";const _={specialist:`---
|
|
2
2
|
name: Specialist
|
|
3
3
|
description: Describe when to use this specialist
|
|
4
4
|
---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aa as T,j as e,a2 as L,a3 as P,a4 as $,a5 as R,a6 as O,E as w,S,ab as A,ac as h,r as k,ad as I,f as V,l as H,$ as z,a0 as B,ae as U,af as F,T as J,s as G,t as v,v as c,w as M,x,V as Y}from"./index-
|
|
1
|
+
import{aa as T,j as e,a2 as L,a3 as P,a4 as $,a5 as R,a6 as O,E as w,S,ab as A,ac as h,r as k,ad as I,f as V,l as H,$ as z,a0 as B,ae as U,af as F,T as J,s as G,t as v,v as c,w as M,x,V as Y}from"./index-Q1wl04d6.js";import{P as Z}from"./Pager-3eTvdbPp.js";import{S as y}from"./scroll-area-TAX36AkX.js";import{u as q}from"./useProjectScope-CNZ2Ry3s.js";const K={file:"text-outline",task:"text-outline",decision:"text-outline",error:"text-error",git:"text-outline",rule:"text-outline",plan:"text-outline"},Q="text-outline";function W(n){return K[n]??Q}function X({sessionId:n,open:a,onClose:r}){const{data:t,isLoading:u,error:p,refetch:j}=T(n??"");return e.jsx(L,{open:a,onOpenChange:o=>!o&&r(),children:e.jsxs(P,{side:"right",className:"w-[540px] max-w-[90vw]",children:[e.jsx($,{children:e.jsx(R,{children:u?"Loading...":t?`${t.agent??"Session"} ${t.agent_version?`v${t.agent_version}`:""}`:"Session Detail"})}),e.jsxs(O,{children:[e.jsx("p",{className:"mb-4 text-sm text-outline",children:"This audit record contains summaries and events. Open Sessions to read native agent conversations or resume them."}),p?e.jsx(w,{message:p.message,onRetry:()=>j()}):u?e.jsx("div",{className:"space-y-4",children:[...Array(4)].map((o,i)=>e.jsx(S,{className:"h-8 w-full bg-surface-highest"},i))}):t?e.jsxs("div",{className:"space-y-6",children:[t.summary&&e.jsx("div",{className:"font-body text-xs text-on-surface leading-relaxed",children:e.jsx(A,{children:t.summary})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(h,{label:"ID",children:e.jsx("span",{className:"font-mono text-xs break-all",children:t.id})}),e.jsx(h,{label:"Project ID",children:t.project_id??"—"}),e.jsx(h,{label:"Job Run ID",children:t.job_run_id??"—"}),e.jsx(h,{label:"Tokens Used",children:t.tokens_used!=null?t.tokens_used.toLocaleString():"—"}),e.jsx(h,{label:"Created",children:new Date(t.created_at).toLocaleString()})]}),t.events.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"font-label text-xs font-medium text-outline mb-3",children:["Events (",t.events.length,")"]}),e.jsx(y,{className:"h-[300px]",children:e.jsx("div",{className:"space-y-1",children:[...t.events].sort((o,i)=>new Date(o.created_at).getTime()-new Date(i.created_at).getTime()).map(o=>e.jsx(ee,{event:o},o.id))})})]}),t.snapshot&&e.jsxs("div",{children:[e.jsx("div",{className:"font-label text-xs font-medium text-outline mb-3",children:"Snapshot"}),e.jsx(y,{className:"h-[200px]",children:e.jsx("pre",{className:"font-mono text-xs text-on-surface-variant whitespace-pre-wrap break-words bg-background border-l border-border p-3",children:t.snapshot})})]})]}):e.jsx("div",{className:"font-body text-xs text-outline py-8 text-center",children:"Session not found"})]})]})})}function ee({event:n}){const[a,r]=k.useState(!1),t=n.data!=null;return e.jsxs("div",{className:"border-b border-border/65",children:[e.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-surface-high transition-colors",onClick:()=>t&&r(!a),"aria-expanded":t?a:void 0,children:[t?a?e.jsx(I,{size:10,className:"text-outline flex-shrink-0"}):e.jsx(V,{size:10,className:"text-outline flex-shrink-0"}):e.jsx("span",{className:"w-[10px] flex-shrink-0"}),e.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 text-[10px] font-label font-medium ${W(n.type)}`,children:n.type}),e.jsx("span",{className:"flex-1 font-body text-xs text-outline truncate",children:se(n.data)}),e.jsx("span",{className:"font-label text-[10px] text-outline flex-shrink-0",children:new Date(n.created_at).toLocaleTimeString()})]}),a&&t&&e.jsx("div",{className:"px-3 pb-2",children:e.jsx("pre",{className:"font-mono text-xs text-on-surface-variant whitespace-pre-wrap break-words bg-background border-l border-border/65 p-2 max-h-48 overflow-auto",children:JSON.stringify(n.data,null,2)})})]})}function se(n){if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object"){const a=n;if(typeof a.path=="string")return a.path;if(typeof a.content=="string")return a.content.length>80?`${a.content.slice(0,80)}...`:a.content;if(typeof a.message=="string")return a.message;if(typeof a.summary=="string")return a.summary;const r=Object.keys(a);return r.length<=3?r.join(", "):`${r.length} fields`}return String(n)}const b=25,m="font-label text-xs font-medium text-outline";function te({projectId:n}){const a=H("sm"),[r,t]=z("order","desc",["asc","desc"]),[u,p]=k.useState({order:r,page:0}),j=u.order===r?u.page:0,o=s=>p({order:r,page:s}),{selectedId:i,openDetail:g,closeDetail:_}=B("/audit","sessionId"),{data:l,isLoading:D,error:N,refetch:E}=U({...n==="all"?{}:{project_id:n},limit:b,offset:j*b,order:r});if(N)return e.jsx(w,{message:N.message,onRetry:()=>E()});const f=(l==null?void 0:l.sessions)??[],C=(l==null?void 0:l.total)??0;return e.jsxs("section",{"data-testid":"logged-sessions",children:[e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsxs("select",{"aria-label":"Sort audit by date","data-testid":"audit-date-sort",value:r,onChange:s=>{o(0),t(s.target.value)},className:"min-h-11 rounded-md border border-control-border bg-background px-3 text-sm text-on-surface",children:[e.jsx("option",{value:"desc",children:"Created: newest first"}),e.jsx("option",{value:"asc",children:"Created: oldest first"})]})}),D?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map((s,d)=>e.jsx(S,{className:"h-10 w-full bg-surface-highest"},d))}):f.length===0?e.jsx(F,{message:"No audit records"}):e.jsxs("div",{className:"min-w-0 overflow-hidden",children:[a?e.jsxs(J,{children:[e.jsx(G,{children:e.jsxs(v,{className:"border-b border-border hover:bg-transparent",children:[e.jsx(c,{className:m,children:"Agent"}),e.jsx(c,{className:`${m} w-24`,children:"Version"}),e.jsx(c,{className:m,children:"Summary"}),e.jsx(c,{className:`${m} w-24`,children:"Project"}),e.jsx(c,{className:`${m} w-28`,children:"Tokens Used"}),e.jsx(c,{className:`${m} w-36`,children:"Created"})]})}),e.jsx(M,{children:f.map(s=>e.jsxs(v,{"data-testid":"session-row","data-session-id":s.id,className:"border-b border-border/65 hover:bg-surface-high cursor-pointer",onClick:()=>g(s.id),children:[e.jsx(x,{className:"font-label text-xs text-primary",children:e.jsx("button",{type:"button",className:"text-left font-medium hover:underline",onClick:d=>{d.stopPropagation(),g(s.id)},children:s.agent??"Session"})}),e.jsx(x,{className:"font-label text-xs text-outline",children:s.agent_version??"—"}),e.jsx(x,{className:"font-body text-xs text-on-surface-variant max-w-sm truncate",children:s.summary??"—"}),e.jsx(x,{className:"font-label text-xs text-outline",children:s.project_id?s.project_id.slice(-6):"—"}),e.jsx(x,{className:"font-label text-xs text-outline text-right",children:s.tokens_used!=null?s.tokens_used.toLocaleString():"—"}),e.jsx(x,{className:"font-label text-xs text-outline",children:new Date(s.created_at).toLocaleString()})]},s.id))})]}):e.jsx("div",{className:"divide-y divide-border",children:f.map(s=>{var d;return e.jsxs("article",{"data-testid":"session-row","data-session-id":s.id,className:"py-4 space-y-3",children:[e.jsx("button",{type:"button",className:"min-h-11 text-sm text-left font-medium text-primary break-words",onClick:()=>g(s.id),children:s.agent??"Session"}),e.jsx("p",{className:"text-sm leading-relaxed text-on-surface break-words",children:s.summary??"No summary recorded"}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-xs text-outline",children:[e.jsxs("span",{children:["Version ",s.agent_version??"—"]}),e.jsxs("span",{children:[((d=s.tokens_used)==null?void 0:d.toLocaleString())??"—"," tokens"]}),e.jsx("span",{children:s.project_id?`Project ${s.project_id.slice(-6)}`:"Unassigned"}),e.jsx("span",{children:new Date(s.created_at).toLocaleString()})]})]},s.id)})}),e.jsx(Z,{page:j,pageSize:b,total:C,onPage:o})]}),e.jsx(X,{sessionId:i,open:!!i,onClose:_})]})}function ie({projectId:n}){const a=q(n);return e.jsxs("div",{children:[e.jsx(Y,{title:"Audit"}),e.jsx("p",{className:"mb-4 text-sm text-outline",children:"Recorded summaries and events. Open Sessions to read conversations or resume a coding agent."}),e.jsx(te,{projectId:a},a)]})}export{ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as E,l as U,m as V,n as q,o as I,p as J,j as t,E as Q,S as H,q as T,P as S,T as z,s as W,t as L,v as m,w as O,x as v,y as F,z as $,R as G}from"./index-
|
|
1
|
+
import{h as E,l as U,m as V,n as q,o as I,p as J,j as t,E as Q,S as H,q as T,P as S,T as z,s as W,t as L,v as m,w as O,x as v,y as F,z as $,R as G}from"./index-Q1wl04d6.js";import{u as K}from"./useJobs-guqFEkan.js";import{u as X}from"./useMemories-Bo0cv-Jb.js";import{u as Y}from"./useProjectScope-CNZ2Ry3s.js";function l(o,p){return o.isLoading?"…":o.error?"—":p}function es({projectId:o}){var f,_;const p=E(),a=Y(o),D=U("sm"),i=s=>{const e=new URL(s,window.location.origin);e.searchParams.set("project",a),p({pathname:e.pathname,search:e.search,hash:e.hash})},d=a==="all"||a==="unassigned"?void 0:{project_id:a},c=V(d),{data:b,isLoading:P}=c,u=K(d),{data:N}=u,h=X({project_id:d==null?void 0:d.project_id,limit:1},{enabled:a!=="unassigned"}),R=a==="unassigned"?0:((f=h.data)==null?void 0:f.total)??0,{data:n}=q(),j=I(!0),g=(j.data??[]).filter(s=>a==="all"||(a==="unassigned"?s.project_id===null:s.project_id===a)),w=a==="unassigned"?(N??[]).filter(s=>s.project_id===null):N??[],k=a==="unassigned"?(b??[]).filter(s=>s.project_id===null):b??[],r=k.reduce((s,e)=>(s[e.status]=(s[e.status]??0)+1,s),{}),y=[...k].sort((s,e)=>new Date(e.updated_at).getTime()-new Date(s.updated_at).getTime()).slice(0,8),x=w.filter(s=>s.enabled),A=a==="all"?"All Projects":a==="unassigned"?"Unassigned":((_=n==null?void 0:n.find(s=>s.id===a))==null?void 0:_.name)??"",M=[{label:"Doing",value:l(c,r.doing??0),sub:"in progress",path:"/tasks?view=table&status=doing"},{label:"Review",value:l(c,r.review??0),sub:"awaiting review",path:"/tasks?view=table&status=review"},{label:"Blocked",value:l(c,r.blocked??0),sub:"needs attention",path:"/tasks?view=table&status=blocked"},{label:"Todo",value:l(c,(r.todo??0)+(r.queued??0)),sub:"pending",path:"/tasks?view=board"},{label:"Done",value:l(c,r.done??0),sub:"completed",path:"/tasks?view=table&status=done"}],B=[{label:"Active jobs",value:l(u,x.length),sub:`of ${w.length} total`,path:"/jobs"},{label:"Memories",value:l(h,R),sub:"in this scope",path:J},{label:"Projects",value:(n??[]).filter(s=>s.status==="active").length,sub:"active across workspace",path:"/projects"}];return t.jsxs("div",{"data-activity-preview":!0,"data-testid":"activity-preview",className:"activity-preview",children:[t.jsxs("div",{className:"activity-heading",children:[t.jsxs("div",{children:[t.jsx("h1",{"data-testid":"view-title",children:"Activity"}),t.jsx("p",{"data-testid":"view-meta",children:A||"All projects"})]}),t.jsx("button",{type:"button",className:"activity-primary",onClick:()=>i("/tasks"),children:"View tasks"})]}),[c,u,h,j].some(s=>s.isLoading)&&t.jsx("p",{role:"status",className:"activity-muted mb-4",children:"Loading activity…"}),[{name:"Tasks",query:c},{name:"Jobs",query:u},{name:"Memories",query:h},{name:"Sessions",query:j}].filter(({query:s})=>s.error).map(({name:s,query:e})=>{var C;return t.jsx(Q,{message:`${s}: ${((C=e.error)==null?void 0:C.message)??"Could not load activity"}`,onRetry:()=>e.refetch()},s)}),t.jsx("section",{className:"activity-metrics","aria-label":"Task summary",children:M.map(s=>t.jsxs("button",{type:"button","data-testid":"stat-card","data-stat-label":s.label,className:"activity-metric",onClick:()=>i(s.path),children:[t.jsx("span",{className:"activity-metric-label",children:s.label}),t.jsx("span",{"data-testid":"stat-card-value",className:"activity-metric-value",children:s.value}),t.jsx("span",{className:"activity-metric-sub",children:s.sub})]},s.label))}),t.jsx("section",{className:"activity-resources","aria-label":"Workspace summary",children:B.map(s=>t.jsxs("button",{type:"button","data-testid":"stat-card","data-stat-label":s.label,onClick:()=>i(s.path),children:[t.jsx("span",{children:s.label}),t.jsx("span",{"data-testid":"stat-card-value",className:"activity-resource-value",children:s.value}),t.jsx("span",{className:"activity-resource-sub",children:s.sub})]},s.label))}),t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Recent tasks"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/tasks"),children:"View all"})]}),P?t.jsx("div",{className:"space-y-2",children:[0,1,2,3].map(s=>t.jsx(H,{className:"h-10 w-full"},s))}):y.length===0?t.jsx("p",{className:"activity-empty",children:"No tasks"}):D?t.jsxs(z,{className:"activity-task-table",children:[t.jsx(W,{children:t.jsxs(L,{children:[t.jsx(m,{children:"Task"}),t.jsx(m,{className:"w-36",children:"Status"}),t.jsx(m,{className:"w-28",children:"Priority"}),t.jsx(m,{className:"w-28",children:"Updated"})]})}),t.jsx(O,{children:y.map(s=>t.jsxs(L,{onClick:()=>i(`/tasks/${s.id}`),children:[t.jsx(v,{children:t.jsx("button",{type:"button",className:"activity-task-title",onClick:e=>{e.stopPropagation(),i(`/tasks/${s.id}`)},children:s.title})}),t.jsx(v,{children:t.jsx("span",{className:"activity-status","data-status":s.status,children:t.jsx(T,{status:s.status})})}),t.jsx(v,{children:t.jsx("span",{className:"activity-priority",children:t.jsx(S,{priority:s.priority})})}),t.jsx(v,{className:"activity-muted",children:new Date(s.updated_at).toLocaleDateString()})]},s.id))})]}):t.jsx("div",{className:"activity-task-list",children:y.map(s=>t.jsxs("article",{className:"activity-task-mobile",children:[t.jsx("button",{type:"button",className:"activity-task-title",onClick:()=>i(`/tasks/${s.id}`),children:s.title}),t.jsxs("div",{className:"activity-task-meta",children:[t.jsx("span",{className:"activity-status","data-status":s.status,children:t.jsx(T,{status:s.status})}),t.jsx("span",{className:"activity-priority",children:t.jsx(S,{priority:s.priority})}),t.jsx("span",{children:new Date(s.updated_at).toLocaleDateString()})]})]},s.id))})]}),t.jsxs("div",{className:"activity-secondary",children:[x.length>0&&t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Active jobs"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/jobs"),children:"View all"})]}),t.jsx("div",{className:"activity-row-list",children:x.slice(0,5).map(s=>t.jsxs("button",{type:"button",className:"activity-row",onClick:()=>i(`/jobs/${s.id}`),children:[t.jsxs("span",{className:"activity-row-heading",children:[t.jsx("span",{children:s.name}),t.jsx("span",{className:"activity-muted",children:s.trigger_type})]}),s.last_run_at&&t.jsxs("span",{className:"activity-row-description",children:["Last run ",new Date(s.last_run_at).toLocaleString()]})]},s.id))})]}),g.length>0&&t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Agent sessions"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/sessions"),children:"View all"})]}),t.jsx("div",{className:"activity-row-list",children:g.slice(0,5).map(s=>t.jsxs("div",{className:"activity-row",children:[t.jsxs("button",{type:"button",className:"w-full text-left","data-testid":"activity-session-link","data-session-id":s.id,onClick:()=>i(`/sessions?session=${encodeURIComponent(s.id)}`),children:[t.jsxs("span",{className:"activity-row-heading",children:[t.jsx("span",{children:s.name??s.agent}),t.jsx("span",{className:"activity-muted",children:F(s.last_activity_at)})]}),t.jsxs("span",{className:"activity-row-description inline-flex items-center gap-2",children:[t.jsx("span",{className:`size-1.5 rounded-full ${$[s.status].dot}`}),s.agent," · ",$[s.status].label,s.task?` · ${s.task.title}`:""]})]}),t.jsx(G,{session:s})]},s.id))})]})]}),a==="all"&&(n??[]).length>0&&t.jsxs("section",{className:"activity-section",children:[t.jsxs("div",{className:"activity-section-heading",children:[t.jsx("h2",{children:"Projects"}),t.jsx("button",{type:"button",className:"activity-text-action",onClick:()=>i("/projects"),children:"View all"})]}),t.jsx("div",{className:"activity-projects",children:(n??[]).filter(s=>s.status==="active").slice(0,6).map(s=>t.jsxs("button",{type:"button",className:"activity-row",onClick:()=>i(`/projects/${s.id}`),children:[t.jsx("span",{className:"activity-row-heading",children:s.name}),s.description&&t.jsx("span",{className:"activity-row-description",children:s.description})]},s.id))})]})]})}export{es as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as A,h as G,r as o,j as e,M as Y,B as m}from"./index-
|
|
1
|
+
import{g as A,h as G,r as o,j as e,M as Y,B as m}from"./index-Q1wl04d6.js";const i=new Map,M=new Set;typeof window<"u"&&window.addEventListener("beforeunload",t=>{i.size&&(t.preventDefault(),t.returnValue="")});function H(t){return M.has(t)?!1:i.has(t)?window.confirm("Discard unsaved changes to this document?")?(i.delete(t),!0):!1:!0}function K({documentId:t,content:s,path:D,onSave:d,testId:N,wikiLinks:C,navigation:k,expanded:R,onExpandedChange:E,layout:F,pageTitle:q,hideFrontmatter:T}){const[V]=A(),W=G(),v=V.get("editorMode"),x=v==="edit"||v==="split"?v:"read",p=o.useRef(i.get(t)??{original:s,content:s}),[w,f]=o.useState(p.current.content),[u,j]=o.useState(p.current.original),[r,z]=o.useState(!1),[y,b]=o.useState(null),S=o.useRef(!1),l=o.useRef(p.current.content),c=w!==u;o.useEffect(()=>{i.has(t)||(f(s),l.current=s,j(s))},[s,t]);function O(a){l.current=a,f(a),a===u?i.delete(t):i.set(t,{original:u,content:a})}async function h(){if(!d||!c||S.current)return;S.current=!0,M.add(t),z(!0),b(null);const a=l.current;try{const n=await d(a,u),g=typeof n=="string"?n:a;j(g),l.current===a?(i.delete(t),l.current=g,f(g)):i.set(t,{original:g,content:l.current})}catch(n){b(n instanceof Error?n.message:"Could not save document")}finally{S.current=!1,M.delete(t),z(!1)}}function P(a){const n=new URLSearchParams(window.location.search);n.set("editorMode",a),n.toString()!==new URLSearchParams(window.location.search).toString()&&W({search:n.toString(),hash:window.location.hash})}function U(){H(t)&&(f(s),j(s),l.current=s,b(null))}const B=d?r?"Saving…":c?"Unsaved changes":"Saved":"Read-only",L=e.jsxs(e.Fragment,{children:[y&&e.jsxs("p",{role:"alert",className:"text-sm text-destructive",children:[y," Your draft has been kept."]}),c&&s!==u&&e.jsx("p",{role:"status",className:"text-sm text-outline",children:"The document changed elsewhere. Your draft is preserved; saving will check for conflicts."})]});return F==="page"?e.jsx("div",{className:"min-w-0","data-testid":"document-workspace",children:e.jsx(Y,{path:D,value:w,onChange:O,onSave:()=>void h(),readOnly:!d||r,testId:N,wikiLinks:C,initialMode:"read",mode:x,onModeChange:P,expanded:R,onExpandedChange:E,layout:"page",pageTitle:q,hideFrontmatter:T,notice:y||c&&s!==u?L:void 0,actions:(x!=="read"||c||r)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-testid":"document-save-status",role:"status",className:"text-xs text-outline",children:B}),d&&(c||r)&&e.jsxs(e.Fragment,{children:[e.jsx(m,{type:"button",size:"sm",variant:"ghost","data-testid":"document-discard",disabled:r,onClick:U,children:"Discard"}),e.jsx(m,{type:"button",size:"sm","data-testid":"document-save",disabled:r,onClick:()=>void h(),children:"Save"})]})]})})}):e.jsx("div",{className:"min-w-0 space-y-3","data-testid":"document-workspace",children:e.jsx(Y,{path:D,value:w,onChange:O,onSave:()=>void h(),readOnly:!d||r,testId:N,wikiLinks:C,initialMode:"read",mode:x,onModeChange:P,expanded:R,onExpandedChange:E,layout:F,header:e.jsxs("div",{className:"space-y-2",children:[k&&e.jsx("div",{className:"mb-3 min-w-0",children:k}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{"data-testid":"document-save-status",role:"status",className:"min-w-0 flex-1 text-sm text-outline",children:B}),d&&e.jsxs(e.Fragment,{children:[e.jsx(m,{type:"button",variant:"ghost","data-testid":"document-discard",disabled:!c||r,onClick:U,children:"Discard changes"}),e.jsx(m,{type:"button","data-testid":"document-save",disabled:!c||r,onClick:()=>void h(),children:"Save changes"})]})]}),L]})})})}export{K as D,H as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as U,r as t,a as $,j as n,i as K,M as A,k as T,d as P}from"./index-
|
|
1
|
+
import{g as U,r as t,a as $,j as n,i as K,M as A,k as T,d as P}from"./index-Q1wl04d6.js";import{S as V}from"./save-BuI4O_ZA.js";const c=new Map;typeof window<"u"&&window.addEventListener("beforeunload",s=>{c.size!==0&&(s.preventDefault(),s.returnValue="")});function H({terminalId:s,path:i,content:u,readOnly:v,onDirty:w}){const[Q,z]=U(),p=Q.get("editorMode"),D=p==="read"||p==="split"?p:"edit",a=`${s}:${i}`,d=t.useRef(c.get(a)??{original:u,content:u}),o=t.useRef(d.current.original),l=t.useRef(d.current.content),[S,g]=t.useState(d.current.content!==d.current.original),[C,j]=t.useState(!1),[E,x]=t.useState(null),[k,b]=t.useState(d.current.content),R=$(),y=t.useRef(()=>{}),h=t.useRef(!1),m=t.useRef(!1),f=t.useRef(w);f.current=w;async function M(){if(h.current||v||l.current===o.current)return;h.current=!0,j(!0),x(null);const e=l.current;try{await P.git.saveFile(s,i,e,o.current),o.current=e;const r=l.current!==e;g(r),m.current&&f.current(r),r?c.set(a,{original:e,content:l.current}):c.delete(a),R.invalidateQueries({queryKey:["checkout-files",s,i]}),R.invalidateQueries({queryKey:["git",s]})}catch(r){x(r instanceof Error?r.message:"Could not save file")}finally{h.current=!1,j(!1)}}y.current=()=>void M(),t.useEffect(()=>(m.current=!0,f.current(d.current.content!==d.current.original),()=>{m.current=!1}),[]),t.useEffect(()=>{h.current||c.has(a)||u===o.current||(o.current=u,l.current=u,b(u),g(!1),m.current&&f.current(!1))},[u,a]);function N(e){l.current=e,b(e);const r=e!==o.current;g(r),f.current(r),r?c.set(a,{original:o.current,content:e}):c.delete(a)}function L(){window.confirm("Discard your edits and reload the file from disk?")&&P.git.files(s,i).then(e=>{if(e.content===null||e.binary||e.truncated)throw new Error("File is no longer editable");o.current=e.content,l.current=e.content,c.delete(a),b(e.content),g(!1),f.current(!1),x(null)}).catch(e=>x(e instanceof Error?e.message:"Could not reload file"))}const F=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b border-surface-highest px-2 py-1",children:[n.jsxs("button",{type:"button","data-testid":"file-save",disabled:!S||C||v,onClick:()=>void M(),className:"flex min-h-11 items-center gap-1 rounded px-2 py-1 text-sm text-primary hover:bg-surface-highest disabled:opacity-40",title:"Save (Ctrl/Cmd+S)",children:[n.jsx(V,{size:14}),C?"Saving…":"Save"]}),n.jsx("span",{"data-testid":"file-save-status",className:"min-w-0 flex-1 truncate text-sm text-on-surface-variant",children:v?"Read-only preview":S?"Unsaved changes":"Saved"})]}),E&&n.jsxs("div",{role:"alert",className:"shrink-0 border-b border-error/30 p-2 text-xs text-error",children:[E,n.jsx("button",{type:"button","data-testid":"file-reload",onClick:L,className:"ml-2 underline",children:"Reload from disk"})]})]});return n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"file-editor",children:[!K(i)&&F,n.jsx("div",{"data-testid":"file-preview",className:"min-h-0 flex-1 overflow-hidden",children:K(i)?n.jsx(A,{path:i,value:k,onChange:N,onSave:()=>y.current(),readOnly:v,height:"100%",testId:"file-editor-input",header:F,mode:D,onModeChange:e=>z(r=>{const q=new URLSearchParams(r);return q.set("editorMode",e),q})}):n.jsx(T,{path:i,value:k,onChange:N,onSave:()=>y.current(),readOnly:v,height:"100%",testId:"file-editor-input"})})]})}export{H as FileEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as S,a as f,b as v,d as j,r as h,j as e,B as b,Y as w,Z as _,L as k,E as R,a9 as F}from"./index-BqQDBYwx.js";import{a as $}from"./useJobs-By4K4BjX.js";function L(t){return S({queryKey:["webhooks",t],queryFn:()=>j.webhooks.list(t),select:s=>s.webhooks})}function D(t){return S({queryKey:["webhook-deliveries",t],queryFn:()=>j.webhooks.deliveries(t),select:s=>s.deliveries,enabled:!!t,refetchInterval:3e3})}function U(){const t=f();return v({mutationFn:s=>j.webhooks.create(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function E(){const t=f();return v({mutationFn:({id:s,...a})=>j.webhooks.update(s,a),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function G(){const t=f();return v({mutationFn:s=>j.webhooks.delete(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function P(){return v({mutationFn:t=>j.webhooks.rotate(t)})}function q(t){return[...new Set(t.split(",").map(s=>s.trim()).filter(Boolean))]}function I(t,s,a){return new URL(`/webhooks/${encodeURIComponent(t)}`,new URL(s,a)).href}function z(t){return["localhost","127.0.0.1","[::1]"].includes(new URL(t).hostname)}function N({id:t,testId:s,value:a,onChange:i,placeholder:d}){const[n,r]=h.useState(a.join(", "));return e.jsx(_,{id:t,"data-testid":s,value:n,placeholder:d,onChange:l=>{r(l.target.value),i(l.target.value)}})}function J({projectId:t,onCreated:s}){const a=U(),[i,d]=h.useState(""),[n,r]=h.useState("github"),[l,m]=h.useState(null),u=h.useId();return l?e.jsxs("div",{"data-testid":"webhook-created",className:"space-y-3",children:[e.jsx(W,{hook:l,secret:l.secret}),e.jsx(b,{type:"button",variant:"outline","data-testid":"webhook-setup-done",onClick:()=>{s==null||s(l),m(null),d("")},children:"I've copied the setup details"})]}):e.jsxs("div",{className:"space-y-3","data-testid":"webhook-create-form",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-name`,children:"Webhook name"}),e.jsx(_,{id:`${u}-name`,"data-testid":"webhook-name",value:i,onChange:c=>d(c.target.value),maxLength:100,placeholder:"GitHub repository events"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-provider`,children:"Provider"}),e.jsxs("select",{id:`${u}-provider`,"data-testid":"webhook-provider",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:n,onChange:c=>r(c.target.value),children:[e.jsx("option",{value:"github",children:"GitHub"}),e.jsx("option",{value:"generic",children:"Other service (HMAC)"})]})]}),e.jsx("p",{className:"text-xs text-outline",children:"Create the event source here. Connect jobs and choose their event filters in Jobs. No job is required to create a webhook."}),a.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:a.error.message}),e.jsx(b,{type:"button","data-testid":"webhook-create",disabled:!i.trim()||a.isPending,onClick:()=>a.mutate({name:i.trim(),provider:n,project_id:t??null},{onSuccess:m}),children:a.isPending?"Creating...":"Create webhook"})]})}function A({value:t,onChange:s,projectId:a}){const{data:i,error:d,isLoading:n,refetch:r}=L(a),l=i==null?void 0:i.filter(o=>o.project_id===null||o.project_id===a),[m,u]=h.useState(!1);function c(o){t.some(p=>p.webhook_id===o)||s([...t,{webhook_id:o,events:[],actions:[]}])}function y(o,p,x){s(t.map(g=>g.webhook_id===o?{...g,[p]:q(x)}:g))}return e.jsxs("section",{className:"space-y-3 border-y border-border py-4","data-testid":"job-webhook-picker",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Which webhook should trigger this job?"}),d?e.jsx(R,{message:d.message,onRetry:()=>r()}):e.jsxs(e.Fragment,{children:[e.jsx(w,{htmlFor:"job-webhook-source",children:"Configured webhooks"}),e.jsxs("select",{id:"job-webhook-source","data-testid":"job-webhook-select",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:"",disabled:n,onChange:o=>{o.target.value&&c(o.target.value)},children:[e.jsx("option",{value:"",children:n?"Loading webhooks...":"Select an existing webhook"}),(l??[]).filter(o=>!t.some(p=>p.webhook_id===o.id)).map(o=>e.jsxs("option",{value:o.id,children:[o.name,o.enabled?"":" (disabled)"]},o.id))]}),!n&&!(l!=null&&l.length)&&e.jsx("p",{className:"text-xs text-outline",children:"No webhooks configured for this project yet. Create one below or on the Webhooks page."})]}),t.map(o=>{var p;return e.jsxs("div",{className:"space-y-2 border-t border-border pt-3","data-testid":"job-webhook-binding","data-webhook-id":o.webhook_id,children:[e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:((p=l==null?void 0:l.find(x=>x.id===o.webhook_id))==null?void 0:p.name)??o.webhook_id}),e.jsx(b,{type:"button",variant:"ghost",size:"sm","data-testid":"job-webhook-remove",onClick:()=>s(t.filter(x=>x.webhook_id!==o.webhook_id)),children:"Disconnect"})]}),e.jsx(w,{htmlFor:`events-${o.webhook_id}`,children:"Events for this job"}),e.jsx(N,{id:`events-${o.webhook_id}`,testId:"webhook-events",value:o.events,onChange:x=>y(o.webhook_id,"events",x),placeholder:"pull_request, push (blank accepts all)"}),e.jsx(w,{htmlFor:`actions-${o.webhook_id}`,children:"Actions for this job (optional)"}),e.jsx(N,{id:`actions-${o.webhook_id}`,testId:"webhook-actions",value:o.actions,onChange:x=>y(o.webhook_id,"actions",x),placeholder:"opened, synchronize (blank accepts all)"})]},o.webhook_id)}),e.jsx(b,{type:"button",size:"sm",variant:"outline","data-testid":"webhook-add",onClick:()=>u(!m),children:m?"Close new webhook":"Create a webhook"}),m&&e.jsx(J,{projectId:a,onCreated:o=>{c(o.id),u(!1)}})]})}function K({job:t}){const s=$(),[a,i]=h.useState(t.webhooks??[]);return e.jsxs("section",{className:"space-y-3","data-testid":"job-webhooks",children:[!t.enabled&&e.jsx("p",{className:"text-sm text-outline",children:"Job disabled. Configure connections now and enable it from Jobs when ready."}),e.jsx(A,{value:a,onChange:i,projectId:t.project_id??void 0}),s.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:s.error.message}),e.jsx(b,{type:"button",size:"sm","data-testid":"job-webhooks-save",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,webhooks:a,trigger_type:"webhook"}),children:"Save connections"}),s.isSuccess&&e.jsx("p",{role:"status",className:"text-xs text-outline",children:"Connections saved."}),e.jsx(k,{className:"inline-block text-sm underline",to:`/webhooks?project=${encodeURIComponent(t.project_id??"all")}`,children:"Manage configured webhooks and deliveries"})]})}function C({label:t,value:s,secret:a=!1}){const[i,d]=h.useState(!1),[n,r]=h.useState(!1);return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-outline",children:t}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 break-all text-xs","data-testid":a?"webhook-secret":"webhook-url",children:s}),e.jsx(b,{type:"button",size:"sm",variant:"outline","aria-label":`Copy ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(s),d(!0),r(!1)}catch{r(!0)}},children:i?"Copied":"Copy"})]}),n&&e.jsx("p",{role:"alert",className:"text-xs text-error",children:"Select and copy the value above; clipboard access is unavailable."})]})}function W({hook:t,secret:s}){const a=I(t.token,F(),window.location.origin);return e.jsxs("div",{className:"space-y-3","data-testid":"webhook-setup",children:[e.jsx(C,{label:"Payload URL",value:a}),z(a)&&e.jsx("p",{className:"text-sm text-warning",children:"This address is local. For external providers, use your publicly reachable ORC address with the same /webhooks/ path."}),s?e.jsxs(e.Fragment,{children:[e.jsx(C,{label:"Signing secret",value:s,secret:!0}),e.jsx("p",{className:"text-xs text-outline",children:"Copy the signing secret before leaving. It is shown once."})]}):e.jsx("p",{className:"text-xs text-outline",children:"The signing secret is hidden. Generate a replacement only if you need to reconnect the sender."}),t.provider==="github"?e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-outline",children:[e.jsx("li",{children:"In your repository, open GitHub Settings - Webhooks - Add webhook."}),e.jsx("li",{children:"Paste the Payload URL, select application/json, and enter the signing secret."}),e.jsx("li",{children:"Select the events needed by your connected jobs. Each job has its own filters."}),e.jsx("li",{children:"Send an event and inspect Recent deliveries below."})]}):e.jsx("p",{className:"text-sm text-outline",children:"Send JSON, signed with HMAC-SHA256 of the raw body. Set X-Orc-Signature-256 to sha256=<hex signature>, X-Orc-Event to the event name and X-Orc-Delivery to a unique delivery ID."})]})}function Q({hook:t}){var u;const s=E(),a=P(),[i,d]=h.useState(!1),[n,r]=h.useState(!1),[l,m]=h.useState();return e.jsxs("article",{className:"space-y-3 border-b border-border pb-5","data-testid":"webhook-endpoint","data-webhook-id":t.id,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:t.name}),e.jsxs("span",{className:"text-xs text-outline",children:[t.provider," - ",t.enabled?"Enabled":"Disabled"]}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,enabled:!t.enabled}),children:t.enabled?"Disable":"Enable"})]}),e.jsxs("div",{className:"space-y-1","data-testid":"webhook-connected-jobs",children:[e.jsxs("p",{className:"text-xs text-outline",children:["Connected jobs (",t.subscriptions.length,")"]}),t.subscriptions.length?t.subscriptions.map(c=>e.jsxs("div",{className:"text-sm",children:[e.jsx(k,{className:"underline","data-testid":"webhook-job-link",to:`/jobs/${c.job_id}?project=all`,children:c.name}),e.jsxs("span",{className:"text-xs text-outline",children:[" ","- ",c.enabled?"Enabled":"Disabled","; events:"," ",c.events.join(", ")||"all","; actions: ",c.actions.join(", ")||"all"]})]},c.job_id)):e.jsx("p",{className:"text-sm text-outline",children:"No connected jobs. Select this webhook when creating or editing a job."})]}),e.jsx(W,{hook:t,secret:l}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":"webhook-deliveries-toggle",onClick:()=>d(!i),children:i?"Hide deliveries":"Recent deliveries"}),e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(!n),children:"New signing secret"})]}),n&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{children:"The sender's existing secret will stop working. Update it after generating the replacement."}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:a.isPending,onClick:()=>a.mutate(t.id,{onSuccess:c=>{m(c.secret),r(!1)}}),children:"Generate replacement secret"})]}),(s.error||a.error)&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:(u=s.error??a.error)==null?void 0:u.message}),i&&e.jsx(H,{id:t.id})]})}function H({id:t}){const{data:s,isLoading:a,error:i,refetch:d}=D(t);return e.jsxs("section",{className:"space-y-2","data-testid":"webhook-deliveries",children:[e.jsx("h4",{className:"text-sm font-medium",children:"Recent deliveries"}),i?e.jsx(R,{message:i.message,onRetry:()=>d()}):a?e.jsx("p",{role:"status",children:"Loading deliveries..."}):s!=null&&s.length?s.map(n=>e.jsxs("div",{className:"space-y-1 border-t border-border py-2 text-xs","data-testid":"webhook-delivery",children:[e.jsxs("div",{className:"flex flex-wrap justify-between gap-2",children:[e.jsxs("span",{children:[n.event,n.action?` / ${n.action}`:""]}),e.jsx("span",{children:n.status})]}),e.jsxs("p",{className:"text-outline",children:[n.repository," ",new Date(n.created_at).toLocaleString()]}),n.status==="ignored"&&e.jsx("p",{className:"text-outline",children:"No enabled connected job matched this event."}),n.error&&e.jsx("p",{className:"text-error",children:n.error}),n.runs.map(r=>e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs(k,{className:"underline",to:`/jobs/${r.job_id}?project=all`,children:["Job run: ",r.status]}),r.task_id&&e.jsx(k,{className:"underline",to:`/tasks/${r.task_id}?project=all`,children:"Created task"}),r.session_id&&e.jsx(k,{className:"underline",to:`/audit/${r.session_id}?project=all`,children:"Agent session"})]},r.job_run_id))]},n.id)):e.jsx("p",{className:"text-sm text-outline",children:"No events received yet. Register the endpoint with your provider, then send an event."})]})}export{K as J,J as W,G as a,Q as b,A as c,L as u};
|
|
1
|
+
import{u as S,a as f,b as v,d as j,r as h,j as e,B as b,Y as w,Z as _,L as k,E as R,a9 as F}from"./index-Q1wl04d6.js";import{a as $}from"./useJobs-guqFEkan.js";function L(t){return S({queryKey:["webhooks",t],queryFn:()=>j.webhooks.list(t),select:s=>s.webhooks})}function D(t){return S({queryKey:["webhook-deliveries",t],queryFn:()=>j.webhooks.deliveries(t),select:s=>s.deliveries,enabled:!!t,refetchInterval:3e3})}function U(){const t=f();return v({mutationFn:s=>j.webhooks.create(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function E(){const t=f();return v({mutationFn:({id:s,...a})=>j.webhooks.update(s,a),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function G(){const t=f();return v({mutationFn:s=>j.webhooks.delete(s),onSuccess:()=>t.invalidateQueries({queryKey:["webhooks"]})})}function P(){return v({mutationFn:t=>j.webhooks.rotate(t)})}function q(t){return[...new Set(t.split(",").map(s=>s.trim()).filter(Boolean))]}function I(t,s,a){return new URL(`/webhooks/${encodeURIComponent(t)}`,new URL(s,a)).href}function z(t){return["localhost","127.0.0.1","[::1]"].includes(new URL(t).hostname)}function N({id:t,testId:s,value:a,onChange:i,placeholder:d}){const[n,r]=h.useState(a.join(", "));return e.jsx(_,{id:t,"data-testid":s,value:n,placeholder:d,onChange:l=>{r(l.target.value),i(l.target.value)}})}function J({projectId:t,onCreated:s}){const a=U(),[i,d]=h.useState(""),[n,r]=h.useState("github"),[l,m]=h.useState(null),u=h.useId();return l?e.jsxs("div",{"data-testid":"webhook-created",className:"space-y-3",children:[e.jsx(W,{hook:l,secret:l.secret}),e.jsx(b,{type:"button",variant:"outline","data-testid":"webhook-setup-done",onClick:()=>{s==null||s(l),m(null),d("")},children:"I've copied the setup details"})]}):e.jsxs("div",{className:"space-y-3","data-testid":"webhook-create-form",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-name`,children:"Webhook name"}),e.jsx(_,{id:`${u}-name`,"data-testid":"webhook-name",value:i,onChange:c=>d(c.target.value),maxLength:100,placeholder:"GitHub repository events"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{htmlFor:`${u}-provider`,children:"Provider"}),e.jsxs("select",{id:`${u}-provider`,"data-testid":"webhook-provider",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:n,onChange:c=>r(c.target.value),children:[e.jsx("option",{value:"github",children:"GitHub"}),e.jsx("option",{value:"generic",children:"Other service (HMAC)"})]})]}),e.jsx("p",{className:"text-xs text-outline",children:"Create the event source here. Connect jobs and choose their event filters in Jobs. No job is required to create a webhook."}),a.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:a.error.message}),e.jsx(b,{type:"button","data-testid":"webhook-create",disabled:!i.trim()||a.isPending,onClick:()=>a.mutate({name:i.trim(),provider:n,project_id:t??null},{onSuccess:m}),children:a.isPending?"Creating...":"Create webhook"})]})}function A({value:t,onChange:s,projectId:a}){const{data:i,error:d,isLoading:n,refetch:r}=L(a),l=i==null?void 0:i.filter(o=>o.project_id===null||o.project_id===a),[m,u]=h.useState(!1);function c(o){t.some(p=>p.webhook_id===o)||s([...t,{webhook_id:o,events:[],actions:[]}])}function y(o,p,x){s(t.map(g=>g.webhook_id===o?{...g,[p]:q(x)}:g))}return e.jsxs("section",{className:"space-y-3 border-y border-border py-4","data-testid":"job-webhook-picker",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Which webhook should trigger this job?"}),d?e.jsx(R,{message:d.message,onRetry:()=>r()}):e.jsxs(e.Fragment,{children:[e.jsx(w,{htmlFor:"job-webhook-source",children:"Configured webhooks"}),e.jsxs("select",{id:"job-webhook-source","data-testid":"job-webhook-select",className:"w-full min-h-11 rounded-md border border-control-border bg-background px-3 text-sm",value:"",disabled:n,onChange:o=>{o.target.value&&c(o.target.value)},children:[e.jsx("option",{value:"",children:n?"Loading webhooks...":"Select an existing webhook"}),(l??[]).filter(o=>!t.some(p=>p.webhook_id===o.id)).map(o=>e.jsxs("option",{value:o.id,children:[o.name,o.enabled?"":" (disabled)"]},o.id))]}),!n&&!(l!=null&&l.length)&&e.jsx("p",{className:"text-xs text-outline",children:"No webhooks configured for this project yet. Create one below or on the Webhooks page."})]}),t.map(o=>{var p;return e.jsxs("div",{className:"space-y-2 border-t border-border pt-3","data-testid":"job-webhook-binding","data-webhook-id":o.webhook_id,children:[e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:((p=l==null?void 0:l.find(x=>x.id===o.webhook_id))==null?void 0:p.name)??o.webhook_id}),e.jsx(b,{type:"button",variant:"ghost",size:"sm","data-testid":"job-webhook-remove",onClick:()=>s(t.filter(x=>x.webhook_id!==o.webhook_id)),children:"Disconnect"})]}),e.jsx(w,{htmlFor:`events-${o.webhook_id}`,children:"Events for this job"}),e.jsx(N,{id:`events-${o.webhook_id}`,testId:"webhook-events",value:o.events,onChange:x=>y(o.webhook_id,"events",x),placeholder:"pull_request, push (blank accepts all)"}),e.jsx(w,{htmlFor:`actions-${o.webhook_id}`,children:"Actions for this job (optional)"}),e.jsx(N,{id:`actions-${o.webhook_id}`,testId:"webhook-actions",value:o.actions,onChange:x=>y(o.webhook_id,"actions",x),placeholder:"opened, synchronize (blank accepts all)"})]},o.webhook_id)}),e.jsx(b,{type:"button",size:"sm",variant:"outline","data-testid":"webhook-add",onClick:()=>u(!m),children:m?"Close new webhook":"Create a webhook"}),m&&e.jsx(J,{projectId:a,onCreated:o=>{c(o.id),u(!1)}})]})}function K({job:t}){const s=$(),[a,i]=h.useState(t.webhooks??[]);return e.jsxs("section",{className:"space-y-3","data-testid":"job-webhooks",children:[!t.enabled&&e.jsx("p",{className:"text-sm text-outline",children:"Job disabled. Configure connections now and enable it from Jobs when ready."}),e.jsx(A,{value:a,onChange:i,projectId:t.project_id??void 0}),s.error&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:s.error.message}),e.jsx(b,{type:"button",size:"sm","data-testid":"job-webhooks-save",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,webhooks:a,trigger_type:"webhook"}),children:"Save connections"}),s.isSuccess&&e.jsx("p",{role:"status",className:"text-xs text-outline",children:"Connections saved."}),e.jsx(k,{className:"inline-block text-sm underline",to:`/webhooks?project=${encodeURIComponent(t.project_id??"all")}`,children:"Manage configured webhooks and deliveries"})]})}function C({label:t,value:s,secret:a=!1}){const[i,d]=h.useState(!1),[n,r]=h.useState(!1);return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-outline",children:t}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 break-all text-xs","data-testid":a?"webhook-secret":"webhook-url",children:s}),e.jsx(b,{type:"button",size:"sm",variant:"outline","aria-label":`Copy ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(s),d(!0),r(!1)}catch{r(!0)}},children:i?"Copied":"Copy"})]}),n&&e.jsx("p",{role:"alert",className:"text-xs text-error",children:"Select and copy the value above; clipboard access is unavailable."})]})}function W({hook:t,secret:s}){const a=I(t.token,F(),window.location.origin);return e.jsxs("div",{className:"space-y-3","data-testid":"webhook-setup",children:[e.jsx(C,{label:"Payload URL",value:a}),z(a)&&e.jsx("p",{className:"text-sm text-warning",children:"This address is local. For external providers, use your publicly reachable ORC address with the same /webhooks/ path."}),s?e.jsxs(e.Fragment,{children:[e.jsx(C,{label:"Signing secret",value:s,secret:!0}),e.jsx("p",{className:"text-xs text-outline",children:"Copy the signing secret before leaving. It is shown once."})]}):e.jsx("p",{className:"text-xs text-outline",children:"The signing secret is hidden. Generate a replacement only if you need to reconnect the sender."}),t.provider==="github"?e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-outline",children:[e.jsx("li",{children:"In your repository, open GitHub Settings - Webhooks - Add webhook."}),e.jsx("li",{children:"Paste the Payload URL, select application/json, and enter the signing secret."}),e.jsx("li",{children:"Select the events needed by your connected jobs. Each job has its own filters."}),e.jsx("li",{children:"Send an event and inspect Recent deliveries below."})]}):e.jsx("p",{className:"text-sm text-outline",children:"Send JSON, signed with HMAC-SHA256 of the raw body. Set X-Orc-Signature-256 to sha256=<hex signature>, X-Orc-Event to the event name and X-Orc-Delivery to a unique delivery ID."})]})}function Q({hook:t}){var u;const s=E(),a=P(),[i,d]=h.useState(!1),[n,r]=h.useState(!1),[l,m]=h.useState();return e.jsxs("article",{className:"space-y-3 border-b border-border pb-5","data-testid":"webhook-endpoint","data-webhook-id":t.id,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:t.name}),e.jsxs("span",{className:"text-xs text-outline",children:[t.provider," - ",t.enabled?"Enabled":"Disabled"]}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:s.isPending,onClick:()=>s.mutate({id:t.id,enabled:!t.enabled}),children:t.enabled?"Disable":"Enable"})]}),e.jsxs("div",{className:"space-y-1","data-testid":"webhook-connected-jobs",children:[e.jsxs("p",{className:"text-xs text-outline",children:["Connected jobs (",t.subscriptions.length,")"]}),t.subscriptions.length?t.subscriptions.map(c=>e.jsxs("div",{className:"text-sm",children:[e.jsx(k,{className:"underline","data-testid":"webhook-job-link",to:`/jobs/${c.job_id}?project=all`,children:c.name}),e.jsxs("span",{className:"text-xs text-outline",children:[" ","- ",c.enabled?"Enabled":"Disabled","; events:"," ",c.events.join(", ")||"all","; actions: ",c.actions.join(", ")||"all"]})]},c.job_id)):e.jsx("p",{className:"text-sm text-outline",children:"No connected jobs. Select this webhook when creating or editing a job."})]}),e.jsx(W,{hook:t,secret:l}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(b,{type:"button",variant:"outline",size:"sm","data-testid":"webhook-deliveries-toggle",onClick:()=>d(!i),children:i?"Hide deliveries":"Recent deliveries"}),e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(!n),children:"New signing secret"})]}),n&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{children:"The sender's existing secret will stop working. Update it after generating the replacement."}),e.jsx(b,{type:"button",variant:"outline",size:"sm",disabled:a.isPending,onClick:()=>a.mutate(t.id,{onSuccess:c=>{m(c.secret),r(!1)}}),children:"Generate replacement secret"})]}),(s.error||a.error)&&e.jsx("p",{role:"alert",className:"text-sm text-error",children:(u=s.error??a.error)==null?void 0:u.message}),i&&e.jsx(H,{id:t.id})]})}function H({id:t}){const{data:s,isLoading:a,error:i,refetch:d}=D(t);return e.jsxs("section",{className:"space-y-2","data-testid":"webhook-deliveries",children:[e.jsx("h4",{className:"text-sm font-medium",children:"Recent deliveries"}),i?e.jsx(R,{message:i.message,onRetry:()=>d()}):a?e.jsx("p",{role:"status",children:"Loading deliveries..."}):s!=null&&s.length?s.map(n=>e.jsxs("div",{className:"space-y-1 border-t border-border py-2 text-xs","data-testid":"webhook-delivery",children:[e.jsxs("div",{className:"flex flex-wrap justify-between gap-2",children:[e.jsxs("span",{children:[n.event,n.action?` / ${n.action}`:""]}),e.jsx("span",{children:n.status})]}),e.jsxs("p",{className:"text-outline",children:[n.repository," ",new Date(n.created_at).toLocaleString()]}),n.status==="ignored"&&e.jsx("p",{className:"text-outline",children:"No enabled connected job matched this event."}),n.error&&e.jsx("p",{className:"text-error",children:n.error}),n.runs.map(r=>e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs(k,{className:"underline",to:`/jobs/${r.job_id}?project=all`,children:["Job run: ",r.status]}),r.task_id&&e.jsx(k,{className:"underline",to:`/tasks/${r.task_id}?project=all`,children:"Created task"}),r.session_id&&e.jsx(k,{className:"underline",to:`/audit/${r.session_id}?project=all`,children:"Agent session"})]},r.job_run_id))]},n.id)):e.jsx("p",{className:"text-sm text-outline",children:"No events received yet. Register the endpoint with your provider, then send an event."})]})}export{K as J,J as W,G as a,Q as b,A as c,L as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ae,r as o,ag as ge,j as e,Y as d,ah as G,Z as f,a2 as pe,a3 as je,a4 as fe,a5 as Ne,a6 as ye,E as H,S as U,ac as P,ai as ve,B as g,ad as ke,f as _e,q as we,L as Q,l as Se,aj as Ce,a0 as De,V as ee,ak as Te,al as $e,af as Pe,am as te,T as Ee,s as Re,t as se,v as L,w as Je,x as O,a7 as ze,n as Ie,a8 as ne,U as re,W as le,X as ie,an as V,ao as q,ap as M,aq as W,ar as B,as as oe}from"./index-
|
|
1
|
+
import{c as ae,r as o,ag as ge,j as e,Y as d,ah as G,Z as f,a2 as pe,a3 as je,a4 as fe,a5 as Ne,a6 as ye,E as H,S as U,ac as P,ai as ve,B as g,ad as ke,f as _e,q as we,L as Q,l as Se,aj as Ce,a0 as De,V as ee,ak as Te,al as $e,af as Pe,am as te,T as Ee,s as Re,t as se,v as L,w as Je,x as O,a7 as ze,n as Ie,a8 as ne,U as re,W as le,X as ie,an as V,ao as q,ap as M,aq as W,ar as B,as as oe}from"./index-Q1wl04d6.js";import{J as Le,c as de}from"./JobWebhooks-DXMJx6Vg.js";import{S as Oe}from"./scroll-area-TAX36AkX.js";import{b as Ae,c as Fe,d as ce,a as K,e as Be,u as Ve,f as qe,g as Me,h as We}from"./useJobs-guqFEkan.js";import{P as X}from"./pencil-D6eVnvqS.js";import{u as He}from"./useProjectScope-CNZ2Ry3s.js";/**
|
|
2
2
|
* @license lucide-react v1.27.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ve,bO as _,bJ as q,bL as re,bI as O,bQ as W,bS as tt,bN as Oe,bK as _t,bP as ps,bM as fs,bT as gs,j as e,Q as B,r as m,f as Ee,B as y,L as St,d as M,ch as Pe,n as ke,Z as U,ah as xe,an as he,ao as pe,ap as fe,aq as ge,ar as J,as as le,am as Re,a7 as ze,aG as Ct,ci as Ge,M as Dt,a8 as $t,U as Et,W as Pt,X as Rt,Y as ie,ag as bs,cj as st,ck as js,a as ys,cl as vs,g as zt,l as Lt,cm as ks,cn as Ns,co as ws,cp as _s,cq as at,a2 as Mt,a3 as Tt,a4 as At,a5 as Ft,a6 as It,ak as $e,cr as Ss,aD as Cs,cs as Ds,h as $s,_ as Kt,b$ as Es,$ as Ae,V as Ps,aC as Bt,af as nt,E as Qe,S as Ye,T as Rs,s as zs,t as it,v as de,w as Ls,x as ce,ct as Ms,p as Ts,ac as ue,cu as rt,cv as Ce,cw as Ut,cx as As,cy as Fs,cz as Is,cA as Ks,cB as Bs,cC as Us,cD as Os,cE as qs}from"./index-
|
|
1
|
+
import{c as ve,bO as _,bJ as q,bL as re,bI as O,bQ as W,bS as tt,bN as Oe,bK as _t,bP as ps,bM as fs,bT as gs,j as e,Q as B,r as m,f as Ee,B as y,L as St,d as M,ch as Pe,n as ke,Z as U,ah as xe,an as he,ao as pe,ap as fe,aq as ge,ar as J,as as le,am as Re,a7 as ze,aG as Ct,ci as Ge,M as Dt,a8 as $t,U as Et,W as Pt,X as Rt,Y as ie,ag as bs,cj as st,ck as js,a as ys,cl as vs,g as zt,l as Lt,cm as ks,cn as Ns,co as ws,cp as _s,cq as at,a2 as Mt,a3 as Tt,a4 as At,a5 as Ft,a6 as It,ak as $e,cr as Ss,aD as Cs,cs as Ds,h as $s,_ as Kt,b$ as Es,$ as Ae,V as Ps,aC as Bt,af as nt,E as Qe,S as Ye,T as Rs,s as zs,t as it,v as de,w as Ls,x as ce,ct as Ms,p as Ts,ac as ue,cu as rt,cv as Ce,cw as Ut,cx as As,cy as Fs,cz as Is,cA as Ks,cB as Bs,cC as Us,cD as Os,cE as qs}from"./index-Q1wl04d6.js";import{D as Hs,c as Ws}from"./DocumentWorkspace-C60YtNG4.js";import{d as Vs,c as V,e as Gs,f as Le,a as Ot,g as Qs,K as Ys,h as Js,i as qt,j as Xs,k as Zs,l as ea,m as ta,n as sa,o as aa,p as na,b as ia}from"./useKnowledge-CfBdZLAo.js";import{U as Ht}from"./upload-CrFhuhaP.js";import{w as ra}from"./wiki-links-Y6CQL1QZ.js";import{E as la,F as oa,A as da}from"./folder-open-Dcx7w9v0.js";import{P as Wt}from"./pencil-D6eVnvqS.js";import{D as ca}from"./download-C_GjdMEk.js";import{R as ua}from"./refresh-cw-D-hq8eog.js";import{u as ma}from"./useProjectScope-CNZ2Ry3s.js";import{a as xa,u as ha,b as pa,c as fa,d as ga,e as ba,f as ja,g as ya}from"./useMemories-Bo0cv-Jb.js";/**
|
|
2
2
|
* @license lucide-react v1.27.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ua,$ as we,r as z,j as t,k as Fe,i as Ca,u as ve,a2 as Pa,a3 as Sa,a4 as Aa,a5 as Ma,a6 as Fa,B as J,d as V,U as Ee,W as Le,X as De,at as Qe,Y as re,Z as he,ah as We,b as je,a8 as Xe,h as ma,_ as $a,b_ as Ia,a1 as Ea,a as La,g as Da,a0 as Oa,V as za,aC as Ra,b$ as Ua,c0 as Ba}from"./index-
|
|
1
|
+
import{c as ua,$ as we,r as z,j as t,k as Fe,i as Ca,u as ve,a2 as Pa,a3 as Sa,a4 as Aa,a5 as Ma,a6 as Fa,B as J,d as V,U as Ee,W as Le,X as De,at as Qe,Y as re,Z as he,ah as We,b as je,a8 as Xe,h as ma,_ as $a,b_ as Ia,a1 as Ea,a as La,g as Da,a0 as Oa,V as za,aC as Ra,b$ as Ua,c0 as Ba}from"./index-Q1wl04d6.js";import{p as $e,i as ra,a as Ta,s as qa}from"./public-api-BvD4z7ja.js";import{r as pa}from"./primitive-files-BwTyowra.js";import{U as Ka}from"./upload-CrFhuhaP.js";/**
|
|
2
2
|
* @license lucide-react v1.27.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,C as c,f as o}from"./index-
|
|
1
|
+
import{j as t,C as c,f as o}from"./index-Q1wl04d6.js";const i="inline-flex min-h-11 items-center gap-1 font-label text-xs text-primary hover:text-on-surface disabled:opacity-40 disabled:hover:text-primary";function h({page:e,pageSize:s,total:a,onPage:n}){const r=Math.max(1,Math.ceil(a/s));if(a<=s)return null;const l=e*s+1,x=Math.min(a,(e+1)*s);return t.jsxs("div",{"data-testid":"pager",className:"flex flex-wrap gap-2 items-center justify-between border-t border-surface-highest px-3 py-2",children:[t.jsxs("span",{className:"font-label text-xs text-outline",children:[l,"–",x," of ",a]}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("button",{type:"button","data-testid":"pager-prev",className:i,disabled:e===0,onClick:()=>n(e-1),children:[t.jsx(c,{className:"h-3 w-3"}),"Prev"]}),t.jsxs("span",{className:"font-label text-xs text-outline",children:["Page ",e+1," / ",r]}),t.jsxs("button",{type:"button","data-testid":"pager-next",className:i,disabled:e>=r-1,onClick:()=>n(e+1),children:["Next",t.jsx(o,{className:"h-3 w-3"})]})]})]})}export{h as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var bt=Object.defineProperty;var Ht=(n,B,e)=>B in n?bt(n,B,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[B]=e;var F=(n,B,e)=>Ht(n,typeof B!="symbol"?B+"":B,e);import{bI as X,bJ as IB,bK as UB,bL as KB,bM as mt,bN as DB,bO as CB,bP as Ft,bQ as jB,bR as Tt,bS as ke,bT as Me,r as _,j as c,Y as z,Z as uB,B as EB,a as Rt,u as St,n as _t,$ as ye,b as Ee,d as Be,bU as vt,bV as Pt,bW as Je,bX as je,a2 as kt,a3 as Mt,a4 as yt,a5 as Jt,bY as jt,a6 as Ut,V as Kt}from"./index-
|
|
1
|
+
var bt=Object.defineProperty;var Ht=(n,B,e)=>B in n?bt(n,B,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[B]=e;var F=(n,B,e)=>Ht(n,typeof B!="symbol"?B+"":B,e);import{bI as X,bJ as IB,bK as UB,bL as KB,bM as mt,bN as DB,bO as CB,bP as Ft,bQ as jB,bR as Tt,bS as ke,bT as Me,r as _,j as c,Y as z,Z as uB,B as EB,a as Rt,u as St,n as _t,$ as ye,b as Ee,d as Be,bU as vt,bV as Pt,bW as Je,bX as je,a2 as kt,a3 as Mt,a4 as yt,a5 as Jt,bY as jt,a6 as Ut,V as Kt}from"./index-Q1wl04d6.js";import{u as Qt}from"./useJobs-guqFEkan.js";function de(n,B,e,t=[]){return Object.entries(n).map(([s,C])=>({native:s,event:C,block:B.includes(s),context:e.includes(s),rewrite_command:t.includes(s)}))}const qt={PreToolUse:"pre_tool",PostToolUse:"post_tool",PostToolUseFailure:"post_tool_failure",PostToolBatch:"post_tool_batch",SessionStart:"session_start",SessionEnd:"session_end",UserPromptSubmit:"prompt_submit",UserPromptExpansion:"prompt_expansion",Stop:"stop",StopFailure:"stop_failure",SubagentStart:"subagent_start",SubagentStop:"subagent_stop",PreCompact:"pre_compact",PostCompact:"post_compact",PermissionRequest:"permission_request",PermissionDenied:"permission_denied",Notification:"notification",Setup:"setup",TeammateIdle:"teammate_idle",TaskCreated:"task_created",TaskCompleted:"task_completed",Elicitation:"elicitation",ElicitationResult:"elicitation_result",ConfigChange:"config_change",WorktreeRemove:"worktree_remove",InstructionsLoaded:"instructions_loaded",CwdChanged:"cwd_changed",FileChanged:"file_changed",DirectoryAdded:"directory_added",MessageDisplay:"message_display"},JB={claude:de(qt,["PreToolUse","UserPromptSubmit","UserPromptExpansion","Stop","SubagentStop","TaskCreated","ConfigChange"],["PreToolUse","PostToolUse","PostToolUseFailure","UserPromptSubmit","SessionStart","SubagentStart","UserPromptExpansion","PostToolBatch","Stop","SubagentStop"],["PreToolUse"]),cursor:de({sessionStart:"session_start",sessionEnd:"session_end",preToolUse:"pre_tool",postToolUse:"post_tool",postToolUseFailure:"post_tool_failure",subagentStart:"subagent_start",subagentStop:"subagent_stop",beforeShellExecution:"before_shell",afterShellExecution:"after_shell",beforeMCPExecution:"before_mcp",afterMCPExecution:"after_mcp",beforeReadFile:"before_read",afterFileEdit:"after_edit",beforeSubmitPrompt:"prompt_submit",preCompact:"pre_compact",stop:"stop",afterAgentResponse:"agent_response",afterAgentThought:"agent_thought",beforeTabFileRead:"before_tab_read",afterTabFileEdit:"after_tab_edit",workspaceOpen:"workspace_open"},["preToolUse","beforeShellExecution","beforeMCPExecution","beforeReadFile","beforeTabFileRead","beforeSubmitPrompt","subagentStart"],["sessionStart"]),gemini:de({BeforeTool:"pre_tool",AfterTool:"post_tool",BeforeAgent:"prompt_submit",AfterAgent:"stop",BeforeModel:"before_model",AfterModel:"after_model",BeforeToolSelection:"before_tool_selection",SessionStart:"session_start",SessionEnd:"session_end",PreCompress:"pre_compact",Notification:"notification"},["BeforeTool","BeforeAgent","AfterAgent","BeforeModel"],["SessionStart","BeforeAgent","BeforeTool","AfterTool","AfterAgent"]),codex:de({PreToolUse:"pre_tool",PermissionRequest:"permission_request",PostToolUse:"post_tool",PreCompact:"pre_compact",PostCompact:"post_compact",UserPromptSubmit:"prompt_submit",SubagentStart:"subagent_start",SubagentStop:"subagent_stop",SessionStart:"session_start",SessionEnd:"session_end",Stop:"stop",Interrupt:"interrupt"},["PreToolUse"],["PreToolUse","PostToolUse","UserPromptSubmit","SessionStart","SubagentStart"])};function Yt(n,B){const e=JB[n];return e==null?void 0:e.find(t=>t.event===B||`native:${t.native}`===B)}/*!
|
|
2
2
|
* re2js
|
|
3
3
|
* RE2JS is the JavaScript port of RE2, a regular expression engine that provides linear time matching
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as fe,h as Je,a as Ke,n as Ae,r as l,u as le,j as e,B as H,a8 as ce,U as de,W as xe,X as ue,at as me,Y as ee,Z as G,au as Oe,d as z,av as Qe,E as Ue,q as Fe,aw as We,L as Ve,ax as Ge,ay as Ye,az as Xe,o as He,aA as Ze,a2 as et,a3 as tt,a4 as st,a5 as at,z as ae,aB as he,y as ne,R as pe,aC as Be,C as nt,f as rt,a6 as it,S as ot,aD as lt,ab as ct,l as dt,aE as xt,aF as ut,af as mt,T as ht,s as pt,t as qe,v as B,w as gt,x as I,V as ft}from"./index-
|
|
1
|
+
import{g as fe,h as Je,a as Ke,n as Ae,r as l,u as le,j as e,B as H,a8 as ce,U as de,W as xe,X as ue,at as me,Y as ee,Z as G,au as Oe,d as z,av as Qe,E as Ue,q as Fe,aw as We,L as Ve,ax as Ge,ay as Ye,az as Xe,o as He,aA as Ze,a2 as et,a3 as tt,a4 as st,a5 as at,z as ae,aB as he,y as ne,R as pe,aC as Be,C as nt,f as rt,a6 as it,S as ot,aD as lt,ab as ct,l as dt,aE as xt,aF as ut,af as mt,T as ht,s as pt,t as qe,v as B,w as gt,x as I,V as ft}from"./index-Q1wl04d6.js";import{P as jt}from"./pencil-D6eVnvqS.js";import{R as Ie}from"./refresh-cw-D-hq8eog.js";import{P as vt}from"./Pager-3eTvdbPp.js";import{u as bt}from"./useProjectScope-CNZ2Ry3s.js";function yt({projectId:s}){var je,ve,be,ye,Ne,we,ke,Se,Ce,_e;const[d]=fe(),u=Je(),f=Ke(),p=Ae(),[h,x]=l.useState({key:"",offset:0}),[r,i]=l.useState(null),[w,k]=l.useState(!1),[c,L]=l.useState(!1),[b,o]=l.useState(""),[m,g]=l.useState(""),[A,$]=l.useState(s),[E,T]=l.useState(""),[R,J]=l.useState(""),[O,P]=l.useState(""),[D,U]=l.useState(""),[n,v]=l.useState(0),q=d.get("q")??"",F=d.get("agent")??"",t=d.get("ended")!=="0",N=JSON.stringify([s,q,F]),_=h.key===N?h.offset:0,C=a=>x({key:N,offset:a}),y=le({queryKey:["sessions","archive",s,q,F,_],queryFn:()=>z.sessions.archive({q,...s==="all"?{}:{project_id:s},...["claude","codex"].includes(F)?{agent:F}:{},offset:_,limit:20}),enabled:t,refetchInterval:1e4}),te=le({queryKey:["sessions","archive-transcript",r==null?void 0:r.id,r==null?void 0:r.revision,n],queryFn:()=>z.sessions.archiveTranscript(r==null?void 0:r.id,{revision:r==null?void 0:r.revision,offset:n,limit:50}),enabled:!!r});async function re(a){L(!0),o(""),g("");try{await a(),await f.invalidateQueries({queryKey:["sessions"]})}catch(S){o(S instanceof Error?S.message:"Request failed")}finally{L(!1)}}async function Me(a){var Te,Le;if(!(a!=null&&a.length))return;const S=(Le=(Te=p.data)==null?void 0:Te.find(K=>K.id===A))==null?void 0:Le.name;if(!S){o("Select a project before uploading");return}await re(async()=>{var Pe,Ee,Re,De;let K=localStorage.getItem("orc_session_upload_source");K||(K=crypto.randomUUID(),localStorage.setItem("orc_session_upload_source",K));let $e=0;const Y=[];for(const se of Array.from(a))try{if(se.size>60*1024*1024)throw new Error("File exceeds 60 MiB");const X=await se.text(),ie=X.split(/\r?\n/).filter(Z=>Z.trim()).map(Z=>JSON.parse(Z)),Q=((Pe=ie[0])==null?void 0:Pe.type)==="session_meta",j=Q?ie[0].payload:ie.find(Z=>Z.sessionId),ze=await z.sessions.archiveUpload({project:S,source_id:K,agent:Q?"codex":"claude",session_id:Q?j==null?void 0:j.id:j==null?void 0:j.sessionId,title:se.name.slice(0,200),metadata:{cwd:(j==null?void 0:j.cwd)??"",subdirectory:"",...Q&&((Ee=j==null?void 0:j.git)!=null&&Ee.repository_url)?{repository:j.git.repository_url}:{},...Q&&((Re=j==null?void 0:j.git)!=null&&Re.branch)?{branch:j.git.branch}:{},...Q&&((De=j==null?void 0:j.git)!=null&&De.commit_hash)?{commit:j.git.commit_hash}:{}},bundle:{version:1,files:[{path:"session.jsonl",content:X}]}});["created","updated","unchanged","stale"].includes(ze.outcome)&&$e++}catch(X){Y.push(`${se.name}: ${X instanceof Error?X.message:"Upload failed"}`)}g(`${$e} of ${a.length} sessions synchronized${Y.length?`; ${Y.length} need attention`:""}.`),Y.length&&o(Y.join(`
|
|
2
2
|
`))})}return t?e.jsxs("section",{className:"mt-8 space-y-3","data-testid":"session-archive",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-medium",children:"Archived sessions"}),e.jsx("p",{className:"text-xs text-outline",children:"Uploaded history stays available after the source computer is offline."})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(H,{variant:"outline","data-testid":"archive-index",disabled:c,onClick:()=>void re(async()=>{const a=await z.sessions.archiveIndex(s==="all"||s==="unassigned"?void 0:s);g(`${a.indexed} sessions indexed; ${a.failed} failed; ${a.skipped} skipped.`)}),children:"Index discovered sessions"}),e.jsx(H,{"data-testid":"archive-upload-open",onClick:()=>{$(s),k(!0)},children:"Upload sessions"})]})]}),m&&e.jsx("p",{role:"status","data-testid":"archive-feedback",className:"text-sm",children:m}),(b||y.error)&&e.jsx("p",{role:"alert",className:"whitespace-pre-wrap text-sm text-error",children:b||((je=y.error)==null?void 0:je.message)}),((ve=y.data)==null?void 0:ve.degraded)&&e.jsx("p",{role:"status","data-testid":"archive-degraded",className:"text-xs text-outline",children:y.data.degraded}),!!((be=y.data)!=null&&be.pending_chunks)&&e.jsxs("p",{className:"text-xs text-outline",children:[y.data.pending_chunks," passages waiting for embeddings"]}),e.jsxs("div",{className:"divide-y divide-outline-variant rounded border border-outline-variant",children:[y.isLoading&&e.jsx("p",{className:"p-4 text-sm",children:"Loading archived sessions…"}),!y.isLoading&&!((ye=y.data)!=null&&ye.sessions.length)&&e.jsx("p",{className:"p-4 text-sm text-outline",children:"No archived sessions match this view."}),(Ne=y.data)==null?void 0:Ne.sessions.map(a=>e.jsxs("button",{type:"button","data-testid":"archive-session-row","data-archive-id":a.id,className:"block w-full p-3 text-left hover:bg-surface-container",onClick:()=>{i(a),v(0),T(a.metadata.repository??""),J(a.metadata.branch??""),P(a.metadata.commit??""),U(a.metadata.subdirectory)},children:[e.jsx("span",{className:"block text-sm font-medium",children:a.title}),e.jsxs("span",{className:"text-xs text-outline",children:[a.agent," · ended · ",new Date(a.updated_at).toLocaleString()," · revision"," ",a.revision," · ",a.metadata.cwd]}),a.passages.map(S=>e.jsx("span",{className:"mt-1 block text-sm text-outline",children:S.snippet},S.citation)),a.embedding_error&&e.jsx("span",{className:"block text-xs text-error",children:a.embedding_error})]},a.id))]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(H,{variant:"ghost",disabled:_===0,onClick:()=>C(Math.max(0,_-20)),children:"Previous"}),e.jsx(H,{variant:"ghost",disabled:!((we=y.data)!=null&&we.has_more),onClick:()=>C(_+20),children:"Next"})]}),e.jsx(ce,{open:w,onOpenChange:k,children:e.jsxs(de,{children:[e.jsxs(xe,{children:[e.jsx(ue,{children:"Upload session histories"}),e.jsx(me,{children:"Select an existing project and native Claude/Codex JSONL files. This stores history without starting a terminal. For large collections, use the orc-platform sync script."})]}),e.jsx(ee,{htmlFor:"archive-project",children:"Project"}),e.jsxs("select",{id:"archive-project","data-testid":"archive-project",value:A,onChange:a=>$(a.target.value),className:"rounded border border-outline-variant bg-surface p-2",children:[e.jsx("option",{value:"all",children:"Select a project"}),(ke=p.data)==null?void 0:ke.map(a=>e.jsx("option",{value:a.id,children:a.name},a.id))]}),e.jsx(G,{"data-testid":"archive-files",type:"file",multiple:!0,accept:".jsonl",disabled:c||!((Se=p.data)!=null&&Se.some(a=>a.id===A)),onChange:a=>void Me(a.target.files)}),c&&e.jsx("p",{role:"status",children:"Uploading…"}),m&&e.jsx("p",{role:"status","data-testid":"archive-upload-feedback",children:m}),b&&e.jsx("p",{role:"alert",className:"whitespace-pre-wrap text-sm text-error",children:b})]})}),e.jsx(ce,{open:!!r,onOpenChange:a=>{a||i(null)},children:e.jsxs(de,{className:"max-h-[90vh] max-w-3xl overflow-y-auto","data-testid":"archive-detail",children:[e.jsxs(xe,{children:[e.jsx(ue,{children:r==null?void 0:r.title}),e.jsxs(me,{children:["Archived history · revision ",r==null?void 0:r.revision,". Prepare a destination checkout to continue in a terminal."]})]}),te.error&&e.jsx("p",{role:"alert",children:te.error.message}),(Ce=te.data)==null?void 0:Ce.turns.map(a=>e.jsxs("div",{className:"border-b border-outline-variant py-2","data-testid":"archive-turn",children:[e.jsx("p",{className:"text-xs text-outline",children:a.role}),e.jsx(Oe,{plain:!0,children:a.blocks.map(S=>S.type==="tool_use"?`${S.name}
|
|
3
3
|
${S.input}
|
|
4
4
|
${S.result??""}`:S.text).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,j as e,G as re,c as M,d as _,c1 as V,Y as g,Z as y,ah as K,B as w,Q as ie,am as oe,an as A,ao as F,ap as T,aq as D,ar as C,a7 as de,a as J,b as le,c2 as ce,c3 as me,c4 as he,ag as ue,c5 as xe,c6 as ge,E as pe,bE as fe,a9 as G,c7 as O,V as be,c8 as Y,c9 as q}from"./index-
|
|
1
|
+
import{r as m,j as e,G as re,c as M,d as _,c1 as V,Y as g,Z as y,ah as K,B as w,Q as ie,am as oe,an as A,ao as F,ap as T,aq as D,ar as C,a7 as de,a as J,b as le,c2 as ce,c3 as me,c4 as he,ag as ue,c5 as xe,c6 as ge,E as pe,bE as fe,a9 as G,c7 as O,V as be,c8 as Y,c9 as q}from"./index-Q1wl04d6.js";import{u as ve,a as je,b as ye,c as Ne}from"./useKnowledge-CfBdZLAo.js";import{D as ke}from"./download-C_GjdMEk.js";import{S as X}from"./save-BuI4O_ZA.js";var _e=Object.defineProperty,ee=(t,n)=>_e(t,"name",{value:n,configurable:!0}),z={Horizontal:"horizontal",Vertical:"vertical"},W=z.Horizontal,we=Object.values(z),te=m.forwardRef(ee(function(n,h){const{decorative:c,orientation:s=W,...x}=n,p=se(s)?s:W,b=p===z.Vertical?p:void 0,v=c?{role:"none"}:{"aria-orientation":b,role:"separator"};return e.jsx(re.div,{"data-orientation":p,...v,...x,ref:h})},"Separator"));function se(t){return we.includes(t)}ee(se,"isValidOrientation");/**
|
|
2
2
|
* @license lucide-react v1.27.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,aG as ie,r as v,a as K,u as F,b as I,d as S,a8 as E,U as $,W as A,X as T,B as b,as as H,Y as P,Z as D,$ as O,a0 as le,E as J,V as ne,ak as re,aC as oe,S as ee,af as ce,T as de,s as ue,t as G,v as R,w as me,x as _,a2 as xe,a3 as he,a4 as pe,a5 as ge,a6 as fe,ac as M,k as te,M as je}from"./index-BqQDBYwx.js";import{D as be,c as W}from"./DocumentWorkspace-BI4JWVsO.js";import{u as ye}from"./useProjectScope-BvcpSOql.js";import{r as ve}from"./primitive-files-BwTyowra.js";import{D as Y}from"./download-CK_EusLu.js";function ke({files:a,selected:i,onSelect:x,testId:h="document-file-tab",entryTestId:c}){return e.jsxs("nav",{"aria-label":"Document files",className:"min-w-0 space-y-2","data-testid":"document-tabs",children:[e.jsx("div",{role:"tablist","aria-label":"Open a file",className:"flex max-w-full gap-1 overflow-x-auto overscroll-x-contain rounded-md border border-surface-highest p-1",children:a.map((n,t)=>e.jsxs("button",{type:"button",role:"tab","aria-selected":n===i,"data-testid":t===0&&c?c:h,"data-file-name":n,title:n,tabIndex:n===i?0:-1,onKeyDown:o=>{var y,p;if(!["ArrowRight","ArrowLeft","Home","End"].includes(o.key))return;o.preventDefault();let f=t;if(o.key==="ArrowRight"&&(f=(t+1)%a.length),o.key==="ArrowLeft"&&(f=(t+a.length-1)%a.length),o.key==="Home"&&(f=0),o.key==="End"&&(f=a.length-1),x(a[f])===!1)return;const l=(y=o.currentTarget.parentElement)==null?void 0:y.querySelectorAll('[role="tab"]');(p=l==null?void 0:l[f])==null||p.focus()},onClick:()=>x(n),className:`flex min-h-11 shrink-0 items-center gap-2 rounded px-3 text-sm ${n===i?"bg-surface-highest text-on-surface":"text-muted-foreground hover:bg-surface-low hover:text-on-surface"}`,children:[e.jsx(ie,{size:14,"aria-hidden":"true"}),e.jsx("span",{className:"max-w-[180px] truncate",children:n.split("/").pop()})]},n))}),e.jsxs("label",{className:"flex min-w-0 items-center gap-2 text-sm text-outline sm:hidden",children:["File",e.jsx("select",{"aria-label":"Choose document file","data-testid":"document-file-picker",value:i,onChange:n=>x(n.target.value),className:"min-h-11 min-w-0 flex-1 rounded border border-control-border bg-surface px-2 text-on-surface",children:a.map(n=>e.jsx("option",{value:n,children:n},n))})]})]})}const X={new:"",installed:"Already in ORC",conflict:"Name taken in ORC (different content)",changed:"Changed since import",invalid:"Invalid"},q=a=>`${a.agent}/${a.name}`;function Ne({onClose:a}){var y,p,w;const[i,x]=v.useState([]),h=K(),c=F({queryKey:["skills","local-agents"],queryFn:S.skills.localAgents}),n=I({mutationFn:S.skills.importLocal,onSuccess:async g=>{x([]),await h.invalidateQueries({queryKey:["skills"]}),g.skipped.length||a()}}),t=n.isPending,o=((y=c.data)==null?void 0:y.agents)??[],s=new Set(i.map(g=>g.split("/")[1])),f=(g,k)=>x(k?[...i,q(g)]:i.filter(m=>m!==q(g))),l=g=>{const k=[...i],m=new Set(s);for(const N of g)N.status!=="new"||m.has(N.name)||(k.push(q(N)),m.add(N.name));x(k)};return e.jsx(E,{open:!0,onOpenChange:g=>!g&&!t&&a(),children:e.jsxs($,{className:"max-w-xl",children:[e.jsx(A,{children:e.jsx(T,{children:"Import from local agents"})}),e.jsx("p",{className:"text-xs text-outline",children:"Copies skills from agent folders such as ~/.claude/skills and ~/.codex/skills into ORC. The originals are not changed."}),c.isLoading&&e.jsx("p",{role:"status",children:"Scanning agent folders…"}),c.data&&!o.length&&e.jsx("p",{role:"status",children:"No local agent skill folders found."}),e.jsx("div",{className:"max-h-[55vh] overflow-y-auto space-y-4",children:o.map(g=>{const k=g.skills.filter(m=>m.status==="new");return e.jsxs("section",{"data-testid":"local-agent","data-agent":g.id,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:g.label}),e.jsx("p",{className:"text-xs text-outline",children:g.dir})]}),e.jsxs(b,{size:"sm",variant:"outline","data-testid":"local-agent-select-all",disabled:t||!k.length,onClick:()=>l(g.skills),children:["Select all new (",k.length,")"]})]}),e.jsx("div",{className:"space-y-2",children:g.skills.map(m=>{const N=i.includes(q(m)),r=!N&&s.has(m.name);return e.jsxs("label",{className:"flex items-start gap-3 border border-surface-highest rounded p-3","data-testid":"local-skill","data-skill-name":m.name,children:[e.jsx("input",{type:"checkbox","data-testid":"local-skill-select",checked:N,disabled:t||m.status!=="new"||r,onChange:d=>f(m,d.target.checked)}),e.jsxs("span",{className:"text-sm",children:[e.jsx("span",{className:"font-medium",children:m.name}),X[m.status]&&e.jsx("span",{className:"ml-2 text-xs text-outline",children:X[m.status]}),e.jsx("span",{className:"block text-xs text-outline",children:m.error??m.description}),m.extra_fields.length>0&&e.jsxs("span",{className:"block text-xs text-outline","data-testid":"local-skill-extra-fields",children:["Extra fields: ",m.extra_fields.join(", ")]}),m.also_in.length>0&&e.jsxs("span",{className:"block text-xs text-outline",children:["Also in ",m.also_in.join(", ")]})]})]},q(m))})})]},g.id)})}),(p=n.data)==null?void 0:p.skipped.map(g=>e.jsxs("p",{role:"alert",className:"text-xs text-destructive",children:["Skipped ",g.name,": ",g.reason]},`${g.agent}/${g.name}`)),(c.error||n.error)&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:(w=c.error||n.error)==null?void 0:w.message}),e.jsxs(H,{children:[e.jsx(b,{variant:"ghost",disabled:t,onClick:a,children:"Close"}),e.jsx(b,{"data-testid":"local-skill-import-submit",disabled:t||!i.length,onClick:()=>n.mutate(i.map(g=>{const[k="",m=""]=g.split("/");return{agent:k,name:m}})),children:n.isPending?"Importing…":`Import selected${i.length?` (${i.length})`:""}`})]})]})})}function Se({onClose:a}){var f;const[i,x]=v.useState(""),[h,c]=v.useState([]),n=K(),t=I({mutationFn:S.skills.discover,onSuccess:()=>c([])}),o=I({mutationFn:S.skills.import,onSuccess:async()=>{await n.invalidateQueries({queryKey:["skills"]}),a()}}),s=t.isPending||o.isPending;return e.jsx(E,{open:!0,onOpenChange:l=>!l&&!s&&a(),children:e.jsxs($,{className:"max-w-xl",children:[e.jsx(A,{children:e.jsx(T,{children:"Import from GitHub"})}),e.jsxs("form",{className:"space-y-4",onSubmit:l=>{l.preventDefault(),t.mutate(i.trim())},children:[e.jsx(P,{htmlFor:"skill-repository",children:"Repository or skills.sh link"}),e.jsx(D,{id:"skill-repository","data-testid":"skill-repository-input",value:i,disabled:s,onChange:l=>{x(l.target.value),t.reset(),o.reset(),c([])},placeholder:"https://github.com/vercel-labs/agent-skills",autoFocus:!0}),e.jsx("p",{className:"text-xs text-outline",children:"GitHub repositories, owner/repo, skill-folder URLs and skills.sh links. Private repositories use gh login on the execution host (local or SSH), or ORC_GITHUB_TOKEN on the ORC server. Supporting files are included."}),e.jsx(b,{type:"submit","data-testid":"skill-discover",disabled:s||!i.trim(),children:t.isPending?"Discovering…":"Discover skills"})]}),t.data&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-xs text-outline",children:[t.data.skills.length," skills found · ",t.data.commit.slice(0,8)]}),!t.data.skills.length&&e.jsx("p",{role:"status",children:"No valid skills found in this source."}),e.jsx("div",{className:"max-h-[45vh] overflow-y-auto space-y-2",children:t.data.skills.map(l=>e.jsxs("label",{className:"flex items-start gap-3 border border-surface-highest rounded p-3","data-testid":"remote-skill","data-skill-name":l.name,children:[e.jsx("input",{type:"checkbox","data-testid":"remote-skill-select",checked:h.includes(l.path),disabled:s||l.installed||!h.includes(l.path)&&h.length>=16,onChange:y=>c(y.target.checked?[...h,l.path]:h.filter(p=>p!==l.path))}),e.jsxs("span",{className:"text-sm",children:[e.jsx("span",{className:"font-medium",children:l.name}),l.installed&&e.jsx("span",{className:"ml-2 text-xs text-outline",children:"Already installed"}),e.jsx("span",{className:"block text-xs text-outline",children:l.description}),e.jsx("span",{className:"block text-xs text-outline",children:l.path||"Repository root"})]})]},l.path))}),t.data.issues.map(l=>e.jsxs("p",{role:"alert",className:"text-xs text-destructive",children:[l.path,": ",l.error]},l.path))]}),(t.error||o.error)&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:(f=t.error||o.error)==null?void 0:f.message}),e.jsxs(H,{children:[e.jsx(b,{variant:"ghost",disabled:s,onClick:a,children:"Cancel"}),e.jsx(b,{"data-testid":"skill-import-submit",disabled:s||!t.data||!h.length,onClick:()=>t.data&&o.mutate({source:i.trim(),commit:t.data.commit,paths:h}),children:o.isPending?"Importing…":`Import selected${h.length?` (${h.length})`:""}`})]})]})})}function we({name:a,scope:i,mutation:x}){var s,f;const h=K(),[c,n]=v.useState(""),t=F({queryKey:["skill-history",a,i],queryFn:()=>S.skills.history(a,i)}),o=I({mutationFn:l=>{if(!x)throw new Error("No active instruction edit");return S.skills.revert(a,{project_id:x.project_id,change_id:l,expected_change_id:x.id,reason:c.trim()})},onSuccess:()=>{h.invalidateQueries({queryKey:["skill"]}),h.invalidateQueries({queryKey:["skills"]}),h.invalidateQueries({queryKey:["skill-history"]}),n("")}});return!((s=t.data)!=null&&s.changes.length)&&!t.error?null:e.jsxs("section",{"data-testid":"skill-history-panel",className:"mb-5 space-y-3",children:[x&&e.jsxs("p",{"data-testid":"skill-mutated-label",className:"text-xs text-primary",children:["Mutated · ",x.project_id?"Project":"Global"," ·"," ",new Date(x.updated_at*1e3).toLocaleString()," · ",x.author]}),e.jsx("h3",{className:"text-sm font-medium",children:"Instruction history"}),e.jsx(D,{"data-testid":"skill-revert-reason","aria-label":"Reason for reverting instructions",value:c,onChange:l=>n(l.target.value),placeholder:"Reason for reverting..."}),t.error&&e.jsx("p",{role:"alert",children:t.error.message}),o.error&&e.jsx("p",{role:"alert",children:o.error.message}),(f=t.data)==null?void 0:f.changes.map(l=>e.jsxs("details",{"data-testid":"skill-history-change",className:"border-b border-outline-variant p-3",children:[e.jsxs("summary",{className:"text-xs cursor-pointer",children:[l.action," · ",l.reason," · ",l.author]}),e.jsx("p",{className:"text-xs text-outline mt-2",children:"Before"}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-all",children:l.previous_raw}),e.jsx("p",{className:"text-xs text-outline mt-2",children:"After"}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-all",children:l.raw}),e.jsx(b,{"data-testid":"skill-revert-change",size:"sm",variant:"outline",disabled:!c.trim()||o.isPending,onClick:()=>o.mutate(l.id),children:"Restore instructions before this change"})]},l.id))]})}function Ce({name:a}){const i=K(),[x,h]=v.useState(!1),c=F({queryKey:["skill-origin",a],queryFn:()=>S.skills.origin(a)}),n=I({mutationFn:s=>S.skills.sync(a,s),onSuccess:async s=>{h(!1),s.applied&&await Promise.all([i.invalidateQueries({queryKey:["skill",a]}),i.invalidateQueries({queryKey:["skills"]}),i.invalidateQueries({queryKey:["skill-origin",a]})])}});if(c.error)return e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:c.error.message});if(!c.data)return null;const t=n.data,o=t&&!t.applied&&t.conflicts.length>0;return e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsxs("p",{className:"text-xs text-outline",children:["Imported from"," ",e.jsx("a",{className:"text-primary underline",href:`https://github.com/${c.data.repository}/tree/${encodeURIComponent(c.data.ref==="HEAD"?c.data.commit:c.data.ref)}/${c.data.path}`,target:"_blank",rel:"noreferrer",children:c.data.repository})," ","· ",c.data.commit.slice(0,8)]}),e.jsx(b,{"data-testid":"skill-sync",variant:"outline",size:"sm",disabled:n.isPending,onClick:()=>n.mutate({}),children:n.isPending?"Syncing…":"Sync from GitHub"}),(t==null?void 0:t.applied)&&e.jsx("p",{role:"status","data-testid":"skill-sync-status",className:"text-xs",children:t.changed.length?`Synced ${t.changed.length} files. Local edits preserved outside confirmed conflicts.`:"Up to date. Local edits preserved."}),o&&e.jsxs("div",{"data-testid":"skill-sync-conflicts",className:"space-y-2",children:[e.jsx("p",{role:"alert",className:"text-sm",children:"Sync paused. Both you and GitHub changed these files:"}),e.jsx("ul",{className:"text-xs space-y-1",children:t.conflicts.map(s=>e.jsx("li",{children:s},s))}),e.jsx(b,{"data-testid":"skill-sync-review-override",variant:"outline",size:"sm",onClick:()=>h(!0),children:"Review override"})]}),n.error&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:n.error.message}),e.jsx(E,{open:x,onOpenChange:s=>!n.isPending&&h(s),children:e.jsxs($,{children:[e.jsx(A,{children:e.jsx(T,{children:"Replace conflicting local edits?"})}),e.jsxs("p",{className:"text-sm",children:["GitHub's version at ",t==null?void 0:t.commit.slice(0,8)," will replace or remove these files. Your other local edits will be kept. The current skill folder will be backed up."]}),e.jsx("ul",{className:"text-sm space-y-1",children:t==null?void 0:t.conflicts.map(s=>e.jsx("li",{children:s},s))}),e.jsxs(H,{children:[e.jsx(b,{variant:"ghost",disabled:n.isPending,onClick:()=>h(!1),children:"Keep local edits"}),e.jsx(b,{"data-testid":"skill-sync-confirm-override",disabled:n.isPending,onClick:()=>t&&n.mutate({override:!0,expectedCommit:t.commit,expectedRevision:t.revision}),children:n.isPending?"Syncing…":"Replace listed files"})]})]})})]})}function Le(a){return F({queryKey:["skills",a],queryFn:()=>S.skills.list(a)})}function Ie(){return F({queryKey:["skill-visibility"],queryFn:()=>S.skills.visibility()})}function Ke(){const a=K();return I({mutationFn:i=>S.skills.setVisibility(i),onSuccess:i=>{a.setQueryData(["skill-visibility"],i),a.invalidateQueries({queryKey:["skills"]})}})}function Z(a,i,x={}){return F({queryKey:["skill",a,i,x],queryFn:()=>S.skills.get(a,i,x),enabled:!!a})}function De(){const a=K();return I({mutationFn:i=>S.skills.create(i),onSuccess:()=>a.invalidateQueries({queryKey:["skills"]})})}const Fe=[{value:"all",label:"All"},{value:"builtin",label:"Built-in"},{value:"user",label:"User"}],se={builtin:"text-muted-foreground",user:"text-muted-foreground"};function Te({projectId:a}){var B,U;const i=ye(a),x=i==="all"||i==="unassigned"?{scope:"global"}:{project_id:i},[h,c]=O("skillQuery",""),[n,t]=v.useState(h),[o,s]=O("source","all",["all","builtin","user"]);v.useEffect(()=>t(h),[h]);const{selectedId:f,openDetail:l,closeDetail:y}=le("/skills","skillName"),[p,w]=v.useState(!1),[g,k]=v.useState(!1),[m,N]=v.useState(!1),r=Ie(),d=Ke(),{data:j,isLoading:C,error:z,refetch:ae}=Le({...x,q:h||void 0,source:o==="all"?void 0:o,include_hidden:!0}),Q=j==null?void 0:j.skills;return z?e.jsx(J,{message:z.message,onRetry:()=>ae()}):e.jsxs("div",{children:[e.jsx(ne,{title:"Skills",meta:`${(Q??[]).length} skills`,action:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(b,{"data-testid":"import-skill-button",size:"sm",variant:"outline",onClick:()=>k(!0),children:[e.jsx(Y,{size:12,className:"mr-1"})," Import from GitHub"]}),e.jsxs(b,{"data-testid":"import-local-skills-button",size:"sm",variant:"outline",onClick:()=>N(!0),children:[e.jsx(Y,{size:12,className:"mr-1"})," Import from agents"]}),e.jsxs(b,{"data-testid":"new-skill-button",size:"sm",onClick:()=>w(!0),className:"font-label text-sm ",children:[e.jsx(re,{size:12,className:"mr-1"})," New skill"]})]})}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:["Skill folders follow the"," ",e.jsx("a",{className:"text-primary underline",href:"https://agentskills.io/specification",target:"_blank",rel:"noreferrer",children:"Agent Skills specification"}),"."]}),e.jsx("p",{className:"mb-4 text-sm leading-relaxed text-muted-foreground",children:"Built-in visibility applies to agent discovery across this installation. Hidden skills remain readable by name and available to flows. Authored overrides stay visible."}),(r.error||d.error)&&e.jsx("p",{role:"alert",className:"text-destructive text-xs mb-2",children:(B=r.error||d.error)==null?void 0:B.message}),(U=j==null?void 0:j.broken)==null?void 0:U.map(u=>e.jsxs("p",{role:"alert",className:"text-destructive text-xs mb-2",children:[u.path,": ",u.error]},u.path)),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex shrink-0 flex-wrap gap-1.5",children:Fe.map(u=>e.jsx("button",{type:"button",onClick:()=>s(u.value),"data-testid":`skill-source-${u.value}`,"aria-pressed":o===u.value,className:`font-label text-sm px-3 py-1.5 border transition-colors ${o===u.value?"bg-surface-highest text-on-surface border-transparent":"bg-transparent border-transparent text-muted-foreground hover:bg-surface-low hover:text-on-surface"}`,children:u.label},u.value))}),e.jsxs("div",{className:"relative min-w-[160px] flex-1",children:[e.jsx(oe,{size:12,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx(D,{"aria-label":"Search skills",value:n,onChange:u=>t(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(u.currentTarget.value),placeholder:"Search skills...",className:"pl-8 bg-background text-on-surface font-body text-sm placeholder:text-muted-foreground"})]}),e.jsx(b,{variant:"outline",size:"sm",onClick:()=>c(n),className:"font-label text-sm ",children:"Search"})]}),C?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map((u,L)=>e.jsx(ee,{className:"h-10 w-full bg-surface-highest"},L))}):(Q??[]).length===0?e.jsx(ce,{message:h?"No skills match your search":"No skills found"}):e.jsx("div",{className:"overflow-hidden",children:e.jsxs(de,{children:[e.jsx(ue,{children:e.jsxs(G,{className:"border-b border-outline-variant hover:bg-transparent",children:[e.jsx(R,{className:"font-label text-sm text-muted-foreground",children:"Name"}),e.jsx(R,{className:"font-label text-sm text-muted-foreground",children:"Description"}),e.jsx(R,{className:"font-label text-sm text-muted-foreground w-24",children:"Source"}),e.jsx(R,{className:"text-xs text-muted-foreground",children:"Agent discovery"})]})}),e.jsx(me,{children:(Q??[]).map(u=>e.jsxs(G,{"data-testid":"skill-row","data-skill-name":u.name,className:"border-b border-outline-variant/50 hover:bg-surface-low cursor-pointer",onClick:()=>l(u.name),children:[e.jsxs(_,{className:"font-body text-sm font-medium text-on-surface",children:[e.jsx("button",{type:"button",className:"min-h-11 text-left hover:text-primary",onClick:L=>{L.stopPropagation(),l(u.name)},children:u.name}),u.mutation&&e.jsx("span",{className:"ml-2 text-primary text-xs",children:"Mutated"})]}),e.jsx(_,{className:"font-body text-sm text-muted-foreground max-w-md truncate",children:u.description||"—"}),e.jsx(_,{children:e.jsx("span",{className:`inline-flex py-0.5 font-label text-sm ${se[u.source]}`,children:u.source})}),e.jsx(_,{onClick:L=>L.stopPropagation(),children:u.source==="builtin"&&!u.mutation?e.jsx("button",{type:"button",role:"switch","aria-label":`${u.name} visible to agents`,"aria-checked":!u.discovery_hidden,"data-testid":`skill-visibility-${u.name}`,disabled:!r.data||d.isPending,className:"text-xs text-primary disabled:opacity-50",onClick:()=>{var V;const L=new Set(((V=r.data)==null?void 0:V.hidden_builtins)??[]);L.has(u.name)?L.delete(u.name):L.add(u.name),d.mutate([...L])},children:u.discovery_hidden?"Hidden — show":"Visible — hide"}):e.jsx("span",{className:"text-xs text-muted-foreground",children:u.mutation?"Visible (override)":"Visible"})})]},u.name))})]})}),e.jsx(qe,{scope:x,skillName:f,open:!!f,onClose:y},f),p&&e.jsx(Re,{open:p,onClose:()=>w(!1)}),g&&e.jsx(Se,{onClose:()=>k(!1)}),m&&e.jsx(Ne,{onClose:()=>N(!1)})]})}function qe({skillName:a,scope:i,open:x,onClose:h}){const{data:c,isLoading:n,error:t,refetch:o}=Z(a,void 0,i),s=c,[f,l]=O("skillFile","SKILL.md"),y=Z(a,f??"SKILL.md",i),p=y.data,w=K(),[g,k]=v.useState(!1),m=`skill:${i.project_id??"global"}:${a}:${f??"SKILL.md"}`;function N(d){return(d??"SKILL.md")===(f??"SKILL.md")?!0:W(m)?(l(d??"SKILL.md"),!0):!1}const r=s?e.jsx(ke,{files:["SKILL.md",...(s.files??[]).map(d=>d.name)],selected:f??"SKILL.md",onSelect:d=>N(d==="SKILL.md"?void 0:d),testId:"skill-file",entryTestId:"skill-show-entry"}):null;return e.jsx(xe,{open:x,onOpenChange:d=>!d&&W(m)&&h(),children:e.jsxs(he,{className:"w-screen max-w-full sm:w-[1120px] sm:max-w-[96vw]",children:[e.jsxs(pe,{children:[e.jsx(ge,{children:(s==null?void 0:s.name)??"Skill Details"}),(s==null?void 0:s.description)&&e.jsx("p",{className:"font-body text-sm text-muted-foreground mt-1",children:s.description})]}),e.jsx(fe,{children:e.jsxs(e.Fragment,{children:[a&&s&&e.jsx(we,{name:a,scope:i,mutation:s.mutation}),a&&s&&e.jsx(Ce,{name:a}),t?e.jsx(J,{message:t.message,onRetry:()=>void o()}):n||!s?e.jsx("div",{className:"space-y-3",children:[...Array(4)].map((d,j)=>e.jsx(ee,{className:"h-8 w-full bg-surface-highest"},j))}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(M,{label:"Source",children:e.jsx("span",{className:`inline-flex py-0.5 font-label text-sm ${se[s.source]}`,children:s.source})}),e.jsx(M,{label:"Path",children:e.jsx("code",{className:"font-mono text-sm text-muted-foreground break-all",children:s.path})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-label text-sm text-muted-foreground mb-2",children:f??"SKILL.md"}),e.jsxs("div",{className:"overflow-hidden",children:[(p==null?void 0:p.encoding)==="base64"&&e.jsx("div",{className:"p-3",children:r}),y.error?e.jsx("p",{role:"alert",children:y.error.message}):y.isLoading?e.jsx("p",{children:"Loading..."}):(p==null?void 0:p.encoding)==="base64"?e.jsx(te,{path:f??"SKILL.md",value:(p==null?void 0:p.content)??"",readOnly:!0,hidePreview:!0,height:400,testId:"skill-file-content"}):e.jsx(be,{documentId:m,expanded:g,onExpandedChange:k,navigation:r,path:f??"SKILL.md",content:(p==null?void 0:p.content)??"",testId:"skill-file-content",onSave:s.source==="user"&&(p==null?void 0:p.encoding)==="utf8"?async(d,j)=>{const C=f??"SKILL.md";return s.mutation&&C==="SKILL.md"?await S.skills.updateInstructions(s.name,{project_id:i.project_id??null,content:d,expected_content:j,reason:"Manual instruction edit",author:"human"}):await S.skills.editFile(s.name,{path:C,content:d,expectedContent:j}),await w.invalidateQueries({queryKey:["skill",s.name]}),await w.invalidateQueries({queryKey:["skills"]}),await w.invalidateQueries({queryKey:["skill-history",s.name]}),d}:void 0},m),(p==null?void 0:p.encoding)==="base64"&&e.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"Binary asset shown as base64 (read-only)."})]})]})]})]})})]})})}function Re({open:a,onClose:i}){var N;const[x,h]=v.useState(""),[c,n]=v.useState(""),t=De(),[o,s]=v.useState([]),[f,l]=v.useState(),[y,p]=v.useState(!1),w=!!(x||c||o.length);v.useEffect(()=>{if(!w)return;function r(d){d.preventDefault(),d.returnValue=""}return window.addEventListener("beforeunload",r),()=>window.removeEventListener("beforeunload",r)},[w]);function g(){t.isPending||y||(!w||window.confirm("Discard this unsaved skill?"))&&i()}async function k(r){if(r!=null&&r.length){p(!0),l(void 0);try{const d=(await ve(r)).map(C=>({...C,encoding:C.encoding??"utf8",id:crypto.randomUUID()})),j=d.find(C=>C.path==="SKILL.md");if(!j)throw new Error("Choose a skill folder containing SKILL.md");if(j.encoding!=="utf8")throw new Error("SKILL.md must be UTF-8 text");n(j.content),h(r[0].webkitRelativePath.split("/")[0]),s(d.filter(C=>C!==j))}catch(d){l(d.message)}finally{p(!1)}}}const m=()=>{!x.trim()||!c.trim()||t.isPending||y||o.some(r=>!r.path.trim())||t.mutate({name:x.trim(),content:c.trim(),files:o.map(({path:r,content:d,encoding:j})=>({path:r,content:d,encoding:j}))},{onSuccess:i})};return e.jsx(E,{open:a,onOpenChange:r=>!r&&g(),children:e.jsxs($,{className:"bg-surface border-outline-variant w-[calc(100%_-_1rem)] max-w-5xl max-h-[94dvh] overflow-y-auto",children:[e.jsx(A,{children:e.jsx(T,{className:"font-headline text-base text-on-surface",children:"New skill"})}),e.jsxs("form",{onSubmit:r=>{r.preventDefault(),m()},className:"space-y-3 mt-2",children:[e.jsx(P,{htmlFor:"skill-folder-input",children:"Import skill folder"}),e.jsx(D,{id:"skill-folder-input","data-testid":"skill-folder-input",type:"file",multiple:!0,webkitdirectory:"",onChange:r=>void k(r.target.files)}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(P,{className:"font-label text-sm text-muted-foreground",children:"Name *"}),e.jsx(D,{"aria-label":"Name","data-testid":"skill-name-input",value:x,onChange:r=>h(r.target.value),placeholder:"my-skill",className:"bg-background text-on-surface font-body text-sm",autoFocus:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(P,{className:"font-label text-sm text-muted-foreground",children:"SKILL.md *"}),e.jsx(je,{testId:"skill-content-input",path:"SKILL.md",value:c,onChange:n,onSave:m})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(b,{"data-testid":"skill-add-file",type:"button",variant:"outline",onClick:()=>s([...o,{id:crypto.randomUUID(),path:"",content:"",encoding:"utf8"}]),children:"Add file"}),o.map(r=>e.jsxs("div",{"data-testid":"skill-supporting-file",className:"space-y-2 border border-outline-variant p-3",children:[e.jsx(D,{"data-testid":"skill-file-path-input","aria-label":"File path",placeholder:"references/guide.md or scripts/check.py",value:r.path,onChange:d=>s(o.map(j=>j.id===r.id?{...j,path:d.target.value}:j))}),e.jsx(te,{testId:"skill-file-content-input",path:r.path||"supporting.txt",readOnly:r.encoding==="base64",label:`Content of ${r.path||"supporting file"}`,value:r.content,height:180,onChange:d=>s(o.map(j=>j.id===r.id?{...j,content:d}:j))}),r.encoding==="base64"&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Binary asset (base64)"}),e.jsx(b,{type:"button",variant:"ghost",onClick:()=>s(o.filter(d=>d.id!==r.id)),children:"Remove file"})]},r.id))]}),(f||t.error)&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:f??((N=t.error)==null?void 0:N.message)}),e.jsxs(H,{children:[e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:g,className:"font-label text-sm text-muted-foreground",children:"Cancel"}),e.jsx(b,{"data-testid":"skill-submit",type:"submit",size:"sm",disabled:y||t.isPending||!x.trim()||!c.trim()||o.some(r=>!r.path.trim()),className:"font-label text-sm ",children:t.isPending?"Creating...":"Create"})]})]})]})})}export{Te as default};
|
|
1
|
+
import{j as e,aG as ie,r as v,a as K,u as F,b as I,d as S,a8 as E,U as $,W as A,X as T,B as b,as as H,Y as P,Z as D,$ as O,a0 as le,E as J,V as ne,ak as re,aC as oe,S as ee,af as ce,T as de,s as ue,t as G,v as R,w as me,x as _,a2 as xe,a3 as he,a4 as pe,a5 as ge,a6 as fe,ac as M,k as te,M as je}from"./index-Q1wl04d6.js";import{D as be,c as W}from"./DocumentWorkspace-C60YtNG4.js";import{u as ye}from"./useProjectScope-CNZ2Ry3s.js";import{r as ve}from"./primitive-files-BwTyowra.js";import{D as Y}from"./download-C_GjdMEk.js";function ke({files:a,selected:i,onSelect:x,testId:h="document-file-tab",entryTestId:c}){return e.jsxs("nav",{"aria-label":"Document files",className:"min-w-0 space-y-2","data-testid":"document-tabs",children:[e.jsx("div",{role:"tablist","aria-label":"Open a file",className:"flex max-w-full gap-1 overflow-x-auto overscroll-x-contain rounded-md border border-surface-highest p-1",children:a.map((n,t)=>e.jsxs("button",{type:"button",role:"tab","aria-selected":n===i,"data-testid":t===0&&c?c:h,"data-file-name":n,title:n,tabIndex:n===i?0:-1,onKeyDown:o=>{var y,p;if(!["ArrowRight","ArrowLeft","Home","End"].includes(o.key))return;o.preventDefault();let f=t;if(o.key==="ArrowRight"&&(f=(t+1)%a.length),o.key==="ArrowLeft"&&(f=(t+a.length-1)%a.length),o.key==="Home"&&(f=0),o.key==="End"&&(f=a.length-1),x(a[f])===!1)return;const l=(y=o.currentTarget.parentElement)==null?void 0:y.querySelectorAll('[role="tab"]');(p=l==null?void 0:l[f])==null||p.focus()},onClick:()=>x(n),className:`flex min-h-11 shrink-0 items-center gap-2 rounded px-3 text-sm ${n===i?"bg-surface-highest text-on-surface":"text-muted-foreground hover:bg-surface-low hover:text-on-surface"}`,children:[e.jsx(ie,{size:14,"aria-hidden":"true"}),e.jsx("span",{className:"max-w-[180px] truncate",children:n.split("/").pop()})]},n))}),e.jsxs("label",{className:"flex min-w-0 items-center gap-2 text-sm text-outline sm:hidden",children:["File",e.jsx("select",{"aria-label":"Choose document file","data-testid":"document-file-picker",value:i,onChange:n=>x(n.target.value),className:"min-h-11 min-w-0 flex-1 rounded border border-control-border bg-surface px-2 text-on-surface",children:a.map(n=>e.jsx("option",{value:n,children:n},n))})]})]})}const X={new:"",installed:"Already in ORC",conflict:"Name taken in ORC (different content)",changed:"Changed since import",invalid:"Invalid"},q=a=>`${a.agent}/${a.name}`;function Ne({onClose:a}){var y,p,w;const[i,x]=v.useState([]),h=K(),c=F({queryKey:["skills","local-agents"],queryFn:S.skills.localAgents}),n=I({mutationFn:S.skills.importLocal,onSuccess:async g=>{x([]),await h.invalidateQueries({queryKey:["skills"]}),g.skipped.length||a()}}),t=n.isPending,o=((y=c.data)==null?void 0:y.agents)??[],s=new Set(i.map(g=>g.split("/")[1])),f=(g,k)=>x(k?[...i,q(g)]:i.filter(m=>m!==q(g))),l=g=>{const k=[...i],m=new Set(s);for(const N of g)N.status!=="new"||m.has(N.name)||(k.push(q(N)),m.add(N.name));x(k)};return e.jsx(E,{open:!0,onOpenChange:g=>!g&&!t&&a(),children:e.jsxs($,{className:"max-w-xl",children:[e.jsx(A,{children:e.jsx(T,{children:"Import from local agents"})}),e.jsx("p",{className:"text-xs text-outline",children:"Copies skills from agent folders such as ~/.claude/skills and ~/.codex/skills into ORC. The originals are not changed."}),c.isLoading&&e.jsx("p",{role:"status",children:"Scanning agent folders…"}),c.data&&!o.length&&e.jsx("p",{role:"status",children:"No local agent skill folders found."}),e.jsx("div",{className:"max-h-[55vh] overflow-y-auto space-y-4",children:o.map(g=>{const k=g.skills.filter(m=>m.status==="new");return e.jsxs("section",{"data-testid":"local-agent","data-agent":g.id,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:g.label}),e.jsx("p",{className:"text-xs text-outline",children:g.dir})]}),e.jsxs(b,{size:"sm",variant:"outline","data-testid":"local-agent-select-all",disabled:t||!k.length,onClick:()=>l(g.skills),children:["Select all new (",k.length,")"]})]}),e.jsx("div",{className:"space-y-2",children:g.skills.map(m=>{const N=i.includes(q(m)),r=!N&&s.has(m.name);return e.jsxs("label",{className:"flex items-start gap-3 border border-surface-highest rounded p-3","data-testid":"local-skill","data-skill-name":m.name,children:[e.jsx("input",{type:"checkbox","data-testid":"local-skill-select",checked:N,disabled:t||m.status!=="new"||r,onChange:d=>f(m,d.target.checked)}),e.jsxs("span",{className:"text-sm",children:[e.jsx("span",{className:"font-medium",children:m.name}),X[m.status]&&e.jsx("span",{className:"ml-2 text-xs text-outline",children:X[m.status]}),e.jsx("span",{className:"block text-xs text-outline",children:m.error??m.description}),m.extra_fields.length>0&&e.jsxs("span",{className:"block text-xs text-outline","data-testid":"local-skill-extra-fields",children:["Extra fields: ",m.extra_fields.join(", ")]}),m.also_in.length>0&&e.jsxs("span",{className:"block text-xs text-outline",children:["Also in ",m.also_in.join(", ")]})]})]},q(m))})})]},g.id)})}),(p=n.data)==null?void 0:p.skipped.map(g=>e.jsxs("p",{role:"alert",className:"text-xs text-destructive",children:["Skipped ",g.name,": ",g.reason]},`${g.agent}/${g.name}`)),(c.error||n.error)&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:(w=c.error||n.error)==null?void 0:w.message}),e.jsxs(H,{children:[e.jsx(b,{variant:"ghost",disabled:t,onClick:a,children:"Close"}),e.jsx(b,{"data-testid":"local-skill-import-submit",disabled:t||!i.length,onClick:()=>n.mutate(i.map(g=>{const[k="",m=""]=g.split("/");return{agent:k,name:m}})),children:n.isPending?"Importing…":`Import selected${i.length?` (${i.length})`:""}`})]})]})})}function Se({onClose:a}){var f;const[i,x]=v.useState(""),[h,c]=v.useState([]),n=K(),t=I({mutationFn:S.skills.discover,onSuccess:()=>c([])}),o=I({mutationFn:S.skills.import,onSuccess:async()=>{await n.invalidateQueries({queryKey:["skills"]}),a()}}),s=t.isPending||o.isPending;return e.jsx(E,{open:!0,onOpenChange:l=>!l&&!s&&a(),children:e.jsxs($,{className:"max-w-xl",children:[e.jsx(A,{children:e.jsx(T,{children:"Import from GitHub"})}),e.jsxs("form",{className:"space-y-4",onSubmit:l=>{l.preventDefault(),t.mutate(i.trim())},children:[e.jsx(P,{htmlFor:"skill-repository",children:"Repository or skills.sh link"}),e.jsx(D,{id:"skill-repository","data-testid":"skill-repository-input",value:i,disabled:s,onChange:l=>{x(l.target.value),t.reset(),o.reset(),c([])},placeholder:"https://github.com/vercel-labs/agent-skills",autoFocus:!0}),e.jsx("p",{className:"text-xs text-outline",children:"GitHub repositories, owner/repo, skill-folder URLs and skills.sh links. Private repositories use gh login on the execution host (local or SSH), or ORC_GITHUB_TOKEN on the ORC server. Supporting files are included."}),e.jsx(b,{type:"submit","data-testid":"skill-discover",disabled:s||!i.trim(),children:t.isPending?"Discovering…":"Discover skills"})]}),t.data&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-xs text-outline",children:[t.data.skills.length," skills found · ",t.data.commit.slice(0,8)]}),!t.data.skills.length&&e.jsx("p",{role:"status",children:"No valid skills found in this source."}),e.jsx("div",{className:"max-h-[45vh] overflow-y-auto space-y-2",children:t.data.skills.map(l=>e.jsxs("label",{className:"flex items-start gap-3 border border-surface-highest rounded p-3","data-testid":"remote-skill","data-skill-name":l.name,children:[e.jsx("input",{type:"checkbox","data-testid":"remote-skill-select",checked:h.includes(l.path),disabled:s||l.installed||!h.includes(l.path)&&h.length>=16,onChange:y=>c(y.target.checked?[...h,l.path]:h.filter(p=>p!==l.path))}),e.jsxs("span",{className:"text-sm",children:[e.jsx("span",{className:"font-medium",children:l.name}),l.installed&&e.jsx("span",{className:"ml-2 text-xs text-outline",children:"Already installed"}),e.jsx("span",{className:"block text-xs text-outline",children:l.description}),e.jsx("span",{className:"block text-xs text-outline",children:l.path||"Repository root"})]})]},l.path))}),t.data.issues.map(l=>e.jsxs("p",{role:"alert",className:"text-xs text-destructive",children:[l.path,": ",l.error]},l.path))]}),(t.error||o.error)&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:(f=t.error||o.error)==null?void 0:f.message}),e.jsxs(H,{children:[e.jsx(b,{variant:"ghost",disabled:s,onClick:a,children:"Cancel"}),e.jsx(b,{"data-testid":"skill-import-submit",disabled:s||!t.data||!h.length,onClick:()=>t.data&&o.mutate({source:i.trim(),commit:t.data.commit,paths:h}),children:o.isPending?"Importing…":`Import selected${h.length?` (${h.length})`:""}`})]})]})})}function we({name:a,scope:i,mutation:x}){var s,f;const h=K(),[c,n]=v.useState(""),t=F({queryKey:["skill-history",a,i],queryFn:()=>S.skills.history(a,i)}),o=I({mutationFn:l=>{if(!x)throw new Error("No active instruction edit");return S.skills.revert(a,{project_id:x.project_id,change_id:l,expected_change_id:x.id,reason:c.trim()})},onSuccess:()=>{h.invalidateQueries({queryKey:["skill"]}),h.invalidateQueries({queryKey:["skills"]}),h.invalidateQueries({queryKey:["skill-history"]}),n("")}});return!((s=t.data)!=null&&s.changes.length)&&!t.error?null:e.jsxs("section",{"data-testid":"skill-history-panel",className:"mb-5 space-y-3",children:[x&&e.jsxs("p",{"data-testid":"skill-mutated-label",className:"text-xs text-primary",children:["Mutated · ",x.project_id?"Project":"Global"," ·"," ",new Date(x.updated_at*1e3).toLocaleString()," · ",x.author]}),e.jsx("h3",{className:"text-sm font-medium",children:"Instruction history"}),e.jsx(D,{"data-testid":"skill-revert-reason","aria-label":"Reason for reverting instructions",value:c,onChange:l=>n(l.target.value),placeholder:"Reason for reverting..."}),t.error&&e.jsx("p",{role:"alert",children:t.error.message}),o.error&&e.jsx("p",{role:"alert",children:o.error.message}),(f=t.data)==null?void 0:f.changes.map(l=>e.jsxs("details",{"data-testid":"skill-history-change",className:"border-b border-outline-variant p-3",children:[e.jsxs("summary",{className:"text-xs cursor-pointer",children:[l.action," · ",l.reason," · ",l.author]}),e.jsx("p",{className:"text-xs text-outline mt-2",children:"Before"}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-all",children:l.previous_raw}),e.jsx("p",{className:"text-xs text-outline mt-2",children:"After"}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-all",children:l.raw}),e.jsx(b,{"data-testid":"skill-revert-change",size:"sm",variant:"outline",disabled:!c.trim()||o.isPending,onClick:()=>o.mutate(l.id),children:"Restore instructions before this change"})]},l.id))]})}function Ce({name:a}){const i=K(),[x,h]=v.useState(!1),c=F({queryKey:["skill-origin",a],queryFn:()=>S.skills.origin(a)}),n=I({mutationFn:s=>S.skills.sync(a,s),onSuccess:async s=>{h(!1),s.applied&&await Promise.all([i.invalidateQueries({queryKey:["skill",a]}),i.invalidateQueries({queryKey:["skills"]}),i.invalidateQueries({queryKey:["skill-origin",a]})])}});if(c.error)return e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:c.error.message});if(!c.data)return null;const t=n.data,o=t&&!t.applied&&t.conflicts.length>0;return e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsxs("p",{className:"text-xs text-outline",children:["Imported from"," ",e.jsx("a",{className:"text-primary underline",href:`https://github.com/${c.data.repository}/tree/${encodeURIComponent(c.data.ref==="HEAD"?c.data.commit:c.data.ref)}/${c.data.path}`,target:"_blank",rel:"noreferrer",children:c.data.repository})," ","· ",c.data.commit.slice(0,8)]}),e.jsx(b,{"data-testid":"skill-sync",variant:"outline",size:"sm",disabled:n.isPending,onClick:()=>n.mutate({}),children:n.isPending?"Syncing…":"Sync from GitHub"}),(t==null?void 0:t.applied)&&e.jsx("p",{role:"status","data-testid":"skill-sync-status",className:"text-xs",children:t.changed.length?`Synced ${t.changed.length} files. Local edits preserved outside confirmed conflicts.`:"Up to date. Local edits preserved."}),o&&e.jsxs("div",{"data-testid":"skill-sync-conflicts",className:"space-y-2",children:[e.jsx("p",{role:"alert",className:"text-sm",children:"Sync paused. Both you and GitHub changed these files:"}),e.jsx("ul",{className:"text-xs space-y-1",children:t.conflicts.map(s=>e.jsx("li",{children:s},s))}),e.jsx(b,{"data-testid":"skill-sync-review-override",variant:"outline",size:"sm",onClick:()=>h(!0),children:"Review override"})]}),n.error&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:n.error.message}),e.jsx(E,{open:x,onOpenChange:s=>!n.isPending&&h(s),children:e.jsxs($,{children:[e.jsx(A,{children:e.jsx(T,{children:"Replace conflicting local edits?"})}),e.jsxs("p",{className:"text-sm",children:["GitHub's version at ",t==null?void 0:t.commit.slice(0,8)," will replace or remove these files. Your other local edits will be kept. The current skill folder will be backed up."]}),e.jsx("ul",{className:"text-sm space-y-1",children:t==null?void 0:t.conflicts.map(s=>e.jsx("li",{children:s},s))}),e.jsxs(H,{children:[e.jsx(b,{variant:"ghost",disabled:n.isPending,onClick:()=>h(!1),children:"Keep local edits"}),e.jsx(b,{"data-testid":"skill-sync-confirm-override",disabled:n.isPending,onClick:()=>t&&n.mutate({override:!0,expectedCommit:t.commit,expectedRevision:t.revision}),children:n.isPending?"Syncing…":"Replace listed files"})]})]})})]})}function Le(a){return F({queryKey:["skills",a],queryFn:()=>S.skills.list(a)})}function Ie(){return F({queryKey:["skill-visibility"],queryFn:()=>S.skills.visibility()})}function Ke(){const a=K();return I({mutationFn:i=>S.skills.setVisibility(i),onSuccess:i=>{a.setQueryData(["skill-visibility"],i),a.invalidateQueries({queryKey:["skills"]})}})}function Z(a,i,x={}){return F({queryKey:["skill",a,i,x],queryFn:()=>S.skills.get(a,i,x),enabled:!!a})}function De(){const a=K();return I({mutationFn:i=>S.skills.create(i),onSuccess:()=>a.invalidateQueries({queryKey:["skills"]})})}const Fe=[{value:"all",label:"All"},{value:"builtin",label:"Built-in"},{value:"user",label:"User"}],se={builtin:"text-muted-foreground",user:"text-muted-foreground"};function Te({projectId:a}){var B,U;const i=ye(a),x=i==="all"||i==="unassigned"?{scope:"global"}:{project_id:i},[h,c]=O("skillQuery",""),[n,t]=v.useState(h),[o,s]=O("source","all",["all","builtin","user"]);v.useEffect(()=>t(h),[h]);const{selectedId:f,openDetail:l,closeDetail:y}=le("/skills","skillName"),[p,w]=v.useState(!1),[g,k]=v.useState(!1),[m,N]=v.useState(!1),r=Ie(),d=Ke(),{data:j,isLoading:C,error:z,refetch:ae}=Le({...x,q:h||void 0,source:o==="all"?void 0:o,include_hidden:!0}),Q=j==null?void 0:j.skills;return z?e.jsx(J,{message:z.message,onRetry:()=>ae()}):e.jsxs("div",{children:[e.jsx(ne,{title:"Skills",meta:`${(Q??[]).length} skills`,action:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(b,{"data-testid":"import-skill-button",size:"sm",variant:"outline",onClick:()=>k(!0),children:[e.jsx(Y,{size:12,className:"mr-1"})," Import from GitHub"]}),e.jsxs(b,{"data-testid":"import-local-skills-button",size:"sm",variant:"outline",onClick:()=>N(!0),children:[e.jsx(Y,{size:12,className:"mr-1"})," Import from agents"]}),e.jsxs(b,{"data-testid":"new-skill-button",size:"sm",onClick:()=>w(!0),className:"font-label text-sm ",children:[e.jsx(re,{size:12,className:"mr-1"})," New skill"]})]})}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:["Skill folders follow the"," ",e.jsx("a",{className:"text-primary underline",href:"https://agentskills.io/specification",target:"_blank",rel:"noreferrer",children:"Agent Skills specification"}),"."]}),e.jsx("p",{className:"mb-4 text-sm leading-relaxed text-muted-foreground",children:"Built-in visibility applies to agent discovery across this installation. Hidden skills remain readable by name and available to flows. Authored overrides stay visible."}),(r.error||d.error)&&e.jsx("p",{role:"alert",className:"text-destructive text-xs mb-2",children:(B=r.error||d.error)==null?void 0:B.message}),(U=j==null?void 0:j.broken)==null?void 0:U.map(u=>e.jsxs("p",{role:"alert",className:"text-destructive text-xs mb-2",children:[u.path,": ",u.error]},u.path)),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex shrink-0 flex-wrap gap-1.5",children:Fe.map(u=>e.jsx("button",{type:"button",onClick:()=>s(u.value),"data-testid":`skill-source-${u.value}`,"aria-pressed":o===u.value,className:`font-label text-sm px-3 py-1.5 border transition-colors ${o===u.value?"bg-surface-highest text-on-surface border-transparent":"bg-transparent border-transparent text-muted-foreground hover:bg-surface-low hover:text-on-surface"}`,children:u.label},u.value))}),e.jsxs("div",{className:"relative min-w-[160px] flex-1",children:[e.jsx(oe,{size:12,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx(D,{"aria-label":"Search skills",value:n,onChange:u=>t(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(u.currentTarget.value),placeholder:"Search skills...",className:"pl-8 bg-background text-on-surface font-body text-sm placeholder:text-muted-foreground"})]}),e.jsx(b,{variant:"outline",size:"sm",onClick:()=>c(n),className:"font-label text-sm ",children:"Search"})]}),C?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map((u,L)=>e.jsx(ee,{className:"h-10 w-full bg-surface-highest"},L))}):(Q??[]).length===0?e.jsx(ce,{message:h?"No skills match your search":"No skills found"}):e.jsx("div",{className:"overflow-hidden",children:e.jsxs(de,{children:[e.jsx(ue,{children:e.jsxs(G,{className:"border-b border-outline-variant hover:bg-transparent",children:[e.jsx(R,{className:"font-label text-sm text-muted-foreground",children:"Name"}),e.jsx(R,{className:"font-label text-sm text-muted-foreground",children:"Description"}),e.jsx(R,{className:"font-label text-sm text-muted-foreground w-24",children:"Source"}),e.jsx(R,{className:"text-xs text-muted-foreground",children:"Agent discovery"})]})}),e.jsx(me,{children:(Q??[]).map(u=>e.jsxs(G,{"data-testid":"skill-row","data-skill-name":u.name,className:"border-b border-outline-variant/50 hover:bg-surface-low cursor-pointer",onClick:()=>l(u.name),children:[e.jsxs(_,{className:"font-body text-sm font-medium text-on-surface",children:[e.jsx("button",{type:"button",className:"min-h-11 text-left hover:text-primary",onClick:L=>{L.stopPropagation(),l(u.name)},children:u.name}),u.mutation&&e.jsx("span",{className:"ml-2 text-primary text-xs",children:"Mutated"})]}),e.jsx(_,{className:"font-body text-sm text-muted-foreground max-w-md truncate",children:u.description||"—"}),e.jsx(_,{children:e.jsx("span",{className:`inline-flex py-0.5 font-label text-sm ${se[u.source]}`,children:u.source})}),e.jsx(_,{onClick:L=>L.stopPropagation(),children:u.source==="builtin"&&!u.mutation?e.jsx("button",{type:"button",role:"switch","aria-label":`${u.name} visible to agents`,"aria-checked":!u.discovery_hidden,"data-testid":`skill-visibility-${u.name}`,disabled:!r.data||d.isPending,className:"text-xs text-primary disabled:opacity-50",onClick:()=>{var V;const L=new Set(((V=r.data)==null?void 0:V.hidden_builtins)??[]);L.has(u.name)?L.delete(u.name):L.add(u.name),d.mutate([...L])},children:u.discovery_hidden?"Hidden — show":"Visible — hide"}):e.jsx("span",{className:"text-xs text-muted-foreground",children:u.mutation?"Visible (override)":"Visible"})})]},u.name))})]})}),e.jsx(qe,{scope:x,skillName:f,open:!!f,onClose:y},f),p&&e.jsx(Re,{open:p,onClose:()=>w(!1)}),g&&e.jsx(Se,{onClose:()=>k(!1)}),m&&e.jsx(Ne,{onClose:()=>N(!1)})]})}function qe({skillName:a,scope:i,open:x,onClose:h}){const{data:c,isLoading:n,error:t,refetch:o}=Z(a,void 0,i),s=c,[f,l]=O("skillFile","SKILL.md"),y=Z(a,f??"SKILL.md",i),p=y.data,w=K(),[g,k]=v.useState(!1),m=`skill:${i.project_id??"global"}:${a}:${f??"SKILL.md"}`;function N(d){return(d??"SKILL.md")===(f??"SKILL.md")?!0:W(m)?(l(d??"SKILL.md"),!0):!1}const r=s?e.jsx(ke,{files:["SKILL.md",...(s.files??[]).map(d=>d.name)],selected:f??"SKILL.md",onSelect:d=>N(d==="SKILL.md"?void 0:d),testId:"skill-file",entryTestId:"skill-show-entry"}):null;return e.jsx(xe,{open:x,onOpenChange:d=>!d&&W(m)&&h(),children:e.jsxs(he,{className:"w-screen max-w-full sm:w-[1120px] sm:max-w-[96vw]",children:[e.jsxs(pe,{children:[e.jsx(ge,{children:(s==null?void 0:s.name)??"Skill Details"}),(s==null?void 0:s.description)&&e.jsx("p",{className:"font-body text-sm text-muted-foreground mt-1",children:s.description})]}),e.jsx(fe,{children:e.jsxs(e.Fragment,{children:[a&&s&&e.jsx(we,{name:a,scope:i,mutation:s.mutation}),a&&s&&e.jsx(Ce,{name:a}),t?e.jsx(J,{message:t.message,onRetry:()=>void o()}):n||!s?e.jsx("div",{className:"space-y-3",children:[...Array(4)].map((d,j)=>e.jsx(ee,{className:"h-8 w-full bg-surface-highest"},j))}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(M,{label:"Source",children:e.jsx("span",{className:`inline-flex py-0.5 font-label text-sm ${se[s.source]}`,children:s.source})}),e.jsx(M,{label:"Path",children:e.jsx("code",{className:"font-mono text-sm text-muted-foreground break-all",children:s.path})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-label text-sm text-muted-foreground mb-2",children:f??"SKILL.md"}),e.jsxs("div",{className:"overflow-hidden",children:[(p==null?void 0:p.encoding)==="base64"&&e.jsx("div",{className:"p-3",children:r}),y.error?e.jsx("p",{role:"alert",children:y.error.message}):y.isLoading?e.jsx("p",{children:"Loading..."}):(p==null?void 0:p.encoding)==="base64"?e.jsx(te,{path:f??"SKILL.md",value:(p==null?void 0:p.content)??"",readOnly:!0,hidePreview:!0,height:400,testId:"skill-file-content"}):e.jsx(be,{documentId:m,expanded:g,onExpandedChange:k,navigation:r,path:f??"SKILL.md",content:(p==null?void 0:p.content)??"",testId:"skill-file-content",onSave:s.source==="user"&&(p==null?void 0:p.encoding)==="utf8"?async(d,j)=>{const C=f??"SKILL.md";return s.mutation&&C==="SKILL.md"?await S.skills.updateInstructions(s.name,{project_id:i.project_id??null,content:d,expected_content:j,reason:"Manual instruction edit",author:"human"}):await S.skills.editFile(s.name,{path:C,content:d,expectedContent:j}),await w.invalidateQueries({queryKey:["skill",s.name]}),await w.invalidateQueries({queryKey:["skills"]}),await w.invalidateQueries({queryKey:["skill-history",s.name]}),d}:void 0},m),(p==null?void 0:p.encoding)==="base64"&&e.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"Binary asset shown as base64 (read-only)."})]})]})]})]})})]})})}function Re({open:a,onClose:i}){var N;const[x,h]=v.useState(""),[c,n]=v.useState(""),t=De(),[o,s]=v.useState([]),[f,l]=v.useState(),[y,p]=v.useState(!1),w=!!(x||c||o.length);v.useEffect(()=>{if(!w)return;function r(d){d.preventDefault(),d.returnValue=""}return window.addEventListener("beforeunload",r),()=>window.removeEventListener("beforeunload",r)},[w]);function g(){t.isPending||y||(!w||window.confirm("Discard this unsaved skill?"))&&i()}async function k(r){if(r!=null&&r.length){p(!0),l(void 0);try{const d=(await ve(r)).map(C=>({...C,encoding:C.encoding??"utf8",id:crypto.randomUUID()})),j=d.find(C=>C.path==="SKILL.md");if(!j)throw new Error("Choose a skill folder containing SKILL.md");if(j.encoding!=="utf8")throw new Error("SKILL.md must be UTF-8 text");n(j.content),h(r[0].webkitRelativePath.split("/")[0]),s(d.filter(C=>C!==j))}catch(d){l(d.message)}finally{p(!1)}}}const m=()=>{!x.trim()||!c.trim()||t.isPending||y||o.some(r=>!r.path.trim())||t.mutate({name:x.trim(),content:c.trim(),files:o.map(({path:r,content:d,encoding:j})=>({path:r,content:d,encoding:j}))},{onSuccess:i})};return e.jsx(E,{open:a,onOpenChange:r=>!r&&g(),children:e.jsxs($,{className:"bg-surface border-outline-variant w-[calc(100%_-_1rem)] max-w-5xl max-h-[94dvh] overflow-y-auto",children:[e.jsx(A,{children:e.jsx(T,{className:"font-headline text-base text-on-surface",children:"New skill"})}),e.jsxs("form",{onSubmit:r=>{r.preventDefault(),m()},className:"space-y-3 mt-2",children:[e.jsx(P,{htmlFor:"skill-folder-input",children:"Import skill folder"}),e.jsx(D,{id:"skill-folder-input","data-testid":"skill-folder-input",type:"file",multiple:!0,webkitdirectory:"",onChange:r=>void k(r.target.files)}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(P,{className:"font-label text-sm text-muted-foreground",children:"Name *"}),e.jsx(D,{"aria-label":"Name","data-testid":"skill-name-input",value:x,onChange:r=>h(r.target.value),placeholder:"my-skill",className:"bg-background text-on-surface font-body text-sm",autoFocus:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(P,{className:"font-label text-sm text-muted-foreground",children:"SKILL.md *"}),e.jsx(je,{testId:"skill-content-input",path:"SKILL.md",value:c,onChange:n,onSave:m})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(b,{"data-testid":"skill-add-file",type:"button",variant:"outline",onClick:()=>s([...o,{id:crypto.randomUUID(),path:"",content:"",encoding:"utf8"}]),children:"Add file"}),o.map(r=>e.jsxs("div",{"data-testid":"skill-supporting-file",className:"space-y-2 border border-outline-variant p-3",children:[e.jsx(D,{"data-testid":"skill-file-path-input","aria-label":"File path",placeholder:"references/guide.md or scripts/check.py",value:r.path,onChange:d=>s(o.map(j=>j.id===r.id?{...j,path:d.target.value}:j))}),e.jsx(te,{testId:"skill-file-content-input",path:r.path||"supporting.txt",readOnly:r.encoding==="base64",label:`Content of ${r.path||"supporting file"}`,value:r.content,height:180,onChange:d=>s(o.map(j=>j.id===r.id?{...j,content:d}:j))}),r.encoding==="base64"&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Binary asset (base64)"}),e.jsx(b,{type:"button",variant:"ghost",onClick:()=>s(o.filter(d=>d.id!==r.id)),children:"Remove file"})]},r.id))]}),(f||t.error)&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:f??((N=t.error)==null?void 0:N.message)}),e.jsxs(H,{children:[e.jsx(b,{type:"button",variant:"ghost",size:"sm",onClick:g,className:"font-label text-sm text-muted-foreground",children:"Cancel"}),e.jsx(b,{"data-testid":"skill-submit",type:"submit",size:"sm",disabled:y||t.isPending||!x.trim()||!c.trim()||o.some(r=>!r.path.trim()),className:"font-label text-sm ",children:t.isPending?"Creating...":"Create"})]})]})]})})}export{Te as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Fn,aH as x,aI as g,aJ as Ue,aK as Re,aL as ce,aM as ve,aN as Et,aO as Tt,aP as pe,aQ as N,aR as Wn,aS as Nn,aT as Ge,aU as qn,aV as je,aW as It,aX as Je,aY as J,aZ as U,a_ as Fe,a$ as We,b0 as $n,b1 as Ke,b2 as Vn,b3 as zn,b4 as Pt,b5 as Ot,b6 as Ft,b7 as M,b8 as Hn,b9 as Un,ba as oe,bb as Wt,bc as T,bd as Gn,be as S,bf as jn,bg as Nt,bh as Jn,bi as f,bj as Kn,bk as _n,bl as Qn,bm as Yn,bn as Zn,bo as Xn,bp as er,bq as tr,br as nr,bs as rr,bt as or,bu as ir,bv as sr,bw as lr,bx as cr,by as ar,bz as qt,bA as ur,bB as hr,bC as fr,bD as dr,bE as mr,r as v,bF as ne,i as Ee,bG as ct,bH as gr,j as E,aC as pr,ab as yr}from"./index-
|
|
1
|
+
import{c as Fn,aH as x,aI as g,aJ as Ue,aK as Re,aL as ce,aM as ve,aN as Et,aO as Tt,aP as pe,aQ as N,aR as Wn,aS as Nn,aT as Ge,aU as qn,aV as je,aW as It,aX as Je,aY as J,aZ as U,a_ as Fe,a$ as We,b0 as $n,b1 as Ke,b2 as Vn,b3 as zn,b4 as Pt,b5 as Ot,b6 as Ft,b7 as M,b8 as Hn,b9 as Un,ba as oe,bb as Wt,bc as T,bd as Gn,be as S,bf as jn,bg as Nt,bh as Jn,bi as f,bj as Kn,bk as _n,bl as Qn,bm as Yn,bn as Zn,bo as Xn,bp as er,bq as tr,br as nr,bs as rr,bt as or,bu as ir,bv as sr,bw as lr,bx as cr,by as ar,bz as qt,bA as ur,bB as hr,bC as fr,bD as dr,bE as mr,r as v,bF as ne,i as Ee,bG as ct,bH as gr,j as E,aC as pr,ab as yr}from"./index-Q1wl04d6.js";/**
|
|
2
2
|
* @license lucide-react v1.27.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as an,r as u,ca as M,cb as ke,j as a,P as ln,cc as ft,am as cn,u as Bn,a as $n,m as un,b as Fn,d as ht,L as Un,g as Kn,a0 as Xn,cd as qn,ce as Yn,V as Bt,E as Vn,B as Hn,ak as Wn,aC as Gn,Z as Jn,an as $t,ao as Ft,ap as Ut,aq as Kt,ar as at,S as Xt,bU as Qn,bV as Zn,bW as er,bX as tr,af as nr,T as rr,s as sr,t as qt,v as te,w as or,x as ne,q as ar,cf as ir,a7 as lr,cg as cr}from"./index-
|
|
1
|
+
import{c as an,r as u,ca as M,cb as ke,j as a,P as ln,cc as ft,am as cn,u as Bn,a as $n,m as un,b as Fn,d as ht,L as Un,g as Kn,a0 as Xn,cd as qn,ce as Yn,V as Bt,E as Vn,B as Hn,ak as Wn,aC as Gn,Z as Jn,an as $t,ao as Ft,ap as Ut,aq as Kt,ar as at,S as Xt,bU as Qn,bV as Zn,bW as er,bX as tr,af as nr,T as rr,s as sr,t as qt,v as te,w as or,x as ne,q as ar,cf as ir,a7 as lr,cg as cr}from"./index-Q1wl04d6.js";import{u as ur}from"./useProjectScope-CNZ2Ry3s.js";import{L as dr}from"./list-vYJbA_Kh.js";/**
|
|
2
2
|
* @license lucide-react v1.27.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|