@inkeep/open-knowledge 0.5.0-beta.2 → 0.5.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +10 -0
  2. package/dist/assets/skills/open-knowledge/SKILL.md +1 -1
  3. package/dist/cli.mjs +5 -5
  4. package/dist/constants-CdfqNseZ.mjs +2 -0
  5. package/dist/{dist-CKbBtGcV.mjs → dist-B57jcfo9.mjs} +2 -2
  6. package/dist/{dist-DD3jbGts.mjs → dist-BGL0ZAep.mjs} +15 -15
  7. package/dist/{dist-DLi5l7jc.mjs → dist-CitXaW0V.mjs} +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/dist/init-CYRb_5EB.mjs +1 -0
  10. package/dist/{init-BVF99f4p.mjs → init-WxyC-q6H.mjs} +3 -3
  11. package/dist/{loader-BuVjsSVh.mjs → loader-49cQC73v.mjs} +2 -2
  12. package/dist/loader-CcNPgKn1.mjs +1 -0
  13. package/dist/{preview-CgtprTPm.mjs → preview-D4TVVGvQ.mjs} +2 -2
  14. package/dist/preview-gwaAyRK2.mjs +1 -0
  15. package/dist/public/assets/ActivityModeContent-CDvwQiJl.js +2 -0
  16. package/dist/public/assets/ConsentDialogBody-zb1TKG9i.js +2 -0
  17. package/dist/public/assets/DocumentContext-DsG0dRJh.js +41 -0
  18. package/dist/public/assets/{GraphPanel-C3gvPdoq.js → GraphPanel-5-zTeMY1.js} +2 -2
  19. package/dist/public/assets/McpConsentDialogBody-C8ewMYVI.js +1 -0
  20. package/dist/public/assets/SettingsDialog-CzUxAbsW.js +11 -0
  21. package/dist/public/assets/{SourceEditor-Xxy5TvNJ.js → SourceEditor-Bc46I85k.js} +2 -2
  22. package/dist/public/assets/{_baseFor-CVV1DSgL.js → _baseFor-Dewzr4ka.js} +1 -1
  23. package/dist/public/assets/{arc-DoxD41WW.js → arc-DA-_Qgty.js} +1 -1
  24. package/dist/public/assets/architecture-YZFGNWBL-ii1DMScC.js +1 -0
  25. package/dist/public/assets/{architectureDiagram-Q4EWVU46-Du5oNRD5.js → architectureDiagram-Q4EWVU46-Wd0Ua0Z1.js} +1 -1
  26. package/dist/public/assets/{blockDiagram-DXYQGD6D-CuxUJ8VP.js → blockDiagram-DXYQGD6D-B_z4vCOg.js} +1 -1
  27. package/dist/public/assets/{c4Diagram-AHTNJAMY-D58kKzW4.js → c4Diagram-AHTNJAMY-CXNX0C7S.js} +1 -1
  28. package/dist/public/assets/channel-BsgewBDI.js +1 -0
  29. package/dist/public/assets/{chunk-2KRD3SAO-uai9wz3V.js → chunk-2KRD3SAO-QHu6lS2z.js} +1 -1
  30. package/dist/public/assets/{chunk-336JU56O-CtkQ28bg.js → chunk-336JU56O-D77Rj_75.js} +2 -2
  31. package/dist/public/assets/chunk-426QAEUC-b3iWz8H-.js +1 -0
  32. package/dist/public/assets/{chunk-4BX2VUAB-BTctgoF3.js → chunk-4BX2VUAB-CDjfF5mJ.js} +1 -1
  33. package/dist/public/assets/{chunk-4TB4RGXK-Cnl-K_AI.js → chunk-4TB4RGXK-DgzpC1RW.js} +1 -1
  34. package/dist/public/assets/chunk-55IACEB6-DLoy8CmX.js +1 -0
  35. package/dist/public/assets/{chunk-5FUZZQ4R-DF0EG1O8.js → chunk-5FUZZQ4R-pDx0Wde8.js} +1 -1
  36. package/dist/public/assets/{chunk-5PVQY5BW-BpceE2BZ.js → chunk-5PVQY5BW-kcWn_d-_.js} +1 -1
  37. package/dist/public/assets/{chunk-67CJDMHE-DiSIolj4.js → chunk-67CJDMHE-DlS8iVRi.js} +1 -1
  38. package/dist/public/assets/{chunk-7N4EOEYR-Yp7Nf16N.js → chunk-7N4EOEYR-BhSQn_oU.js} +1 -1
  39. package/dist/public/assets/{chunk-AA7GKIK3--s2NNuet.js → chunk-AA7GKIK3-C1CcYx5B.js} +1 -1
  40. package/dist/public/assets/{chunk-BSJP7CBP-BrRqu__W.js → chunk-BSJP7CBP-B5xN369R.js} +1 -1
  41. package/dist/public/assets/{chunk-CIAEETIT-BUzaopy6.js → chunk-CIAEETIT-ecxKAxUb.js} +1 -1
  42. package/dist/public/assets/{chunk-EDXVE4YY-Bo83e0iq.js → chunk-EDXVE4YY-Bm2-fU6x.js} +1 -1
  43. package/dist/public/assets/{chunk-ENJZ2VHE-CY9yto8o.js → chunk-ENJZ2VHE-1bYQNnwE.js} +1 -1
  44. package/dist/public/assets/{chunk-FMBD7UC4-DEzvlUl3.js → chunk-FMBD7UC4-Da7gMLWx.js} +1 -1
  45. package/dist/public/assets/{chunk-FOC6F5B3-BtjWNx10.js → chunk-FOC6F5B3-CHF5QCPz.js} +1 -1
  46. package/dist/public/assets/{chunk-ICPOFSXX-BC5Xd13f.js → chunk-ICPOFSXX-rmT7ehAO.js} +1 -1
  47. package/dist/public/assets/{chunk-K5T4RW27-CfU2wPmV.js → chunk-K5T4RW27-CHoEPFOL.js} +1 -1
  48. package/dist/public/assets/{chunk-KGLVRYIC-BV1pDifD.js → chunk-KGLVRYIC-DRtjGHKV.js} +1 -1
  49. package/dist/public/assets/{chunk-LIHQZDEY-C40dIbib.js → chunk-LIHQZDEY-GDhBbkMd.js} +1 -1
  50. package/dist/public/assets/{chunk-ORNJ4GCN-8cFqvOFf.js → chunk-ORNJ4GCN-C9FrQ4Hp.js} +1 -1
  51. package/dist/public/assets/{chunk-OYMX7WX6-D0C6jdl8.js → chunk-OYMX7WX6-CAW2HwTq.js} +1 -1
  52. package/dist/public/assets/chunk-QZHKN3VN-XrJADtWP.js +1 -0
  53. package/dist/public/assets/{chunk-U2HBQHQK-DenE4TdD.js → chunk-U2HBQHQK-Cg7rxXd1.js} +1 -1
  54. package/dist/public/assets/{chunk-X2U36JSP-DSyuGkzP.js → chunk-X2U36JSP-Z4V8etFJ.js} +1 -1
  55. package/dist/public/assets/{chunk-XPW4576I-CLO5Bb_q.js → chunk-XPW4576I-Ci37cmyJ.js} +1 -1
  56. package/dist/public/assets/{chunk-YZCP3GAM-D8kUvWu6.js → chunk-YZCP3GAM-BlAQKShJ.js} +1 -1
  57. package/dist/public/assets/{chunk-ZZ45TVLE-DHB0SHUz.js → chunk-ZZ45TVLE-CKHp-exc.js} +1 -1
  58. package/dist/public/assets/classDiagram-6PBFFD2Q-Bt8hJVX9.js +1 -0
  59. package/dist/public/assets/classDiagram-v2-HSJHXN6E-BTPIteVB.js +1 -0
  60. package/dist/public/assets/clone-B_tH2FKO.js +1 -0
  61. package/dist/public/assets/config-validation-events-kuYsS9Uy.js +10 -0
  62. package/dist/public/assets/{cose-bilkent-S5V4N54A-6FB6GAoi.js → cose-bilkent-S5V4N54A-CzOLOBap.js} +1 -1
  63. package/dist/public/assets/{dagre-D2_448Gx.js → dagre-CbTJGa51.js} +1 -1
  64. package/dist/public/assets/{dagre-KV5264BT-Bn9RtFC-.js → dagre-KV5264BT-CzrIWBHi.js} +1 -1
  65. package/dist/public/assets/{diagram-5BDNPKRD-XCR9sVhK.js → diagram-5BDNPKRD-DDHvw5SM.js} +1 -1
  66. package/dist/public/assets/{diagram-G4DWMVQ6-Bz0ngc_7.js → diagram-G4DWMVQ6-DiQx8aIN.js} +1 -1
  67. package/dist/public/assets/{diagram-MMDJMWI5-o_IQFxK_.js → diagram-MMDJMWI5-CJELLr4J.js} +1 -1
  68. package/dist/public/assets/{diagram-TYMM5635-D2QJXyfV.js → diagram-TYMM5635-BHwicR15.js} +1 -1
  69. package/dist/public/assets/dialog-CY2eQd6O.js +45 -0
  70. package/dist/public/assets/{dist-BYGzJeLM.js → dist-B3L7cm0M.js} +1 -1
  71. package/dist/public/assets/{dist-CXGJFbY5.js → dist-BMooy-F_.js} +1 -1
  72. package/dist/public/assets/{dist-DsbVHLNy.js → dist-BiYnsAMa.js} +1 -1
  73. package/dist/public/assets/{dist-Cq1LYbUj.js → dist-CATLRngz.js} +1 -1
  74. package/dist/public/assets/{dist-BrsSsfiw.js → dist-Cp-iTcML.js} +1 -1
  75. package/dist/public/assets/{dist-CyaBbyDQ.js → dist-Dwop2AD8.js} +1 -1
  76. package/dist/public/assets/doc-hash-CaKfwYBW.js +422 -0
  77. package/dist/public/assets/{erDiagram-SMLLAGMA-C1Mr5jbs.js → erDiagram-SMLLAGMA-DdltplqB.js} +1 -1
  78. package/dist/public/assets/{flatten-DFiFicpD.js → flatten-BdgTwKTr.js} +1 -1
  79. package/dist/public/assets/{flowDiagram-DWJPFMVM--ukgnTYS.js → flowDiagram-DWJPFMVM-CQHlOxjR.js} +1 -1
  80. package/dist/public/assets/{ganttDiagram-T4ZO3ILL-CVeIdgCM.js → ganttDiagram-T4ZO3ILL-CNDOT9hb.js} +1 -1
  81. package/dist/public/assets/gitGraph-7Q5UKJZL-CIz9LX1B.js +1 -0
  82. package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BSivDyLh.js → gitGraphDiagram-UUTBAWPF-BgXxQBs9.js} +1 -1
  83. package/dist/public/assets/{graphlib-DvRtwu4N.js → graphlib-CrrIJ98S.js} +1 -1
  84. package/dist/public/assets/index-DThsdx9L.js +1853 -0
  85. package/dist/public/assets/index-wYiupFbR.css +1 -0
  86. package/dist/public/assets/info-OMHHGYJF-CIFsXa-y.js +1 -0
  87. package/dist/public/assets/{infoDiagram-42DDH7IO-DtO1Tc8U.js → infoDiagram-42DDH7IO-BNSprTvD.js} +1 -1
  88. package/dist/public/assets/{isEmpty-gGVpRSDa.js → isEmpty-XlV2b3kS.js} +1 -1
  89. package/dist/public/assets/isSymbol-CiN6ou2H.js +1 -0
  90. package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BY3noyNF.js → ishikawaDiagram-UXIWVN3A-COSeJVOI.js} +1 -1
  91. package/dist/public/assets/{journeyDiagram-VCZTEJTY-DdFdkR8_.js → journeyDiagram-VCZTEJTY-sGfNXUrs.js} +1 -1
  92. package/dist/public/assets/{kanban-definition-6JOO6SKY-WoLnXp48.js → kanban-definition-6JOO6SKY-DknMinG3.js} +1 -1
  93. package/dist/public/assets/{line-C59Ezo8Z.js → line-BI6r6-S8.js} +1 -1
  94. package/dist/public/assets/{linear-faBQNtcz.js → linear-1aKBO-v1.js} +1 -1
  95. package/dist/public/assets/{mermaid-parser.core-CFsvu03i.js → mermaid-parser.core-BrufKICx.js} +2 -2
  96. package/dist/public/assets/{mermaid.core-CWYso-V4.js → mermaid.core-hgzeX18g.js} +3 -3
  97. package/dist/public/assets/{mindmap-definition-QFDTVHPH-BG3Kwhhs.js → mindmap-definition-QFDTVHPH-X4KQZFdB.js} +1 -1
  98. package/dist/public/assets/{now-D_m-3Vjm.js → now--RAZR_wd.js} +1 -1
  99. package/dist/public/assets/{ordinal-BLFwWMHf.js → ordinal-C6wHcby9.js} +1 -1
  100. package/dist/public/assets/packet-4T2RLAQJ-BaGTVTK6.js +1 -0
  101. package/dist/public/assets/pie-ZZUOXDRM-BlBm3k_7.js +1 -0
  102. package/dist/public/assets/{pieDiagram-DEJITSTG-B1wtn7py.js → pieDiagram-DEJITSTG-5kceM3o3.js} +1 -1
  103. package/dist/public/assets/{quadrantDiagram-34T5L4WZ-yboV7Kxh.js → quadrantDiagram-34T5L4WZ-CQehowKY.js} +1 -1
  104. package/dist/public/assets/radar-PYXPWWZC-DcDFZeKR.js +1 -0
  105. package/dist/public/assets/{reduce-DmI60TfL.js → reduce-C4NH7ua9.js} +1 -1
  106. package/dist/public/assets/{requirementDiagram-MS252O5E-BpVLqxNT.js → requirementDiagram-MS252O5E-DySfGFfG.js} +1 -1
  107. package/dist/public/assets/{sankeyDiagram-XADWPNL6-CH1ZYL1H.js → sankeyDiagram-XADWPNL6-CMU0uGgr.js} +1 -1
  108. package/dist/public/assets/{sequenceDiagram-FGHM5R23-CwQvwa3m.js → sequenceDiagram-FGHM5R23-BlnukeK1.js} +1 -1
  109. package/dist/public/assets/{src-DOAilbaA.js → src-BXk72DrU.js} +1 -1
  110. package/dist/public/assets/{stateDiagram-FHFEXIEX-DL3pXt3n.js → stateDiagram-FHFEXIEX-B7C4fJw1.js} +1 -1
  111. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BjMTOSSV.js +1 -0
  112. package/dist/public/assets/{target-navigation-intent-Bsa-5sN4.js → target-navigation-intent-COKjYFzE.js} +1 -1
  113. package/dist/public/assets/{telemetry-impl-H--5W_Jc.js → telemetry-impl-C6x9yckj.js} +2 -2
  114. package/dist/public/assets/{timeline-definition-GMOUNBTQ-CDbb3c--.js → timeline-definition-GMOUNBTQ-DAcQtRlS.js} +1 -1
  115. package/dist/public/assets/{toggle-group-fH3GS2vu.js → toggle-group-zxAmL7AG.js} +1 -1
  116. package/dist/public/assets/{tooltip-BuwIhPCp.js → tooltip-DfmK7iDN.js} +1 -1
  117. package/dist/public/assets/treeView-SZITEDCU-DT6-aoa9.js +1 -0
  118. package/dist/public/assets/treemap-W4RFUUIX-JWBoWOdi.js +1 -0
  119. package/dist/public/assets/{typing-burst-detector-isOlON7R.js → typing-burst-detector-wbnGbURk.js} +2 -2
  120. package/dist/public/assets/{vennDiagram-DHZGUBPP-BaHOUqGA.js → vennDiagram-DHZGUBPP-D5QpqXSc.js} +1 -1
  121. package/dist/public/assets/wardley-RL74JXVD-GxyzoOqN.js +1 -0
  122. package/dist/public/assets/{wardleyDiagram-NUSXRM2D-5ysokC2z.js → wardleyDiagram-NUSXRM2D-CV74dN2L.js} +1 -1
  123. package/dist/public/assets/{xychartDiagram-5P7HB3ND-CFQqcNjf.js → xychartDiagram-5P7HB3ND-VYAkLjyv.js} +1 -1
  124. package/dist/public/index.html +19 -20
  125. package/dist/{src-ClUycJ-8.mjs → src-D8dkz5py.mjs} +2 -2
  126. package/dist/start-C2EAqlEk.mjs +1 -0
  127. package/dist/{start-9GiauZpx.mjs → start-GpGsUB8n.mjs} +2 -2
  128. package/package.json +1 -1
  129. package/dist/constants-DaHLULeB.mjs +0 -2
  130. package/dist/init-C5EZlTRi.mjs +0 -1
  131. package/dist/loader-hhLpWo02.mjs +0 -1
  132. package/dist/preview-B3SUZJxp.mjs +0 -1
  133. package/dist/public/assets/ActivityModeContent-BPpQcXSp.js +0 -2
  134. package/dist/public/assets/ConsentDialogBody-CPwBJJLE.js +0 -2
  135. package/dist/public/assets/DocumentContext-DOBntg5q.js +0 -37
  136. package/dist/public/assets/McpConsentDialogBody-0w9-K4mU.js +0 -1
  137. package/dist/public/assets/SettingsDialog-DJeu0WRa.js +0 -11
  138. package/dist/public/assets/architecture-YZFGNWBL-C7rs88Cj.js +0 -1
  139. package/dist/public/assets/channel-kvPH_LHg.js +0 -1
  140. package/dist/public/assets/chunk-426QAEUC-jRhC4EYv.js +0 -1
  141. package/dist/public/assets/chunk-55IACEB6-dtXOOCuI.js +0 -1
  142. package/dist/public/assets/chunk-QZHKN3VN-Bz4XrtbS.js +0 -1
  143. package/dist/public/assets/classDiagram-6PBFFD2Q-MrFnlVPS.js +0 -1
  144. package/dist/public/assets/classDiagram-v2-HSJHXN6E-DFkKo4Ct.js +0 -1
  145. package/dist/public/assets/clone-jj9sSaF-.js +0 -1
  146. package/dist/public/assets/config-validation-events-BpvRjXIZ.js +0 -10
  147. package/dist/public/assets/dialog-BFN-ujuF.js +0 -1
  148. package/dist/public/assets/dist-OTL8-1C2.js +0 -45
  149. package/dist/public/assets/doc-hash-DefAyZGx.js +0 -422
  150. package/dist/public/assets/gitGraph-7Q5UKJZL-Bmgp5n-M.js +0 -1
  151. package/dist/public/assets/index-Cfu0nrKh.js +0 -1853
  152. package/dist/public/assets/index-Cl4ZMMDO.css +0 -1
  153. package/dist/public/assets/info-OMHHGYJF-DCMX4pS_.js +0 -1
  154. package/dist/public/assets/isSymbol-D0ur5y-p.js +0 -1
  155. package/dist/public/assets/packet-4T2RLAQJ-DveBhlQF.js +0 -1
  156. package/dist/public/assets/pie-ZZUOXDRM-yiLyabeZ.js +0 -1
  157. package/dist/public/assets/radar-PYXPWWZC-D8GV_2fZ.js +0 -1
  158. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-6f8E13YF.js +0 -1
  159. package/dist/public/assets/treeView-SZITEDCU-A2Cj-I1J.js +0 -1
  160. package/dist/public/assets/treemap-W4RFUUIX-uOn6xcZK.js +0 -1
  161. package/dist/public/assets/wardley-RL74JXVD-DrTPuxUO.js +0 -1
  162. package/dist/start-BOjZrRX3.mjs +0 -1
  163. /package/dist/public/assets/{ActivityPanelDiffView-DeDaG2lq.js → ActivityPanelDiffView-EaCFURAu.js} +0 -0
  164. /package/dist/public/assets/{__vite-browser-external-sCjVW6Bj.js → __vite-browser-external-mvD4HPu0.js} +0 -0
  165. /package/dist/public/assets/{array-COEOjKUv.js → array-o2rfyIz3.js} +0 -0
  166. /package/dist/public/assets/{colors-D6LRuSY-.js → colors-BbIH8S-B.js} +0 -0
  167. /package/dist/public/assets/{cytoscape.esm-4jw_vW_Q.js → cytoscape.esm-xzkCxEpv.js} +0 -0
  168. /package/dist/public/assets/{defaultLocale-CoF2cqkH.js → defaultLocale-D3xTVDt1.js} +0 -0
  169. /package/dist/public/assets/{dist-Du-s1q8P.js → dist-D2RGH7XO.js} +0 -0
  170. /package/dist/public/assets/{dist-Bog19bCH.js → dist-TlK-S7KL.js} +0 -0
  171. /package/dist/public/assets/{go-wMvjCq97.js → go-e6pdpn6U.js} +0 -0
  172. /package/dist/public/assets/{init-8GNx5phc.js → init-gbiKrEzm.js} +0 -0
  173. /package/dist/public/assets/{input-BOmkuBId.js → input-hZk8Tm0e.js} +0 -0
  174. /package/dist/public/assets/{isObjectLike-DFnkciUU.js → isObjectLike-BNNgtFA6.js} +0 -0
  175. /package/dist/public/assets/{min-BiwsSkbB.js → min-VayDM1tY.js} +0 -0
  176. /package/dist/public/assets/{path-C-grg3CZ.js → path-DFpIsaqN.js} +0 -0
  177. /package/dist/public/assets/{pdf-CtJiipL_.js → pdf-w2KBoLit.js} +0 -0
  178. /package/dist/public/assets/{pdf.worker-BZq-wJdz.js → pdf.worker-BpRoOtgY.js} +0 -0
  179. /package/dist/public/assets/{project-paths-Cs3srSjk.js → project-paths-hiY0fNWB.js} +0 -0
  180. /package/dist/public/assets/{rough.esm-DDK-gphn.js → rough.esm-BgPNbngg.js} +0 -0
  181. /package/dist/public/assets/{shell-DdhS5_h8.js → shell-BkCD5kyH.js} +0 -0
  182. /package/dist/public/assets/{src-L3wpjxBL.js → src-BYmEUJ3I.js} +0 -0
  183. /package/dist/public/assets/{stex-CzCFWeB9.js → stex-J8UMaf7u.js} +0 -0
  184. /package/dist/public/assets/{textarea-CaFqgjns.js → textarea-gXd-JXvQ.js} +0 -0
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActivityPanelDiffView-DeDaG2lq.js","./chunk-CFjPhJqf.js","./compiler-runtime-CVnuRdak.js","./ActivityPanelDiffView-legcy4jI.css"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./preload-helper-2ej06EnG.js";import{n,r,t as i}from"./compiler-runtime-CVnuRdak.js";import{$ as a,_n as o,n as s,r as c,rn as l,vn as u,yn as d}from"./DocumentContext-DOBntg5q.js";import{At as f,G as p,W as m,p as h}from"./doc-hash-DefAyZGx.js";import{C as g,t as _}from"./button-C1nwPVFQ.js";import{f as v,i as y,m as b,r as x,t as S}from"./agent-presence-BrTlNKmt.js";import{p as C}from"./dist-OTL8-1C2.js";import{i as w,n as T,t as E}from"./tooltip-BuwIhPCp.js";import{a as D,c as O,i as k,o as ee,s as te,t as ne}from"./dialog-BFN-ujuF.js";var re=g(`rewind`,[[`path`,{d:`M12 6a2 2 0 0 0-3.414-1.414l-6 6a2 2 0 0 0 0 2.828l6 6A2 2 0 0 0 12 18z`,key:`2a1g8i`}],[`path`,{d:`M22 6a2 2 0 0 0-3.414-1.414l-6 6a2 2 0 0 0 0 2.828l6 6A2 2 0 0 0 22 18z`,key:`rg3s36`}]]),A=i(),j=e(n(),1),ie=500,ae=64;async function oe(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new a(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=f.safeParse(r);throw e.success?Error(e.data.title):new a(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let i=m.safeParse(r);if(!i.success)throw new a(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:i.error,status:n.status});return i.data}async function se(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&stackIndex=${n}`,i=await fetch(r),o;try{o=await i.json()}catch(e){throw new a(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:i.status})}if(!i.ok){let e=f.safeParse(o);throw e.success?Error(e.data.title):new a(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:i.status})}let s=p.safeParse(o);if(!s.success)throw new a(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:s.error,status:i.status});return s.data.diff}function ce(e){let t=(0,A.c)(23),{systemProvider:n}=s(),[r,i]=(0,j.useState)(null),[a,o]=(0,j.useState)(`idle`),[c,l]=(0,j.useState)(null),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=new y(ae),t[0]=u):u=t[0];let d=(0,j.useRef)(u),f=(0,j.useRef)(0),p;t[1]===n?p=t[2]:(p=e=>{let t=f.current+=1;o(`loading`),l(null),oe(e).then(r=>{if(f.current!==t)return;let a=ue(n,e);i({...r,writingDocs:a}),o(`ready`)}).catch(e=>{f.current===t&&(l(e instanceof Error?e.message:String(e)),o(`error`))})},t[1]=n,t[2]=p);let m=p,g;t[3]!==e||t[4]!==m?(g=()=>{if(!e){f.current+=1,i(null),o(`idle`),l(null),d.current.clear();return}d.current.clear(),m(e);let t=null,n=h(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,m(e)},ie))});return()=>{t&&clearTimeout(t),n()}},t[3]=e,t[4]=m,t[5]=g):g=t[5];let _;t[6]===e?_=t[7]:(_=[e],t[6]=e,t[7]=_),(0,j.useEffect)(g,_);let v,b;t[8]!==e||t[9]!==n?(v=()=>{if(!e||!n)return;let t=()=>{if(!n.awareness)return;let t=ue(n,e);i(e=>!e||le(e.writingDocs,t)?e:{...e,writingDocs:t})},r=n.awareness;if(!r||typeof r.on!=`function`){t();return}r.on(`update`,t),t();let a=setInterval(t,1e3);return()=>{clearInterval(a),typeof r.off==`function`&&r.off(`update`,t)}},b=[e,n],t[8]=e,t[9]=n,t[10]=v,t[11]=b):(v=t[10],b=t[11]),(0,j.useEffect)(v,b);let x;t[12]===e?x=t[13]:(x=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=d.current.get(r);if(i!==void 0)return i;let a=await se(e,t,n);return d.current.set(r,a),a},t[12]=e,t[13]=x);let S=x,C;t[14]!==e||t[15]!==m?(C=()=>{e&&m(e)},t[14]=e,t[15]=m,t[16]=C):C=t[16];let w=C,T;return t[17]!==r||t[18]!==c||t[19]!==S||t[20]!==w||t[21]!==a?(T={data:r,status:a,error:c,reload:w,fetchBurstDiff:S},t[17]=r,t[18]=c,t[19]=S,t[20]=w,t[21]=a,t[22]=T):T=t[22],T}function le(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ue(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!S(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}var M=r(),de=(0,j.lazy)(async()=>({default:(await t(()=>import(`./ActivityPanelDiffView-DeDaG2lq.js`),__vite__mapDeps([0,1,2,3]),import.meta.url)).ActivityPanelDiffView}));function fe(e,t){let n=Math.max(0,t-e);return n<6e4?`${Math.round(n/1e3)}s ago`:n<36e5?`${Math.round(n/6e4)}m ago`:new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function pe(e){let t=(0,A.c)(38),{burst:n,docName:r,fetchBurstDiff:i}=e,[a,o]=(0,j.useState)(!1),[s,c]=(0,j.useState)(null),[l,f]=(0,j.useState)(null),[p,m]=(0,j.useState)(!1),[h,g]=(0,j.useState)(N),_,v;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{let e=setInterval(()=>g(Date.now()),3e4);return()=>clearInterval(e)},v=[],t[0]=_,t[1]=v):(_=t[0],v=t[1]),(0,j.useEffect)(_,v);let y;t[2]!==n.stackIndex||t[3]!==s||t[4]!==r||t[5]!==a||t[6]!==i||t[7]!==p?(y=()=>{let e=!a;o(e),e&&s===null&&!p&&(m(!0),f(null),i(r,n.stackIndex).then(e=>{c(e),m(!1)}).catch(e=>{f(e instanceof Error?e.message:String(e)),m(!1)}))},t[2]=n.stackIndex,t[3]=s,t[4]=r,t[5]=a,t[6]=i,t[7]=p,t[8]=y):y=t[8];let b=y,x=`${a?`Collapse`:`Expand`} burst ${n.stackIndex+1} diff`,S;t[9]===a?S=t[10]:(S=a?(0,M.jsx)(d,{className:`size-3 shrink-0`,"aria-hidden":`true`}):(0,M.jsx)(u,{className:`size-3 shrink-0`,"aria-hidden":`true`}),t[9]=a,t[10]=S);let C;t[11]!==n.ts||t[12]!==h?(C=fe(n.ts,h),t[11]=n.ts,t[12]=h,t[13]=C):C=t[13];let w;t[14]===C?w=t[15]:(w=(0,M.jsx)(`span`,{className:`font-mono`,children:C}),t[14]=C,t[15]=w);let T;t[16]===n.additions?T=t[17]:(T=(0,M.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additions]}),t[16]=n.additions,t[17]=T);let E;t[18]===n.deletions?E=t[19]:(E=(0,M.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletions]}),t[18]=n.deletions,t[19]=E);let D;t[20]!==T||t[21]!==E?(D=(0,M.jsxs)(`span`,{className:`ml-auto font-mono`,children:[T,` `,E]}),t[20]=T,t[21]=E,t[22]=D):D=t[22];let O;t[23]!==a||t[24]!==D||t[25]!==x||t[26]!==S||t[27]!==w||t[28]!==b?(O=(0,M.jsxs)(`button`,{type:`button`,onClick:b,className:`flex w-full items-center gap-2 px-4 py-1.5 text-xs text-muted-foreground hover:bg-muted/40`,"aria-expanded":a,"aria-label":x,children:[S,w,D]}),t[23]=a,t[24]=D,t[25]=x,t[26]=S,t[27]=w,t[28]=b,t[29]=O):O=t[29];let k;t[30]!==s||t[31]!==a||t[32]!==l||t[33]!==p?(k=a?(0,M.jsx)(`div`,{className:`bg-muted/20`,children:p?(0,M.jsx)(`div`,{className:`px-4 py-2 text-xs text-muted-foreground italic`,children:`Loading diff`}):l?(0,M.jsxs)(`div`,{className:`px-4 py-2 text-xs text-destructive`,children:[`Failed: `,l]}):s===null?(0,M.jsx)(`div`,{className:`px-4 py-2 text-xs text-muted-foreground italic`,children:`No diff.`}):(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(`div`,{className:`px-4 py-2 text-xs text-muted-foreground italic`,children:`Loading diff`}),children:(0,M.jsx)(de,{diff:s})})}):null,t[30]=s,t[31]=a,t[32]=l,t[33]=p,t[34]=k):k=t[34];let ee;return t[35]!==O||t[36]!==k?(ee=(0,M.jsxs)(`div`,{className:`border-t border-border/50`,children:[O,k]}),t[35]=O,t[36]=k,t[37]=ee):ee=t[37],ee}function N(){return Date.now()}function me(e,t){let n=Math.max(0,t-e);return n<6e4?`${Math.round(n/1e3)}s ago`:n<36e5?`${Math.round(n/6e4)}m ago`:`${Math.round(n/36e5)}h ago`}function P(e){let t=(0,A.c)(93),{file:n,sessionAlive:r,isWriting:i,onNavigate:a,onUndoLast:o,onUndoAll:s,fetchBurstDiff:c}=e,[l,f]=(0,j.useState)(!1),[p,m]=(0,j.useState)(!1),[h,g]=(0,j.useState)(!1),[y,b]=(0,j.useState)(ge),x,S;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>{let e=setInterval(()=>b(Date.now()),3e4);return()=>clearInterval(e)},S=[],t[0]=x,t[1]=S):(x=t[0],S=t[1]),(0,j.useEffect)(x,S),n.bursts.length===0)return null;let C=!r||n.bursts.length===0||h,ie=r?n.bursts.length===0?`Nothing to undo on this file`:null:`Session ended — undo unavailable`,ae;t[2]!==C||t[3]!==n.docName||t[4]!==o?(ae=e=>{e.stopPropagation(),!C&&(g(!0),Promise.resolve(o(n.docName)).finally(()=>g(!1)))},t[2]=C,t[3]=n.docName,t[4]=o,t[5]=ae):ae=t[5];let oe=ae,se;t[6]===C?se=t[7]:(se=e=>{e.stopPropagation(),!C&&m(!0)},t[6]=C,t[7]=se);let ce=se,le;t[8]!==C||t[9]!==n.docName||t[10]!==s?(le=()=>{m(!1),!C&&(g(!0),Promise.resolve(s(n.docName)).finally(()=>g(!1)))},t[8]=C,t[9]=n.docName,t[10]=s,t[11]=le):le=t[11];let ue=le,de;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>f(he),t[12]=de):de=t[12];let fe=l?`Collapse ${n.docName}`:`Expand ${n.docName}`,N;t[13]===l?N=t[14]:(N=l?(0,M.jsx)(d,{className:`size-4`,"aria-hidden":`true`}):(0,M.jsx)(u,{className:`size-4`,"aria-hidden":`true`}),t[13]=l,t[14]=N);let P;t[15]!==l||t[16]!==fe||t[17]!==N?(P=(0,M.jsx)(`button`,{type:`button`,onClick:de,className:`flex size-5 shrink-0 items-center justify-center rounded hover:bg-muted`,"aria-expanded":l,"aria-label":fe,"data-testid":`activity-panel-file-row-carrot`,children:N}),t[15]=l,t[16]=fe,t[17]=N,t[18]=P):P=t[18];let F;t[19]!==n.docName||t[20]!==a?(F=()=>a(n.docName),t[19]=n.docName,t[20]=a,t[21]=F):F=t[21];let _e=`Navigate to ${n.docName}`,I;t[22]!==n.docName||t[23]!==F||t[24]!==_e?(I=(0,M.jsx)(`button`,{type:`button`,onClick:F,className:`min-w-0 flex-1 truncate text-left text-foreground hover:underline focus-visible:outline-ring`,"aria-label":_e,"data-testid":`activity-panel-file-row-filename`,title:n.docName,children:n.docName}),t[22]=n.docName,t[23]=F,t[24]=_e,t[25]=I):I=t[25];let ve=`Undo last edit on ${n.docName}`,ye;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,M.jsx)(v,{className:`size-3.5`,"aria-hidden":`true`}),t[26]=ye):ye=t[26];let L;t[27]!==C||t[28]!==oe||t[29]!==ve?(L=(0,M.jsx)(w,{asChild:!0,children:(0,M.jsx)(_,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0`,onClick:oe,disabled:C,"aria-label":ve,"data-testid":`activity-panel-undo-last`,children:ye})}),t[27]=C,t[28]=oe,t[29]=ve,t[30]=L):L=t[30];let be=ie??`Undo last edit`,R;t[31]===be?R=t[32]:(R=(0,M.jsx)(T,{side:`bottom`,children:be}),t[31]=be,t[32]=R);let z;t[33]!==L||t[34]!==R?(z=(0,M.jsxs)(E,{children:[L,R]}),t[33]=L,t[34]=R,t[35]=z):z=t[35];let xe=`Undo all edits on ${n.docName}`,Se;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,M.jsx)(re,{className:`size-3.5`,"aria-hidden":`true`}),t[36]=Se):Se=t[36];let B;t[37]!==C||t[38]!==ce||t[39]!==xe?(B=(0,M.jsx)(w,{asChild:!0,children:(0,M.jsx)(_,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0`,onClick:ce,disabled:C,"aria-label":xe,"data-testid":`activity-panel-undo-all`,children:Se})}),t[37]=C,t[38]=ce,t[39]=xe,t[40]=B):B=t[40];let Ce=ie??`Undo all edits`,V;t[41]===Ce?V=t[42]:(V=(0,M.jsx)(T,{side:`bottom`,children:Ce}),t[41]=Ce,t[42]=V);let H;t[43]!==B||t[44]!==V?(H=(0,M.jsxs)(E,{children:[B,V]}),t[43]=B,t[44]=V,t[45]=H):H=t[45];let U;t[46]===n.additionsTotal?U=t[47]:(U=(0,M.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additionsTotal]}),t[46]=n.additionsTotal,t[47]=U);let W;t[48]===n.deletionsTotal?W=t[49]:(W=(0,M.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletionsTotal]}),t[48]=n.deletionsTotal,t[49]=W);let G;t[50]!==U||t[51]!==W?(G=(0,M.jsxs)(`span`,{className:`shrink-0 font-mono text-xs`,children:[U,` `,W]}),t[50]=U,t[51]=W,t[52]=G):G=t[52];let K;t[53]!==n.lastTs||t[54]!==y?(K=me(n.lastTs,y),t[53]=n.lastTs,t[54]=y,t[55]=K):K=t[55];let q;t[56]===K?q=t[57]:(q=(0,M.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:K}),t[56]=K,t[57]=q);let J;t[58]===i?J=t[59]:(J=i?(0,M.jsx)(`span`,{className:`shrink-0 text-[11px] text-primary animate-pulse`,role:`status`,children:`writing`}):null,t[58]=i,t[59]=J);let Y;t[60]!==I||t[61]!==z||t[62]!==H||t[63]!==G||t[64]!==q||t[65]!==J||t[66]!==P?(Y=(0,M.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[P,I,z,H,G,q,J]}),t[60]=I,t[61]=z,t[62]=H,t[63]=G,t[64]=q,t[65]=J,t[66]=P,t[67]=Y):Y=t[67];let X;t[68]!==l||t[69]!==c||t[70]!==n.bursts||t[71]!==n.docName?(X=l?(0,M.jsx)(`div`,{children:n.bursts.map(e=>(0,M.jsx)(pe,{burst:e,docName:n.docName,fetchBurstDiff:c},`${n.docName}:${e.stackIndex}`))}):null,t[68]=l,t[69]=c,t[70]=n.bursts,t[71]=n.docName,t[72]=X):X=t[72];let we;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,M.jsx)(O,{children:`Undo all edits on this file?`}),t[73]=we):we=t[73];let Z;t[74]===n.docName?Z=t[75]:(Z=(0,M.jsx)(`span`,{className:`font-mono text-foreground`,children:n.docName}),t[74]=n.docName,t[75]=Z);let Te=n.bursts.length===1?``:`s`,Q;t[76]!==n.bursts.length||t[77]!==Z||t[78]!==Te?(Q=(0,M.jsxs)(te,{children:[we,(0,M.jsxs)(D,{children:[`This will revert every change this agent has made to`,` `,Z,` in their current session (`,n.bursts.length,` burst`,Te,`). Other files and other writers are not affected.`]})]}),t[76]=n.bursts.length,t[77]=Z,t[78]=Te,t[79]=Q):Q=t[79];let Ee;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,M.jsx)(_,{type:`button`,variant:`outline`,onClick:()=>m(!1),"data-testid":`activity-panel-undo-all-cancel`,children:`Cancel`}),t[80]=Ee):Ee=t[80];let $;t[81]===ue?$=t[82]:($=(0,M.jsxs)(ee,{children:[Ee,(0,M.jsx)(_,{type:`button`,variant:`destructive`,onClick:ue,"data-testid":`activity-panel-undo-all-confirm`,children:`Undo all`})]}),t[81]=ue,t[82]=$);let De;t[83]!==Q||t[84]!==$?(De=(0,M.jsxs)(k,{className:`sm:max-w-md`,children:[Q,$]}),t[83]=Q,t[84]=$,t[85]=De):De=t[85];let Oe;t[86]!==p||t[87]!==De?(Oe=(0,M.jsx)(ne,{open:p,onOpenChange:m,children:De}),t[86]=p,t[87]=De,t[88]=Oe):Oe=t[88];let ke;return t[89]!==Y||t[90]!==X||t[91]!==Oe?(ke=(0,M.jsxs)(`div`,{className:`border-b border-border`,"data-testid":`activity-panel-file-row`,children:[Y,X,Oe]}),t[89]=Y,t[90]=X,t[91]=Oe,t[92]=ke):ke=t[92],ke}function he(e){return!e}function ge(){return Date.now()}async function F(e){let t=await fetch(`/api/agent-undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,agentId:e.connectionId})});if(!t.ok)throw Error(`agent-undo failed: HTTP ${t.status}`)}function _e(e){return`#/${e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`}function I(e){typeof window>`u`||(window.location.hash=_e(e))}function ve(){let e=(0,A.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,role:`status`,"aria-busy":`true`,children:[(0,M.jsx)(l,{className:`mr-2 size-4 animate-spin`,"aria-hidden":`true`}),(0,M.jsx)(`span`,{className:`text-sm`,children:`Loading agent activity`})]}),e[0]=t):t=e[0],t}function ye(e){let t=(0,A.c)(9),{error:n,onRetry:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(o,{className:`size-6 text-destructive`,"aria-hidden":`true`}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,M.jsx)(`p`,{className:`text-sm font-medium`,children:`Failed to load activity`}),t[1]=a):a=t[1];let s;t[2]===n?s=t[3]:(s=(0,M.jsxs)(`div`,{className:`space-y-1`,children:[a,(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})]}),t[2]=n,t[3]=s);let c;t[4]===r?c=t[5]:(c=(0,M.jsx)(_,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:`Retry`}),t[4]=r,t[5]=c);let l;return t[6]!==s||t[7]!==c?(l=(0,M.jsxs)(`div`,{className:`flex flex-col items-center gap-3 p-6 text-center`,role:`alert`,"data-testid":`activity-panel-error`,children:[i,s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function L(){let e=(0,A.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsx)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,"data-testid":`activity-panel-empty`,children:(0,M.jsx)(`p`,{className:`text-sm italic`,children:`No edits yet.`})}),e[0]=t):t=e[0],t}function be(e){let t=(0,A.c)(8),{onExit:n}=e,r;t[0]===n?r=t[1]:(r=(0,M.jsx)(R,{onClick:n}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:`Agent activity`}),t[2]=i):i=t[2];let a;t[3]===r?a=t[4]:(a=(0,M.jsxs)(`div`,{className:`flex shrink-0 flex-row items-center gap-2 border-b border-border px-3 py-2`,children:[r,i]}),t[3]=r,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,M.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 text-muted-foreground`,children:(0,M.jsx)(`p`,{className:`text-center text-sm italic`,children:`Click an agent's avatar in the presence bar to view their session.`})}),t[5]=o):o=t[5];let s;return t[6]===a?s=t[7]:(s=(0,M.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel-no-agent`,"aria-label":`Agent activity`,children:[a,o]}),t[6]=a,t[7]=s),s}function R(e){let t=(0,A.c)(6),{onClick:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,M.jsx)(b,{}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=(0,M.jsx)(w,{asChild:!0,children:(0,M.jsx)(_,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:n,"aria-label":`Back to document view`,"data-testid":`docpanel-exit-agent-mode`,children:r})}),t[1]=n,t[2]=i);let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,M.jsx)(T,{side:`bottom`,children:`Back to document view`}),t[3]=a):a=t[3];let o;return t[4]===i?o=t[5]:(o=(0,M.jsxs)(E,{children:[i,a]}),t[4]=i,t[5]=o),o}function z(e){let t=(0,A.c)(9),{lastTs:n}=e,[r]=(0,j.useState)(xe),i;t[0]!==n||t[1]!==r?(i=n?Se(r-n):null,t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i,o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,M.jsx)(`span`,{className:`font-medium`,children:`Session ended`}),t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=a?(0,M.jsxs)(`span`,{children:[` · `,a]}):null,t[4]=a,t[5]=s);let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,M.jsx)(`div`,{className:`mt-1 opacity-80`,children:`Undo buttons are disabled — per-session state has been garbage-collected.`}),t[6]=c):c=t[6];let l;return t[7]===s?l=t[8]:(l=(0,M.jsxs)(`div`,{className:`border-b border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,"data-testid":`activity-panel-session-ended`,children:[o,s,c]}),t[7]=s,t[8]=l),l}function xe(){return Date.now()}function Se(e){let t=Math.max(0,e);return t<6e4?`${Math.round(t/1e3)}s ago`:t<36e5?`${Math.round(t/6e4)}m ago`:`${Math.round(t/36e5)}h ago`}function B(e){let t=(0,A.c)(10),{agent:n,size:r}=e,i=r===void 0?28:r,a;t[0]!==n.color||t[1]!==i?(a={backgroundColor:n.color,width:i,height:i},t[0]=n.color,t[1]=i,t[2]=a):a=t[2];let o=i*.57,s=i*.57,c;t[3]!==n.icon||t[4]!==o||t[5]!==s?(c=(0,M.jsx)(x,{icon:n.icon,width:o,height:s}),t[3]=n.icon,t[4]=o,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==c?(l=(0,M.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-full text-white ring-2 ring-background`,style:a,"aria-hidden":`true`,children:c}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function Ce(e){let t=(0,A.c)(20),{data:n,status:r,error:i,reload:a,fetchBurstDiff:o,onExit:s,onNavigate:c,onUndoLast:l,onUndoAll:u}=e,d=n?.files?.[0]?.lastTs??null,f;t[0]===s?f=t[1]:(f=(0,M.jsx)(R,{onClick:s}),t[0]=s,t[1]=f);let p;t[2]===n?p=t[3]:(p=n?.agent?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(B,{agent:n.agent}),(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:n.agent.displayName}),(0,M.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[n.sessionAlive?`Active`:`Ended`,n.files.length>0?` · ${n.files.length} file${n.files.length===1?``:`s`}`:``]})]})]}):(0,M.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,M.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:`Agent activity`})}),t[2]=n,t[3]=p);let m;t[4]!==f||t[5]!==p?(m=(0,M.jsxs)(`div`,{className:`flex flex-row items-center gap-2 border-b border-border px-3 py-2 shrink-0`,children:[f,p]}),t[4]=f,t[5]=p,t[6]=m):m=t[6];let h;t[7]!==n||t[8]!==i||t[9]!==o||t[10]!==d||t[11]!==c||t[12]!==u||t[13]!==l||t[14]!==a||t[15]!==r?(h=(0,M.jsx)(`div`,{className:`flex-1 overflow-y-auto`,"data-testid":`activity-panel-body`,children:r===`loading`&&n===null?(0,M.jsx)(ve,{}):r===`error`&&i?(0,M.jsx)(ye,{error:i,onRetry:a}):n===null?(0,M.jsx)(L,{}):(0,M.jsxs)(M.Fragment,{children:[n.sessionAlive?null:(0,M.jsx)(z,{lastTs:d}),n.files.length===0?(0,M.jsx)(L,{}):n.files.map(e=>(0,M.jsx)(P,{file:e,sessionAlive:n.sessionAlive,isWriting:n.writingDocs.has(e.docName),onNavigate:c,onUndoLast:l,onUndoAll:u,fetchBurstDiff:o},e.docName))]})}),t[7]=n,t[8]=i,t[9]=o,t[10]=d,t[11]=c,t[12]=u,t[13]=l,t[14]=a,t[15]=r,t[16]=h):h=t[16];let g;return t[17]!==m||t[18]!==h?(g=(0,M.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel`,"aria-label":`Agent activity`,children:[m,h]}),t[17]=m,t[18]=h,t[19]=g):g=t[19],g}function V(){let e=(0,A.c)(22),{docPanelAgentId:t,closeActivityPanel:n}=s(),{openDocumentTransition:r}=c(),{data:i,status:a,error:o,reload:l,fetchBurstDiff:u}=ce(t);if(t===null){let t;return e[0]===n?t=e[1]:(t=(0,M.jsx)(be,{onExit:n}),e[0]=n,e[1]=t),t}let d;e[2]===r?d=e[3]:(d=e=>{r(e),I(e)},e[2]=r,e[3]=d);let f=d,p;e[4]!==i||e[5]!==t||e[6]!==l?(p=async e=>{try{await F({connectionId:t,docName:e,scope:`last`,agentName:i?.agent?.displayName}),l()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);C.error(`Undo failed: ${n}`),l()}},e[4]=i,e[5]=t,e[6]=l,e[7]=p):p=e[7];let m=p,h;e[8]!==i||e[9]!==t||e[10]!==l?(h=async e=>{try{await F({connectionId:t,docName:e,scope:`file`,agentName:i?.agent?.displayName}),C.success(`Undone all edits on ${e}`),l()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);C.error(`Undo all failed: ${n}`),l()}},e[8]=i,e[9]=t,e[10]=l,e[11]=h):h=e[11];let g=h,_;return e[12]!==n||e[13]!==i||e[14]!==o||e[15]!==u||e[16]!==f||e[17]!==g||e[18]!==m||e[19]!==l||e[20]!==a?(_=(0,M.jsx)(Ce,{data:i,status:a,error:o,reload:l,fetchBurstDiff:u,onExit:n,onNavigate:f,onUndoLast:m,onUndoAll:g}),e[12]=n,e[13]=i,e[14]=o,e[15]=u,e[16]=f,e[17]=g,e[18]=m,e[19]=l,e[20]=a,e[21]=_):_=e[21],_}export{V as ActivityModeContent};
@@ -1,2 +0,0 @@
1
- import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{t as i}from"./button-C1nwPVFQ.js";import{p as a}from"./dist-OTL8-1C2.js";import{a as o,c as s,i as c,n as l,o as u,s as ee,t as te}from"./dialog-BFN-ujuF.js";import{t as ne}from"./input-BOmkuBId.js";import{n as re,r as d,t as ie}from"./project-paths-Cs3srSjk.js";import{t as ae}from"./textarea-CaFqgjns.js";var oe=r(),f=e(t(),1),p=n(),se=750,ce={root:`You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want.`,home:`You picked your home directory. OK will index everything in your home tree — large and may surface personal files.`,"home-documents":`You picked ~/Documents. OK will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope.`,"home-desktop":`You picked ~/Desktop. OK will index everything on your desktop.`,"home-downloads":`You picked ~/Downloads. Files there are usually transient — consider a stable folder instead.`,"volumes-mount":`This path is on an external volume (/Volumes/...). OK will lose track of files when the drive ejects.`,"drive-root":`This looks like a drive root (e.g., C:\\). Scaffolding here will scan an entire drive.`},m={error:e=>a.error(e)};function le(e){let t=(0,oe.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{store:r,toast:i,payload:a}=n,o=r===void 0?d:r,s=i===void 0?m:i,c;t[2]!==a||t[3]!==o?(c=a??o.getSnapshot(),t[2]=a,t[3]=o,t[4]=c):c=t[4];let l=c;if(!l)return null;let u;return t[5]!==l||t[6]!==o||t[7]!==s?(u=(0,p.jsx)(h,{payload:l,store:o,toast:s}),t[5]=l,t[6]=o,t[7]=s,t[8]=u):u=t[8],u}function h(e){let t=(0,oe.c)(96),{payload:n,store:r,toast:a}=e,[d,ce]=(0,f.useState)(n.defaultContentDir),[m,le]=(0,f.useState)(``),h;t[0]===n.editorOptions?h=t[1]:(h=()=>new Set(n.editorOptions.map(de)),t[0]=n.editorOptions,t[1]=h);let[g,pe]=(0,f.useState)(h),[me,he]=(0,f.useState)(null),[_,v]=(0,f.useState)(!1),[y,ge]=(0,f.useState)(null),b,x;t[2]===d?(b=t[3],x=t[4]):(b=()=>{if(!ie(d)){he(null);return}let e=!1,t=setTimeout(()=>{let t=window.okDesktop;t&&t.onboarding.probeContent({contentDir:d}).then(t=>{e||he(t)}).catch(t=>{e||he({ok:!1,error:t instanceof Error?t.message:`probe failed`})})},se);return()=>{e=!0,clearTimeout(t)}},x=[d],t[2]=d,t[3]=b,t[4]=x),(0,f.useEffect)(b,x);let _e;t[5]===d?_e=t[6]:(_e=ie(d),t[5]=d,t[6]=_e);let S=_e,C=_||!S,w;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(w=function(e){pe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[7]=w):w=t[7];let ve=w,T;t[8]===n.projectDir?T=t[9]:(T=async function(){let e=window.okDesktop;if(!e)return;let t;try{t=await e.dialog.openFolder({defaultPath:n.projectDir})}catch(e){let t=e;ge(t instanceof Error?t.message:`Could not open folder picker`);return}if(t===null)return;let r=re(n.projectDir,t);if(r===null){ge(`Selection must be inside the project`);return}ge(null),ce(r)},t[8]=n.projectDir,t[9]=T);let ye=T,E;t[10]!==m||t[11]!==d||t[12]!==g||t[13]!==r||t[14]!==a?(E=async function(){v(!0);let e=await r.confirm({initGit:!0,contentDir:d,additionalIgnores:m,editorIds:Array.from(g)});e.ok||(a.error(e.error),v(!1))},t[10]=m,t[11]=d,t[12]=g,t[13]=r,t[14]=a,t[15]=E):E=t[15];let be=E,D;t[16]!==be||t[17]!==C?(D=function(e){e.preventDefault(),!C&&be()},t[16]=be,t[17]=C,t[18]=D):D=t[18];let xe=D,O;t[19]!==r||t[20]!==a?(O=async function(){v(!0);let e=await r.cancel();e.ok||(a.error(e.error),v(!1))},t[19]=r,t[20]=a,t[21]=O):O=t[21];let k=O,A;t[22]!==_||t[23]!==k?(A=function(e){!e&&!_&&k()},t[22]=_,t[23]=k,t[24]=A):A=t[24];let Se=A,j;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(s,{children:`Open this folder with Open Knowledge`}),t[25]=j):j=t[25];let M;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsxs)(ee,{children:[j,(0,p.jsxs)(o,{children:[`Open Knowledge will create a `,(0,p.jsx)(`code`,{children:`.ok/`}),` folder to track this project's metadata. Click Start to proceed with the defaults below — adjust any field first, or Cancel to leave the folder untouched.`]})]}),t[26]=M):M=t[26];let N;t[27]!==n.gitRootPromoted||t[28]!==n.pickedPath||t[29]!==n.projectDir?(N=n.gitRootPromoted?(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`OK will be initialized at `,(0,p.jsx)(`code`,{children:n.projectDir}),` — the parent of`,` `,(0,p.jsx)(`code`,{children:re(n.projectDir,n.pickedPath)??n.pickedPath}),` `,`because it contains a `,(0,p.jsx)(`code`,{children:`.git`}),` folder (one .ok/ per git repo).`,` `,(0,p.jsx)(`code`,{children:`Content directory`}),` defaults to `,(0,p.jsx)(`code`,{children:`.`}),` (the whole repo); type a sub-folder below to narrow it.`]}):null,t[27]=n.gitRootPromoted,t[28]=n.pickedPath,t[29]=n.projectDir,t[30]=N):N=t[30];let P;t[31]===n.warnings?P=t[32]:(P=n.warnings.length>0?(0,p.jsx)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:n.warnings.map(ue)}):null,t[31]=n.warnings,t[32]=P);let Ce;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,p.jsx)(`label`,{htmlFor:`consent-content-dir`,className:`mb-1 block text-sm font-medium`,children:`Content directory`}),t[33]=Ce):Ce=t[33];let F;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{ce(e.target.value),ge(null)},t[34]=F):F=t[34];let we=!S,I;t[35]!==_||t[36]!==d||t[37]!==we?(I=(0,p.jsx)(ne,{id:`consent-content-dir`,value:d,onChange:F,disabled:_,"aria-invalid":we,"data-testid":`consent-content-dir`,className:`flex-1`}),t[35]=_,t[36]=d,t[37]=we,t[38]=I):I=t[38];let L;t[39]===ye?L=t[40]:(L=()=>void ye(),t[39]=ye,t[40]=L);let R;t[41]!==_||t[42]!==L?(R=(0,p.jsx)(i,{type:`button`,variant:`outline`,disabled:_,onClick:L,"data-testid":`consent-content-dir-browse`,children:`Browse`}),t[41]=_,t[42]=L,t[43]=R):R=t[43];let z;t[44]!==I||t[45]!==R?(z=(0,p.jsxs)(`div`,{className:`flex items-stretch gap-2`,children:[I,R]}),t[44]=I,t[45]=R,t[46]=z):z=t[46];let B;t[47]!==y||t[48]!==S||t[49]!==me?(B=y===null?S?(0,p.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,"data-testid":`consent-preview`,children:fe(me)}):(0,p.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,"data-testid":`consent-content-dir-error`,children:`Content directory must be inside the project`}):(0,p.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,"data-testid":`consent-content-dir-browse-error`,children:y}),t[47]=y,t[48]=S,t[49]=me,t[50]=B):B=t[50];let V;t[51]!==z||t[52]!==B?(V=(0,p.jsxs)(`div`,{children:[Ce,z,B]}),t[51]=z,t[52]=B,t[53]=V):V=t[53];let H;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,p.jsx)(`label`,{htmlFor:`consent-additional-ignores`,className:`mb-1 block text-sm font-medium`,children:`Ignore patterns`}),t[54]=H):H=t[54];let U;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(U=e=>le(e.target.value),t[55]=U):U=t[55];let W;t[56]!==m||t[57]!==_?(W=(0,p.jsx)(ae,{id:`consent-additional-ignores`,value:m,onChange:U,disabled:_,placeholder:`tmp/
2
- *.draft.md`,rows:3,"data-testid":`consent-additional-ignores`}),t[56]=m,t[57]=_,t[58]=W):W=t[58];let Te;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,p.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`One pattern per line — appended to `,(0,p.jsx)(`code`,{children:`.okignore`}),`.`]}),t[59]=Te):Te=t[59];let G;t[60]===W?G=t[61]:(G=(0,p.jsxs)(`div`,{children:[H,W,Te]}),t[60]=W,t[61]=G);let Ee;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,p.jsx)(`legend`,{className:`text-sm font-medium`,children:`Connect to AI tools`}),t[62]=Ee):Ee=t[62];let De;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,p.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`All editors are checked by default — uncheck the ones you don't use. Each checked editor's project-MCP config is written; the Claude Code entry also scaffolds`,` `,(0,p.jsx)(`code`,{children:`.claude/launch.json`}),`.`]}),t[63]=De):De=t[63];let K;if(t[64]!==_||t[65]!==g||t[66]!==n.editorOptions){let e;t[68]!==_||t[69]!==g?(e=e=>(0,p.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,p.jsx)(`input`,{type:`checkbox`,checked:g.has(e.id),onChange:()=>ve(e.id),disabled:_,className:`size-4 shrink-0 rounded accent-primary`,"data-testid":`consent-editor-${e.id}`}),(0,p.jsx)(`span`,{children:e.label}),(0,p.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`consent-editor-${e.id}-scope`,children:e.hasProjectConfig?`(project + user)`:`(user-level only)`})]},e.id),t[68]=_,t[69]=g,t[70]=e):e=t[70],K=n.editorOptions.map(e),t[64]=_,t[65]=g,t[66]=n.editorOptions,t[67]=K}else K=t[67];let q;t[71]===K?q=t[72]:(q=(0,p.jsxs)(`fieldset`,{className:`space-y-2 pb-2`,children:[Ee,De,K]}),t[71]=K,t[72]=q);let J;t[73]!==N||t[74]!==P||t[75]!==V||t[76]!==G||t[77]!==q?(J=(0,p.jsxs)(l,{className:`space-y-4`,children:[N,P,V,G,q]}),t[73]=N,t[74]=P,t[75]=V,t[76]=G,t[77]=q,t[78]=J):J=t[78];let Y;t[79]===k?Y=t[80]:(Y=()=>void k(),t[79]=k,t[80]=Y);let X;t[81]!==_||t[82]!==Y?(X=(0,p.jsx)(i,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:Y,disabled:_,"data-testid":`consent-cancel`,children:`Cancel`}),t[81]=_,t[82]=Y,t[83]=X):X=t[83];let Z;t[84]===C?Z=t[85]:(Z=(0,p.jsx)(i,{type:`submit`,disabled:C,"data-testid":`consent-start`,children:`Start`}),t[84]=C,t[85]=Z);let Q;t[86]!==X||t[87]!==Z?(Q=(0,p.jsxs)(u,{children:[X,Z]}),t[86]=X,t[87]=Z,t[88]=Q):Q=t[88];let $;t[89]!==xe||t[90]!==J||t[91]!==Q?($=(0,p.jsxs)(c,{className:`sm:max-w-lg motion-reduce:duration-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none`,children:[M,(0,p.jsxs)(`form`,{onSubmit:xe,"data-testid":`consent-form`,className:`flex min-h-0 flex-1 flex-col`,children:[J,Q]})]}),t[89]=xe,t[90]=J,t[91]=Q,t[92]=$):$=t[92];let Oe;return t[93]!==Se||t[94]!==$?(Oe=(0,p.jsx)(te,{open:!0,onOpenChange:Se,children:$}),t[93]=Se,t[94]=$,t[95]=Oe):Oe=t[95],Oe}function ue(e){return(0,p.jsx)(`p`,{className:`mb-1 last:mb-0`,children:ce[e.kind]},e.kind)}function de(e){return e.id}function fe(e){if(e===null)return`Counting markdown files`;if(!e.ok)return`Preview unavailable: ${e.error}`;let t=e.truncated?`≥ 50,000`:String(e.count);return e.sample.length===0?`Found ${t} markdown files`:`Found ${t} markdown files; sample: ${e.sample.join(`, `)}`}export{le as default};