@symerian/symi 3.4.30 → 3.4.32
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/{agent-O3PihJOY.js → agent-BaSGoKPq.js} +17 -17
- package/dist/{agent-tdS4G7e8.js → agent-C8IIjDyn.js} +21 -21
- package/dist/{agent-scope-Ck_TLGsV.js → agent-scope-B6p555mP.js} +1 -1
- package/dist/{agent-scope-DJI5ijOw.js → agent-scope-DIjW66iO.js} +3 -3
- package/dist/{agents-C2MpIr16.js → agents-D6Ygz9ED.js} +12 -12
- package/dist/{agents.config-PPeqGzAc.js → agents.config-D1nFwU81.js} +1 -1
- package/dist/{agents.config-LRW5SZoE.js → agents.config-D7cHU-OU.js} +1 -1
- package/dist/{audit-TmPjr_wD.js → audit-BI8Rbs5q.js} +19 -19
- package/dist/{audit-yf3H4Y1h.js → audit-nqP-JeOr.js} +17 -17
- package/dist/{auth-BSmNj-Lv.js → auth-BbwD4lRX.js} +1 -1
- package/dist/{auth-choice-Bw2Kd6RM.js → auth-choice-BBrEzoy2.js} +8 -8
- package/dist/{auth-choice-CyBcsQ9T.js → auth-choice-Bx4Duu6u.js} +8 -8
- package/dist/{auth-profiles-C1lvfaCM.js → auth-profiles-BFSVvFKy.js} +6 -6
- package/dist/{auth-profiles-BG_wMJz6.js → auth-profiles-Bs5D0GUv.js} +4 -4
- package/dist/{auth-token-C0-TDuag.js → auth-token-Brb1Askz.js} +2 -2
- package/dist/{auth-token-BwQ5Nv4O.js → auth-token-SebYuqfR.js} +2 -2
- package/dist/{banner-D7__HlM-.js → banner-l9GjW5Rm.js} +2 -2
- package/dist/{bindings-D5s2VRjL.js → bindings-9LSA3Jr1.js} +1 -1
- package/dist/{bonjour-discovery-YoubCASb.js → bonjour-discovery-BTpm6P8H.js} +1 -1
- package/dist/{bonjour-discovery-CPzedvdf.js → bonjour-discovery-CU1mz7AC.js} +2 -2
- package/dist/{browser-cli-R6JagRCf.js → browser-cli-BAxOL41p.js} +22 -22
- package/dist/{browser-cli-B_6WWHm_.js → browser-cli-Bk8DxxeA.js} +13 -13
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +4 -4
- package/dist/bundled/session-memory/handler.js +4 -4
- package/dist/{call-IfleM0ap.js → call-5IE9ycvm.js} +3 -4
- package/dist/{call-sikajorp.js → call-BPJn2_th.js} +5 -6
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{catalog-DgsRZ5Yu.js → catalog-CJzUbDcX.js} +2 -2
- package/dist/{catalog-Bc0hKvgn.js → catalog-CSgSg5Gp.js} +2 -2
- package/dist/{channel-options-DrHwfPTb.js → channel-options-COanIUoQ.js} +5 -5
- package/dist/{channel-options-B5974x-7.js → channel-options-DGUqfnbP.js} +2 -2
- package/dist/{channel-selection-Cc4Pvn6b.js → channel-selection-BvIcXQLj.js} +2 -2
- package/dist/{channels-cli-D50PQAPc.js → channels-cli-B1zmnm5a.js} +83 -83
- package/dist/{channels-cli-C6Nv9mzy.js → channels-cli-CZ3M3yE1.js} +62 -62
- package/dist/{channels-status-issues-VZcSU4qT.js → channels-status-issues-DC8vgOMo.js} +1 -1
- package/dist/{chrome-DJCkCRLf.js → chrome-B0wRtBRB.js} +3 -3
- package/dist/{chrome-DT1fIVG1.js → chrome-B4P7ycw5.js} +7 -7
- package/dist/{chrome-CPSDqbK6.js → chrome-CQn8fDIy.js} +7 -7
- package/dist/{chrome-BM8HZu2p.js → chrome-VbDUdW0_.js} +4 -4
- package/dist/{chunk-D2_aCcvs.js → chunk-DQGU0F8t.js} +1 -1
- package/dist/{clack-prompter-BwhCW0Jc.js → clack-prompter-CWQQn_CK.js} +5 -5
- package/dist/cli-C7I5uEFC.js +128 -0
- package/dist/{cli-DZoms4qg.js → cli-CC5GrdTI.js} +52 -52
- package/dist/{client-Bcz3rG5V.js → client-Dp8LUTmF.js} +3 -5
- package/dist/{client-BzacpVvW.js → client-qjXXRKCO.js} +5 -7
- package/dist/{clipboard-Dz-Ob0yt.js → clipboard-McRwF3r0.js} +1 -1
- package/dist/{command-format-6B5tP-i9.js → command-format-Xm6vX3qJ.js} +1 -1
- package/dist/{command-registry--D98SJ6k.js → command-registry-D8fj6th4.js} +12 -12
- package/dist/{commands-DgyiLrAe.js → commands-B3UrgxIz.js} +2 -2
- package/dist/{commands-BN08daX-.js → commands-CHkx0oTl.js} +1 -1
- package/dist/{commands-registry-Bbs_ugoi.js → commands-registry-BNCcZy2y.js} +5 -5
- package/dist/{commands-registry-QB7xD3bc.js → commands-registry-Bccp0eH5.js} +3 -3
- package/dist/{completion-cli-CHYvpIPw.js → completion-cli-BxspmuYm.js} +3 -3
- package/dist/{completion-cli-QxWULepB.js → completion-cli-C-85b5b8.js} +4 -4
- package/dist/{config-vtCLkS2w.js → config-DqMsGcSQ.js} +7 -21
- package/dist/{config-cli-CcZo2229.js → config-cli-BqzjDmIH.js} +13 -13
- package/dist/{config-cli-DstpcB33.js → config-cli-DSDGwckX.js} +12 -12
- package/dist/{config-guard-CC-lFWDU.js → config-guard-CJcSKMuP.js} +21 -21
- package/dist/{config-guard-CCJrDmON.js → config-guard-Cu-dwAgi.js} +4 -4
- package/dist/{config-BTSBEAnk.js → config-igdtSRrZ.js} +10 -24
- package/dist/{config-validation-DSnQNdDO.js → config-validation-Bp2wJ610.js} +1 -1
- package/dist/{config-validation-YCrMlM9Z.js → config-validation-Bs1Gp2oG.js} +2 -2
- package/dist/{configure-B-UvSZZ7.js → configure-BazJdwKU.js} +14 -14
- package/dist/{configure-C4Qjzxdq.js → configure-Dl1f1Den.js} +25 -25
- package/dist/{consolidate-CPVaVTv0.js → consolidate-7Usm-b2g.js} +4 -4
- package/dist/{control-service-CwRG4M_O.js → control-service-DO8FjrS6.js} +4 -4
- package/dist/{control-service--TrXUUt_.js → control-service-Fn3d9AlH.js} +5 -5
- package/dist/{control-ui-assets-DI1jLkM6.js → control-ui-assets-DUhvOLUL.js} +2 -2
- package/dist/{cron-cli-DUETe3Of.js → cron-cli-DXgI5Lid.js} +10 -10
- package/dist/{cron-cli-BfUM5_Kw.js → cron-cli-DZyH2BfZ.js} +19 -19
- package/dist/{daemon-cli-DRDkDw_M.js → daemon-cli-C6FSROt1.js} +18 -18
- package/dist/{daemon-cli-Dy5eY4M7.js → daemon-cli-DmMYx5Uf.js} +10 -10
- package/dist/daemon-cli.js +0 -3
- package/dist/{daemon-runtime-ChztAKDA.js → daemon-runtime-2Y9RfgcP.js} +2 -2
- package/dist/{daemon-runtime-CqMnoGym.js → daemon-runtime-BpfA4d6Q.js} +2 -2
- package/dist/{deliver-59sRVaYQ.js → deliver-BkCYBlzi.js} +4 -4
- package/dist/{deliver-Mqq3tgqB.js → deliver-DvW5xHHr.js} +4 -4
- package/dist/{deliver-fvcQPsBc.js → deliver-RwovDEDy.js} +8 -8
- package/dist/{deliver-BHmK4isn.js → deliver-izdrXPr4.js} +5 -5
- package/dist/{delivery-queue-Du1ukE9B.js → delivery-queue-DDs84baU.js} +1 -1
- package/dist/{delivery-queue-Bqja5xKq.js → delivery-queue-nheCYaMd.js} +1 -1
- package/dist/{deps-CeHgkkO6.js → deps-bCHNuszw.js} +1 -1
- package/dist/{devices-cli-DV8wT4cj.js → devices-cli-D6xXc9Ym.js} +17 -17
- package/dist/{devices-cli-BCZ2HHjT.js → devices-cli-IMv-0zor.js} +9 -9
- package/dist/{diagnostic-Db9MI5bh.js → diagnostic-CwF3MnBL.js} +1 -1
- package/dist/{diagnostics-B9e2Kvx8.js → diagnostics-DxdqTfpW.js} +1 -1
- package/dist/{directory-cli-BVGd0l0T.js → directory-cli-3wlYB9In.js} +7 -7
- package/dist/{directory-cli-B6Ja7314.js → directory-cli-ClbYhd6z.js} +17 -17
- package/dist/{dm-policy-shared-Bjdk2L7B.js → dm-policy-shared-5HLej1br.js} +2 -2
- package/dist/{dm-policy-shared-BBTioONS.js → dm-policy-shared-CSF4Tw_F.js} +1 -1
- package/dist/{dns-cli-MEjZBWpL.js → dns-cli-CY2voLuR.js} +14 -14
- package/dist/{dns-cli-DH-ksmiI.js → dns-cli-CoVIqRWx.js} +8 -8
- package/dist/{dock-CSF4Y7tm.js → dock-CnGWTXL4.js} +2 -2
- package/dist/{docs-cli-BuX8FDdh.js → docs-cli-CFklWCND.js} +5 -5
- package/dist/{docs-cli-Cc3Rhfkx.js → docs-cli-DjQ3SvBq.js} +8 -8
- package/dist/{doctor-completion-rBc-f29C.js → doctor-completion-BwHbIZjF.js} +2 -2
- package/dist/{doctor-completion-C4Sf8CFV.js → doctor-completion-CX7LjkOD.js} +2 -2
- package/dist/{doctor-config-flow-CrnteetS.js → doctor-config-flow-CYDx1U0Z.js} +7 -7
- package/dist/{doctor-config-flow-BhmF6EAq.js → doctor-config-flow-wvoEFNeZ.js} +8 -8
- package/dist/entry.js +4 -7
- package/dist/{env-DoZWjLUy.js → env-B97Ms861.js} +1 -1
- package/dist/{exec-BcMHopF9.js → exec-DKyLtSjm.js} +2 -2
- package/dist/{exec-approvals-BndOYKTM.js → exec-approvals-B8n8es8o.js} +1 -1
- package/dist/{exec-approvals-BZBjOrJL.js → exec-approvals-CZOc8M5w.js} +1 -1
- package/dist/{exec-approvals-cli-Bqh3x_d1.js → exec-approvals-cli-B_P-1zVp.js} +24 -24
- package/dist/{exec-approvals-cli-CyXTXgft.js → exec-approvals-cli-Dy1jvh2M.js} +16 -16
- package/dist/extensionAPI.js +4 -4
- package/dist/{fetch-guard-BuQQKfW1.js → fetch-guard-DG6T0ZdL.js} +1 -1
- package/dist/{frontmatter-BH3ExkUY.js → frontmatter-B4levtVg.js} +2 -2
- package/dist/{gateway-cli-BrcMZGyF.js → gateway-cli-CTcK1Az2.js} +113 -114
- package/dist/{gateway-cli-fT43bqlv.js → gateway-cli-CW-Z71cE.js} +88 -89
- package/dist/{gateway-rpc-BEqCo2JK.js → gateway-rpc-C1xjWlxu.js} +1 -1
- package/dist/{gateway-rpc-cpgRv0Yq.js → gateway-rpc-DD_aXogj.js} +3 -3
- package/dist/{github-copilot-token-DIIEouRg.js → github-copilot-token-BTNK6Tcd.js} +1 -1
- package/dist/{github-copilot-token-CrM1aEWo.js → github-copilot-token-a6a53zx_.js} +1 -1
- package/dist/{glass-ui-ws-dERcmtve.js → glass-ui-ws-BNJkhJrL.js} +96 -96
- package/dist/{glass-ui-ws-BfMKuf9v.js → glass-ui-ws-BZvH4MBO.js} +68 -68
- package/dist/{gmail-setup-utils-Cz9Tb30q.js → gmail-setup-utils-B1BYpISg.js} +2 -2
- package/dist/{gmail-setup-utils-5bVmaBiu.js → gmail-setup-utils-fA1VaWLv.js} +3 -3
- package/dist/{health-Bpjd5_Oq.js → health-D8cKia4i.js} +10 -10
- package/dist/{health-DDxrkioj.js → health-DdzNc1yA.js} +5 -5
- package/dist/{health-format-BQcmGV4C.js → health-format-39e76m9p.js} +1 -1
- package/dist/{help-format-Bm9CoBSa.js → help-format-BI_G2p1e.js} +1 -1
- package/dist/{hooks-cli-Bkp-j7h6.js → hooks-cli-DkP3Y4ou.js} +76 -76
- package/dist/{hooks-cli-Btgk__9z.js → hooks-cli-qO421UdO.js} +59 -59
- package/dist/{hooks-status-BjjfBQnp.js → hooks-status-COU9Cw9_.js} +2 -2
- package/dist/{hooks-status-BaV4_YaJ.js → hooks-status-uaFS2SUa.js} +3 -3
- package/dist/{image-ops-CiGlXf65.js → image-ops-C-gIIp7Q.js} +1 -1
- package/dist/index.js +81 -81
- package/dist/{inspect-B_hklr0u.js → inspect-BDzd6yBs.js} +1 -1
- package/dist/{installs-DjzewzNC.js → installs-DhSLZRT7.js} +2 -2
- package/dist/{installs-B7y-N4mr.js → installs-cPraL4Dg.js} +2 -2
- package/dist/{lifecycle-core-CHB-QdED.js → lifecycle-core-BEmljRfh.js} +7 -7
- package/dist/{lifecycle-core-B0tG8ERp.js → lifecycle-core-uN2bsrZs.js} +3 -3
- package/dist/{links-Bmkpld9F.js → links-CSaUKNKm.js} +1 -1
- package/dist/{links-D4w-tJYZ.js → links-Db3Rw0Tg.js} +1 -1
- package/dist/llm-slug-generator.js +4 -4
- package/dist/{local-roots-DSeNuIW-.js → local-roots-Bk3321gv.js} +2 -2
- package/dist/{local-roots-lknhM9c3.js → local-roots-BnDnugq3.js} +3 -3
- package/dist/{logging-miJdTAeb.js → logging-B96FQvnn.js} +2 -2
- package/dist/{logging-DrqPd0Fg.js → logging-BeA4q4J_.js} +1 -1
- package/dist/{logs-cli-CUhZrDw7.js → logs-cli-BB0Mq8D1.js} +11 -11
- package/dist/{logs-cli-CGcdfvBo.js → logs-cli-Dbmzz8m_.js} +18 -18
- package/dist/{manager-BeNnzSJv.js → manager-BD_cpL9b.js} +1 -1
- package/dist/{manager-Di9qtuZF.js → manager-BQaZlWzK.js} +6 -6
- package/dist/{manager-uBAL1G42.js → manager-D0NIHMuQ.js} +1 -1
- package/dist/{manager-DqMx0qDw.js → manager-DOiW-Koo.js} +9 -9
- package/dist/{manifest-registry-0FO1WTmC.js → manifest-registry-DJcKcUQ9.js} +1 -1
- package/dist/{manifest-registry-DYQQ9Cci.js → manifest-registry-D_LsBSyt.js} +1 -1
- package/dist/{markdown-tables-Ca1j7TYS.js → markdown-tables-GTLvbzuR.js} +1 -1
- package/dist/{memory-BDeydRz3.js → memory-Cl4I_45k.js} +6 -6
- package/dist/{memory-cli-D4hZiGr5.js → memory-cli-CszP57Ee.js} +8 -8
- package/dist/{memory-cli-BXclq7qt.js → memory-cli-DkD_OD70.js} +13 -13
- package/dist/{memory-BXoRMmVn.js → memory-kIYeV9aO.js} +7 -7
- package/dist/{message-channel-BqrA0uMO.js → message-channel-C_V8IAYx.js} +1 -1
- package/dist/{model-DibfNW71.js → model-BRcKPW49.js} +1 -1
- package/dist/{model-Czbmn47-.js → model-DgN15006.js} +1 -1
- package/dist/{model-catalog-DPnCNs5N.js → model-catalog-C2rNhRI4.js} +4 -4
- package/dist/{model-catalog-Ds0dg_ob.js → model-catalog-CaGfL-2g.js} +4 -4
- package/dist/{model-picker-DuPommMc.js → model-picker-4NUXHy8M.js} +3 -3
- package/dist/{model-picker-BbaEgNir.js → model-picker-CV56GE8A.js} +3 -3
- package/dist/{models-B0wNKA18.js → models-BYi0Fo1a.js} +21 -21
- package/dist/{models-cli-CZY5Me88.js → models-cli-Bn9M1TgO.js} +83 -83
- package/dist/{models-cli-CL5K06Wu.js → models-cli-EdjvkvFO.js} +59 -59
- package/dist/{models-config-Box19p27.js → models-config-Unnduxgs.js} +3 -3
- package/dist/{models-config-CPlvO1b0.js → models-config-yKxNCn4V.js} +3 -3
- package/dist/{node-cli-BFBfD3vK.js → node-cli-39H0MZ8q.js} +36 -36
- package/dist/{node-cli-CWWMajKF.js → node-cli-C8FYMIjN.js} +21 -21
- package/dist/{node-service-CkP4-uRI.js → node-service-tPO_yUk7.js} +1 -1
- package/dist/{nodes-cli-BY4Ppctn.js → nodes-cli-C-03nIJ0.js} +22 -22
- package/dist/{nodes-cli-YmE7S-JB.js → nodes-cli-CqxQexTU.js} +14 -14
- package/dist/{nodes-screen-BfQScwqX.js → nodes-screen-Bkq2kswx.js} +2 -2
- package/dist/{nodes-screen-BMUoHTPZ.js → nodes-screen-JELuBMBi.js} +1 -1
- package/dist/{note-C4Pc_hIl.js → note-CHrtEumO.js} +2 -2
- package/dist/{npm-registry-spec-C8W7KCAB.js → npm-registry-spec-BXw_6vF6.js} +2 -2
- package/dist/{npm-registry-spec-s-9OX2Kw.js → npm-registry-spec-NLo2PCol.js} +1 -1
- package/dist/{onboard-DjlI4mIw.js → onboard-C8IQnigm.js} +19 -19
- package/dist/{onboard-HqUZVKyD.js → onboard-CAIujkV7.js} +13 -13
- package/dist/{onboard-channels-BbF5-N3g.js → onboard-channels-B2l6OoMg.js} +7 -7
- package/dist/{onboard-channels-C5EUFcLq.js → onboard-channels-D_uUQbem.js} +9 -9
- package/dist/{onboard-custom-C-6Cooq5.js → onboard-custom-B2fJvyxt.js} +3 -3
- package/dist/{onboard-custom-63SI3jrk.js → onboard-custom-DcZ2SEUv.js} +3 -3
- package/dist/{onboard-helpers-Cb3WFLl9.js → onboard-helpers-Bm-oyLWy.js} +5 -5
- package/dist/{onboard-helpers-Bpa6_3vl.js → onboard-helpers-CHfdRdZR.js} +9 -9
- package/dist/{onboard-hooks-ggR6fsQs.js → onboard-hooks-DBYkemjF.js} +8 -8
- package/dist/{onboard-hooks-DXXg3YH9.js → onboard-hooks-DgRzMz0E.js} +5 -5
- package/dist/{onboard-remote-Cnxe89N8.js → onboard-remote-ecyetiyL.js} +3 -3
- package/dist/{onboard-remote-CqtCrqtm.js → onboard-remote-z8XLK4M0.js} +3 -3
- package/dist/{onboard-skills-D5Ww8pwO.js → onboard-skills-BLvL0KPR.js} +4 -4
- package/dist/{onboard-skills-CS3l5fhH.js → onboard-skills-C53RGq_5.js} +5 -5
- package/dist/{onboarding-BPmsmDud.js → onboarding-4v9LJueP.js} +18 -18
- package/dist/{onboarding-Be_HJIFA.js → onboarding-BIq5BxG0.js} +16 -16
- package/dist/{onboarding.finalize-QwO5yuPm.js → onboarding.finalize-Bkcwe5RS.js} +51 -51
- package/dist/{onboarding.finalize-dsCUTKCQ.js → onboarding.finalize-CXAQzVXM.js} +32 -32
- package/dist/{onboarding.gateway-config-BZDShYzP.js → onboarding.gateway-config-3JMN1xRf.js} +22 -22
- package/dist/{onboarding.gateway-config-Ctd1_QW4.js → onboarding.gateway-config-Ft3f6Jba.js} +11 -11
- package/dist/{openai-model-default-Dxlm7Pvs.js → openai-model-default-BVPmAuXK.js} +3 -3
- package/dist/{openai-model-default-DT9-42Xb.js → openai-model-default-CDDFpxUr.js} +3 -3
- package/dist/{outbound-send-deps-DPsU_Xdy.js → outbound-send-deps-Dmc3B-LK.js} +1 -1
- package/dist/{pairing-cli-PtlNv7Gr.js → pairing-cli-B_icqS8Y.js} +9 -9
- package/dist/{pairing-cli-C1TeY-2m.js → pairing-cli-CJGA4j6G.js} +15 -15
- package/dist/{pairing-store-5oyzSW2X.js → pairing-store-BGf29nPx.js} +4 -4
- package/dist/{pairing-store-B9MEud_Y.js → pairing-store-CtBnCGHZ.js} +2 -2
- package/dist/{pairing-token-Cup-49D-.js → pairing-token-Bnr7QjVF.js} +1 -1
- package/dist/{pairing-token-BaZLnDjo.js → pairing-token-CURbSHdi.js} +1 -1
- package/dist/{path-env-C8hRAfiL.js → path-env-DuQralyy.js} +1 -1
- package/dist/{paths-By0XjHBk.js → paths-BSzKwaxE.js} +1 -4
- package/dist/{paths-BldkKgCk.js → paths-CJcw9nbZ.js} +1 -1
- package/dist/{paths-gcw23t43.js → paths-CNexk5_o.js} +1 -1
- package/dist/{paths-7zaGPdLp.js → paths-CsQkeUQ3.js} +1 -1
- package/dist/{paths-DeDKrl27.js → paths-Dc6A9_vI.js} +1 -1
- package/dist/{pi-auth-json-BOXWkXms.js → pi-auth-json-CUZ7IgY7.js} +1 -1
- package/dist/{pi-auth-json-DVUJqaKg.js → pi-auth-json-SHGGQzOL.js} +1 -1
- package/dist/{pi-embedded-Cp7d6jtB.js → pi-embedded-CGebiST2.js} +10 -13
- package/dist/{pi-embedded-helpers-CVKIHnFv.js → pi-embedded-helpers-BwBjqJM5.js} +2 -2
- package/dist/{pi-embedded-helpers-DMVyRPBT.js → pi-embedded-helpers-CAdI9wJ5.js} +4 -4
- package/dist/{pi-tools.policy-8_wTu7v2.js → pi-tools.policy-BaRznBvu.js} +3 -3
- package/dist/{pi-tools.policy-C5aC-K5q.js → pi-tools.policy-Dyx3nBmp.js} +5 -5
- package/dist/{plugin-auto-enable-CYoZQPJO.js → plugin-auto-enable-D2TNEv3x.js} +4 -4
- package/dist/{plugin-auto-enable-BWd5lJQf.js → plugin-auto-enable-DSliW8o4.js} +3 -3
- package/dist/{plugin-registry-BG51uZOA.js → plugin-registry-D7ACpV2Y.js} +3 -3
- package/dist/{plugin-registry-BouuQy-X.js → plugin-registry-d4hMhLLZ.js} +5 -5
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +2 -5
- package/dist/plugin-sdk/gateway/protocol/schema/logs-chat.d.ts +0 -1
- package/dist/{plugins-CypN_04v.js → plugins-DuuHorqi.js} +1 -1
- package/dist/{plugins-cli-Bk7Al8u3.js → plugins-cli-CPf1hMaZ.js} +76 -76
- package/dist/{plugins-cli-B-zVOiQN.js → plugins-cli-D1gd8p9T.js} +58 -58
- package/dist/{ports-BgvsHTN5.js → ports-BAzQoIw0.js} +2 -2
- package/dist/{ports-YkSuli-C.js → ports-Cv4kt1bT.js} +1 -1
- package/dist/{ports-BxtK6PMH.js → ports-DRHSHvqY.js} +2 -2
- package/dist/{ports-CduvYJlk.js → ports-DqxP-bXz.js} +3 -3
- package/dist/{program-BOh0XGsA.js → program-C19G7o-Q.js} +63 -63
- package/dist/{program-context-D73fzUUe.js → program-context-BSUkEz3n.js} +39 -39
- package/dist/{progress-B3rWk9lR.js → progress-CyPyGCDn.js} +2 -2
- package/dist/{prompt-select-styled-Bz1VV3Qu.js → prompt-select-styled-B5wlPYN5.js} +40 -40
- package/dist/{prompt-select-styled-Bj-hrPCx.js → prompt-select-styled-CnYM7W0j.js} +24 -24
- package/dist/{prompt-style-LtRrtcTi.js → prompt-style-Cad0BDRS.js} +1 -1
- package/dist/{provider-auth-helpers-BK6NFk2Q.js → provider-auth-helpers-BUC4xGK9.js} +5 -5
- package/dist/{provider-auth-helpers-D3hXI6HN.js → provider-auth-helpers-DpRoNr_8.js} +7 -7
- package/dist/{push-apns-C1guJr4R.js → push-apns-Bm39oOO9.js} +5 -5
- package/dist/{push-apns-CMxk3Hxf.js → push-apns-DqmFEcqh.js} +3 -3
- package/dist/{pw-ai-CE2TBGif.js → pw-ai-B0-pgbYu.js} +9 -9
- package/dist/{pw-ai-EtT_bBJY.js → pw-ai-B2NuWIL7.js} +13 -13
- package/dist/{pw-ai-w6Qalz1W.js → pw-ai-BB1pJj9_.js} +1 -1
- package/dist/{pw-ai-C5MJKzUM.js → pw-ai-BsEf8C15.js} +1 -1
- package/dist/{qmd-manager--xIse9H_.js → qmd-manager--kGuC39q.js} +4 -4
- package/dist/{qmd-manager-DgCmfS8D.js → qmd-manager-358OTDns.js} +8 -8
- package/dist/{qr-cli-BeHlC33g.js → qr-cli-Cx7DYTSk.js} +5 -5
- package/dist/{qr-cli-zto9YWnY.js → qr-cli-hPIeUYAT.js} +11 -11
- package/dist/{redact-identifier-B1VHIbnd.js → redact-identifier-Cm1VfV7E.js} +4 -4
- package/dist/{register.agent-CNhg2KUt.js → register.agent-CCKcgAXs.js} +91 -91
- package/dist/{register.agent-COv5OPLQ.js → register.agent-DZuxoC0a.js} +71 -71
- package/dist/register.configure-CJErdFO_.js +129 -0
- package/dist/register.configure-JT8T7HO5.js +125 -0
- package/dist/{register.maintenance-BAK-DiQY.js → register.maintenance-CKsv0lok.js} +70 -70
- package/dist/{register.maintenance-B_slxJa6.js → register.maintenance-DDzKUGYJ.js} +98 -98
- package/dist/{register.message-Bbtej3vy.js → register.message-CpOXi1rz.js} +74 -74
- package/dist/{register.message-CCBmn5ja.js → register.message-_bfhetTg.js} +55 -55
- package/dist/{register.onboard-Cu2KnArg.js → register.onboard-BHtTh0b_.js} +42 -42
- package/dist/{register.onboard-B3jO_Goy.js → register.onboard-CkIM3hU7.js} +24 -24
- package/dist/{register.setup-Ca6zdWpf.js → register.setup-CLhdFQHW.js} +42 -42
- package/dist/{register.setup-CYSISTDO.js → register.setup-CYtYDKMU.js} +27 -27
- package/dist/{register.status-health-sessions-D9p0ClqJ.js → register.status-health-sessions-DZnebsxZ.js} +60 -60
- package/dist/{register.status-health-sessions-CGbg9k6d.js → register.status-health-sessions-DmX0DLAt.js} +39 -39
- package/dist/{register.subclis-loifbhVx.js → register.subclis-CnDo2jzv.js} +29 -29
- package/dist/{registry-Sbac4a4z.js → registry-DKJLAPDB.js} +2 -2
- package/dist/{replies-PetyGT0p.js → replies-B2O2eRh6.js} +3 -3
- package/dist/{replies-Dj640LxQ.js → replies-DIHkSwoW.js} +2 -2
- package/dist/{reply-prefix-CXsO5E1Z.js → reply-prefix-B7pYEiW_.js} +1 -1
- package/dist/{reply-prefix-DKeEUCUp.js → reply-prefix-BOdARKaY.js} +1 -1
- package/dist/{resolve-route-8JoEBwi6.js → resolve-route-CRWE36h5.js} +4 -4
- package/dist/{resolve-route-BcYnh5es.js → resolve-route-DNKcB7Q9.js} +1 -1
- package/dist/{routes-CJ4en0jL.js → routes-BMShi_eY.js} +7 -7
- package/dist/{routes-B5y-oAKp.js → routes-Cio8is5Y.js} +5 -5
- package/dist/{rpc-qWm1bRo5.js → rpc-CEhoSTGo.js} +1 -1
- package/dist/{rpc-ElDiKzq4.js → rpc-D0Ldc6Hv.js} +3 -3
- package/dist/{run-main-B7Ria3zD.js → run-main-BIRbWKyA.js} +73 -73
- package/dist/{runtime-guard-oeRbIq84.js → runtime-guard-BZ3_1QqS.js} +1 -1
- package/dist/{sandbox-BJgHc4Vu.js → sandbox-B4RfQ7k1.js} +9 -9
- package/dist/{sandbox-C8Gh5iJW.js → sandbox-C-UeHmuJ.js} +11 -11
- package/dist/{sandbox-cli-CSudrHYL.js → sandbox-cli-B43FqqPT.js} +17 -17
- package/dist/{sandbox-cli-DkMmnojU.js → sandbox-cli-CNAPNXJ4.js} +29 -29
- package/dist/{security-cli-pLoqKkfb.js → security-cli-BSd8_Gsq.js} +38 -38
- package/dist/{security-cli-B2lCR2xX.js → security-cli-DDM0Z6IW.js} +27 -27
- package/dist/{send-DuYvWRLE.js → send-DSK6O8SC.js} +9 -9
- package/dist/{send-CY9na-Jw.js → send-EluKytgO.js} +3 -3
- package/dist/{server-context-DdWWaDf6.js → server-context-CDTuNR-O.js} +5 -5
- package/dist/{server-context-CJFU_WfI.js → server-context-DFO6o83F.js} +8 -8
- package/dist/{server-methods-Dk_EnINI.js → server-methods-Dz6NGEg3.js} +35 -59
- package/dist/{server-methods-RhVqtIqB.js → server-methods-vp5zi6v5.js} +41 -65
- package/dist/{server-node-events-BHegSgG9.js → server-node-events-4ufB_olv.js} +55 -55
- package/dist/{server-node-events-UQx561GA.js → server-node-events-B7UtUhkC.js} +74 -74
- package/dist/{service-BCu0FBzN.js → service-AP9pR9R5.js} +1 -1
- package/dist/{session-cost-usage-5VmVPhKy.js → session-cost-usage-Cj3vd7lZ.js} +1 -1
- package/dist/{session-cost-usage-XhPrxXSs.js → session-cost-usage-DYcv40ss.js} +1 -1
- package/dist/{session-utils-DFJztVrF.js → session-utils-CgGDr4eh.js} +12 -12
- package/dist/{session-utils-CAVPV2Hh.js → session-utils-D1VcHni_.js} +7 -7
- package/dist/{sessions-CqLQkkWg.js → sessions-BNEDanZO.js} +4 -4
- package/dist/{sessions-BsGGoTdl.js → sessions-Dh88Kqd6.js} +9 -9
- package/dist/{sessions-BDM9kNY0.js → sessions-iLfSd6VD.js} +5 -5
- package/dist/{shared-CpwtQRJB.js → shared-CIeW3aWF.js} +4 -4
- package/dist/{shared-D7tsGdxc.js → shared-DP6YX7_w.js} +1 -1
- package/dist/{shared-B7nP44vU.js → shared-DmYHvtn2.js} +2 -2
- package/dist/{shared-CbUpEKXt.js → shared-_wwqvx84.js} +3 -3
- package/dist/{skill-commands-B45w-suH.js → skill-commands-5QB5E8bv.js} +4 -4
- package/dist/{skill-commands-CRQniaHy.js → skill-commands-CcCCVblU.js} +4 -4
- package/dist/{skills-CTcjFd_F.js → skills-BP6p7GnN.js} +3 -3
- package/dist/{skills-haW9gU7e.js → skills-Bmjf5nFv.js} +3 -3
- package/dist/{skills-cli-9Mlb7VRg.js → skills-cli-BJDvUT_e.js} +13 -13
- package/dist/{skills-cli-CV_42wby.js → skills-cli-Byp9MfZh.js} +17 -17
- package/dist/{skills-install-B4JPO_Np.js → skills-install-BB27sD4d.js} +4 -4
- package/dist/{skills-install-D5ikt72d.js → skills-install-BzqoHn0x.js} +3 -3
- package/dist/{skills-remote-BW2GvG2l.js → skills-remote-CqwR3Zvp.js} +5 -5
- package/dist/{skills-remote-BASG1Doo.js → skills-remote-DHfuS68n.js} +4 -4
- package/dist/{skills-status-1iVfuVIG.js → skills-status-01KNlWUS.js} +3 -3
- package/dist/{skills-status-C9lLJu0B.js → skills-status-BNDqwHkP.js} +3 -3
- package/dist/{sqlite-DL_ZWVN-.js → sqlite-DBEvS-Ne.js} +2 -2
- package/dist/{sqlite-67BqaVPd.js → sqlite-l3CZYU6t.js} +1 -1
- package/dist/{status-CrddsMfu.js → status-B0HecH1s.js} +4 -4
- package/dist/{status-D5RhVO0A.js → status-BD8gFYKH.js} +18 -18
- package/dist/{status-DPu7qNXE.js → status-DEXnB1sw.js} +27 -27
- package/dist/{status-Bci6O3aA.js → status-MMLxoRgQ.js} +3 -3
- package/dist/{status.update-D5CachQ_.js → status.update-Be8PuHCh.js} +2 -2
- package/dist/{status.update-Dfd0eZOH.js → status.update-CB9e3eWW.js} +2 -2
- package/dist/{subagent-registry-CsXaK_sy.js → subagent-registry-C57PFGHU.js} +61 -61
- package/dist/{subsystem-CHbO_DkH.js → subsystem-CtH6J8AV.js} +1 -1
- package/dist/{synthesis-BwcfS9jt.js → synthesis-CQdzrLFL.js} +4 -4
- package/dist/{synthesis-CU_MR7nV.js → synthesis-CjsIBd8X.js} +71 -71
- package/dist/{synthesis-dplLmFIP.js → synthesis-DSdF0vsi.js} +4 -4
- package/dist/{synthesis-BoZf8BeO.js → synthesis-j_kjlFo1.js} +52 -52
- package/dist/{system-cli-CCn-08Zm.js → system-cli-BM8KbtUc.js} +18 -18
- package/dist/{system-cli-D5FffFX5.js → system-cli-CQFH_HwX.js} +10 -10
- package/dist/{systemd-bkj5giUQ.js → systemd-9LEEqibe.js} +2 -2
- package/dist/{systemd-hints-UeG2BDXq.js → systemd-hints-A1W3AdVo.js} +3 -3
- package/dist/{systemd-hints-CufcSfMk.js → systemd-hints-BejQ6J2Y.js} +2 -2
- package/dist/{systemd-linger-DVkUgWAi.js → systemd-linger-PqG8iGCt.js} +2 -2
- package/dist/{table-Sfrx6RZ-.js → table-CSEp22Mk.js} +1 -1
- package/dist/{table-B4DunWtf.js → table-DkAQzCOR.js} +2 -2
- package/dist/{tailscale-G_tEEN9T.js → tailscale-D7dC-5EX.js} +3 -3
- package/dist/{tokens-BdVB8KXo.js → tokens-BKbemuIk.js} +1 -1
- package/dist/{tokens-h4i8ww8n.js → tokens-K3kGchJA.js} +1 -1
- package/dist/{tool-display-BngPYwnR.js → tool-display-Dr6VaTg5.js} +1 -1
- package/dist/{tool-display-DccYrlOh.js → tool-display-wSdT0Ynz.js} +1 -1
- package/dist/{tool-loop-detection-ckNnHN4a.js → tool-loop-detection-CLDr_JBu.js} +1 -1
- package/dist/{tool-loop-detection-DldKffR8.js → tool-loop-detection-CSSq5kkt.js} +4 -4
- package/dist/{trash-S6FbJcDo.js → trash-BjVrPcAx.js} +1 -1
- package/dist/{tui-DZ8gksSZ.js → tui-D0j61PXx.js} +8 -8
- package/dist/{tui-DroW8IOb.js → tui-DFuScHlA.js} +10 -10
- package/dist/{tui-cli-CyBJYh9u.js → tui-cli-25xTveHh.js} +24 -24
- package/dist/{tui-cli-1SpmbQMM.js → tui-cli-C3dXNtPo.js} +36 -36
- package/dist/{unified-runner-BFLLzEHE.js → unified-runner-BNt7TQKM.js} +10 -13
- package/dist/{unified-runner-CSPkKZHX.js → unified-runner-DCiPB--z.js} +73 -73
- package/dist/{update-BITFZPr2.js → update-C1rkPV1C.js} +3 -3
- package/dist/{update-OkPZ3jjl.js → update-CjZgU686.js} +3 -3
- package/dist/{update-check-CMbKkelk.js → update-check-CZxZhEXr.js} +2 -2
- package/dist/{update-cli-Dh5dvdv-.js → update-cli-CWufRpkr.js} +104 -104
- package/dist/{update-cli-yW6Xl6fs.js → update-cli-Dl_QbjXc.js} +77 -77
- package/dist/{update-runner-BI8ZSR1b.js → update-runner-Dq5UYQbo.js} +5 -5
- package/dist/{update-runner-CIgLduhH.js → update-runner-ENJw0Mco.js} +2 -2
- package/dist/{utils-CTPsqyE_.js → utils-BU8jVQFM.js} +1 -1
- package/dist/{webhooks-cli-Cwhu9vyD.js → webhooks-cli-Clx8DGfA.js} +14 -14
- package/dist/{webhooks-cli-4bmyKzwb.js → webhooks-cli-UfO_WffC.js} +11 -11
- package/dist/{widearea-dns-BZ7fV_kq.js → widearea-dns-C5NqCQ3L.js} +1 -1
- package/dist/{widearea-dns-D9KXb2gb.js → widearea-dns-drOINmDM.js} +1 -1
- package/dist/{with-timeout-D_FOTx48.js → with-timeout-BE7lxhxW.js} +2 -2
- package/dist/{with-timeout-bWr6yBeX.js → with-timeout-BcL6qAbd.js} +2 -2
- package/dist/{workspace-DxscDsm6.js → workspace-B3sO7QlN.js} +2 -2
- package/dist/{workspace-BHDa_VCi.js → workspace-Bb1HX2I0.js} +1 -1
- package/dist/{workspace-dirs-2xcWGse3.js → workspace-dirs-23IYtZj2.js} +1 -1
- package/dist/{workspace-dirs-aYEM1rQE.js → workspace-dirs-D5OnUmvw.js} +1 -1
- package/extensions/memory-core/node_modules/.bin/symi +0 -0
- package/extensions/msteams/node_modules/.bin/symi +0 -0
- package/extensions/outlook/node_modules/.bin/symi +0 -0
- package/extensions/slack/node_modules/.bin/symi +0 -0
- package/package.json +108 -79
- package/dist/cli-CK62Eh_9.js +0 -128
- package/dist/control-ui/css/revert-red-theme.md +0 -141
- package/dist/control-ui/css/style.css +0 -5843
- package/dist/control-ui/css/style.css.backup-2026-03-03-162525 +0 -3546
- package/dist/control-ui/css/style.css.backup-before-red-2026-03-03-162525 +0 -3546
- package/dist/control-ui/css/style.css.backup-before-red-theme-2026-03-03-162530 +0 -3546
- package/dist/control-ui/css/style.css.pre-2row +0 -2165
- package/dist/control-ui/css/style.css.pre-brand +0 -1776
- package/dist/control-ui/css/style.css.pre-history +0 -1974
- package/dist/control-ui/css/style.css.pre-nav +0 -2264
- package/dist/control-ui/css/style.css.pre-newsession +0 -1898
- package/dist/control-ui/css/style.css.pre-queue +0 -2195
- package/dist/control-ui/css/style.css.pre-red-prompt +0 -2524
- package/dist/control-ui/css/style.css.pre-stop +0 -2239
- package/dist/control-ui/css/style.css.pre-textarea +0 -2184
- package/dist/control-ui/css/style.css.pre-watchdog +0 -1848
- package/dist/control-ui/css/style.css.red-theme +0 -2999
- package/dist/control-ui/index.html +0 -1042
- package/dist/control-ui/js/app.js +0 -1304
- package/dist/control-ui/js/app.js.pre-2row +0 -463
- package/dist/control-ui/js/app.js.pre-heartbeat-filter +0 -595
- package/dist/control-ui/js/app.js.pre-newsession +0 -408
- package/dist/control-ui/js/app.js.pre-queue +0 -476
- package/dist/control-ui/js/app.js.pre-stop +0 -564
- package/dist/control-ui/js/app.js.pre-textarea +0 -467
- package/dist/control-ui/js/app.js.pre-watchdog +0 -293
- package/dist/control-ui/js/connections.js +0 -438
- package/dist/control-ui/js/gateway.js +0 -233
- package/dist/control-ui/js/gateway.js.pre-stop +0 -110
- package/dist/control-ui/js/history.js +0 -732
- package/dist/control-ui/js/logs.js +0 -238
- package/dist/control-ui/js/menu.js +0 -230
- package/dist/control-ui/js/menu.js.pre-nav +0 -66
- package/dist/control-ui/js/metrics.js +0 -53
- package/dist/control-ui/js/models.js +0 -138
- package/dist/control-ui/js/render.js +0 -882
- package/dist/control-ui/js/render.test.js +0 -112
- package/dist/control-ui/js/scheduling.js +0 -461
- package/dist/control-ui/js/settings.js +0 -909
- package/dist/control-ui/js/slash-autocomplete.js +0 -168
- package/dist/control-ui/js/subagents.js +0 -560
- package/dist/control-ui/js/utils.js +0 -29
- package/dist/control-ui/vendor/highlight.min.js +0 -2518
- package/dist/control-ui/vendor/marked.min.js +0 -69
- package/dist/register.configure-RhKVlfWH.js +0 -125
- package/dist/register.configure-q33027ym.js +0 -129
|
@@ -1,732 +0,0 @@
|
|
|
1
|
-
// ── Session History Browser ────────────────────────────────────────────
|
|
2
|
-
// Provides the history drawer: list past sessions, browse archived
|
|
3
|
-
// transcripts, favourite/delete/load. Exactly one row is ever CURRENT;
|
|
4
|
-
// all others are loadable past sessions.
|
|
5
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
(function () {
|
|
10
|
-
const drawer = document.getElementById("history-drawer");
|
|
11
|
-
const overlay = document.getElementById("history-overlay");
|
|
12
|
-
const drawerBody = document.getElementById("history-drawer-body");
|
|
13
|
-
const closeBtn = document.getElementById("history-close-btn");
|
|
14
|
-
const historyBtn = document.getElementById("history-btn");
|
|
15
|
-
const archiveToast = document.getElementById("session-archive-toast");
|
|
16
|
-
const archiveToastLink = document.getElementById("session-archive-link");
|
|
17
|
-
const searchInput = document.getElementById("history-search-input");
|
|
18
|
-
const searchClear = document.getElementById("history-search-clear");
|
|
19
|
-
|
|
20
|
-
let isOpen = false;
|
|
21
|
-
let toastTimer = null;
|
|
22
|
-
let __viewingFile = null;
|
|
23
|
-
const DELETE_CONFIRM_MS = 5000;
|
|
24
|
-
const SEARCH_DEBOUNCE_MS = 250;
|
|
25
|
-
let searchDebounceTimer = null;
|
|
26
|
-
let activeSearchToken = 0;
|
|
27
|
-
|
|
28
|
-
// ── Open / close ──────────────────────────────────────────────────────
|
|
29
|
-
function openDrawer() {
|
|
30
|
-
isOpen = true;
|
|
31
|
-
drawer.classList.add("open");
|
|
32
|
-
overlay.classList.add("open");
|
|
33
|
-
drawer.setAttribute("aria-hidden", "false");
|
|
34
|
-
void loadSessionList();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function closeDrawer() {
|
|
38
|
-
isOpen = false;
|
|
39
|
-
drawer.classList.remove("open");
|
|
40
|
-
overlay.classList.remove("open");
|
|
41
|
-
drawer.setAttribute("aria-hidden", "true");
|
|
42
|
-
__viewingFile = null;
|
|
43
|
-
showToolCalls = false;
|
|
44
|
-
if (searchInput && searchInput.value) {
|
|
45
|
-
searchInput.value = "";
|
|
46
|
-
if (searchClear) {
|
|
47
|
-
searchClear.hidden = true;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
historyBtn.addEventListener("click", () => (isOpen ? closeDrawer() : openDrawer()));
|
|
53
|
-
closeBtn.addEventListener("click", closeDrawer);
|
|
54
|
-
overlay.addEventListener("click", closeDrawer);
|
|
55
|
-
document.addEventListener("keydown", (e) => {
|
|
56
|
-
if (e.key === "Escape" && isOpen) {
|
|
57
|
-
closeDrawer();
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// ── Cross-session search ─────────────────────────────────────────────
|
|
62
|
-
if (searchInput) {
|
|
63
|
-
searchInput.addEventListener("input", () => {
|
|
64
|
-
const value = searchInput.value;
|
|
65
|
-
if (searchClear) {
|
|
66
|
-
searchClear.hidden = !value;
|
|
67
|
-
}
|
|
68
|
-
if (searchDebounceTimer) {
|
|
69
|
-
clearTimeout(searchDebounceTimer);
|
|
70
|
-
}
|
|
71
|
-
searchDebounceTimer = setTimeout(() => {
|
|
72
|
-
const trimmed = value.trim();
|
|
73
|
-
if (!trimmed) {
|
|
74
|
-
void loadSessionList();
|
|
75
|
-
} else {
|
|
76
|
-
void runSessionSearch(trimmed);
|
|
77
|
-
}
|
|
78
|
-
}, SEARCH_DEBOUNCE_MS);
|
|
79
|
-
});
|
|
80
|
-
searchInput.addEventListener("keydown", (e) => {
|
|
81
|
-
if (e.key === "Escape" && searchInput.value) {
|
|
82
|
-
e.stopPropagation();
|
|
83
|
-
searchInput.value = "";
|
|
84
|
-
if (searchClear) {
|
|
85
|
-
searchClear.hidden = true;
|
|
86
|
-
}
|
|
87
|
-
void loadSessionList();
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
if (searchClear) {
|
|
92
|
-
searchClear.addEventListener("click", () => {
|
|
93
|
-
if (!searchInput) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
searchInput.value = "";
|
|
97
|
-
searchClear.hidden = true;
|
|
98
|
-
searchInput.focus();
|
|
99
|
-
void loadSessionList();
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// ── Session list ──────────────────────────────────────────────────────
|
|
104
|
-
async function loadSessionList() {
|
|
105
|
-
drawerBody.innerHTML = '<div class="history-loading">Loading sessions…</div>';
|
|
106
|
-
__viewingFile = null;
|
|
107
|
-
|
|
108
|
-
const currentKey = window.SESSION_KEY ?? "agent:main:main";
|
|
109
|
-
const url = "/api/sessions?currentKey=" + encodeURIComponent(currentKey);
|
|
110
|
-
|
|
111
|
-
let sessions;
|
|
112
|
-
try {
|
|
113
|
-
const res = await fetch(url);
|
|
114
|
-
const payload = await res.json();
|
|
115
|
-
// Response shape: { sessions: [...] } (2.7.1+)
|
|
116
|
-
sessions = Array.isArray(payload?.sessions) ? payload.sessions : [];
|
|
117
|
-
} catch {
|
|
118
|
-
drawerBody.innerHTML = '<div class="history-empty">Failed to load sessions.</div>';
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (!sessions.length) {
|
|
123
|
-
drawerBody.innerHTML = '<div class="history-empty">No session history found.</div>';
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Group rows: CURRENT / FAVOURITES / RECENT
|
|
128
|
-
const current = sessions.filter((s) => s.kind === "current");
|
|
129
|
-
const favourites = sessions.filter((s) => s.kind !== "current" && s.favorited);
|
|
130
|
-
const recent = sessions.filter((s) => s.kind !== "current" && !s.favorited);
|
|
131
|
-
|
|
132
|
-
// Newest `.reset.*` archive with content — this becomes the target of
|
|
133
|
-
// the Load Session button on the CURRENT row, giving the user a
|
|
134
|
-
// one-click path back to the session they just left.
|
|
135
|
-
const returnCandidate = findReturnCandidate(sessions);
|
|
136
|
-
|
|
137
|
-
drawerBody.innerHTML = "";
|
|
138
|
-
|
|
139
|
-
if (current.length > 0) {
|
|
140
|
-
drawerBody.appendChild(renderSection("CURRENT", current, returnCandidate));
|
|
141
|
-
}
|
|
142
|
-
if (favourites.length > 0) {
|
|
143
|
-
drawerBody.appendChild(renderSection("★ FAVOURITES", favourites, null));
|
|
144
|
-
}
|
|
145
|
-
if (recent.length > 0) {
|
|
146
|
-
drawerBody.appendChild(renderSection("RECENT", recent, null));
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function findReturnCandidate(sessions) {
|
|
151
|
-
const now = Date.now();
|
|
152
|
-
const windowMs = 24 * 60 * 60 * 1000; // 24 hours
|
|
153
|
-
const candidates = sessions.filter((s) => {
|
|
154
|
-
if (s.kind !== "archived") {
|
|
155
|
-
return false;
|
|
156
|
-
}
|
|
157
|
-
if (s.archivedReason !== "reset") {
|
|
158
|
-
return false;
|
|
159
|
-
}
|
|
160
|
-
if (!s.msgCount || s.msgCount <= 0) {
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
if (!s.archivedAt) {
|
|
164
|
-
return false;
|
|
165
|
-
}
|
|
166
|
-
const archivedMs = new Date(s.archivedAt).getTime();
|
|
167
|
-
if (Number.isNaN(archivedMs)) {
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
170
|
-
return now - archivedMs < windowMs;
|
|
171
|
-
});
|
|
172
|
-
if (!candidates.length) {
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
|
-
// Newest first
|
|
176
|
-
candidates.sort((a, b) => (b.archivedAt ?? "").localeCompare(a.archivedAt ?? ""));
|
|
177
|
-
return candidates[0];
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function renderSection(title, rows, returnCandidate) {
|
|
181
|
-
const section = document.createElement("section");
|
|
182
|
-
section.className = "history-section";
|
|
183
|
-
const heading = document.createElement("div");
|
|
184
|
-
heading.className = "history-section-heading";
|
|
185
|
-
heading.textContent = title;
|
|
186
|
-
section.appendChild(heading);
|
|
187
|
-
for (const row of rows) {
|
|
188
|
-
// Pass the return candidate through only for the CURRENT row — it
|
|
189
|
-
// drives the row's Load Session button (which returns the user to
|
|
190
|
-
// their previous session). Other rows use their own row data.
|
|
191
|
-
section.appendChild(renderRow(row, row.kind === "current" ? returnCandidate : null));
|
|
192
|
-
}
|
|
193
|
-
return section;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function renderRow(row, returnCandidate) {
|
|
197
|
-
const item = document.createElement("div");
|
|
198
|
-
item.className = "history-session-item history-session-" + row.kind;
|
|
199
|
-
|
|
200
|
-
const badge = BADGE[row.kind] ?? BADGE.past;
|
|
201
|
-
const when = formatTimestamp(row.lastActivity);
|
|
202
|
-
const preview = row.preview
|
|
203
|
-
? escHtml(row.preview) + (row.preview.length >= 80 ? "…" : "")
|
|
204
|
-
: '<em style="opacity:0.5">No messages</em>';
|
|
205
|
-
|
|
206
|
-
// CURRENT row's Load Session button targets the most-recent .reset.*
|
|
207
|
-
// archive (returnCandidate). Non-current rows use their own file.
|
|
208
|
-
let footerHtml;
|
|
209
|
-
if (row.kind === "current") {
|
|
210
|
-
footerHtml = returnCandidate
|
|
211
|
-
? `<footer class="history-session-actions">
|
|
212
|
-
<button class="history-load-btn" data-return="1">Load Session</button>
|
|
213
|
-
</footer>`
|
|
214
|
-
: "";
|
|
215
|
-
} else {
|
|
216
|
-
footerHtml = `<footer class="history-session-actions">
|
|
217
|
-
${row.canLoad ? `<button class="history-load-btn">Load Session</button>` : ""}
|
|
218
|
-
${row.canDelete ? `<button class="history-delete-btn">Delete</button>` : ""}
|
|
219
|
-
</footer>`;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
item.innerHTML = `
|
|
223
|
-
<header class="history-session-header">
|
|
224
|
-
<button class="history-fav-btn ${row.favorited ? "active" : ""}"
|
|
225
|
-
aria-pressed="${row.favorited ? "true" : "false"}"
|
|
226
|
-
aria-label="${row.favorited ? "Unfavourite" : "Favourite"} session"
|
|
227
|
-
title="${row.favorited ? "Unfavourite" : "Favourite"}">★</button>
|
|
228
|
-
<span class="history-session-badge ${badge.className}">${badge.label}</span>
|
|
229
|
-
<span class="history-session-date">${escHtml(when)}</span>
|
|
230
|
-
</header>
|
|
231
|
-
<div class="history-session-meta">
|
|
232
|
-
<span class="history-session-count">${row.msgCount} msgs · ${fmtSize(row.size)}</span>
|
|
233
|
-
</div>
|
|
234
|
-
<div class="history-session-preview">${preview}</div>
|
|
235
|
-
${footerHtml}
|
|
236
|
-
`;
|
|
237
|
-
|
|
238
|
-
// Body-click behaviour varies by kind:
|
|
239
|
-
// - CURRENT: close the drawer (user is already viewing this session
|
|
240
|
-
// in the main feed — no point opening a transcript preview).
|
|
241
|
-
// - PAST / ARCHIVED: open the transcript viewer.
|
|
242
|
-
item.addEventListener("click", (e) => {
|
|
243
|
-
const target = e.target;
|
|
244
|
-
if (target instanceof Element && target.closest("button")) {
|
|
245
|
-
return; // button click handled below
|
|
246
|
-
}
|
|
247
|
-
if (row.kind === "current") {
|
|
248
|
-
closeDrawer();
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
void loadTranscript(row.file, when);
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
const favBtn = item.querySelector(".history-fav-btn");
|
|
255
|
-
favBtn?.addEventListener("click", async (e) => {
|
|
256
|
-
e.stopPropagation();
|
|
257
|
-
await toggleFavorite(row, favBtn);
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
const loadBtn = item.querySelector(".history-load-btn");
|
|
261
|
-
loadBtn?.addEventListener("click", async (e) => {
|
|
262
|
-
e.stopPropagation();
|
|
263
|
-
// On the CURRENT row, Load Session loads the most-recent archive
|
|
264
|
-
// (returnCandidate). On PAST/ARCHIVED rows, it loads that row.
|
|
265
|
-
const target = loadBtn.getAttribute("data-return") === "1" ? returnCandidate : row;
|
|
266
|
-
if (target) {
|
|
267
|
-
await loadRow(target);
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
const deleteBtn = item.querySelector(".history-delete-btn");
|
|
272
|
-
if (deleteBtn instanceof HTMLButtonElement) {
|
|
273
|
-
wireTwoStageDelete(deleteBtn, () => deleteRow(row));
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return item;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
const BADGE = {
|
|
280
|
-
current: { label: "CURRENT", className: "badge-current" },
|
|
281
|
-
past: { label: "PAST", className: "badge-past" },
|
|
282
|
-
archived: { label: "ARCHIVED", className: "badge-archived" },
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
// ── Cross-session search ─────────────────────────────────────────────
|
|
286
|
-
async function runSessionSearch(query) {
|
|
287
|
-
if (!window.gateway?.connected) {
|
|
288
|
-
drawerBody.innerHTML = '<div class="history-empty">Gateway not connected.</div>';
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
const token = ++activeSearchToken;
|
|
292
|
-
drawerBody.innerHTML = '<div class="history-loading">Searching…</div>';
|
|
293
|
-
|
|
294
|
-
let result;
|
|
295
|
-
try {
|
|
296
|
-
result = await window.gateway.rpc("sessions.search", { query, limit: 24 });
|
|
297
|
-
} catch (err) {
|
|
298
|
-
if (token !== activeSearchToken) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
drawerBody.innerHTML =
|
|
302
|
-
'<div class="history-empty">Search failed: ' +
|
|
303
|
-
escHtml(err?.message ?? String(err)) +
|
|
304
|
-
"</div>";
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// Drop stale responses if a newer search was kicked off mid-flight.
|
|
309
|
-
if (token !== activeSearchToken) {
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
const matches = Array.isArray(result?.matches) ? result.matches : [];
|
|
314
|
-
if (!matches.length) {
|
|
315
|
-
drawerBody.innerHTML = `<div class="history-search-status">No matches for ${escHtml(
|
|
316
|
-
query,
|
|
317
|
-
)}.</div>`;
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
drawerBody.innerHTML = "";
|
|
322
|
-
const status = document.createElement("div");
|
|
323
|
-
status.className = "history-search-status";
|
|
324
|
-
status.textContent = `${matches.length} match${matches.length === 1 ? "" : "es"} for "${query}"`;
|
|
325
|
-
drawerBody.appendChild(status);
|
|
326
|
-
|
|
327
|
-
const section = document.createElement("section");
|
|
328
|
-
section.className = "history-section";
|
|
329
|
-
for (const match of matches) {
|
|
330
|
-
section.appendChild(renderSearchMatch(match, query));
|
|
331
|
-
}
|
|
332
|
-
drawerBody.appendChild(section);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
function renderSearchMatch(match, query) {
|
|
336
|
-
const item = document.createElement("div");
|
|
337
|
-
item.className = "history-session-item history-session-search-match";
|
|
338
|
-
|
|
339
|
-
const title =
|
|
340
|
-
match.label ||
|
|
341
|
-
match.displayName ||
|
|
342
|
-
match.sessionKey ||
|
|
343
|
-
`session ${match.sessionId.slice(0, 8)}`;
|
|
344
|
-
const when = match.updatedAt ? formatTimestamp(new Date(match.updatedAt).toISOString()) : "—";
|
|
345
|
-
const lineRange =
|
|
346
|
-
match.lineStart === match.lineEnd
|
|
347
|
-
? `line ${match.lineStart}`
|
|
348
|
-
: `lines ${match.lineStart}–${match.lineEnd}`;
|
|
349
|
-
const score = typeof match.score === "number" ? match.score.toFixed(2) : "—";
|
|
350
|
-
const snippetHtml = highlightSnippet(match.snippet ?? "", query);
|
|
351
|
-
|
|
352
|
-
const canLoad = Boolean(match.sessionKey);
|
|
353
|
-
const footerHtml = canLoad
|
|
354
|
-
? `<footer class="history-session-actions">
|
|
355
|
-
<button class="history-load-btn">Load Session</button>
|
|
356
|
-
</footer>`
|
|
357
|
-
: "";
|
|
358
|
-
|
|
359
|
-
item.innerHTML = `
|
|
360
|
-
<header class="history-session-header">
|
|
361
|
-
<span class="history-session-badge badge-past">MATCH</span>
|
|
362
|
-
<span class="history-session-date">${escHtml(title)}</span>
|
|
363
|
-
</header>
|
|
364
|
-
<div class="history-match-snippet">${snippetHtml}</div>
|
|
365
|
-
<div class="history-match-meta">
|
|
366
|
-
<span>${escHtml(when)}</span>
|
|
367
|
-
<span>${escHtml(lineRange)}</span>
|
|
368
|
-
<span>score ${escHtml(score)}</span>
|
|
369
|
-
</div>
|
|
370
|
-
${footerHtml}
|
|
371
|
-
`;
|
|
372
|
-
|
|
373
|
-
const loadBtn = item.querySelector(".history-load-btn");
|
|
374
|
-
loadBtn?.addEventListener("click", async (e) => {
|
|
375
|
-
e.stopPropagation();
|
|
376
|
-
if (!match.sessionKey) {
|
|
377
|
-
return;
|
|
378
|
-
}
|
|
379
|
-
// Adopt-by-file using the session's current transcript file (basename).
|
|
380
|
-
await loadRow({ file: match.sessionId + ".jsonl" });
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
item.addEventListener("click", (e) => {
|
|
384
|
-
const target = e.target;
|
|
385
|
-
if (target instanceof Element && target.closest("button")) {
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
void loadTranscript(match.sessionId + ".jsonl", title);
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
return item;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
function highlightSnippet(text, query) {
|
|
395
|
-
if (!text) {
|
|
396
|
-
return "";
|
|
397
|
-
}
|
|
398
|
-
if (!query) {
|
|
399
|
-
return escHtml(text);
|
|
400
|
-
}
|
|
401
|
-
const safeText = escHtml(text);
|
|
402
|
-
const escapedQuery = query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
403
|
-
try {
|
|
404
|
-
const re = new RegExp(escapedQuery, "gi");
|
|
405
|
-
return safeText.replace(re, (m) => `<mark>${m}</mark>`);
|
|
406
|
-
} catch {
|
|
407
|
-
return safeText;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
// ── Actions ───────────────────────────────────────────────────────────
|
|
412
|
-
|
|
413
|
-
async function toggleFavorite(row, favBtn) {
|
|
414
|
-
if (!window.gateway?.connected) {
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
const next = !row.favorited;
|
|
418
|
-
try {
|
|
419
|
-
await window.gateway.rpc("sessions.favoriteFile", {
|
|
420
|
-
file: row.file,
|
|
421
|
-
favorited: next,
|
|
422
|
-
});
|
|
423
|
-
row.favorited = next;
|
|
424
|
-
favBtn.classList.toggle("active", next);
|
|
425
|
-
favBtn.setAttribute("aria-pressed", next ? "true" : "false");
|
|
426
|
-
// Re-render to move the row between FAVOURITES and RECENT sections.
|
|
427
|
-
void loadSessionList();
|
|
428
|
-
} catch (err) {
|
|
429
|
-
console.warn("[history] favorite toggle failed", err);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
async function loadRow(row) {
|
|
434
|
-
if (!window.gateway?.connected) {
|
|
435
|
-
alert("Gateway not connected.");
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
drawerBody.innerHTML = '<div class="history-loading">Loading session…</div>';
|
|
439
|
-
try {
|
|
440
|
-
await window.gateway.rpc("sessions.adoptFile", {
|
|
441
|
-
key: window.SESSION_KEY,
|
|
442
|
-
targetFile: row.file,
|
|
443
|
-
});
|
|
444
|
-
closeDrawer();
|
|
445
|
-
if (typeof window.reloadSession === "function") {
|
|
446
|
-
window.reloadSession();
|
|
447
|
-
}
|
|
448
|
-
} catch (err) {
|
|
449
|
-
drawerBody.innerHTML =
|
|
450
|
-
'<div class="history-empty">Load failed: ' +
|
|
451
|
-
escHtml(err?.message ?? String(err)) +
|
|
452
|
-
"</div>";
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
async function deleteRow(row) {
|
|
457
|
-
if (!window.gateway?.connected) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
try {
|
|
461
|
-
if (row.kind === "past" && row.sessionKey) {
|
|
462
|
-
// Archives the transcript via `sessions.delete` — the file becomes
|
|
463
|
-
// an ARCHIVED row in the next list refresh. Reversible.
|
|
464
|
-
await window.gateway.rpc("sessions.delete", {
|
|
465
|
-
key: row.sessionKey,
|
|
466
|
-
deleteTranscript: true,
|
|
467
|
-
});
|
|
468
|
-
} else {
|
|
469
|
-
// Archived files (or orphan live files): permanent deletion.
|
|
470
|
-
await window.gateway.rpc("sessions.deleteFile", { file: row.file });
|
|
471
|
-
}
|
|
472
|
-
await loadSessionList();
|
|
473
|
-
} catch (err) {
|
|
474
|
-
console.warn("[history] delete failed", err);
|
|
475
|
-
alert("Delete failed: " + (err?.message ?? String(err)));
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* Wire a Delete button as a two-stage confirm. First click arms it with
|
|
481
|
-
* "Really delete?" for DELETE_CONFIRM_MS; second click within the window
|
|
482
|
-
* runs the action. Auto-reverts if the user walks away.
|
|
483
|
-
*/
|
|
484
|
-
function wireTwoStageDelete(btn, run) {
|
|
485
|
-
let armed = false;
|
|
486
|
-
let armTimer = null;
|
|
487
|
-
const originalLabel = btn.textContent;
|
|
488
|
-
btn.addEventListener("click", (e) => {
|
|
489
|
-
e.stopPropagation();
|
|
490
|
-
if (!armed) {
|
|
491
|
-
armed = true;
|
|
492
|
-
btn.textContent = "Really delete?";
|
|
493
|
-
btn.classList.add("armed");
|
|
494
|
-
if (armTimer) {
|
|
495
|
-
clearTimeout(armTimer);
|
|
496
|
-
}
|
|
497
|
-
armTimer = setTimeout(() => {
|
|
498
|
-
armed = false;
|
|
499
|
-
btn.textContent = originalLabel;
|
|
500
|
-
btn.classList.remove("armed");
|
|
501
|
-
}, DELETE_CONFIRM_MS);
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
clearTimeout(armTimer);
|
|
505
|
-
armed = false;
|
|
506
|
-
btn.disabled = true;
|
|
507
|
-
btn.textContent = "Deleting…";
|
|
508
|
-
btn.classList.remove("armed");
|
|
509
|
-
void run();
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
// ── Transcript viewer ─────────────────────────────────────────────────
|
|
514
|
-
// Per-drawer-session preference: whether the transcript modal includes
|
|
515
|
-
// tool_use / tool_result content blocks alongside chat text. Defaults
|
|
516
|
-
// off (matches the historical view); the toggle button in the banner
|
|
517
|
-
// flips it for the current viewing session, then resets on close.
|
|
518
|
-
let showToolCalls = false;
|
|
519
|
-
|
|
520
|
-
async function loadTranscript(file, label) {
|
|
521
|
-
__viewingFile = file;
|
|
522
|
-
drawerBody.innerHTML = '<div class="history-loading">Loading transcript…</div>';
|
|
523
|
-
|
|
524
|
-
let messages;
|
|
525
|
-
try {
|
|
526
|
-
const res = await fetch("/api/transcript?" + new URLSearchParams({ file }));
|
|
527
|
-
const data = await res.json();
|
|
528
|
-
messages = data.messages ?? [];
|
|
529
|
-
} catch {
|
|
530
|
-
drawerBody.innerHTML = '<div class="history-empty">Failed to load transcript.</div>';
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
renderTranscript(messages, label);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function renderTranscript(messages, label) {
|
|
538
|
-
drawerBody.innerHTML = "";
|
|
539
|
-
|
|
540
|
-
const banner = document.createElement("div");
|
|
541
|
-
banner.className = "archive-banner";
|
|
542
|
-
banner.innerHTML = `
|
|
543
|
-
<span class="archive-banner-label">◈ ${escHtml(label)}</span>
|
|
544
|
-
<div class="archive-banner-actions">
|
|
545
|
-
<button class="archive-banner-toggle ${showToolCalls ? "active" : ""}"
|
|
546
|
-
id="archive-tools-toggle"
|
|
547
|
-
aria-pressed="${showToolCalls ? "true" : "false"}">
|
|
548
|
-
${showToolCalls ? "Hide tool calls" : "Show tool calls"}
|
|
549
|
-
</button>
|
|
550
|
-
<button class="archive-banner-back" id="archive-back-btn">← All Sessions</button>
|
|
551
|
-
</div>
|
|
552
|
-
`;
|
|
553
|
-
drawerBody.appendChild(banner);
|
|
554
|
-
drawerBody.querySelector("#archive-back-btn").addEventListener("click", loadSessionList);
|
|
555
|
-
drawerBody.querySelector("#archive-tools-toggle").addEventListener("click", () => {
|
|
556
|
-
showToolCalls = !showToolCalls;
|
|
557
|
-
renderTranscript(messages, label);
|
|
558
|
-
});
|
|
559
|
-
|
|
560
|
-
const container = document.createElement("div");
|
|
561
|
-
container.className = "history-transcript";
|
|
562
|
-
|
|
563
|
-
const relevant = messages.filter((m) => m.role === "user" || m.role === "assistant");
|
|
564
|
-
if (!relevant.length) {
|
|
565
|
-
container.innerHTML = '<div class="history-empty">No chat messages in this session.</div>';
|
|
566
|
-
} else {
|
|
567
|
-
let renderedAny = false;
|
|
568
|
-
for (const msg of relevant) {
|
|
569
|
-
const text = extractMsgText(msg);
|
|
570
|
-
const tools = showToolCalls ? extractToolBlocks(msg) : [];
|
|
571
|
-
if (!text.trim() && tools.length === 0) {
|
|
572
|
-
continue;
|
|
573
|
-
}
|
|
574
|
-
renderedAny = true;
|
|
575
|
-
const el = document.createElement("div");
|
|
576
|
-
el.className = `history-msg ${msg.role}`;
|
|
577
|
-
const roleLabel = msg.role === "user" ? "YOU" : "SYMI";
|
|
578
|
-
|
|
579
|
-
let html = `<div class="history-msg-role ${msg.role}">${roleLabel}</div>`;
|
|
580
|
-
if (text.trim()) {
|
|
581
|
-
html += `<div class="history-msg-text">${escHtml(text)}</div>`;
|
|
582
|
-
}
|
|
583
|
-
for (const block of tools) {
|
|
584
|
-
html += renderToolBlock(block);
|
|
585
|
-
}
|
|
586
|
-
el.innerHTML = html;
|
|
587
|
-
container.appendChild(el);
|
|
588
|
-
}
|
|
589
|
-
if (!renderedAny) {
|
|
590
|
-
container.innerHTML = '<div class="history-empty">No chat messages in this session.</div>';
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
drawerBody.appendChild(container);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
function extractToolBlocks(msg) {
|
|
598
|
-
if (!Array.isArray(msg.content)) {
|
|
599
|
-
return [];
|
|
600
|
-
}
|
|
601
|
-
const out = [];
|
|
602
|
-
for (const block of msg.content) {
|
|
603
|
-
if (!block || typeof block !== "object") {
|
|
604
|
-
continue;
|
|
605
|
-
}
|
|
606
|
-
if (block.type === "tool_use") {
|
|
607
|
-
out.push({
|
|
608
|
-
kind: "use",
|
|
609
|
-
name: typeof block.name === "string" ? block.name : "tool",
|
|
610
|
-
input: block.input ?? null,
|
|
611
|
-
});
|
|
612
|
-
} else if (block.type === "tool_result") {
|
|
613
|
-
let resultText = "";
|
|
614
|
-
if (typeof block.content === "string") {
|
|
615
|
-
resultText = block.content;
|
|
616
|
-
} else if (Array.isArray(block.content)) {
|
|
617
|
-
resultText = block.content
|
|
618
|
-
.filter((c) => c && (c.type === "text" || typeof c === "string"))
|
|
619
|
-
.map((c) => (typeof c === "string" ? c : (c.text ?? "")))
|
|
620
|
-
.join("\n");
|
|
621
|
-
}
|
|
622
|
-
out.push({
|
|
623
|
-
kind: "result",
|
|
624
|
-
isError: block.is_error === true,
|
|
625
|
-
text: resultText,
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
return out;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
function renderToolBlock(block) {
|
|
633
|
-
const MAX_INPUT_CHARS = 400;
|
|
634
|
-
const MAX_OUTPUT_CHARS = 600;
|
|
635
|
-
if (block.kind === "use") {
|
|
636
|
-
let body = "";
|
|
637
|
-
try {
|
|
638
|
-
body = block.input == null ? "" : JSON.stringify(block.input, null, 2);
|
|
639
|
-
} catch {
|
|
640
|
-
body = String(block.input);
|
|
641
|
-
}
|
|
642
|
-
if (body.length > MAX_INPUT_CHARS) {
|
|
643
|
-
body = body.slice(0, MAX_INPUT_CHARS) + "\n… [truncated]";
|
|
644
|
-
}
|
|
645
|
-
return `
|
|
646
|
-
<div class="history-tool-block history-tool-use">
|
|
647
|
-
<div class="history-tool-head">⚙ ${escHtml(block.name)}</div>
|
|
648
|
-
${body ? `<pre class="history-tool-body">${escHtml(body)}</pre>` : ""}
|
|
649
|
-
</div>
|
|
650
|
-
`;
|
|
651
|
-
}
|
|
652
|
-
let text = block.text ?? "";
|
|
653
|
-
if (text.length > MAX_OUTPUT_CHARS) {
|
|
654
|
-
text = text.slice(0, MAX_OUTPUT_CHARS) + "\n… [truncated]";
|
|
655
|
-
}
|
|
656
|
-
const cls = block.isError ? "history-tool-result-error" : "history-tool-result";
|
|
657
|
-
return `
|
|
658
|
-
<div class="history-tool-block ${cls}">
|
|
659
|
-
<div class="history-tool-head">${block.isError ? "✗ tool error" : "✓ tool result"}</div>
|
|
660
|
-
${text ? `<pre class="history-tool-body">${escHtml(text)}</pre>` : ""}
|
|
661
|
-
</div>
|
|
662
|
-
`;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
// ── Archive toast (shown after /new) ──────────────────────────────────
|
|
666
|
-
window.showArchiveToast = function () {
|
|
667
|
-
if (toastTimer) {
|
|
668
|
-
clearTimeout(toastTimer);
|
|
669
|
-
}
|
|
670
|
-
archiveToast.classList.add("show");
|
|
671
|
-
toastTimer = setTimeout(() => archiveToast.classList.remove("show"), 8000);
|
|
672
|
-
};
|
|
673
|
-
|
|
674
|
-
archiveToastLink.addEventListener("click", () => {
|
|
675
|
-
archiveToast.classList.remove("show");
|
|
676
|
-
openDrawer();
|
|
677
|
-
});
|
|
678
|
-
|
|
679
|
-
// ── Helpers ───────────────────────────────────────────────────────────
|
|
680
|
-
function extractMsgText(msg) {
|
|
681
|
-
if (typeof msg.content === "string") {
|
|
682
|
-
return msg.content;
|
|
683
|
-
}
|
|
684
|
-
if (!Array.isArray(msg.content)) {
|
|
685
|
-
return "";
|
|
686
|
-
}
|
|
687
|
-
return msg.content
|
|
688
|
-
.filter((b) => b.type === "text" || b.type === "thinking")
|
|
689
|
-
.map((b) => b.text ?? b.thinking ?? "")
|
|
690
|
-
.join("\n")
|
|
691
|
-
.trim();
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
function escHtml(str) {
|
|
695
|
-
return String(str)
|
|
696
|
-
.replace(/&/g, "&")
|
|
697
|
-
.replace(/</g, "<")
|
|
698
|
-
.replace(/>/g, ">")
|
|
699
|
-
.replace(/"/g, """);
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
function formatTimestamp(iso) {
|
|
703
|
-
if (!iso) {
|
|
704
|
-
return "Unknown";
|
|
705
|
-
}
|
|
706
|
-
const d = new Date(iso);
|
|
707
|
-
if (Number.isNaN(d.getTime())) {
|
|
708
|
-
return "Unknown";
|
|
709
|
-
}
|
|
710
|
-
return d.toLocaleString("en-US", {
|
|
711
|
-
month: "short",
|
|
712
|
-
day: "numeric",
|
|
713
|
-
year: "numeric",
|
|
714
|
-
hour: "2-digit",
|
|
715
|
-
minute: "2-digit",
|
|
716
|
-
hour12: true,
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
function fmtSize(bytes) {
|
|
721
|
-
if (typeof bytes !== "number" || !Number.isFinite(bytes) || bytes < 0) {
|
|
722
|
-
return "0B";
|
|
723
|
-
}
|
|
724
|
-
if (bytes < 1024) {
|
|
725
|
-
return `${bytes}B`;
|
|
726
|
-
}
|
|
727
|
-
if (bytes < 1024 * 1024) {
|
|
728
|
-
return `${(bytes / 1024).toFixed(0)}KB`;
|
|
729
|
-
}
|
|
730
|
-
return `${(bytes / 1024 / 1024).toFixed(1)}MB`;
|
|
731
|
-
}
|
|
732
|
-
})();
|