sliccy 6.248.3 → 6.248.4

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 (138) hide show
  1. package/dist/ui/.vite/manifest.json +229 -204
  2. package/dist/ui/assets/{account-store-mjceqynz.js → account-store-CoiNHIE9.js} +1 -1
  3. package/dist/ui/assets/{account-store-DvMtuAxT.js → account-store-EUAU8ivx.js} +1 -1
  4. package/dist/ui/assets/{adobe-BwMu78zI.js → adobe-Cnyzs0z9.js} +1 -1
  5. package/dist/ui/assets/{adobe-BR5kagG4.js → adobe-bJrGAM6E.js} +1 -1
  6. package/dist/ui/assets/{agent-panels-CqdhYmst.js → agent-panels-DxCO1Hct.js} +1 -1
  7. package/dist/ui/assets/{almost-bash-shell-headless-Bapmhu3C.js → almost-bash-shell-headless-BMKZNLwu.js} +12 -12
  8. package/dist/ui/assets/{apply-layout-e_T1KE6y.js → apply-layout-BjLmZ8CX.js} +1 -1
  9. package/dist/ui/assets/{azure-openai-g4Xv5E--.js → azure-openai-C5kzBBrl.js} +1 -1
  10. package/dist/ui/assets/{azure-openai-BN148pwc.js → azure-openai-CgL7nikU.js} +1 -1
  11. package/dist/ui/assets/{cdp-BY2Mm1l_.js → cdp-DU50qKlQ.js} +1 -1
  12. package/dist/ui/assets/{cerebras-DFBA9Br9.js → cerebras-C4IlgrId.js} +1 -1
  13. package/dist/ui/assets/{cerebras-BxdukTUc.js → cerebras-Exx59PmI.js} +1 -1
  14. package/dist/ui/assets/{composer-speech--hKCVvOJ.js → composer-speech-CtvE78Rx.js} +1 -1
  15. package/dist/ui/assets/{connect-surface-BT8a8Ghs.js → connect-surface-Bvi30iYd.js} +1 -1
  16. package/dist/ui/assets/{directed-approval-DCBFB0cJ.js → directed-approval-CQVXF9kD.js} +1 -1
  17. package/dist/ui/assets/dist-CegW-G1M.js +1 -0
  18. package/dist/ui/assets/dist-kcvXs5tL.js +5 -0
  19. package/dist/ui/assets/{emscripten-vfs-hook-Dh5V1kuy.js → emscripten-vfs-hook-G9JRg26r.js} +1 -1
  20. package/dist/ui/assets/{frozen-archive-writer-AZqZX0be.js → frozen-archive-writer-DV7A8nNw.js} +1 -1
  21. package/dist/ui/assets/{frozen-archive-writer-D8Na80jS.js → frozen-archive-writer-DV8CfTGq.js} +1 -1
  22. package/dist/ui/assets/{frozen-session-delete-DgFaw8dO.js → frozen-session-delete-KNFPPuJe.js} +1 -1
  23. package/dist/ui/assets/{frozen-session-identity-V1cg6Y8X.js → frozen-session-identity-B46HFhaz.js} +1 -1
  24. package/dist/ui/assets/{frozen-session-identity-bvyrPA_v.js → frozen-session-identity-CF594WMJ.js} +1 -1
  25. package/dist/ui/assets/{gelatiere-unit-Cb4ufYMy.js → gelatiere-unit-BnExmaTM.js} +1 -1
  26. package/dist/ui/assets/{ghostty-vt-BeUP0ymd.wasm → ghostty-vt--DTGF19l.wasm} +0 -0
  27. package/dist/ui/assets/{github-D6ABE0-R.js → github-BrjjZAsX.js} +1 -1
  28. package/dist/ui/assets/{github-MjQRJghz.js → github-C6Rd03wJ.js} +1 -1
  29. package/dist/ui/assets/{github-copilot-DzbXKZtj.js → github-copilot-DqpGzQw_.js} +1 -1
  30. package/dist/ui/assets/{github-copilot-D6lNv_9-.js → github-copilot-_OyzohK5.js} +1 -1
  31. package/dist/ui/assets/{hear-AGuOYMWS.js → hear-BN5luL3S.js} +1 -1
  32. package/dist/ui/assets/{js-realm-worker-ChQxP0KX.js → js-realm-worker-DUoX2h5j.js} +2 -2
  33. package/dist/ui/assets/{jsh-executor-75tLym35.js → jsh-executor-B_ddQzto.js} +2 -2
  34. package/dist/ui/assets/{kernel-worker-BnbHshZp.js → kernel-worker-MybuXyBd.js} +8 -8
  35. package/dist/ui/assets/{lick-ws-bridge-6FEM7X9M.js → lick-ws-bridge-CPjy5dPn.js} +1 -1
  36. package/dist/ui/assets/{lick-ws-bridge-BPZTVU5Z.js → lick-ws-bridge-DEmDlxVR.js} +1 -1
  37. package/dist/ui/assets/{live-session-curation-BM7-y_ky.js → live-session-curation-C9AY4psl.js} +1 -1
  38. package/dist/ui/assets/{live-session-curation-Kj71P6dK.js → live-session-curation-ChkffqSA.js} +1 -1
  39. package/dist/ui/assets/{live-session-snapshot-DywJwCkI.js → live-session-snapshot-DwWIWtG9.js} +1 -1
  40. package/dist/ui/assets/{local-llm-_Vv5kgAi.js → local-llm-B-KVBQuy.js} +1 -1
  41. package/dist/ui/assets/{local-llm-CWvkEx1Y.js → local-llm-BI7bYfoc.js} +1 -1
  42. package/dist/ui/assets/{main-cherry-C242PEw0.js → main-cherry-CQgQpSib.js} +1 -1
  43. package/dist/ui/assets/{main-CraGyWI5.js → main-pp1LzVcX.js} +3 -3
  44. package/dist/ui/assets/{mcp-command-BabmvfAi.js → mcp-command-B779bOTK.js} +10 -10
  45. package/dist/ui/assets/{memory-curation-seam-ETLJrcCv.js → memory-curation-seam-ByPo8cGi.js} +1 -1
  46. package/dist/ui/assets/{memory-health-DS1GE6Db.js → memory-health-DcxlUrXc.js} +1 -1
  47. package/dist/ui/assets/{memory-write-execute-gi5xCQnL.js → memory-write-execute-CKI-9ZAP.js} +1 -1
  48. package/dist/ui/assets/{merge-folded-cost-into-frozen-B6zMyDMc.js → merge-folded-cost-into-frozen-DIYTak4p.js} +1 -1
  49. package/dist/ui/assets/{new-session-ERMxClkz.js → new-session-g_r_qcmc.js} +2 -2
  50. package/dist/ui/assets/{oauth-bootstrap-bG8L_Eoa.js → oauth-bootstrap-DreVl6g7.js} +2 -2
  51. package/dist/ui/assets/{onboarding-orchestrator-DHS8hPJJ.js → onboarding-orchestrator-C2EOhp34.js} +1 -1
  52. package/dist/ui/assets/{openai-codex-DKIssXwD.js → openai-codex-B8pw-NWl.js} +1 -1
  53. package/dist/ui/assets/{openai-codex-CGrqWES0.js → openai-codex-C4Tm1S2D.js} +1 -1
  54. package/dist/ui/assets/{openrouter-ZVV6FVqk.js → openrouter-B0EqwIn3.js} +1 -1
  55. package/dist/ui/assets/{openrouter-si1rvDmH.js → openrouter-CzQ8Mfh0.js} +1 -1
  56. package/dist/ui/assets/{openrouter-free-BL-82nwO.js → openrouter-free-Cl4RHvyD.js} +1 -1
  57. package/dist/ui/assets/{openrouter-free-TVKDr4Ci.js → openrouter-free-CpKJupv_.js} +1 -1
  58. package/dist/ui/assets/{openrouter-oauth-Do5xCmz5.js → openrouter-oauth-0yFjXvrc.js} +1 -1
  59. package/dist/ui/assets/{openrouter-oauth-C0BSjkp9.js → openrouter-oauth-BRahdbZ4.js} +1 -1
  60. package/dist/ui/assets/{panel-rpc-handlers-DoEdFmZH.js → panel-rpc-handlers-GkEWjrsh.js} +2 -2
  61. package/dist/ui/assets/{panelize-shell-BbOMOerL.js → panelize-shell-CtMH6CGD.js} +1 -1
  62. package/dist/ui/assets/{pi-edit-execution-sHOLEMOO.js → pi-edit-execution-ru_RSE31.js} +1 -1
  63. package/dist/ui/assets/{provider-BNzD2VCf.js → provider-Dm5ZNpu9.js} +1 -1
  64. package/dist/ui/assets/{provider-DTbC8IiQ.js → provider-qOOj0Bx4.js} +1 -1
  65. package/dist/ui/assets/{provider-settings-Hf5Vr2vr.js → provider-settings-Dts8qnq0.js} +1 -1
  66. package/dist/ui/assets/provider-store-access-C_mdEz_o.js +1 -0
  67. package/dist/ui/assets/provider-store-access-TfpqgcQb.js +1 -0
  68. package/dist/ui/assets/{providers-CH0N1Hn6.js → providers-CEBpTOtO.js} +2 -2
  69. package/dist/ui/assets/{providers-DXT44kfO.js → providers-IksVbHjy.js} +1 -1
  70. package/dist/ui/assets/{quick-llm-95xYFP4C.js → quick-llm-BKYqGAke.js} +1 -1
  71. package/dist/ui/assets/{realm-inprocess-BJztShpA.js → realm-inprocess-ZgBNrBFy.js} +2 -2
  72. package/dist/ui/assets/{realm-unhandled-rejections-DLGlX1JV.js → realm-unhandled-rejections-Dlau5E21.js} +1 -1
  73. package/dist/ui/assets/{realm-unhandled-rejections-VCxk3AmS.js → realm-unhandled-rejections-VXmx0XIB.js} +1 -1
  74. package/dist/ui/assets/{recovery-screen-C4ccpr6-.js → recovery-screen-NNWQWNqn.js} +1 -1
  75. package/dist/ui/assets/{remote-terminal-view-CbmgWziL.js → remote-terminal-view-oOTCkn_X.js} +2 -2
  76. package/dist/ui/assets/{restore-D14e8jg_.js → restore-zlhvIM6j.js} +1 -1
  77. package/dist/ui/assets/{run-CAghXwX-.js → run-BGO-UaQS.js} +1 -1
  78. package/dist/ui/assets/{run-Dt6bu0ib.js → run-BY-WnPWq.js} +2 -2
  79. package/dist/ui/assets/{run-BNk3oV9Y.js → run-DD-Zc-AI.js} +2 -2
  80. package/dist/ui/assets/{run-CctUty19.js → run-DfaMtqBW.js} +1 -1
  81. package/dist/ui/assets/{serve-command-CwZwH2sF.js → serve-command-Bkb8RYZg.js} +2 -2
  82. package/dist/ui/assets/{serve-runtime-CUY8Qryz.js → serve-runtime-BWUwkiqv.js} +1 -1
  83. package/dist/ui/assets/{session-command-memory-NpuNEURz.js → session-command-memory-nKG4sb28.js} +2 -2
  84. package/dist/ui/assets/{session-jsonl-D4p25wJo.js → session-jsonl-B5phOLgv.js} +1 -1
  85. package/dist/ui/assets/{session-jsonl-2Dg1Jgyg.js → session-jsonl-Ca8gi9Dg.js} +1 -1
  86. package/dist/ui/assets/{session-search-index-BjKWodVu.js → session-search-index-tweAFlvW.js} +1 -1
  87. package/dist/ui/assets/{setup-feature-flags-remote-CjVU1qOg.js → setup-feature-flags-remote-Bnrz-kqW.js} +1 -1
  88. package/dist/ui/assets/{setup-model-catalog-BdD735K3.js → setup-model-catalog-DPoX_vRY.js} +1 -1
  89. package/dist/ui/assets/{silent-renew-backoff-C5-VfSnD.js → silent-renew-backoff-CMGVLIXZ.js} +1 -1
  90. package/dist/ui/assets/slicc-version-D9VMviCR.js +1 -0
  91. package/dist/ui/assets/{soundscape-CQ9qZd-p.js → soundscape-DtFo8gPx.js} +1 -1
  92. package/dist/ui/assets/{speak-CSIK-Yvk.js → speak-BNqo53H8.js} +1 -1
  93. package/dist/ui/assets/{sprinkle-manager-Cn-J2bbA.js → sprinkle-manager-KZBan5ot.js} +1 -1
  94. package/dist/ui/assets/{sprinkle-renderer-BUkonV7E.js → sprinkle-renderer-GOx0t_KB.js} +1 -1
  95. package/dist/ui/assets/{sudo-EZzi8bkV.js → sudo-CfhS3XDc.js} +1 -1
  96. package/dist/ui/assets/{supervisor-CUgH4wzz.js → supervisor-DXke_KPH.js} +1 -1
  97. package/dist/ui/assets/{sync-dialog-D4gXHIgq.js → sync-dialog-B4XIyWlR.js} +1 -1
  98. package/dist/ui/assets/{transformers-env-Dm_MXKYG.js → transformers-env-C6_kFf6e.js} +1 -1
  99. package/dist/ui/assets/{tray-leader-BUSNq_Gl.js → tray-leader-CrSh1Fel.js} +1 -1
  100. package/dist/ui/assets/{tray-leave-runtime-DEwFa7lI.js → tray-leave-runtime-wJkN1AA0.js} +1 -1
  101. package/dist/ui/assets/{tray-sidecar-CKjdtBdU.js → tray-sidecar-DlOOGPQH.js} +1 -1
  102. package/dist/ui/assets/{upgrade-detection-DZ35XKwJ.js → upgrade-detection-Ct24ndl7.js} +1 -1
  103. package/dist/ui/assets/{voice-reply-CaYhBRdn.js → voice-reply-CxXL_kEA.js} +1 -1
  104. package/dist/ui/assets/warm-wterm-DQwmz7G4.js +1 -0
  105. package/dist/ui/assets/wasm-inline-DSUyFn1L.js +1 -0
  106. package/dist/ui/assets/{wc-attach-C9rxulO7.js → wc-attach-Cmjdm23i.js} +2 -2
  107. package/dist/ui/assets/{wc-browser-6Ul-SEOZ.js → wc-browser-SUzkjJTA.js} +1 -1
  108. package/dist/ui/assets/{wc-computers-sDur6b13.js → wc-computers-BrBtwbOb.js} +1 -1
  109. package/dist/ui/assets/{wc-detached-9ariBwmo.js → wc-detached-cVeDn3rP.js} +1 -1
  110. package/dist/ui/assets/{wc-extension-CaXN-GTk.js → wc-extension-VohpgpQG.js} +2 -2
  111. package/dist/ui/assets/{wc-follower-B1AULTlR.js → wc-follower-BfOmPsV0.js} +3 -3
  112. package/dist/ui/assets/{wc-follower-oauth-L5HBJRH7.js → wc-follower-oauth-Br9RPRQJ.js} +1 -1
  113. package/dist/ui/assets/{wc-gelatiere-CWTa_Fw1.js → wc-gelatiere-WQR5AxZ9.js} +1 -1
  114. package/dist/ui/assets/{wc-live-CBQLeEAN.js → wc-live-Bj38qUgj.js} +5 -5
  115. package/dist/ui/assets/{wc-nav-D-qT15R2.js → wc-nav-BHy21Jl4.js} +2 -2
  116. package/dist/ui/assets/{wc-onboarding-C30JW8KM.js → wc-onboarding-DooXTaWX.js} +2 -2
  117. package/dist/ui/assets/{wc-permissions-Do9-WSJc.js → wc-permissions-CUtqnNV2.js} +2 -2
  118. package/dist/ui/assets/{wc-placeholder-B67JnHl5.js → wc-placeholder-Ca_dzZDr.js} +3 -3
  119. package/dist/ui/assets/{wc-secret-request-BaJdvYlQ.js → wc-secret-request-CxHPy2MF.js} +1 -1
  120. package/dist/ui/assets/{wc-settings-D8XLxkCT.js → wc-settings-Bf68mx0s.js} +3 -3
  121. package/dist/ui/assets/{wc-shell-BOiMEPvK.js → wc-shell-C0Y0f1tt.js} +234 -20
  122. package/dist/ui/assets/{wc-shortcut-config-B9YZlZ95.js → wc-shortcut-config-CkCG_Ehd.js} +1 -1
  123. package/dist/ui/assets/{wc-sprinkles-PlC39bUS.js → wc-sprinkles-BlFVp_Zu.js} +2 -2
  124. package/dist/ui/assets/{wc-transcript-export-BLI_0Glp.js → wc-transcript-export-DWFK7w_9.js} +2 -2
  125. package/dist/ui/assets/{wc-tray-DWLWOtPX.js → wc-tray-BU_mkrQK.js} +4 -4
  126. package/dist/ui/assets/welcome-detection-3uAUZPVw.js +1 -0
  127. package/dist/ui/assets/{whisper-session-CoIpux2Q.js → whisper-session-7VWAVhAF.js} +2 -2
  128. package/dist/ui/assets/{xai-grok-B5uojC5R.js → xai-grok-6WPJsfyI.js} +1 -1
  129. package/dist/ui/assets/{xai-grok-Xb6FZ1vE.js → xai-grok-Cl-8KspF.js} +1 -1
  130. package/dist/ui/index.html +3 -3
  131. package/dist/ui/packages/webapp/index.html +3 -3
  132. package/package.json +1 -1
  133. package/dist/ui/assets/dist-CaUJj_g5.js +0 -1
  134. package/dist/ui/assets/dist-DBSQLDw2.js +0 -1
  135. package/dist/ui/assets/provider-store-access-BiWdVR9d.js +0 -1
  136. package/dist/ui/assets/provider-store-access-D3dRz2B4.js +0 -1
  137. package/dist/ui/assets/slicc-version-Cf9JtZVj.js +0 -1
  138. package/dist/ui/assets/welcome-detection-BXOFjfMt.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-kBT87Ea7.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/preload-helper-Czpn1I53.js","assets/quick-llm-95xYFP4C.js","assets/compat-0YnuwvMn.js","assets/models-D9KYIFyv.js","assets/diagnostics-B-5VkVir.js","assets/env-api-keys-BMbk-OAv.js","assets/provider-env-CTOcDKrQ.js","assets/__vite-browser-external-5eBdwsFd.js","assets/openrouter.models-C88RzzVZ.js","assets/azure-openai-config--zABV6W_.js","assets/logger-DDBAeTLF.js","assets/utf16-clip-CGL7omVm.js","assets/account-store-DvMtuAxT.js","assets/core-DzRw0pz2.js","assets/feature-flags-DvsApnS-.js","assets/proxied-fetch-4VBgrEIu.js","assets/base64-ELzoYfwP.js","assets/proxy-error-BSFYY7jj.js","assets/api-endpoint-DuEQRZ4g.js","assets/runtime-env-Dlaokqg1.js","assets/secret-topology-hMRoGGjt.js","assets/float-topology-C_iRKPQK.js","assets/secrets-bridge-client-D734Xx8G.js","assets/port-bridge-client-B-gpiOVR.js","assets/panel-rpc-accessor-B4BfPLSo.js","assets/image-markers-q8JQTtid.js","assets/tool-ui-eSQ1g2I1.js","assets/providers-CH0N1Hn6.js","assets/stored-accounts-ChNHYF68.js","assets/bedrock-camp-compat-D6dUCn_T.js","assets/bedrock-camp-extra-models-COVvjLB5.js","assets/claude-model-version-3MWQoaco.js","assets/renamed-providers-DDe6My59.js","assets/llm-session-id-bZQs6gBN.js","assets/icons-BUdZEBvI.js","assets/isomorphic-git-CL-UvciX.js","assets/buffer-DvhmllZ2.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./preload-helper-Czpn1I53.js";import{t as n}from"./logger-DDBAeTLF.js";import{i as r,n as i,r as a,t as o}from"./mime-types-D0xZwlMO.js";import{n as s,t as c}from"./base64-ELzoYfwP.js";import{a as l}from"./bridge-protocol-C52CnDIj.js";import{k as u,p as d}from"./account-store-DvMtuAxT.js";import{n as f,t as p}from"./same-file-identity-OexpsaSD.js";import{n as m}from"./runtime-env-Dlaokqg1.js";import{n as h}from"./image-markers-q8JQTtid.js";import{d as g,f as _,i as v,m as y,u as b}from"./telemetry-B0sKnLBU.js";import{t as x}from"./types-D8gIX-W-.js";import{a as S,n as C,r as ee,t as w}from"./icons-BUdZEBvI.js";function T(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n>=10||r===0?Math.round(n):Math.round(n*10)/10} ${t[r]}`}function te(e){let t=e.mimeType||`application/octet-stream`;return`${e.name} (${t}, ${T(e.size)})`}function ne(e,t=`The original file lives on a remote runtime and is not accessible here.`){return e?.length?e.map(e=>{if(!e.path)return{...e};let{path:n,...r}=e;return e.kind===`image`&&e.data||e.kind===`text`&&e.text!==void 0?r:{...r,error:r.error??t}}):[]}var re='---\nintervalHours: 24\nnightly: \'0 3 * * *\'\nmaxSuggestions: 5\n# allowedCommands adds to the built-in set a pass may run without asking you\n# for approval; it never replaces it. Bare command names only:\n# allowedCommands: [tree, xxd]\n---\n\n# Gelatiere pass\n\nYou are the gelatiere, SLICC\'s resident advisor. A lick just asked you for a pass: a nightly `[Cron Event: gelatiere-nightly]`, a `[Sprinkle Event: gelatiere]` because a session ended or someone ran `gelatiere run`, or a direct request. Your job is to look at how this person actually uses SLICC and come back with a handful of concrete, well-grounded suggestions — skills to install, use cases they have not tried, habits that would make their sessions go better, a skill worth writing when none exists, a bug worth reporting when SLICC itself is what got in the way — then hand them to the cones.\n\n**Work fast: a pass should take a few minutes, not many.** Mine the signals below, cross them with what is available, write the candidates file, and finish with the two commands at the end. Never install anything, never edit memory files yourself (the nightly\'s `memory dream` delegates that to sandboxed dreamer scoops), never message a cone by any other means than `gelatiere deliver`.\n\n## Nightly only: start the dreaming pass\n\nWhen this pass is the nightly (`[Cron Event: gelatiere-nightly]`), start the memory-dreaming pass first, before anything else, and do not wait for it:\n\n```bash\nmemory dream --all\n```\n\nThat spawns one sandboxed memory-dreamer per cone to consolidate its memory file — merge duplicates, drop superseded facts, land under budget. It runs detached; carry on with your own pass immediately and never read or edit the memory files it is working on beyond the signal-mining below. Skip this step entirely on session-end and on-demand passes.\n\n## What the user has done\n\nRead these in order; each one is cheap. Start with `date -u +%Y-%m-%d` so your evidence carries today\'s date.\n\n1. **Profile** — who they said they are on first run: `cat /home/*/.welcome.json 2>/dev/null` (`purpose`, `role`, `tasks`, `apps`, `company`).\n2. **Durable memory** — what earlier sessions already established (preferences, projects, pitfalls): `cat /workspace/CLAUDE.md`, and `cat /cones/*/CLAUDE.md 2>/dev/null` for the other cones. A long-lived install\'s memory files run to a thousand lines each; on those, read the shape first (`grep -n \'^## \' FILE`) and `sed -n` only the sections that look relevant.\n3. **Session index** — titles, dates, cones: `jq -r \'.[] | "\\(.frozenAt[0:10]) \\(.cone // "cone") \\(.title)"\' /sessions/index.json | tail -30`.\n4. **Recent archives** — the newest few sessions: `ls -t /sessions/*.md | grep -v agent- | head -5`.\n `/sessions/live-*.md` in that list is a chat still in progress — usually the newest and largest\n signal there is, and the easiest to skip. Check `ls -lt /sessions/live-*.md` too.\n5. **Your own notes** — what you concluded last time: `cat /shared/.gelatiere/notes.md 2>/dev/null`.\n\n**Never `cat` an archive.** They reach several megabytes and the `<!-- slicc:session-data ... -->` block is one JSON line holding the whole session. Pull the three signals separately, each on the prose half only:\n\n```bash\n# What the user asked for, in their words.\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | awk \'/^## User/{p=1;next} /^## (Assistant|Summary)/{p=0} /^### Tool/{p=0} p\' | head -80\n\n# Which commands and tools the sessions lean on.\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | grep -o \'^### Tool: [a-z_]*\' | sort | uniq -c | sort -rn\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | grep -oE \'^\\$? ?[a-z][a-z0-9-]+ \' | sort | uniq -c | sort -rn | head -20\n\n# What broke — the strongest signal for a missing skill.\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | grep -B4 \'^Result:.*\\(rror\\|not found\\|failed\\|denied\\|ENOENT\\)\' | cut -c1-160 | head -60\n```\n\n6. **What is already installed** — never suggest a duplicate: `upskill list`.\n7. **What you already suggested** — `/shared/.gelatiere/suggestions.json` holds every earlier suggestion with its `dismissedAt`. Do not repeat an id that is still open, and do not resurrect a dismissed one unless the sessions show a new, strong reason: `jq -r \'.[] | "\\(.id)\\t\\(.kind)\\t\\(.dismissedAt // "open")\\t\\(.title)"\' /shared/.gelatiere/suggestions.json 2>/dev/null`.\n\n## What is available\n\nCross the signals above with what SLICC can offer. Spend one command on each; do not browse further.\n\n```bash\n# The skill catalog: name, description, the tasks / roles / apps each skill fits, and WHERE it\n# lives (repo, path, skill, installAll) — the install command is built from those last four.\ngelatiere catalog | jq -r \'.data[] | "\\(.name)\\t\\(.description)\\ttasks=\\(.tasks) role=\\(.role) apps=\\(.apps)\\trepo=\\(.repo) path=\\(.path) skill=\\(.skill) installAll=\\(.installAll)"\'\n\n# Every documented shell command, one man page each. This is what the WEBSITE documents,\n# not everything SLICC ships — never tell the user a command is absent on this alone.\ngelatiere commands\n\n# What SLICC is FOR, in the site\'s own words: title, summary and the skills each use case\n# wants. Where a `use-case` suggestion for untried territory comes from.\ngelatiere use-cases\n\n# The community skills repo, when the catalog looks thin for this user.\nupskill ai-ecoverse/skills\n```\n\nRead a man page only when you are about to recommend that command and need to be sure it does what you think: `gelatiere man <command> | head -60`. You have no `curl` and need none — `gelatiere catalog`, `gelatiere commands`, `gelatiere use-cases` and `gelatiere man` are your whole web surface.\n\n## What to suggest\n\nAt most the `maxSuggestions` from the config block above, best first. Fewer, sharper suggestions beat a full list; an empty list is a fine outcome when nothing is genuinely worth the user\'s attention. Every suggestion must be traceable to something you saw:\n\n| kind | when | required fields |\n| ------------ | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |\n| `skill` | a catalog or repo skill matches a recurring task, app, or failure in the sessions | `skill`, and `install` — the exact `upskill` command (see below) |\n| `use-case` | a SLICC capability (shell command, scoops, sprinkles, mounts, automation) fits work the user does by hand or not at all | `prompt` — a message the user could send verbatim |\n| `tip` | a habit that would have avoided a failure or a repeated detour in the sessions | `body` explains what to do differently |\n| `skill-idea` | the sessions repeat a routine no installable skill covers — write one instead of installing one | `prompt` — what to ask a cone to author |\n| `issue` | SLICC ITSELF is what got in the way: a command that broke, a surface that lied, a capability that is simply missing | `prompt` — what to ask a cone to file |\n\n### `skill-idea` and `issue` — the two that point away from the catalog\n\nThe catalog is small and mostly already installed, so do not expect a `skill` every pass. When the\nsame multi-step routine shows up in two or more sessions — the same command sequence, the same\nprompt retyped, the same checklist rebuilt from memory — and neither `upskill list` nor `gelatiere\ncatalog` covers it, the honest answer is **write one**. Name the routine you watched, not a\ncategory; the `prompt` asks a cone to author it (what it does, when it triggers, the steps you saw)\nand points at `skill-creator` when `upskill list` shows it installed.\n\n> "You rebuilt the same release checklist by hand in three sessions — tag, changelog, TestFlight\n> notes, then the smoke run." `prompt`: "Write a skill for my release checklist: …"\n\n`issue` is for the failures nobody reports: the command that exited 1 and got worked around, the\nflag that silently did nothing, the panel that showed stale state. Only when the friction is\nSLICC\'s own AND reproducible from what you read — a named failure with session evidence, not a\nwish. One per pass at the very most: a pass that files speculative bugs teaches the user to ignore\nthe card. The `prompt` asks a cone to open it against `ai-ecoverse/slicc` with your reproduction.\n\n> "`chmod +x` reports success and leaves the mode unchanged, so `./script.sh` fails with\n> `Permission denied`." `prompt`: "File an issue against ai-ecoverse/slicc: chmod appears to …"\n\nNeither fits when the user simply did something the hard way (that is a `tip`), when the capability\nalready exists and they missed it (`use-case`), or when the evidence is one ambiguous error.\n\n### The `install` command\n\nIt is built from the catalog row, never from the bare name — `upskill <name>` alone searches the public registries and does not find catalog skills:\n\n| catalog row | `install` |\n| ------------------------------------------------- | -------------------------------------------- |\n| `repo=o/r skill=x` (path empty) | `upskill o/r --skill x` |\n| `repo=o/r path=skills/ skill=x` | `upskill o/r --path skills/ --skill x` |\n| `repo=o/r path=skills/migration/ installAll=true` | `upskill o/r --path skills/migration/ --all` |\n| a skill from `upskill ai-ecoverse/skills` output | `upskill ai-ecoverse/skills --skill <name>` |\n\n### Rules for every kind\n\n- `id` is a stable slug (`skill-github`, `use-case-fswatch-deploy`, `tip-mount-once`, `skill-idea-release-checklist`, `issue-chmod-noop`) so a repeat pass recognises it.\n- Speak to the user as "you" in every field — never about them in the third person ("Lars builds…" is wrong; "You build…" is right).\n- The card shows exactly two things — WHAT to do and WHY — so write the fields that way:\n - `title` is the WHAT: a short imperative, eight words or fewer, sentence case — "Install the GitHub skill", "Script your build–serve–screenshot loop", "Write a release-checklist skill", "Report the chmod no-op". No benefit clause bolted on ("…to manage repos and pull requests from chat" belongs in the why, if anywhere).\n - `body` is the WHY: one or two sentences, grounded in what you actually saw, that tell the story of the change — what you watched the user do by hand, and what gets better. "You ran the build–serve–screenshot loop 80+ times by hand in your bakery session; a workflow file replays it as one command." It must not restate the title, list features, or repeat `evidence` word for word.\n- `evidence` is one friendly sentence, spoken to the user, saying what you saw that led here — "You told the welcome wizard you\'re a developer who lives in GitHub". It rides the lick for the cones; the card does not render it, so do not lean on it to justify the suggestion — the why lives in `body`. Never a field dump like `role=developer, tasks=[…]`.\n- `url` is optional: the skill page or the man page.\n- `cones` names who it is for: the folder(s) of the cones whose sessions or memory led to it — the `cone` in the session index or an archive\'s frontmatter (`cone` is the primary, `cone-<slug>` an extra cone). Only those cones get a lick. Omit it only for advice that is about the whole install, not one cone\'s work; that goes to the primary cone alone.\n- Never suggest what `upskill list` already shows installed, and never invent a skill or command that is not in the catalog, the repo listing, or the sitemap. A `skill-idea` is the one exception — it names a skill that does NOT exist yet, which is the point; check first that no installable one covers it.\n\n## Finish\n\nWrite the candidates as JSON — `{ "suggestions": [ { "id", "kind", "title", "body", "skill", "install", "prompt", "url", "evidence", "cones" } ] }` — to `$TMPDIR/candidates.json`, then run exactly:\n\n```bash\ngelatiere suggest "$TMPDIR/candidates.json" && gelatiere deliver\n```\n\n`suggest` validates and folds the candidates into the store (known ids are kept, dismissed ones stay dismissed); `deliver` licks each cone with what is new and addressed to it. Then update `/shared/.gelatiere/notes.md` with two or three lines on what you looked at and what you decided against — that file, not your reply, is your memory across passes. Reply with one short line.\n\n<!-- How to customize\nAdd instructions above, for example: prefer skills from a company repo, or always check a team\nwiki at /mnt/kb before suggesting. The config block sets `intervalHours` (minimum hours between\nsession-end passes; the nightly pass ignores it), `nightly` (a 5-field cron expression, registered\nby `gelatiere init` as the `gelatiere-nightly` crontask), `maxSuggestions` (capped at 10) and\n`allowedCommands`.\n\n`allowedCommands` is the gelatiere\'s half of what `MEMORY.md` gives the memory curator: extra shell\ncommands a pass may run without escalating. It is ADDITIVE — the built-in set (the read-only text\nutilities, `jq`, `rg`, `upskill`, `gelatiere`, `memory`) always stands, and the file only extends\nit; entries are bare command names, so `tree` is valid and `tree -L 2` is not. `gelatiere status`\nprints the list actually in force and flags an edit that has not been applied yet. The unit is\nregistered once and then persists, so an edit here takes effect on the next boot or the next\n`gelatiere init` — and never mid-pass: applying it rebuilds the unit, which would cancel a pass in\nflight, so `gelatiere init` leaves a busy gelatiere alone and asks to be re-run when it is idle.\n\nAdding a command grants it to an UNATTENDED agent that can read `/sessions/` and every cone\'s\nmemory, so weigh a network command (`curl`, `wget`, `ssh`) against that: the pass reads third-party\ncatalog and repo content, and general egress would make one injected line enough to exfiltrate an\narchive. That is why the built-in set has none, and why leaving them out is the right default.\n\nThe gelatiere is a persistent scoop no cone owns (folder `gelatiere`); its own conversation is\ncompacted while it idles. Dismissed suggestions are kept with a dismissedAt stamp so the next pass does not\nrepeat them. `gelatiere run` from any cone\'s shell asks for a pass now.\n-->\n';function ie(e,t){let n=e.replace(/^\uFEFF/,``).replace(/\r\n?/g,`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-kBT87Ea7.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/preload-helper-Czpn1I53.js","assets/dist-kcvXs5tL.js","assets/quick-llm-BKYqGAke.js","assets/compat-0YnuwvMn.js","assets/models-D9KYIFyv.js","assets/diagnostics-B-5VkVir.js","assets/env-api-keys-BMbk-OAv.js","assets/provider-env-CTOcDKrQ.js","assets/__vite-browser-external-5eBdwsFd.js","assets/openrouter.models-C88RzzVZ.js","assets/azure-openai-config--zABV6W_.js","assets/logger-DDBAeTLF.js","assets/utf16-clip-CGL7omVm.js","assets/account-store-EUAU8ivx.js","assets/core-DzRw0pz2.js","assets/feature-flags-DvsApnS-.js","assets/proxied-fetch-4VBgrEIu.js","assets/base64-ELzoYfwP.js","assets/proxy-error-BSFYY7jj.js","assets/api-endpoint-DuEQRZ4g.js","assets/runtime-env-Dlaokqg1.js","assets/secret-topology-hMRoGGjt.js","assets/float-topology-C_iRKPQK.js","assets/secrets-bridge-client-D734Xx8G.js","assets/port-bridge-client-B-gpiOVR.js","assets/panel-rpc-accessor-B4BfPLSo.js","assets/image-markers-q8JQTtid.js","assets/tool-ui-eSQ1g2I1.js","assets/providers-CEBpTOtO.js","assets/stored-accounts-ChNHYF68.js","assets/bedrock-camp-compat-D6dUCn_T.js","assets/bedrock-camp-extra-models-COVvjLB5.js","assets/claude-model-version-3MWQoaco.js","assets/renamed-providers-DDe6My59.js","assets/llm-session-id-bZQs6gBN.js","assets/icons-BUdZEBvI.js","assets/isomorphic-git-CL-UvciX.js","assets/buffer-DvhmllZ2.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./preload-helper-Czpn1I53.js";import{t as n}from"./logger-DDBAeTLF.js";import{i as r,n as i,r as a,t as o}from"./mime-types-D0xZwlMO.js";import{n as s,t as c}from"./base64-ELzoYfwP.js";import{a as l}from"./bridge-protocol-C52CnDIj.js";import{k as u,p as d}from"./account-store-EUAU8ivx.js";import{n as f,t as p}from"./same-file-identity-OexpsaSD.js";import{n as m}from"./runtime-env-Dlaokqg1.js";import{n as h}from"./image-markers-q8JQTtid.js";import{d as g,f as _,i as v,m as y,u as b}from"./telemetry-B0sKnLBU.js";import{t as x}from"./types-D8gIX-W-.js";import{a as S,n as C,r as ee,t as w}from"./icons-BUdZEBvI.js";function T(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n>=10||r===0?Math.round(n):Math.round(n*10)/10} ${t[r]}`}function te(e){let t=e.mimeType||`application/octet-stream`;return`${e.name} (${t}, ${T(e.size)})`}function ne(e,t=`The original file lives on a remote runtime and is not accessible here.`){return e?.length?e.map(e=>{if(!e.path)return{...e};let{path:n,...r}=e;return e.kind===`image`&&e.data||e.kind===`text`&&e.text!==void 0?r:{...r,error:r.error??t}}):[]}var re='---\nintervalHours: 24\nnightly: \'0 3 * * *\'\nmaxSuggestions: 5\n# allowedCommands adds to the built-in set a pass may run without asking you\n# for approval; it never replaces it. Bare command names only:\n# allowedCommands: [tree, xxd]\n---\n\n# Gelatiere pass\n\nYou are the gelatiere, SLICC\'s resident advisor. A lick just asked you for a pass: a nightly `[Cron Event: gelatiere-nightly]`, a `[Sprinkle Event: gelatiere]` because a session ended or someone ran `gelatiere run`, or a direct request. Your job is to look at how this person actually uses SLICC and come back with a handful of concrete, well-grounded suggestions — skills to install, use cases they have not tried, habits that would make their sessions go better, a skill worth writing when none exists, a bug worth reporting when SLICC itself is what got in the way — then hand them to the cones.\n\n**Work fast: a pass should take a few minutes, not many.** Mine the signals below, cross them with what is available, write the candidates file, and finish with the two commands at the end. Never install anything, never edit memory files yourself (the nightly\'s `memory dream` delegates that to sandboxed dreamer scoops), never message a cone by any other means than `gelatiere deliver`.\n\n## Nightly only: start the dreaming pass\n\nWhen this pass is the nightly (`[Cron Event: gelatiere-nightly]`), start the memory-dreaming pass first, before anything else, and do not wait for it:\n\n```bash\nmemory dream --all\n```\n\nThat spawns one sandboxed memory-dreamer per cone to consolidate its memory file — merge duplicates, drop superseded facts, land under budget. It runs detached; carry on with your own pass immediately and never read or edit the memory files it is working on beyond the signal-mining below. Skip this step entirely on session-end and on-demand passes.\n\n## What the user has done\n\nRead these in order; each one is cheap. Start with `date -u +%Y-%m-%d` so your evidence carries today\'s date.\n\n1. **Profile** — who they said they are on first run: `cat /home/*/.welcome.json 2>/dev/null` (`purpose`, `role`, `tasks`, `apps`, `company`).\n2. **Durable memory** — what earlier sessions already established (preferences, projects, pitfalls): `cat /workspace/CLAUDE.md`, and `cat /cones/*/CLAUDE.md 2>/dev/null` for the other cones. A long-lived install\'s memory files run to a thousand lines each; on those, read the shape first (`grep -n \'^## \' FILE`) and `sed -n` only the sections that look relevant.\n3. **Session index** — titles, dates, cones: `jq -r \'.[] | "\\(.frozenAt[0:10]) \\(.cone // "cone") \\(.title)"\' /sessions/index.json | tail -30`.\n4. **Recent archives** — the newest few sessions: `ls -t /sessions/*.md | grep -v agent- | head -5`.\n `/sessions/live-*.md` in that list is a chat still in progress — usually the newest and largest\n signal there is, and the easiest to skip. Check `ls -lt /sessions/live-*.md` too.\n5. **Your own notes** — what you concluded last time: `cat /shared/.gelatiere/notes.md 2>/dev/null`.\n\n**Never `cat` an archive.** They reach several megabytes and the `<!-- slicc:session-data ... -->` block is one JSON line holding the whole session. Pull the three signals separately, each on the prose half only:\n\n```bash\n# What the user asked for, in their words.\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | awk \'/^## User/{p=1;next} /^## (Assistant|Summary)/{p=0} /^### Tool/{p=0} p\' | head -80\n\n# Which commands and tools the sessions lean on.\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | grep -o \'^### Tool: [a-z_]*\' | sort | uniq -c | sort -rn\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | grep -oE \'^\\$? ?[a-z][a-z0-9-]+ \' | sort | uniq -c | sort -rn | head -20\n\n# What broke — the strongest signal for a missing skill.\nsed \'/^<!-- slicc:session-data$/,/^-->$/d\' ARCHIVE | grep -B4 \'^Result:.*\\(rror\\|not found\\|failed\\|denied\\|ENOENT\\)\' | cut -c1-160 | head -60\n```\n\n6. **What is already installed** — never suggest a duplicate: `upskill list`.\n7. **What you already suggested** — `/shared/.gelatiere/suggestions.json` holds every earlier suggestion with its `dismissedAt`. Do not repeat an id that is still open, and do not resurrect a dismissed one unless the sessions show a new, strong reason: `jq -r \'.[] | "\\(.id)\\t\\(.kind)\\t\\(.dismissedAt // "open")\\t\\(.title)"\' /shared/.gelatiere/suggestions.json 2>/dev/null`.\n\n## What is available\n\nCross the signals above with what SLICC can offer. Spend one command on each; do not browse further.\n\n```bash\n# The skill catalog: name, description, the tasks / roles / apps each skill fits, and WHERE it\n# lives (repo, path, skill, installAll) — the install command is built from those last four.\ngelatiere catalog | jq -r \'.data[] | "\\(.name)\\t\\(.description)\\ttasks=\\(.tasks) role=\\(.role) apps=\\(.apps)\\trepo=\\(.repo) path=\\(.path) skill=\\(.skill) installAll=\\(.installAll)"\'\n\n# Every documented shell command, one man page each. This is what the WEBSITE documents,\n# not everything SLICC ships — never tell the user a command is absent on this alone.\ngelatiere commands\n\n# What SLICC is FOR, in the site\'s own words: title, summary and the skills each use case\n# wants. Where a `use-case` suggestion for untried territory comes from.\ngelatiere use-cases\n\n# The community skills repo, when the catalog looks thin for this user.\nupskill ai-ecoverse/skills\n```\n\nRead a man page only when you are about to recommend that command and need to be sure it does what you think: `gelatiere man <command> | head -60`. You have no `curl` and need none — `gelatiere catalog`, `gelatiere commands`, `gelatiere use-cases` and `gelatiere man` are your whole web surface.\n\n## What to suggest\n\nAt most the `maxSuggestions` from the config block above, best first. Fewer, sharper suggestions beat a full list; an empty list is a fine outcome when nothing is genuinely worth the user\'s attention. Every suggestion must be traceable to something you saw:\n\n| kind | when | required fields |\n| ------------ | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |\n| `skill` | a catalog or repo skill matches a recurring task, app, or failure in the sessions | `skill`, and `install` — the exact `upskill` command (see below) |\n| `use-case` | a SLICC capability (shell command, scoops, sprinkles, mounts, automation) fits work the user does by hand or not at all | `prompt` — a message the user could send verbatim |\n| `tip` | a habit that would have avoided a failure or a repeated detour in the sessions | `body` explains what to do differently |\n| `skill-idea` | the sessions repeat a routine no installable skill covers — write one instead of installing one | `prompt` — what to ask a cone to author |\n| `issue` | SLICC ITSELF is what got in the way: a command that broke, a surface that lied, a capability that is simply missing | `prompt` — what to ask a cone to file |\n\n### `skill-idea` and `issue` — the two that point away from the catalog\n\nThe catalog is small and mostly already installed, so do not expect a `skill` every pass. When the\nsame multi-step routine shows up in two or more sessions — the same command sequence, the same\nprompt retyped, the same checklist rebuilt from memory — and neither `upskill list` nor `gelatiere\ncatalog` covers it, the honest answer is **write one**. Name the routine you watched, not a\ncategory; the `prompt` asks a cone to author it (what it does, when it triggers, the steps you saw)\nand points at `skill-creator` when `upskill list` shows it installed.\n\n> "You rebuilt the same release checklist by hand in three sessions — tag, changelog, TestFlight\n> notes, then the smoke run." `prompt`: "Write a skill for my release checklist: …"\n\n`issue` is for the failures nobody reports: the command that exited 1 and got worked around, the\nflag that silently did nothing, the panel that showed stale state. Only when the friction is\nSLICC\'s own AND reproducible from what you read — a named failure with session evidence, not a\nwish. One per pass at the very most: a pass that files speculative bugs teaches the user to ignore\nthe card. The `prompt` asks a cone to open it against `ai-ecoverse/slicc` with your reproduction.\n\n> "`chmod +x` reports success and leaves the mode unchanged, so `./script.sh` fails with\n> `Permission denied`." `prompt`: "File an issue against ai-ecoverse/slicc: chmod appears to …"\n\nNeither fits when the user simply did something the hard way (that is a `tip`), when the capability\nalready exists and they missed it (`use-case`), or when the evidence is one ambiguous error.\n\n### The `install` command\n\nIt is built from the catalog row, never from the bare name — `upskill <name>` alone searches the public registries and does not find catalog skills:\n\n| catalog row | `install` |\n| ------------------------------------------------- | -------------------------------------------- |\n| `repo=o/r skill=x` (path empty) | `upskill o/r --skill x` |\n| `repo=o/r path=skills/ skill=x` | `upskill o/r --path skills/ --skill x` |\n| `repo=o/r path=skills/migration/ installAll=true` | `upskill o/r --path skills/migration/ --all` |\n| a skill from `upskill ai-ecoverse/skills` output | `upskill ai-ecoverse/skills --skill <name>` |\n\n### Rules for every kind\n\n- `id` is a stable slug (`skill-github`, `use-case-fswatch-deploy`, `tip-mount-once`, `skill-idea-release-checklist`, `issue-chmod-noop`) so a repeat pass recognises it.\n- Speak to the user as "you" in every field — never about them in the third person ("Lars builds…" is wrong; "You build…" is right).\n- The card shows exactly two things — WHAT to do and WHY — so write the fields that way:\n - `title` is the WHAT: a short imperative, eight words or fewer, sentence case — "Install the GitHub skill", "Script your build–serve–screenshot loop", "Write a release-checklist skill", "Report the chmod no-op". No benefit clause bolted on ("…to manage repos and pull requests from chat" belongs in the why, if anywhere).\n - `body` is the WHY: one or two sentences, grounded in what you actually saw, that tell the story of the change — what you watched the user do by hand, and what gets better. "You ran the build–serve–screenshot loop 80+ times by hand in your bakery session; a workflow file replays it as one command." It must not restate the title, list features, or repeat `evidence` word for word.\n- `evidence` is one friendly sentence, spoken to the user, saying what you saw that led here — "You told the welcome wizard you\'re a developer who lives in GitHub". It rides the lick for the cones; the card does not render it, so do not lean on it to justify the suggestion — the why lives in `body`. Never a field dump like `role=developer, tasks=[…]`.\n- `url` is optional: the skill page or the man page.\n- `cones` names who it is for: the folder(s) of the cones whose sessions or memory led to it — the `cone` in the session index or an archive\'s frontmatter (`cone` is the primary, `cone-<slug>` an extra cone). Only those cones get a lick. Omit it only for advice that is about the whole install, not one cone\'s work; that goes to the primary cone alone.\n- Never suggest what `upskill list` already shows installed, and never invent a skill or command that is not in the catalog, the repo listing, or the sitemap. A `skill-idea` is the one exception — it names a skill that does NOT exist yet, which is the point; check first that no installable one covers it.\n\n## Finish\n\nWrite the candidates as JSON — `{ "suggestions": [ { "id", "kind", "title", "body", "skill", "install", "prompt", "url", "evidence", "cones" } ] }` — to `$TMPDIR/candidates.json`, then run exactly:\n\n```bash\ngelatiere suggest "$TMPDIR/candidates.json" && gelatiere deliver\n```\n\n`suggest` validates and folds the candidates into the store (known ids are kept, dismissed ones stay dismissed); `deliver` licks each cone with what is new and addressed to it. Then update `/shared/.gelatiere/notes.md` with two or three lines on what you looked at and what you decided against — that file, not your reply, is your memory across passes. Reply with one short line.\n\n<!-- How to customize\nAdd instructions above, for example: prefer skills from a company repo, or always check a team\nwiki at /mnt/kb before suggesting. The config block sets `intervalHours` (minimum hours between\nsession-end passes; the nightly pass ignores it), `nightly` (a 5-field cron expression, registered\nby `gelatiere init` as the `gelatiere-nightly` crontask), `maxSuggestions` (capped at 10) and\n`allowedCommands`.\n\n`allowedCommands` is the gelatiere\'s half of what `MEMORY.md` gives the memory curator: extra shell\ncommands a pass may run without escalating. It is ADDITIVE — the built-in set (the read-only text\nutilities, `jq`, `rg`, `upskill`, `gelatiere`, `memory`) always stands, and the file only extends\nit; entries are bare command names, so `tree` is valid and `tree -L 2` is not. `gelatiere status`\nprints the list actually in force and flags an edit that has not been applied yet. The unit is\nregistered once and then persists, so an edit here takes effect on the next boot or the next\n`gelatiere init` — and never mid-pass: applying it rebuilds the unit, which would cancel a pass in\nflight, so `gelatiere init` leaves a busy gelatiere alone and asks to be re-run when it is idle.\n\nAdding a command grants it to an UNATTENDED agent that can read `/sessions/` and every cone\'s\nmemory, so weigh a network command (`curl`, `wget`, `ssh`) against that: the pass reads third-party\ncatalog and repo content, and general egress would make one injected line enough to exfiltrate an\narchive. That is why the built-in set has none, and why leaving them out is the right default.\n\nThe gelatiere is a persistent scoop no cone owns (folder `gelatiere`); its own conversation is\ncompacted while it idles. Dismissed suggestions are kept with a dismissedAt stamp so the next pass does not\nrepeat them. `gelatiere run` from any cone\'s shell asks for a pass now.\n-->\n';function ie(e,t){let n=e.replace(/^\uFEFF/,``).replace(/\r\n?/g,`
3
3
  `).match(/^---\s*\n([\s\S]*?)\n---\s*\n([\s\S]*)$/);if(!n?.[2].trim())throw Error(`${t} requires frontmatter and a prompt`);return{frontmatter:n[1],body:n[2].trim()}}function ae(e,t){let n={},r=e.split(`
4
4
  `);for(let e=0;e<r.length;e+=1){let i=r[e];if(!i.trim()||i.trimStart().startsWith(`#`))continue;let a=i.match(/^([A-Za-z][A-Za-z0-9]*):\s*(.*)$/);if(!a)throw Error(`Invalid frontmatter line: ${i}`);let[,o,s]=a;if(t.arrayKeys.has(o)){let t=E(r,e,s);n[o]=t.value,e=t.lastIndex}else if(t.scalarKeys.has(o)&&s.trim())n[o]=se(s);else throw Error(`Unsupported or empty frontmatter field: ${o}`)}return n}function E(e,t,n){if(n.trim()){let e=n.trim();if(!e.startsWith(`[`)||!e.endsWith(`]`))throw Error(`Expected an array`);let r=e.slice(1,-1).trim();return{value:r?oe(r):[],lastIndex:t}}let r=[],i=t;for(let n=t+1;n<e.length;n+=1){let t=e[n].match(/^\s+-\s+(.+)$/);if(!t)break;r.push(se(D(t[1]))),i=n}return{value:r,lastIndex:i}}function oe(e){let t=[],n=0,r;for(let i=0;i<e.length;i+=1){let a=e[i];a===`"`||a===`'`?r=r===a?void 0:r??a:a===`,`&&!r&&(t.push(se(e.slice(n,i))),n=i+1)}if(r)throw Error(`Unclosed quoted value`);return t.push(se(e.slice(n))),t}function D(e){let t;for(let n=0;n<e.length;n+=1){let r=e[n];if(r===`"`||r===`'`)t=t===r?void 0:t??r;else if(r===`#`&&!t&&(n===0||/\s/.test(e[n-1])))return e.slice(0,n).trimEnd()}return e}function se(e){let t=e.trim();if(!t)throw Error(`Empty frontmatter value`);let n=t[0];if((n===`"`||n===`'`)&&t.at(-1)===n)return t.slice(1,-1);if(n===`"`||n===`'`)throw Error(`Unclosed quoted value`);return t}function ce(e,t,n){let r=e[t];if(r===void 0)return[...n];if(!Array.isArray(r)||r.some(e=>!e))throw Error(`${t} is invalid`);return[...r]}function le(e,t){if(e!==void 0){if(typeof e!=`string`||!e)throw Error(`${t} is invalid`);return e}}function ue(e,t,n,r=`timeoutSeconds`){if(e===void 0)return t;if(typeof e!=`string`)throw Error(`${r} is invalid`);let i=Number(e);if(!Number.isFinite(i)||i<=0)throw Error(`${r} must be positive`);return Math.min(i,n)}function de(e,t){if(e.some(e=>!e.startsWith(`/`)||e.includes(`\0`)||t===`writablePaths`&&e===`/`))throw Error(`${t} must contain absolute VFS paths`)}var O=`gelatiere`,fe=`gelatiere`,pe=`gelatiere-nightly`,me=`system:gelatiere`;function he(e){return e.parentJid===`system:gelatiere`&&e.folder===`gelatiere`}var ge=e({DEFAULT_GELATIERE_INTERVAL_HOURS:()=>24,DEFAULT_GELATIERE_MD:()=>re,DEFAULT_GELATIERE_NIGHTLY_CRON:()=>Se,DEFAULT_MAX_SUGGESTIONS:()=>5,GELATIERE_BASE_ALLOWED_COMMANDS:()=>Te,GELATIERE_DIR:()=>ye,GELATIERE_FOLDER:()=>O,GELATIERE_INSTRUCTIONS_PATH:()=>ve,GELATIERE_NIGHTLY_CRON_NAME:()=>pe,GELATIERE_OWNER_JID:()=>me,GELATIERE_SKILL_PATH:()=>A,GELATIERE_SPRINKLE_NAME:()=>fe,GELATIERE_STATE_PATH:()=>k,GELATIERE_SUGGESTIONS_ACTION:()=>xe,GELATIERE_SUGGESTIONS_PATH:()=>be,LICK_SUGGESTION_LIMIT:()=>5,MAX_STORED_SUGGESTIONS:()=>40,MAX_SUGGESTIONS_PER_PASS:()=>10,buildGelatiereLickBody:()=>ut,coerceSuggestions:()=>at,describeGelatiereLick:()=>M,dismissGelatiereSuggestion:()=>Ke,isGelatiereUnit:()=>he,isNewSince:()=>We,isPassDue:()=>ze,loadGelatiereConfig:()=>je,mergeSuggestions:()=>ot,openSuggestions:()=>Ve,parseGelatiereDocument:()=>ke,readGelatiereState:()=>Le,readGelatiereSuggestions:()=>Pe,recordGelatiereTrigger:()=>Be,recordPass:()=>lt,suggestionsForCone:()=>Ge,suggestionsSince:()=>Ue,takeGelatiereSuggestion:()=>qe,takenSuggestions:()=>He,writeGelatiereState:()=>Re,writeGelatiereSuggestions:()=>Ie}),_e=n(`gelatiere-store`),ve=`/shared/GELATIERE.md`,ye=`/shared/.gelatiere`,be=`${ye}/suggestions.json`,k=`${ye}/state.json`,xe=`gelatiere-suggestions`,A=`/workspace/skills/gelatiere/SKILL.md`,Se=`0 3 * * *`,Ce=8,we={arrayKeys:new Set([`allowedCommands`]),scalarKeys:new Set([`intervalHours`,`nightly`,`maxSuggestions`])},Te=`awk.basename.cat.column.cut.date.dirname.echo.expr.false.file.find.fold.gelatiere.grep.head.jq.ls.man.memory.mkdir.nl.paste.printf.realpath.rg.sed.seq.sort.stat.tail.tee.test.touch.tr.true.uniq.upskill.wc`.split(`.`),Ee=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,De=new Set([`skill`,`use-case`,`tip`,`skill-idea`,`issue`]),Oe=new Set([`use-case`,`skill-idea`,`issue`]);function ke(e){let t=ie(e,`GELATIERE.md`),n=ae(t.frontmatter,we),r=le(n.nightly,`nightly`)??`0 3 * * *`;if(r.trim().split(/\s+/).length!==5)throw Error(`nightly must be a 5-field cron expression`);return{allowedCommands:Ae(n),intervalHours:j(n.intervalHours,`intervalHours`,24),nightly:r.trim(),maxSuggestions:Math.min(10,j(n.maxSuggestions,`maxSuggestions`,5)),instructions:t.body}}function Ae(e){let t=ce(e,`allowedCommands`,[]),n=t.find(e=>!Ee.test(e));if(n!==void 0)throw Error(`allowedCommands must contain bare command names, not "${n}"`);return[...new Set([...Te,...t])]}function j(e,t,n){if(e===void 0)return n;if(typeof e!=`string`)throw Error(`${t} is invalid`);let r=Number(e);if(!Number.isFinite(r)||r<=0)throw Error(`${t} must be positive`);return r}async function je(e){try{return ke(await Me(e,ve))}catch(e){return _e.warn(`Could not load valid GELATIERE.md; using built-in default`,{error:dt(e)}),ke(re)}}async function Me(e,t){let n=await e.readFile(t,{encoding:`utf-8`});return typeof n==`string`?n:new TextDecoder().decode(n)}async function Ne(e,t){let n;try{n=await Me(e,t)}catch(e){if(e instanceof x&&e.code===`ENOENT`)return;throw e}try{return JSON.parse(n)}catch{return}}async function Pe(e){let t=await Ne(e,be);if(!Array.isArray(t))return[];let n=[];for(let e of t){let t=it(e,null);if(!t)continue;let{dismissedAt:r,takenAt:i,retargets:a}=e;typeof r==`string`&&r&&(t.dismissedAt=r),typeof i==`string`&&i&&(t.takenAt=i);let o=Fe(a);o.length>0&&(t.retargets=o),n.push(t)}return n}function Fe(e){return Array.isArray(e)?e.filter(e=>!!e&&typeof e.cone==`string`&&typeof e.at==`string`):[]}async function Ie(e,t){await e.mkdir(ye,{recursive:!0}),await e.writeFile(be,`${JSON.stringify(t,null,2)}\n`)}async function Le(e){let t=await Ne(e,k);if(!t||typeof t!=`object`)return{passes:0};let n=t;return{passes:typeof n.passes==`number`&&n.passes>=0?n.passes:0,...typeof n.lastPassAt==`string`?{lastPassAt:n.lastPassAt}:{},...typeof n.lastTriggeredAt==`string`?{lastTriggeredAt:n.lastTriggeredAt}:{},...typeof n.lastDeliveredAt==`string`?{lastDeliveredAt:n.lastDeliveredAt}:{}}}async function Re(e,t){await e.mkdir(ye,{recursive:!0}),await e.writeFile(k,`${JSON.stringify(t,null,2)}\n`)}function ze(e,t,n){let r=Math.max(...[e.lastPassAt,e.lastTriggeredAt].map(e=>e?Date.parse(e):NaN).filter(e=>!Number.isNaN(e)));return!Number.isFinite(r)||t.getTime()-r>=n*36e5}async function Be(e,t=new Date){await Re(e,{...await Le(e),lastTriggeredAt:t.toISOString()})}function Ve(e){return e.filter(e=>!e.dismissedAt&&!e.takenAt)}function He(e){return e.filter(e=>!!e.takenAt)}function Ue(e,t){return Ve(e).filter(e=>We(e,t))}function We(e,t,n){let r=t?Date.parse(t):NaN;if(Number.isNaN(r))return!0;let i=e=>{let t=Date.parse(e);return Number.isNaN(t)||t>r};return i(e.createdAt)?!0:(e.retargets??[]).some(e=>(n===void 0||e.cone===n)&&i(e.at))}function Ge(e,t,n,r){return e.filter(e=>{let i=e.cones?.filter(e=>r.has(e))??[];return i.length>0?i.includes(t):t===n})}async function Ke(e,t,n=new Date){return Ye(e,t,`dismissedAt`,n)}async function qe(e,t,n=new Date){return Ye(e,t,`takenAt`,n)}var Je=Promise.resolve();function Ye(e,t,n,r){let i=async()=>{let i=await Pe(e),a=i.find(e=>e.id===t&&!e.dismissedAt&&!e.takenAt);return a?(a[n]=r.toISOString(),await Ie(e,i),!0):!1},a=Je.then(i,i);return Je=a.catch(()=>!1),a}var Xe=/[^a-z0-9]+/g;function Ze(e){return e.toLowerCase().replace(Xe,`-`).replace(/^-+|-+$/g,``).slice(0,60)}function Qe(e,t){if(typeof e!=`string`)return;let n=e.trim();return n?n.slice(0,t):void 0}function $e(e){if(e)try{let t=new URL(e).protocol;return t===`http:`||t===`https:`?e:void 0}catch{return}}var et=/^[A-Za-z0-9@._/:=-]+$/;function tt(e){if(!e)return;let t=e.split(/\s+/);if(!(t[0]!==`upskill`||t.length<2))return t.slice(1).every(e=>et.test(e))?e:void 0}var nt=/^[a-z0-9][a-z0-9_-]*$/i;function rt(e){let t=(typeof e==`string`?[e]:Array.isArray(e)?e:[]).map(e=>Qe(e,80)).filter(e=>e!==void 0&&nt.test(e)),n=[...new Set(t)].slice(0,Ce);return n.length>0?n:void 0}function it(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=typeof n.kind==`string`?n.kind:``,i=Qe(n.title,200),a=Qe(n.body,1e3);if(!De.has(r)||!i||!a)return null;let o=Ze(Qe(n.id,80)??`${r}-${i}`)||Ze(`${r}-${i}`);if(!o)return null;let s=t??Qe(n.createdAt,40)??``,c=n.skill===void 0?void 0:Qe(n.skill,120),l=n.install===void 0?void 0:tt(Qe(n.install,300)),u=n.prompt===void 0?void 0:Qe(n.prompt,1e3);if(r===`skill`&&(!c||!l)||Oe.has(r)&&!u)return null;let d=rt(n.cones);return{id:o,kind:r,title:i,body:a,...n.skill===void 0?{}:{skill:c},...n.install===void 0?{}:{install:l},...n.prompt===void 0?{}:{prompt:u},...n.url===void 0?{}:{url:$e(Qe(n.url,500))},...n.evidence===void 0?{}:{evidence:Qe(n.evidence,500)},...d?{cones:d}:{},createdAt:s}}function at(e,t,n=10){let r=Array.isArray(e)?e:e&&typeof e==`object`&&Array.isArray(e.suggestions)?e.suggestions??[]:[],i=new Set,a=[];for(let e of r){let r=it(e,t);if(!(!r||i.has(r.id))&&(i.add(r.id),a.push(r),a.length>=n))break}return a}function ot(e,t,n=40){let r=new Map(t.map(e=>[e.id,e])),i=new Set(e.map(e=>e.id)),a=t.filter(e=>!i.has(e.id)),o=[...a,...e.map(e=>st(e,r.get(e.id)))];for(;o.length>n;){let e=ct(o,e=>!!e.dismissedAt),t=e>=0?e:ct(o,e=>!!e.takenAt);o.splice(t>=0?t:o.length-1,1)}return{merged:o,added:a}}function st(e,t){if(!t?.cones||e.dismissedAt||e.takenAt)return e;let n=e.cones??[],r=t.cones.filter(e=>!n.includes(e)),i=[...n,...r].slice(0,Ce),a=r.filter(e=>i.includes(e));if(a.length===0)return e;let o=[...e.retargets??[],...a.map(e=>({cone:e,at:t.createdAt}))];return{...e,cones:i,retargets:o}}function ct(e,t){for(let n=e.length-1;n>=0;--n)if(t(e[n]))return n;return-1}async function lt(e,t,n=new Date){let r=await je(e),i=at(t,n.toISOString(),r.maxSuggestions),{merged:a,added:o}=ot(await Pe(e),i);await Ie(e,a);let s=await Le(e);return await Re(e,{...s,passes:s.passes+1,lastPassAt:n.toISOString()}),{added:o,open:Ve(a)}}function ut(e,t){return{action:xe,data:{added:e.length,open:t.length,suggestions:t.slice(0,5),path:be,skill:A}}}function dt(e){return e instanceof Error?e.message:String(e)}function M(e){let t=N(e);if(!t)return null;let{action:n,bag:r}=t;return n===`gelatiere-suggestions`?P(n,r):n===`session-settled`?pt(n,r):n===`run`?mt(n,r):{action:n,headline:`gelatiere: ${n}`,titles:[]}}function N(e){let t=e.indexOf(`{`),n=e.lastIndexOf(`}`);if(t<0||n<=t)return null;let r;try{r=JSON.parse(e.slice(t,n+1))}catch{return null}if(!r||typeof r!=`object`)return null;let{action:i,data:a}=r;return typeof i==`string`?{action:i,bag:a&&typeof a==`object`?a:{}}:null}function P(e,t){let n=ft(t.suggestions),r=typeof t.added==`number`?t.added:n.length,i=typeof t.open==`number`?t.open:n.length;return{action:e,headline:r===0?`Nothing new — ${i} open ${i===1?`suggestion`:`suggestions`} in the suggestions card.`:`${r} new ${r===1?`suggestion`:`suggestions`} (${i} open) — the cards are in the suggestions sprinkle.`,titles:n}}function ft(e){return Array.isArray(e)?e.map(e=>e&&typeof e==`object`?e.title:void 0).filter(e=>typeof e==`string`&&e.length>0):[]}function pt(e,t){let n=typeof t.cone==`string`?t.cone:void 0;return{action:e,headline:n?`A session ended in ${n} — time for a pass.`:`A session ended — time for a pass.`,titles:[]}}function mt(e,t){let n=typeof t.requestedBy==`string`?t.requestedBy:void 0;return{action:e,headline:n?`${n} asked for a pass now.`:`Someone asked for a pass now.`,titles:[]}}var ht=new Set([`webhook`,`cron`,`sprinkle`,`fswatch`,`session-reload`,`navigate`,`discovery`,`upgrade`,`workflow`,`bash`,`jshd`,`preview`,`scoop-notify`,`scoop-idle`,`scoop-wait`,`sudo-request`]);function gt(e){return e!=null&&ht.has(e)}var _t=new Set([`send_message`,`list_scoops`,`list_tasks`,`sudo_request`,`list_sudo_requests`,`lick_confirm`,`lick_dismiss`]),vt=65536;function yt(e,t=vt){return e.length<=t?e:`${e.slice(0,t)}\n… [tool output truncated for the chat transcript: showing ${St(t)} of ${St(e.length)} — the agent received the full output]`}var bt=4;function xt(e,t=vt,n=bt){if(typeof e==`string`)return yt(e,t);if(typeof e!=`object`||!e||n<=0)return e;if(Array.isArray(e)){let r=null;for(let i=0;i<e.length;i++){let a=xt(e[i],t,n-1);a!==e[i]&&(r??=[...e],r[i]=a)}return r??e}let r=null;for(let[i,a]of Object.entries(e)){let o=xt(a,t,n-1);o!==a&&(r??={...e},r[i]=o)}return r??e}function St(e){return e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.round(e/1024)} KB`}var F=e({agentMessagesToChatMessages:()=>Ct,lickChannelFromBody:()=>Rt,lickChannelFromSenderName:()=>Lt,lickIdFromBody:()=>zt,splitEnvelopes:()=>It,unwrapMessageEnvelope:()=>Ft});function Ct(e,t={}){let{source:n=`cone`,idSeed:r=Pt,hiddenToolNames:i=_t,uncapped:a=!1}=t,o=[],s=null,c=new Set;for(let t of e)Dt(t)?(o.push(...wt(t,r)),s=null):Ot(t)?(s=Tt(t,n,r,i,c,a),o.push(s)):kt(t)&&Et(t,s,c,a);return o}function wt(e,t){let n=At(e.content);if(n.length===0)return[];let r=[];for(let i of It(n)){if(i.body.length===0&&i.sender==null)continue;let n=(i.sender?Lt(i.sender):null)??Rt(i.body),a=n?zt(i.body):void 0,o={id:n===`sudo-request`&&a?`sudo-request-${a}`:t(),role:`user`,content:i.body,timestamp:e.timestamp};n&&(o.source=`lick`,o.channel=n,a&&(o.lickId=a)),r.push(o)}return r}function Tt(e,t,n,r,i,a=!1){let o=[];for(let t of Nt(e,a))r.has(t.name)?i.add(t.id):o.push(t);let s={id:n(),role:`assistant`,content:At(e.content),timestamp:e.timestamp,source:t,model:e.model},{usage:c}=e;return c&&(s.usage={input:c.input,output:c.output,cacheRead:c.cacheRead,cacheWrite:c.cacheWrite,cost:{input:c.cost.input,output:c.cost.output,cacheRead:c.cost.cacheRead,cacheWrite:c.cost.cacheWrite,total:c.cost.total}}),o.length>0&&(s.toolCalls=o),s}function Et(e,t,n,r=!1){if(n.has(e.toolCallId))return;let i=t?.toolCalls?.find(t=>t.id===e.toolCallId);if(!i)return;let a=At(e.content);i.result=r?a:yt(a),i.isError=e.isError}function Dt(e){return e.role===`user`}function Ot(e){return e.role===`assistant`}function kt(e){return e.role===`toolResult`}function At(e){if(typeof e==`string`)return e;if(!Array.isArray(e))return``;let t=[];for(let n of e)jt(n)&&t.push(n.text);return t.join(``)}function jt(e){return e.type===`text`}function Mt(e){return e.type===`toolCall`}function Nt(e,t=!1){if(!Array.isArray(e.content))return[];let n=[];for(let r of e.content)Mt(r)&&n.push({id:r.id,name:r.name,input:t?r.arguments:xt(r.arguments)});return n}function Pt(){return Date.now().toString(36)+Math.random().toString(36).slice(2,8)}function Ft(e){if(!e.startsWith(`[`))return null;let t=e.indexOf(`] `);if(t<=0||e.lastIndexOf(`
5
5
  `,t)!==-1)return null;let n=e.slice(t+2);if(n.startsWith(`User: `))return{sender:`User`,body:n.slice(6)};for(let e of ht){let t=`${e}:`;if(!n.startsWith(t))continue;let r=n.indexOf(`
@@ -7942,6 +7942,11 @@ slicc-surface:fullscreen {
7942
7942
  position: fixed;
7943
7943
  }
7944
7944
  `,HE=`slicc-surface-style`;function UE(e){if(e.getElementById(HE))return;let t=e.createElement(`style`);t.id=HE,t.textContent=VE,(e.head??e.documentElement).appendChild(t)}function WE(e){return e===`block`||e===`column`?e:`flex`}var GE=class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){UE(this.ownerDocument),this.#e()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`surface-id`?this.#e():e===`active`&&t!==n&&this.dispatchEvent(new CustomEvent(`surface-toggle`,{bubbles:!0,composed:!0,detail:{surfaceId:this.surfaceId,active:this.active,layout:this.layout}})))}get surfaceId(){return this.getAttribute(`surface-id`)}set surfaceId(e){e==null?this.removeAttribute(`surface-id`):this.setAttribute(`surface-id`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get layout(){return WE(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,WE(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}};I(`slicc-surface`,GE);var KE=`.wterm {
7945
+ /* Application overrides are owned by the renderer; each terminal is isolated. */
7946
+ --term-app-fg: initial;
7947
+ --term-app-bg: initial;
7948
+ --term-app-cursor: initial;
7949
+
7945
7950
  --term-fg: #d4d4d4;
7946
7951
  --term-bg: #1e1e1e;
7947
7952
  --term-cursor: #aeafad;
@@ -7963,16 +7968,19 @@ slicc-surface:fullscreen {
7963
7968
  --term-color-14: #4ec9b0;
7964
7969
  --term-color-15: #ffffff;
7965
7970
 
7966
- --term-font-family: 'Menlo', 'Consolas', 'DejaVu Sans Mono', 'Courier New', monospace;
7971
+ --term-font-family:
7972
+ "Menlo", "Consolas", "DejaVu Sans Mono", "Courier New", monospace;
7967
7973
  --term-font-size: 14px;
7968
7974
  --term-line-height: 1.2;
7969
7975
  --term-row-height: 17px;
7970
7976
 
7971
7977
  position: relative;
7972
- background: var(--term-bg);
7973
- color: var(--term-fg);
7978
+ background: var(--term-app-bg, var(--term-bg));
7979
+ color: var(--term-app-fg, var(--term-fg));
7974
7980
  font-family: var(--term-font-family);
7975
7981
  font-size: var(--term-font-size);
7982
+ font-kerning: none;
7983
+ font-variant-ligatures: none;
7976
7984
  line-height: var(--term-line-height);
7977
7985
  padding: 12px;
7978
7986
  border-radius: 8px;
@@ -7995,6 +8003,21 @@ slicc-surface:fullscreen {
7995
8003
  will-change: contents;
7996
8004
  }
7997
8005
 
8006
+ .term-announcements {
8007
+ position: absolute;
8008
+ left: 0;
8009
+ top: 0;
8010
+ width: 1px;
8011
+ height: 1px;
8012
+ padding: 0;
8013
+ margin: -1px;
8014
+ overflow: hidden;
8015
+ clip-path: inset(50%);
8016
+ white-space: pre;
8017
+ pointer-events: none;
8018
+ user-select: none;
8019
+ }
8020
+
7998
8021
  .term-images {
7999
8022
  position: absolute;
8000
8023
  inset: 0;
@@ -8003,6 +8026,24 @@ slicc-surface:fullscreen {
8003
8026
  z-index: 1;
8004
8027
  }
8005
8028
 
8029
+ .term-search-layer {
8030
+ position: absolute;
8031
+ inset: 0;
8032
+ pointer-events: none;
8033
+ user-select: none;
8034
+ z-index: 2;
8035
+ }
8036
+
8037
+ .term-search-match {
8038
+ position: absolute;
8039
+ background: var(--term-search-match, rgb(255 200 0 / 25%));
8040
+ }
8041
+
8042
+ .term-search-active {
8043
+ background: var(--term-search-active, rgb(255 150 0 / 40%));
8044
+ box-shadow: inset 0 0 0 1px var(--term-search-border, #ffb000);
8045
+ }
8046
+
8006
8047
  .term-image-flow-spacer {
8007
8048
  display: block;
8008
8049
  height: 0;
@@ -8023,11 +8064,61 @@ slicc-surface:fullscreen {
8023
8064
  contain: layout style;
8024
8065
  }
8025
8066
 
8067
+ .term-select-all .term-row,
8068
+ .term-rectangle-row {
8069
+ position: relative;
8070
+ }
8071
+
8072
+ .term-select-all .term-row::after,
8073
+ .term-rectangle-row::after {
8074
+ content: "";
8075
+ position: absolute;
8076
+ inset: 0;
8077
+ background: var(--term-selection-bg, rgb(80 140 255 / 30%));
8078
+ pointer-events: none;
8079
+ user-select: none;
8080
+ z-index: 3;
8081
+ }
8082
+
8083
+ .term-rectangle-row::after {
8084
+ left: var(--term-selection-left);
8085
+ width: var(--term-selection-width);
8086
+ right: auto;
8087
+ }
8088
+
8089
+ .term-selection-status {
8090
+ position: sticky;
8091
+ bottom: 0;
8092
+ width: fit-content;
8093
+ max-width: 100%;
8094
+ white-space: normal;
8095
+ background: var(--term-app-bg, var(--term-bg));
8096
+ color: var(--term-app-fg, var(--term-fg));
8097
+ user-select: none;
8098
+ pointer-events: none;
8099
+ z-index: 4;
8100
+ }
8101
+
8102
+ .term-selection-status:empty {
8103
+ display: none;
8104
+ }
8105
+
8026
8106
  .term-scrollback-spacer {
8027
8107
  display: block;
8028
8108
  pointer-events: none;
8029
8109
  }
8030
8110
 
8111
+ .term-size-probe {
8112
+ position: absolute;
8113
+ top: 0;
8114
+ left: 0;
8115
+ visibility: hidden;
8116
+ pointer-events: none;
8117
+ white-space: pre;
8118
+ width: auto;
8119
+ height: var(--term-row-height);
8120
+ }
8121
+
8031
8122
  .term-row > span,
8032
8123
  .term-row > .term-link,
8033
8124
  .term-link > span {
@@ -8036,6 +8127,13 @@ slicc-surface:fullscreen {
8036
8127
  vertical-align: top;
8037
8128
  }
8038
8129
 
8130
+ .term-row > span,
8131
+ .term-link > span {
8132
+ width: calc(var(--term-span-cols, 1) * var(--term-cell-width, 1ch));
8133
+ /* Glyph ink may overhang its advance without moving the following cell. */
8134
+ overflow: visible;
8135
+ }
8136
+
8039
8137
  .term-link {
8040
8138
  color: inherit;
8041
8139
  cursor: text;
@@ -8053,35 +8151,151 @@ slicc-surface:fullscreen {
8053
8151
  }
8054
8152
 
8055
8153
  .term-block {
8056
- width: 1ch;
8154
+ width: var(--term-cell-width, 1ch);
8057
8155
  overflow: hidden;
8156
+ -webkit-text-fill-color: transparent;
8157
+ }
8158
+
8159
+ .term-box {
8160
+ --term-box-stroke: max(
8161
+ 1px,
8162
+ round(calc(var(--term-cell-width, 1ch) * 0.18), 1px)
8163
+ );
8164
+ -webkit-text-fill-color: transparent;
8165
+ }
8166
+
8167
+ .term-box-heavy,
8168
+ .term-box-bold {
8169
+ --term-box-stroke: max(
8170
+ 2px,
8171
+ round(calc(var(--term-cell-width, 1ch) * 0.3), 1px)
8172
+ );
8173
+ }
8174
+
8175
+ .term-box-round {
8176
+ position: relative;
8177
+ }
8178
+
8179
+ .term-box-round::after {
8180
+ content: "";
8181
+ position: absolute;
8182
+ box-sizing: border-box;
8183
+ border: 0 solid currentColor;
8184
+ pointer-events: none;
8185
+ }
8186
+
8187
+ .term-box-round-tl::after {
8188
+ inset: calc(50% - var(--term-box-stroke) * 0.5) 0 0
8189
+ calc(50% - var(--term-box-stroke) * 0.5);
8190
+ border-top-width: var(--term-box-stroke);
8191
+ border-left-width: var(--term-box-stroke);
8192
+ border-top-left-radius: 100%;
8193
+ }
8194
+
8195
+ .term-box-round-tr::after {
8196
+ inset: calc(50% - var(--term-box-stroke) * 0.5)
8197
+ calc(50% - var(--term-box-stroke) * 0.5) 0 0;
8198
+ border-top-width: var(--term-box-stroke);
8199
+ border-right-width: var(--term-box-stroke);
8200
+ border-top-right-radius: 100%;
8201
+ }
8202
+
8203
+ .term-box-round-br::after {
8204
+ inset: 0 calc(50% - var(--term-box-stroke) * 0.5)
8205
+ calc(50% - var(--term-box-stroke) * 0.5) 0;
8206
+ border-bottom-width: var(--term-box-stroke);
8207
+ border-right-width: var(--term-box-stroke);
8208
+ border-bottom-right-radius: 100%;
8209
+ }
8210
+
8211
+ .term-box-round-bl::after {
8212
+ inset: 0 0 calc(50% - var(--term-box-stroke) * 0.5)
8213
+ calc(50% - var(--term-box-stroke) * 0.5);
8214
+ border-bottom-width: var(--term-box-stroke);
8215
+ border-left-width: var(--term-box-stroke);
8216
+ border-bottom-left-radius: 100%;
8217
+ }
8218
+
8219
+ @media (forced-colors: active), print {
8220
+ .term-block {
8221
+ background: none !important;
8222
+ -webkit-text-fill-color: currentColor;
8223
+ }
8224
+
8225
+ .term-box {
8226
+ background-image: none !important;
8227
+ -webkit-text-fill-color: currentColor;
8228
+ }
8229
+
8230
+ .term-box-round::after {
8231
+ display: none;
8232
+ }
8058
8233
  }
8059
8234
 
8060
8235
  .term-wide {
8061
- width: 2ch;
8062
- overflow: hidden;
8236
+ --term-span-cols: 2;
8237
+ overflow: visible;
8063
8238
  }
8064
8239
 
8065
8240
  .term-cursor {
8066
8241
  color: var(--term-cell-fg, inherit);
8067
8242
  background: var(--term-cell-bg, transparent);
8068
- outline: 1px solid var(--term-cursor);
8243
+ outline: 1px solid var(--term-app-cursor, var(--term-cursor));
8069
8244
  outline-offset: -1px;
8070
8245
  }
8071
8246
 
8072
- .wterm.focused .term-cursor {
8073
- background: var(--term-cursor);
8074
- color: var(--term-bg);
8247
+ /* Native text selection can blur the input until click-to-focus runs. Keep
8248
+ the cursor active during that press without cancelling the selection. */
8249
+ .wterm:is(.focused, :active) .term-cursor {
8250
+ background: var(--term-app-cursor, var(--term-cursor));
8251
+ color: var(--term-app-bg, var(--term-bg));
8075
8252
  outline: none;
8076
8253
  }
8077
8254
 
8078
- .wterm.focused.cursor-blink .term-cursor {
8079
- animation: cursor-blink 1s step-end infinite;
8255
+ .wterm:is(.focused, :active) .term-grid[data-cursor-shape="bar"] .term-cursor,
8256
+ .wterm:is(.focused, :active) .term-grid[data-cursor-shape="underline"] .term-cursor {
8257
+ background: var(--term-cell-bg, transparent);
8258
+ color: var(--term-cell-fg, inherit);
8259
+ box-shadow: var(--term-cursor-shadow);
8260
+ --term-cursor-animation: cursor-line-blink;
8261
+ }
8262
+
8263
+ .term-grid[data-cursor-shape="bar"] .term-cursor {
8264
+ --term-cursor-shadow: inset 2px 0 0 var(--term-app-cursor, var(--term-cursor));
8265
+ }
8266
+
8267
+ .term-grid[data-cursor-shape="underline"] .term-cursor {
8268
+ --term-cursor-shadow: inset 0 -2px 0
8269
+ var(--term-app-cursor, var(--term-cursor));
8270
+ }
8271
+
8272
+ .wterm:is(.focused, :active).cursor-blink .term-cursor,
8273
+ .wterm:is(.focused, :active):not(.cursor-steady)
8274
+ .term-grid[data-cursor-blink="true"]
8275
+ .term-cursor {
8276
+ animation: var(--term-cursor-animation, cursor-blink) 1s step-end infinite;
8080
8277
  }
8081
8278
 
8082
8279
  @keyframes cursor-blink {
8083
- 0%, 100% { background: var(--term-cursor); color: var(--term-bg); }
8084
- 50% { background: transparent; color: inherit; }
8280
+ 0%,
8281
+ 100% {
8282
+ background: var(--term-app-cursor, var(--term-cursor));
8283
+ color: var(--term-app-bg, var(--term-bg));
8284
+ }
8285
+ 50% {
8286
+ background: var(--term-cell-bg, transparent);
8287
+ color: var(--term-cell-fg, inherit);
8288
+ }
8289
+ }
8290
+
8291
+ @keyframes cursor-line-blink {
8292
+ 0%,
8293
+ 100% {
8294
+ box-shadow: var(--term-cursor-shadow);
8295
+ }
8296
+ 50% {
8297
+ box-shadow: none;
8298
+ }
8085
8299
  }
8086
8300
 
8087
8301
  .wterm.has-scrollback,
@@ -8207,7 +8421,7 @@ slicc-surface:fullscreen {
8207
8421
  font-size: 12px;
8208
8422
  line-height: 1.25;
8209
8423
  }
8210
- `,YE=null;function XE(){return YE||=[R(KE),R(JE)],YE}var ZE=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;#s=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s++,this.#c(),this.#l().catch(e=>{this.dispatchEvent(new CustomEvent(`terminal-error`,{detail:e,bubbles:!0,composed:!0}))})}disconnectedCallback(){this.#u()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.write(`${e}\r\n`):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.write(`\x1B[2J\x1B[H`):this.#a.length=0}focus(){this.#n?.focus()}fit(){if(!this.#n||!this.#t)return;let e=document.createElement(`span`);e.textContent=`M`,this.#t.appendChild(e);let t=e.getBoundingClientRect().width,n=parseFloat(getComputedStyle(this.#t).fontSize)*1.25;e.remove(),t>0&&n>0&&this.#n.resize(Math.max(1,Math.floor(this.#t.clientWidth/t)),Math.max(1,Math.floor(this.#t.clientHeight/n)))}#c(){if(this.#t)return;this.#e.adoptedStyleSheets=XE();let e=L(`div`,{class:`hd`,part:`header`},C(`terminal`,{size:14}),L(`span`,{class:`title`},this.label),L(`span`,{class:`spacer`})),t=L(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#l(){if(this.#n||this.#o)return;let e=this.#s,[{WTerm:n},{GhosttyCore:r}]=await Promise.all([t(()=>import(`./dist-CaUJj_g5.js`),[]),t(()=>import(`./dist-DBSQLDw2.js`),[])]);if(this.#o||e!==this.#s||!this.#t)return;let i=qE(this),a=await r.load({foregroundColor:i.foreground,backgroundColor:i.background});if(this.#o||e!==this.#s||!this.#t){a.dispose();return}this.#r=a,this.#f();let o=new n(this.#t,{core:a,cursorBlink:!QE(),onData:e=>this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))});try{await o.init()}catch(t){if(a.dispose(),this.#r===a&&(this.#r=null),this.#o||e!==this.#s)return;throw t}if(this.#o||e!==this.#s){o.destroy(),a.dispose(),this.#r===a&&(this.#r=null);return}if(this.#n=o,this.#d(),this.fit(),this.#a.length){for(let e of this.#a)o.write(e);this.#a.length=0}this.dispatchEvent(new CustomEvent(`terminal-ready`,{bubbles:!0,composed:!0}))}#u(){this.#o=!0,this.#s++,this.#i?.(),this.#i=null,this.#n?.destroy(),this.#r?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}#d(){this.#i?.(),this.#i=_g(this,()=>{this.#f()})}#f(){if(!this.#t)return;let e=qE(this),t=[e.black,e.red,e.green,e.yellow,e.blue,e.magenta,e.cyan,e.white,e.brightBlack,e.brightRed,e.brightGreen,e.brightYellow,e.brightBlue,e.brightMagenta,e.brightCyan,e.brightWhite];this.#t.style.setProperty(`--term-bg`,e.background),this.#t.style.setProperty(`--term-fg`,e.foreground),this.#t.style.setProperty(`--term-cursor`,e.cursor),t.forEach((e,t)=>{this.#t?.style.setProperty(`--term-color-${t}`,e)})}};function QE(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}I(`slicc-terminal`,ZE);function $E(){}var eD=`slicc_monitor_collapsed`;function tD(){try{let e=localStorage.getItem(eD);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function nD(e){try{localStorage.setItem(eD,JSON.stringify([...e]))}catch{}}var rD=`
8424
+ `,YE=null;function XE(){return YE||=[R(KE),R(JE)],YE}var ZE=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;#s=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s++,this.#c(),this.#l().catch(e=>{this.dispatchEvent(new CustomEvent(`terminal-error`,{detail:e,bubbles:!0,composed:!0}))})}disconnectedCallback(){this.#u()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.write(`${e}\r\n`):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.write(`\x1B[2J\x1B[H`):this.#a.length=0}focus(){this.#n?.focus()}fit(){if(!this.#n||!this.#t)return;let e=document.createElement(`span`);e.textContent=`M`,this.#t.appendChild(e);let t=e.getBoundingClientRect().width,n=parseFloat(getComputedStyle(this.#t).fontSize)*1.25;e.remove(),t>0&&n>0&&this.#n.resize(Math.max(1,Math.floor(this.#t.clientWidth/t)),Math.max(1,Math.floor(this.#t.clientHeight/n)))}#c(){if(this.#t)return;this.#e.adoptedStyleSheets=XE();let e=L(`div`,{class:`hd`,part:`header`},C(`terminal`,{size:14}),L(`span`,{class:`title`},this.label),L(`span`,{class:`spacer`})),t=L(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#l(){if(this.#n||this.#o)return;let e=this.#s,[{WTerm:n},{GhosttyCore:r}]=await Promise.all([t(()=>import(`./dist-kcvXs5tL.js`),__vite__mapDeps([3,2])),t(()=>import(`./dist-CegW-G1M.js`),[])]);if(this.#o||e!==this.#s||!this.#t)return;let i=qE(this),a=await r.load({foregroundColor:i.foreground,backgroundColor:i.background});if(this.#o||e!==this.#s||!this.#t){a.dispose();return}this.#r=a,this.#f();let o=new n(this.#t,{core:a,cols:80,rows:24,autoResize:!1,cursorBlink:!QE(),onData:e=>this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))});if(await new Promise(e=>{setTimeout(e,0)}),this.#o||e!==this.#s||!this.#t){a.dispose(),this.#r===a&&(this.#r=null);return}try{await o.init()}catch(t){if(a.dispose(),this.#r===a&&(this.#r=null),this.#o||e!==this.#s)return;throw t}if(this.#o||e!==this.#s){o.destroy(),a.dispose(),this.#r===a&&(this.#r=null);return}if(this.#n=o,this.#d(),this.fit(),this.#a.length){for(let e of this.#a)o.write(e);this.#a.length=0}this.dispatchEvent(new CustomEvent(`terminal-ready`,{bubbles:!0,composed:!0}))}#u(){this.#o=!0,this.#s++,this.#i?.(),this.#i=null,this.#n?.destroy(),this.#r?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}#d(){this.#i?.(),this.#i=_g(this,()=>{this.#f()})}#f(){if(!this.#t)return;let e=qE(this),t=[e.black,e.red,e.green,e.yellow,e.blue,e.magenta,e.cyan,e.white,e.brightBlack,e.brightRed,e.brightGreen,e.brightYellow,e.brightBlue,e.brightMagenta,e.brightCyan,e.brightWhite];this.#t.style.setProperty(`--term-bg`,e.background),this.#t.style.setProperty(`--term-fg`,e.foreground),this.#t.style.setProperty(`--term-cursor`,e.cursor),t.forEach((e,t)=>{this.#t?.style.setProperty(`--term-color-${t}`,e)})}};function QE(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}I(`slicc-terminal`,ZE);function $E(){}var eD=`slicc_monitor_collapsed`;function tD(){try{let e=localStorage.getItem(eD);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function nD(e){try{localStorage.setItem(eD,JSON.stringify([...e]))}catch{}}var rD=`
8211
8425
  slicc-monitor {
8212
8426
  display: block;
8213
8427
  box-sizing: border-box;
@@ -8904,7 +9118,7 @@ Example input:
8904
9118
  2. bash: {"command":"ls /published"}
8905
9119
  3. bash: {"command":"diff /drafts /published"}
8906
9120
  Example output: Compare drafts against published files`;function eP(e){return e.length>=6&&/[a-zA-Z]/.test(e)&&/\s/.test(e.trim())}function tP(e,n){if(e.length===0)return;let r=QN(e);if(!r)return;let i=YN.get(r);if(i){n.setAttribute(`label`,i);return}let a=e[0]?.id;if(a){let e=ZN.get(a);e&&n.setAttribute(`label`,e)}if(XN.has(r))return;XN.add(r);let o=e.map((e,t)=>{let n;try{n=JSON.stringify(e.input??{})}catch{n=String(e.input??``)}return n.length>300&&(n=`${n.slice(0,300)}…`),`${t+1}. ${e.name}: ${n}`}).join(`
8907
- `);t(async()=>{let{quickLabel:e}=await import(`./quick-llm-95xYFP4C.js`).then(e=>e.n);return{quickLabel:e}},__vite__mapDeps([3,1,4,5,6,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36])).then(({quickLabel:e})=>e({system:$N,prompt:`Label these tool calls (inputs only):\n${o}`,maxTokens:40})).then(e=>{let t=e?.replace(/^["']|["']$|\.$/g,``).trim()??``;eP(t)&&(YN.set(r,t),a&&ZN.set(a,t),n.isConnected&&n.setAttribute(`label`,t))}).catch(()=>void 0).finally(()=>XN.delete(r))}function nP(e,t={}){let n=sN(`slicc-tool-cluster`,{count:String(e.length)});return t.open&&n.setAttribute(`open`,``),n.append(...e),t.toolCalls&&t.toolCalls.length>0&&tP(t.toolCalls,n),n}function rP(e){let t=document.createElement(`slicc-agent-message`);t.setAttribute(`data-msg-id`,e.id),Number.isFinite(e.timestamp)&&e.timestamp>0&&t.setAttribute(`data-msg-time`,String(e.timestamp));let n=(e.content??``).trim().length>0,r=Cn(e.timestamp);return r&&n&&t.setAttribute(`timestamp`,r),e.isStreaming&&t.setAttribute(`streaming`,``),t.setBodyHtml($M(e.content,e.isStreaming===!0)),n||t.setAttribute(`data-empty`,``),[t,...(e.toolCalls??[]).map(t=>KN(t,e.id))]}function iP(e,t){let n=e.querySelectorAll(`:scope > slicc-tool-cluster`);for(let e of n){let n=Array.from(e.querySelectorAll(`slicc-action-row`));aP(e,n,t);let r=e.parentNode;if(!r){e.remove();continue}for(let t of n)oP(t,r,e);e.remove()}}function aP(e,t,n){if(!e.hasAttribute(`open`))return;let r=t[0]?.dataset.msgId;r&&n.add(r)}function oP(e,t,n){let r=e.dataset.msgId,i=r&&t instanceof Element?t.querySelector(`:scope > slicc-agent-message[data-msg-id="${r}"]`):null;if(!i||i.parentNode!==t){t.insertBefore(e,n);return}let a=i;for(;a.nextSibling instanceof HTMLElement&&a.nextSibling.tagName.toLowerCase()===`slicc-action-row`&&a.nextSibling.dataset.msgId===r;)a=a.nextSibling;t.insertBefore(e,a.nextSibling)}var sP=new Set([`slicc-user-message`,`slicc-lick-card`,`slicc-error-card`,`slicc-delegation-line`,`slicc-day-separator`,`slicc-compaction-marker`]);function cP(e){return e instanceof HTMLElement?sP.has(e.tagName.toLowerCase()):!0}function lP(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-action-row`}function uP(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-agent-message`}function dP(e){let t=[],n=[];for(let r of e)uP(r)?!r.hasAttribute(`data-empty`)&&n.length>0&&(t.push(n),n=[]):lP(r)&&n.push(r);return n.length>0&&t.push(n),t}function fP(e,t){let n=[];for(let r of e){let e=r.dataset.msgId,i=r.dataset.toolId;if(!e||!i)return;let a=t(e,i);if(!a)return;n.push(a)}return n}function pP(e,t){let n=e[0],r=n.parentNode;if(!r)return;let i=new Set(e),a=n.nextSibling;for(;a&&i.has(a);)a=a.nextSibling;let o=n.dataset.msgId,s=nP(e,{open:!!(o&&t.openClusterAnchors.has(o)),toolCalls:t.toolCallLookup?fP(e,t.toolCallLookup):void 0});r.insertBefore(s,a)}function mP(e,t){iP(e,t.openClusterAnchors);let n=Array.from(e.children),r=0;for(;r<n.length;){if(cP(n[r])){r++;continue}let e=r;for(;e<n.length&&!cP(n[e]);)e++;let i=dP(n.slice(r,e));for(let e of i)e.length>=3&&pP(e,t);r=e}t.openClusterAnchors.clear()}function hP(e,t){return e.channel===`sprinkle`&&t?.[2]?.trim()===`gelatiere`}function gP(e){let t=M(e);if(!t)return null;let n=document.createElement(`div`),r=document.createElement(`p`);if(r.textContent=t.headline,n.append(r),t.titles.length>0){let e=document.createElement(`ul`);for(let n of t.titles){let t=document.createElement(`li`);t.textContent=n,e.append(t)}n.append(e)}return n}function _P(e){let t=tN.exec(e.content),n=e.lickCount??1,r=aN.exec(e.content),i=r?oN(r[1]):null,a=hP(e,t),o=a?M(e.content)?.action:void 0,s=sN(`slicc-lick-card`,{kind:a?fe:e.channel??`webhook`,"event-label":a?(o??`suggestions`).replace(/^gelatiere-/,``):dN(e.content,e.channel,t,i),collapsible:``,collapsed:``});i&&s.setAttribute(`hue`,vO({isRoot:!1,name:i})),n>1&&s.setAttribute(`count`,String(n)),e.lickState&&e.lickState!==`pending`&&s.setAttribute(`state`,e.lickState);let c=e.lickParts??[e.content];for(let e of c){let t=a?gP(e):null;if(t){s.append(t);continue}let n=document.createElement(`div`);n.innerHTML=QM(rN(e)),s.append(n)}return s}function vP(e){let t=sN(`slicc-delegation-line`,{kind:`feed`,verb:`feed_scoop`,label:cN(e.content.replace(/\*\*\[[^\]]*\]\*\*\s*/,``))}),n=document.createElement(`slicc-user-message`);return n.setBodyHtml(QM(e.content)),[t,n]}var yP=`Out of AI budget`;function bP(){try{return d(u())}catch{return[]}}function xP(e){if(e.resetsAt===null||/reset/i.test(e.message))return e.message;let t=new Date(e.resetsAt);return Number.isNaN(t.getTime())?e.message:`${e.message} Resets on ${t.toLocaleDateString(void 0,{dateStyle:`long`})}.`}function SP(){return bP().length===0?{action:`settings`,"button-label":`Add a provider`}:{action:`change-model`,"button-label":`Switch provider and try again`,"secondary-action":`settings`,"secondary-button-label":`Add a provider`}}function CP(e,t){let n={message:e.content,"message-id":e.id},r=y(e.content);return r&&(n.label=yP,n.message=xP(r)),t?(n[`no-action`]=``,sN(`slicc-error-card`,n)):r?sN(`slicc-error-card`,{...n,...SP()}):(_(e.content)?n.action=`settings`:g(e.content)?n.action=`change-model`:b(e.content)&&(n.action=`login`),sN(`slicc-error-card`,n))}function wP(e){return sN(`slicc-compaction-marker`,{trigger:e.trigger,state:e.state,...e.transcriptPath?{transcript:e.transcriptPath}:{}})}function TP(e,t={}){if(e.compaction)return e.compaction.state===`discarded`?[]:[wP(e.compaction)];if(e.source===`lick`)return[_P(e)];if(e.source===`delegation`||e.channel===`delegation`)return vP(e);if(e.error)return[CP(e,t.readOnly===!0)];if(e.role===`assistant`)return rP(e);let n=iN(e.content);return n?[_P({...e,source:`lick`,channel:n})]:[qN(e)]}function EP(e){let t=[];for(let n of e){let e=n;if(!n.source&&n.role===`user`){let t=iN(n.content);t&&(e={...n,source:`lick`,channel:t})}let r=t[t.length-1];if(!(e.lickId||r?.lickId)&&e.source===`lick`&&r?.source===`lick`&&r.channel===e.channel){r.lickParts=[...r.lickParts??[r.content],e.content],r.lickCount=r.lickParts.length,r.content+=`\n\n${e.content}`;continue}t.push({...e})}return t}function DP(e){return new Date(e).toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`})}function OP(e){return sN(`slicc-day-separator`,{label:DP(e)})}function kP(e,t={}){let n=[],r=``;for(let i of e){let e=new Date(i.timestamp).toDateString();e!==r&&(n.push(OP(i.timestamp)),r=e),n.push(...TP(i,t))}let i=document.createElement(`div`);return i.append(...n),mP(i,{openClusterAnchors:new Set,toolCallLookup:(t,n)=>e.find(e=>e.id===t)?.toolCalls?.find(e=>e.id===n)}),Array.from(i.children)}var AP=`auto`;function jP(e){if(e===null)return null;if(e===`auto`||e===`esc`)return e}var MP=`slicc-shortcuts-style`,NP=`
9121
+ `);t(async()=>{let{quickLabel:e}=await import(`./quick-llm-BKYqGAke.js`).then(e=>e.n);return{quickLabel:e}},__vite__mapDeps([4,1,5,6,7,2,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37])).then(({quickLabel:e})=>e({system:$N,prompt:`Label these tool calls (inputs only):\n${o}`,maxTokens:40})).then(e=>{let t=e?.replace(/^["']|["']$|\.$/g,``).trim()??``;eP(t)&&(YN.set(r,t),a&&ZN.set(a,t),n.isConnected&&n.setAttribute(`label`,t))}).catch(()=>void 0).finally(()=>XN.delete(r))}function nP(e,t={}){let n=sN(`slicc-tool-cluster`,{count:String(e.length)});return t.open&&n.setAttribute(`open`,``),n.append(...e),t.toolCalls&&t.toolCalls.length>0&&tP(t.toolCalls,n),n}function rP(e){let t=document.createElement(`slicc-agent-message`);t.setAttribute(`data-msg-id`,e.id),Number.isFinite(e.timestamp)&&e.timestamp>0&&t.setAttribute(`data-msg-time`,String(e.timestamp));let n=(e.content??``).trim().length>0,r=Cn(e.timestamp);return r&&n&&t.setAttribute(`timestamp`,r),e.isStreaming&&t.setAttribute(`streaming`,``),t.setBodyHtml($M(e.content,e.isStreaming===!0)),n||t.setAttribute(`data-empty`,``),[t,...(e.toolCalls??[]).map(t=>KN(t,e.id))]}function iP(e,t){let n=e.querySelectorAll(`:scope > slicc-tool-cluster`);for(let e of n){let n=Array.from(e.querySelectorAll(`slicc-action-row`));aP(e,n,t);let r=e.parentNode;if(!r){e.remove();continue}for(let t of n)oP(t,r,e);e.remove()}}function aP(e,t,n){if(!e.hasAttribute(`open`))return;let r=t[0]?.dataset.msgId;r&&n.add(r)}function oP(e,t,n){let r=e.dataset.msgId,i=r&&t instanceof Element?t.querySelector(`:scope > slicc-agent-message[data-msg-id="${r}"]`):null;if(!i||i.parentNode!==t){t.insertBefore(e,n);return}let a=i;for(;a.nextSibling instanceof HTMLElement&&a.nextSibling.tagName.toLowerCase()===`slicc-action-row`&&a.nextSibling.dataset.msgId===r;)a=a.nextSibling;t.insertBefore(e,a.nextSibling)}var sP=new Set([`slicc-user-message`,`slicc-lick-card`,`slicc-error-card`,`slicc-delegation-line`,`slicc-day-separator`,`slicc-compaction-marker`]);function cP(e){return e instanceof HTMLElement?sP.has(e.tagName.toLowerCase()):!0}function lP(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-action-row`}function uP(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-agent-message`}function dP(e){let t=[],n=[];for(let r of e)uP(r)?!r.hasAttribute(`data-empty`)&&n.length>0&&(t.push(n),n=[]):lP(r)&&n.push(r);return n.length>0&&t.push(n),t}function fP(e,t){let n=[];for(let r of e){let e=r.dataset.msgId,i=r.dataset.toolId;if(!e||!i)return;let a=t(e,i);if(!a)return;n.push(a)}return n}function pP(e,t){let n=e[0],r=n.parentNode;if(!r)return;let i=new Set(e),a=n.nextSibling;for(;a&&i.has(a);)a=a.nextSibling;let o=n.dataset.msgId,s=nP(e,{open:!!(o&&t.openClusterAnchors.has(o)),toolCalls:t.toolCallLookup?fP(e,t.toolCallLookup):void 0});r.insertBefore(s,a)}function mP(e,t){iP(e,t.openClusterAnchors);let n=Array.from(e.children),r=0;for(;r<n.length;){if(cP(n[r])){r++;continue}let e=r;for(;e<n.length&&!cP(n[e]);)e++;let i=dP(n.slice(r,e));for(let e of i)e.length>=3&&pP(e,t);r=e}t.openClusterAnchors.clear()}function hP(e,t){return e.channel===`sprinkle`&&t?.[2]?.trim()===`gelatiere`}function gP(e){let t=M(e);if(!t)return null;let n=document.createElement(`div`),r=document.createElement(`p`);if(r.textContent=t.headline,n.append(r),t.titles.length>0){let e=document.createElement(`ul`);for(let n of t.titles){let t=document.createElement(`li`);t.textContent=n,e.append(t)}n.append(e)}return n}function _P(e){let t=tN.exec(e.content),n=e.lickCount??1,r=aN.exec(e.content),i=r?oN(r[1]):null,a=hP(e,t),o=a?M(e.content)?.action:void 0,s=sN(`slicc-lick-card`,{kind:a?fe:e.channel??`webhook`,"event-label":a?(o??`suggestions`).replace(/^gelatiere-/,``):dN(e.content,e.channel,t,i),collapsible:``,collapsed:``});i&&s.setAttribute(`hue`,vO({isRoot:!1,name:i})),n>1&&s.setAttribute(`count`,String(n)),e.lickState&&e.lickState!==`pending`&&s.setAttribute(`state`,e.lickState);let c=e.lickParts??[e.content];for(let e of c){let t=a?gP(e):null;if(t){s.append(t);continue}let n=document.createElement(`div`);n.innerHTML=QM(rN(e)),s.append(n)}return s}function vP(e){let t=sN(`slicc-delegation-line`,{kind:`feed`,verb:`feed_scoop`,label:cN(e.content.replace(/\*\*\[[^\]]*\]\*\*\s*/,``))}),n=document.createElement(`slicc-user-message`);return n.setBodyHtml(QM(e.content)),[t,n]}var yP=`Out of AI budget`;function bP(){try{return d(u())}catch{return[]}}function xP(e){if(e.resetsAt===null||/reset/i.test(e.message))return e.message;let t=new Date(e.resetsAt);return Number.isNaN(t.getTime())?e.message:`${e.message} Resets on ${t.toLocaleDateString(void 0,{dateStyle:`long`})}.`}function SP(){return bP().length===0?{action:`settings`,"button-label":`Add a provider`}:{action:`change-model`,"button-label":`Switch provider and try again`,"secondary-action":`settings`,"secondary-button-label":`Add a provider`}}function CP(e,t){let n={message:e.content,"message-id":e.id},r=y(e.content);return r&&(n.label=yP,n.message=xP(r)),t?(n[`no-action`]=``,sN(`slicc-error-card`,n)):r?sN(`slicc-error-card`,{...n,...SP()}):(_(e.content)?n.action=`settings`:g(e.content)?n.action=`change-model`:b(e.content)&&(n.action=`login`),sN(`slicc-error-card`,n))}function wP(e){return sN(`slicc-compaction-marker`,{trigger:e.trigger,state:e.state,...e.transcriptPath?{transcript:e.transcriptPath}:{}})}function TP(e,t={}){if(e.compaction)return e.compaction.state===`discarded`?[]:[wP(e.compaction)];if(e.source===`lick`)return[_P(e)];if(e.source===`delegation`||e.channel===`delegation`)return vP(e);if(e.error)return[CP(e,t.readOnly===!0)];if(e.role===`assistant`)return rP(e);let n=iN(e.content);return n?[_P({...e,source:`lick`,channel:n})]:[qN(e)]}function EP(e){let t=[];for(let n of e){let e=n;if(!n.source&&n.role===`user`){let t=iN(n.content);t&&(e={...n,source:`lick`,channel:t})}let r=t[t.length-1];if(!(e.lickId||r?.lickId)&&e.source===`lick`&&r?.source===`lick`&&r.channel===e.channel){r.lickParts=[...r.lickParts??[r.content],e.content],r.lickCount=r.lickParts.length,r.content+=`\n\n${e.content}`;continue}t.push({...e})}return t}function DP(e){return new Date(e).toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`})}function OP(e){return sN(`slicc-day-separator`,{label:DP(e)})}function kP(e,t={}){let n=[],r=``;for(let i of e){let e=new Date(i.timestamp).toDateString();e!==r&&(n.push(OP(i.timestamp)),r=e),n.push(...TP(i,t))}let i=document.createElement(`div`);return i.append(...n),mP(i,{openClusterAnchors:new Set,toolCallLookup:(t,n)=>e.find(e=>e.id===t)?.toolCalls?.find(e=>e.id===n)}),Array.from(i.children)}var AP=`auto`;function jP(e){if(e===null)return null;if(e===`auto`||e===`esc`)return e}var MP=`slicc-shortcuts-style`,NP=`
8908
9122
  /* The sheet grows a column at a time as the viewport allows, and the dialog
8909
9123
  grows with it — one alphabetical column of thirty-odd rows is a reference
8910
9124
  you read; three short labelled ones are a cheat sheet you scan. Capped at
@@ -8950,6 +9164,6 @@ slicc-dialog.wcsc-dialog::part(dialog){width:min(460px,92vw);}
8950
9164
  `;function qF(e,t){let n=e.commands.map(e=>sF(t,e)).filter(e=>e!==null);return n.length===0?null:n.join(` `)}function JF(e){return{commands:[e],find:t=>{let n=tF(e);return n?t.root.ownerDocument.querySelector(`slicc-dock-item[item-id="${YF(n)}"]`):null}}}function YF(e){return typeof globalThis.CSS?.escape==`function`?globalThis.CSS.escape(e):e.replace(/["\\]/g,`\\$&`)}var XF=[{commands:[`prevAgent`,`nextAgent`],find:e=>e.switcher.scoops.length>1?e.root.ownerDocument.querySelector(`slicc-agent-tabs [part="track-frame"]`):null,placement:`end`},JF(`tabs`),JF(`files`),JF(`terminal`),JF(`memory`),JF(`monitor`),{commands:[`sprinkles`],find:e=>e.root.ownerDocument.querySelector(`slicc-dock-item[kind="sprinkle"]`)},{commands:[`leftRail`],find:e=>e.root.ownerDocument.querySelector(`slicc-freezer [part="toggle"]`)},{commands:[`attach`],find:e=>e.inputCard.querySelector(`slicc-add-menu`),placement:`top-start`},{commands:[`stop`],find:e=>e.inputCard.querySelector(`slicc-send-button`)},{commands:[`composer`],find:e=>e.inputCard.querySelector(`textarea`),placement:`top-start`}];function ZF(e,t,n=globalThis.innerWidth){return e.endsWith(`end`)&&t.right+HF>n?e.replace(/end$/,`start`):e.endsWith(`start`)&&t.left-HF<0?e.replace(/start$/,`end`):e}function QF(e){if(e.getElementById(GF))return;let t=e.createElement(`style`);t.id=GF,t.textContent=KF,(e.head??e.documentElement)?.append(t)}function $F(e){let t=e.root.ownerDocument,n=t.defaultView,r=null,i={},a=new Map,o=0,s=null,c=null,l=()=>{!r||o!==0||!n||(o=n.requestAnimationFrame(()=>{o=0,r&&d()}))},u=e=>{let t=a.get(e);t&&(t.cap.anchor=null,t.ghost.remove(),a.delete(e))};function d(){r&&XF.forEach((n,o)=>{let c=qF(n,i),l=c===null?null:n.find(e),d=l?.getBoundingClientRect();if(c===null||!l||!d||d.width===0||d.height===0){u(o);return}let f=a.get(o);if(!f){let e=t.createElement(`div`);e.className=WF;let n=t.createElement(`slicc-keycap`);n.setAttribute(`stagger`,String(o)),e.append(n),r?.append(e),f={ghost:e,cap:n},a.set(o,f)}let p=ZF(n.placement??`top-end`,d);f.cap.getAttribute(`placement`)!==p&&f.cap.setAttribute(`placement`,p),f.cap.getAttribute(`cap`)!==c&&f.cap.setAttribute(`cap`,c),f.cap.anchor!==l&&(f.cap.anchor=l);let m=f.ghost.style;m.left=`${d.left}px`,m.top=`${d.top}px`,m.width=`${d.width}px`,m.height=`${d.height}px`,s?.observe(l)})}let f=a=>{if(i=a,r){d();return}if(QF(t),r=t.createElement(`div`),r.className=UF,r.dataset.wcShortcuts=`caps`,t.body.append(r),n?.ResizeObserver&&(s=new n.ResizeObserver(l)),n?.MutationObserver){c=new n.MutationObserver(l),c.observe(e.inputCard,{childList:!0,subtree:!0});let r=t.querySelector(`slicc-dock`);r&&c.observe(r,{childList:!0,subtree:!0})}n?.addEventListener(`resize`,l),t.addEventListener(`scroll`,l,{capture:!0,passive:!0}),s?.observe(t.documentElement),d()},p=()=>{if(r){o!==0&&(n?.cancelAnimationFrame(o),o=0);for(let e of[...a.keys()])u(e);s?.disconnect(),s=null,c?.disconnect(),c=null,n?.removeEventListener(`resize`,l),t.removeEventListener(`scroll`,l,{capture:!0}),r.remove(),r=null}};return{show:f,hide:p,destroy:p}}var eI=`slicc-dock-select`,tI=`freezer-toggle`;function nI(e){let t=e.detail;return typeof t?.id==`string`?t.id:null}function rI(e){let t=new Map,n=new Map,r=0,i=e=>{eF(e)&&(t.set(e,(t.get(e)??0)+1),r+=1,n.set(e,r))},a=!1,o=e=>{i(e),!a&&(a=!0,queueMicrotask(()=>{a=!1}))},s=e=>{a||i(e)},c=e=>{let t=nI(e);if(t===null)return;let n=nF(t);s(n??`sprinkles`)},l=()=>s(`leftRail`);return e.addEventListener(eI,c,!0),e.addEventListener(tI,l,!0),{record:o,used:e=>t.has(e),ranked:()=>[...t.entries()].map(([e,t])=>({id:e,count:t})).sort((e,t)=>t.count-e.count||(n.get(t.id)??0)-(n.get(e.id)??0)),dispose:()=>{e.removeEventListener(eI,c,!0),e.removeEventListener(tI,l,!0),t.clear(),n.clear()}}}function iI(e){e.inputCard.dispatchEvent(new CustomEvent(`stop`,{bubbles:!0,composed:!0}))}function aI(e){e.inputCard.querySelector(`slicc-add-menu`)?.open?.()}function oI(e){e.composer.toggleHandsFree?.()}function sI(e){let t=e.thread.ownerDocument.querySelector(`slicc-tab-overlay`);t&&(t.peeking=!0),e.dock.selectItem?.(`browser`)}function cI(e,t){let n=e.thread,r=n.getBoundingClientRect().top,i=[...n.children].map(e=>e.getBoundingClientRect().top-r),a=t>0?i.find(e=>e>1):i.filter(e=>e<-1).at(-1);a!==void 0&&(n.scrollTop+=a)}function lI(e,t){e.thread.querySelector(`.wc-copy-row slicc-press-button`)?.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:{}}))}function uI(e){lI(e,`short-click`)}function dI(e){lI(e,`long-press`)}function fI(e){if(!e)return null;try{return e.contentDocument}catch{return null}}function pI(e){let t=[...e.thread.querySelectorAll(`[data-tool-ui-request]`)];if(t.length===0)return;let n=e.thread.ownerDocument.activeElement,r=t[(t.findIndex(e=>n instanceof Node&&e.contains(n))+1)%t.length];if(!r)return;let i=r.querySelector(`iframe`),a=fI(i)?.querySelector(`button[data-action]`);(r.querySelector(`button[data-action]:not([disabled])`)??a??i)?.focus?.(),r.scrollIntoView?.({block:`nearest`})}function mI(e){let t=e.dock.active;t&&zn(e.frame??e.dockTree,t)}function hI(e){let t=(e,t)=>({size:()=>e().querySelectorAll(t).length,selectAt:n=>{e().querySelectorAll(t)[n]?.click()}});return{files:{size:()=>e.fileTree.visibleIds().length,selectAt:t=>{let n=e.fileTree.visibleIds()[t];n&&e.fileTree.selectFile(n)}},memory:t(()=>e.memoryHost,`slicc-memrow`),sessions:t(()=>e.freezer,`slicc-freezer-card:not(.match-hidden):not([hidden])`)}}function gI(e){return BF({switcher:e.switcher,dock:e.dock,freezer:e.freezer,composerMeta:e.composerMeta,hudHost:e.chatPane,composerBand:e.composer,focusComposer:()=>e.inputCard.focus(),composerAvailable:()=>!e.composer.hasAttribute(`hidden`)&&!e.inputCard.hasAttribute(`disabled`),stopTurn:()=>iI(e),toggleVoice:()=>oI(e),scrollMessage:t=>cI(e,t),focusApproval:()=>pI(e),openAttachMenu:()=>aI(e),copyReply:()=>uI(e),copyChat:()=>dI(e),zoomSurface:()=>mI(e),peekTabs:()=>sI(e),lists:hI(e),caps:$F({inputCard:e.inputCard,root:e.chatPane,switcher:e.switcher}),usage:rI(e.chatPane.ownerDocument)})}var _I=/data:([\w.+-]+\/[\w.+-]+)(?:;[\w.+-]+=[^;,]*)*;base64,([A-Za-z0-9+/=]+)/g,vI=RegExp(`(?:^|[\\s"'\`(\\[{<,;:=])([A-Za-z0-9+/]{128,}={0,2})(?=$|[\\s"'\`)\\]}>,;:.!?])`,`g`),yI=16;function bI(e){let t=[],n=0;for(;;){let r=e.indexOf(`
8951
9165
  `,n),i=r<0?e.length:r,a=e[i-1]===`\r`?i-1:i;if(t.push({start:n,end:a,text:e.slice(n,a)}),r<0)return t;n=r+1}}var xI=/^[A-Za-z0-9+/]+$/,SI=/^[A-Za-z0-9+/]+={0,2}$/;function CI(e){let t=bI(e),n=[];for(let r=0;r<t.length;r+=1){let i=wI(t,r);if(i===null)continue;let a=TI(t,r,i);if(a===r)continue;let o=t.slice(r,a+1),s=EI(t,r,i);s&&o.unshift(s);let c=DI(e,o);c&&n.push(c),r=a}return n}function wI(e,t){let n=e[t];if(!n)return null;let r=n.text.length;return r<yI||r%4!=0?null:xI.test(n.text)?r:null}function TI(e,t,n){let r=t;for(let i=t+1;i<e.length;i+=1){let t=e[i];if(!t||t.text.length!==n||!xI.test(t.text))break;r=i}let i=e[r+1];if(!i||i.text.length===0||i.text.length>=n||!SI.test(i.text))return r;let a=e[r+2];return a!==void 0&&a.text.length===n&&xI.test(a.text)?r:r+1}function EI(e,t,n){let r=e[t-1];if(!r||r.text.length<=n)return null;let i=r.text.length-n,a=r.text.slice(i);return!xI.test(a)||xI.test(r.text[i-1]??` `)?null:{start:r.start+i,end:r.end,text:a}}function DI(e,t){let n=t.map(e=>e.text).join(``);if(n.replace(/=+$/,``).length<128||n.length%4!=0)return null;let r=s(n);if(!r)return null;let i=t[0]?.start??0,a=t[t.length-1]?.end??i;return{raw:e.slice(i,a),data:r,start:i,end:a}}function OI(e){let t=[],n=[],r=(e,t)=>n.some(([n,r])=>e<r&&t>n);_I.lastIndex=0;for(let r of e.matchAll(_I)){let e=r[2]??``;if(e.length<128)continue;let i=s(e);if(!i)continue;let a=r.index??0,o=a+r[0].length;t.push({raw:r[0],data:i,declaredMime:r[1]??``,start:a,end:o}),n.push([a,o])}for(let i of CI(e))r(i.start,i.end)||(t.push(i),n.push([i.start,i.end]));vI.lastIndex=0;for(let i of e.matchAll(vI)){let e=i[1]??``,a=(i.index??0)+(i[0].length-e.length),o=a+e.length;if(r(a,o)||e.length%4!=0)continue;let c=s(e);c&&(t.push({raw:e,data:c,start:a,end:o}),n.push([a,o]))}return t.sort((e,t)=>e.start-t.start)}var kI=e=>Array.from(e,e=>e.charCodeAt(0)),AI=[{offset:0,bytes:[137,80,78,71,13,10,26,10],mime:`image/png`},{offset:0,bytes:[255,216,255],mime:`image/jpeg`},{offset:0,bytes:kI(`GIF87a`),mime:`image/gif`},{offset:0,bytes:kI(`GIF89a`),mime:`image/gif`},{offset:0,bytes:kI(`BM`),mime:`image/bmp`},{offset:0,bytes:kI(`RIFF`),also:{offset:8,bytes:kI(`WEBP`)},mime:`image/webp`},{offset:4,bytes:kI(`ftypavif`),mime:`image/avif`},{offset:0,bytes:[0,0,1,0],mime:`image/x-icon`},{offset:0,bytes:kI(`RIFF`),also:{offset:8,bytes:kI(`WAVE`)},mime:`audio/wav`},{offset:0,bytes:kI(`ID3`),mime:`audio/mpeg`},{offset:0,bytes:kI(`fLaC`),mime:`audio/flac`},{offset:4,bytes:kI(`ftypM4A`),mime:`audio/mp4`},{offset:4,bytes:kI(`ftypisom`),mime:`video/mp4`},{offset:4,bytes:kI(`ftypmp42`),mime:`video/mp4`},{offset:4,bytes:kI(`ftypqt`),mime:`video/quicktime`},{offset:0,bytes:[26,69,223,163],mime:`video/webm`},{offset:0,bytes:kI(`%PDF-`),mime:`application/pdf`},{offset:0,bytes:[0,97,115,109],mime:`application/wasm`},{offset:0,bytes:kI(`PK`),mime:`application/zip`},{offset:0,bytes:[31,139],mime:`application/gzip`},{offset:0,bytes:[127,69,76,70],mime:`application/x-executable`},{offset:0,bytes:[202,254,186,190],mime:`application/x-mach-binary`}],jI=kI(`OggS`);function MI(e,t,n){if(t+n.length>e.length)return!1;for(let r=0;r<n.length;r+=1)if(e[t+r]!==n[r])return!1;return!0}function NI(e){let t=[...AI].sort((e,t)=>t.bytes.length+(t.also?.bytes.length??0)-(e.bytes.length+(e.also?.bytes.length??0)));for(let n of t)if(MI(e,n.offset,n.bytes)&&!(n.also&&!MI(e,n.also.offset,n.also.bytes)))return n.mime;if(MI(e,0,jI)){let t=PI(e.subarray(0,64));return/theora|VP8/.test(t)?`video/ogg`:`audio/ogg`}return null}function PI(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return t}var FI=4096;function II(e){if(e.length===0)return!0;let t=e.subarray(0,Math.min(e.length,FI));if(t.includes(0))return!1;let n=t.length;if(n===FI)for(let e=0;e<4&&n>0;e+=1){let e=t[n-1]??0;if(!(e&128)||(--n,(e&192)==192))break}try{let e=new TextDecoder(`utf-8`,{fatal:!0}).decode(t.subarray(0,n)),r=0;for(let t of e){let e=t.codePointAt(0)??0;e!==9&&e!==10&&e!==13&&e!==12&&e!==27&&(e<32||e===127)&&(r+=1)}return r<=e.length*.05}catch{return!1}}function LI(e,t){if(t&&t.length>0){let e=NI(t);if(e)return{mime:e,text:RI(e),source:`magic`}}let n=i(e);return n===`application/octet-stream`?t&&II(t)?{mime:`text/plain`,text:!0,source:`content`}:{mime:`application/octet-stream`,text:!1,source:t?`content`:`unknown`}:{mime:n,text:RI(n),source:`extension`}}function RI(e){if(e.startsWith(`text/`))return!0;let t=e.split(`;`,1)[0]?.trim()??e;return t===`application/json`||t===`application/xml`||t===`application/javascript`||t===`application/ecmascript`||t===`image/svg+xml`||t.endsWith(`+json`)||t.endsWith(`+xml`)}var zI=new Set([`md`,`markdown`,`mdown`,`mkd`,`mkdn`,`mdwn`]);function BI(e,t){let n=t.split(`;`,1)[0]?.trim()??t;if(n===`text/html`)return`html`;if(n===`text/markdown`||n===`text/x-markdown`)return`markdown`;let r=e.lastIndexOf(`.`),i=r>0?e.slice(r+1).toLowerCase():``;return zI.has(i)?`markdown`:i===`html`||i===`htm`?`html`:null}var VI=`payload`;function HI(e,t){let n;try{n=c(e)}catch{return null}if(n.length===0)return null;let r=NI(n);if(r)return UI(n,r,`magic`);let i=t?.split(`;`,1)[0]?.trim().toLowerCase();return i&&i.length>0&&i!==`application/octet-stream`?UI(n,i,`declared`):II(n)?UI(n,`text/plain`,`content`):null}function UI(e,t,n){let r=o(t);return{bytes:e,mime:t,text:RI(t),source:n,name:r?`${VI}.${r}`:VI}}var WI=`slicc-blob-chip`,GI=`base64-preview-open`,KI=`data-base64-chips`;function qI(e){return`${e.childNodes.length}:${e.textContent?.length??0}`}var JI=new Set([`A`,`PRE`,`SCRIPT`,`STYLE`,`TEXTAREA`]),YI=[[`image/`,`image`],[`audio/`,`file-audio`],[`video/`,`file-video`],[`text/`,`file-text`]];function XI(e){for(let[t,n]of YI)if(e.startsWith(t))return w(n)?n:`file`;return`file`}function ZI(e){let t=qI(e);if(e.getAttribute(KI)!==t){for(let t of $I(e)){let e=[];for(let n of OI(t.text)){let t=HI(n.data,n.declaredMime);t&&e.push({start:n.start,end:n.end,payload:t})}e.length!==0&&tL(t,e)}e.setAttribute(KI,qI(e))}}function QI(e,t){for(let n=e;n;n=n.parentElement){if(JI.has(n.tagName))return!0;if(n===t)return!1}return!1}function $I(e){let t=[];for(let n of[e,...e.querySelectorAll(`*`)]){if(QI(n,e))continue;let r=null;for(let e of n.childNodes){let n=eL(e);if(n===null){r=null;continue}r||(r={text:``,parts:[]},t.push(r));let i=r.text.length;r.text+=n,r.parts.push({node:e,start:i,end:r.text.length})}}return t.filter(e=>e.text.length>0)}function eL(e){return e.nodeType===Node.TEXT_NODE?e.nodeValue??``:e.nodeType===Node.ELEMENT_NODE&&e.tagName===`BR`?`
8952
9166
  `:null}function tL(e,t){let n=e.parts[0]?.node,r=n?.parentNode;if(!n||!r)return;let i=n.ownerDocument;if(!i)return;let a=i.createDocumentFragment(),o=new Set;for(let n of e.parts){if(eL(n.node)===`
8953
- `&&n.node.nodeType===Node.ELEMENT_NODE){t.some(e=>e.start<=n.start&&n.end<=e.end)||a.appendChild(i.createElement(`br`));continue}let r=n.start;for(let[s,c]of t.entries()){if(c.end<=n.start||c.start>=n.end)continue;let t=Math.min(Math.max(c.start,n.start),n.end);t>r&&a.appendChild(i.createTextNode(e.text.slice(r,t))),o.has(s)||(a.appendChild(nL(i,c.payload)),o.add(s)),r=Math.max(r,Math.min(c.end,n.end))}r<n.end&&a.appendChild(i.createTextNode(e.text.slice(r,n.end)))}r.insertBefore(a,n);for(let t of e.parts)t.node.remove()}function nL(e,t){let n=t.bytes.byteLength,r=e.createElement(WI);return r.setAttribute(`icon`,XI(t.mime)),r.setAttribute(`label`,`${mp(t.mime)} · ${T(n)}`),r.title=`${t.mime} · ${n.toLocaleString()} bytes\nClick to preview`,r.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation();let n={payload:t};r.dispatchEvent(new CustomEvent(GI,{detail:n,bubbles:!0,composed:!0}))}),r}var rL=24;async function iL(e,t){let n=t.slice(0,Math.max(t.lastIndexOf(`/`),0))||`/`;for(let t=0;t<rL;t+=1){try{return await e.stat(n===`/`?`/.git`:`${n}/.git`),n===``?`/`:n}catch{}if(n===`/`||n===``)return null;n=n.slice(0,Math.max(n.lastIndexOf(`/`),0))||`/`}return null}function aL(e){let t=async t=>{let n=await e.stat(t),r=n.type===`directory`;return{type:r?`dir`:`file`,mode:r?16877:33188,size:n.size,ino:0,mtimeMs:n.mtime,ctimeMs:n.ctime,uid:1,gid:1,dev:1,isFile:()=>!r,isDirectory:()=>r,isSymbolicLink:()=>n.isSymlink===!0}};return{promises:{readFile:(t,n)=>{let r=typeof n==`string`?n:n?.encoding;return e.readFile(t,r===`utf8`?{encoding:`utf-8`}:{encoding:`binary`})},readdir:async t=>(await e.readDir(t)).map(e=>e.name),stat:t,lstat:t,readlink:async t=>(await e.stat(t)).symlinkTarget??``}}}async function oL(e,n,r){let i=await iL(e,n);if(!i)return null;let a=n.slice(i===`/`?1:i.length+1);if(a.length===0)return null;try{let n=await t(()=>import(`./isomorphic-git-CL-UvciX.js`),__vite__mapDeps([37,1,38])),o=aL(e),s=await n.resolveRef({fs:o,dir:i,ref:`HEAD`}),{blob:c}=await n.readBlob({fs:o,dir:i,oid:s,filepath:a}),l=new TextDecoder().decode(c);return l===r?null:{baseContent:l,status:`modified`,repoRoot:i}}catch{return null}}function sL(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return t===`.html`||t===`.svg`}async function cL(e,t){let n=await e.readFile(t,{encoding:`binary`}),r=new Uint8Array(new ArrayBuffer(n.length));r.set(n);let{mime:i,text:a}=LI(t,r);return{mime:i,text:a,bytes:r}}var lL=524288;function uL(e,t,n){if(n.length>lL)return null;switch(BI(e,t)){case`markdown`:return{mount:`inline`,html:QM(n)};case`html`:return{mount:`sandbox`,html:n};default:return null}}async function dL(e,t,n={}){let{mime:r,text:i,bytes:a}=await cL(e,t);if(!i){Ap.open({path:t,content:a.buffer,mimeType:r,text:!1});return}let o=new TextDecoder().decode(a),s=await oL(e,t,o),c=uL(t,r,o);Ap.open({path:t,content:o,mimeType:r,text:!0,...s?{baseContent:s.baseContent,gitStatus:s.status}:{},...c?{rendered:c}:{},...n.line===void 0?{}:{line:n.line}})}async function fL(e,t){let{mime:n,bytes:r}=await cL(e,t),i=new Blob([r],{type:n}),a=URL.createObjectURL(i);try{let e=document.createElement(`a`);e.href=a,e.download=t.split(`/`).pop()||`download`,e.click()}finally{URL.revokeObjectURL(a)}}async function pL(e,t,n){let r=await e.readFile(t,{encoding:`binary`}),i=typeof r==`string`?r:Uint8Array.from(r);await e.writeFile(n,i)}async function mL(e,t){try{return await e.stat(t),!0}catch{return!1}}async function hL(e,t){let n=t.split(`/`).pop()??``,r=prompt(`Rename ${t} to:`,n)?.trim();if(!r||r===n||r.includes(`/`))return;let i=`${t.slice(0,t.length-n.length)}${r}`,a=await e.stat(t);try{let t=await e.stat(i);if(p(a,t))return}catch{}await mL(e,i)&&!confirm(`${i} already exists. Overwrite?`)||(await pL(e,t,i),await e.rm(t))}function gL(e){let{fileTree:t,openFs:n,openWriter:r,insertReference:i,toPreviewUrl:a,log:o}=e;t.addEventListener(`file-preview`,async e=>{let{path:t}=e.detail;try{await dL(await n(),t)}catch(e){o.error(`File preview failed`,e)}}),t.addEventListener(`file-reference`,e=>{let{path:t}=e.detail;i(t)}),t.addEventListener(`file-download`,async e=>{let{path:t}=e.detail;try{await fL(await n(),t)}catch(e){o.error(`File download failed`,e)}}),t.addEventListener(`file-overflow`,e=>{let{path:n,anchor:r,kind:i}=e.detail,a=i!==`directory`,o=[{id:`preview`,label:`Preview`,visible:a},{id:`reference`,label:`Reference in chat`,visible:a},{id:`download`,label:`Download`,visible:a},{id:`rename`,label:`Rename`,visible:a},{id:`duplicate`,label:`Duplicate`,visible:a},{id:`copy-path`,label:`Copy path`},{id:`open-browser`,label:`Open in browser`,visible:a&&sL(n)},{id:`delete`,label:`Delete`,destructive:!0,visible:a}];ku.show({anchor:r,items:o,context:{path:n},dispatchTarget:t})}),t.addEventListener(`overflow-action`,async e=>{let{action:n,context:i}=e.detail,{path:s}=i;try{switch(n){case`preview`:case`reference`:case`download`:t.dispatchEvent(new CustomEvent(`file-${n}`,{detail:{id:s,path:s},bubbles:!0,composed:!0}));break;case`copy-path`:await navigator.clipboard.writeText(s);break;case`open-browser`:window.open(a(s),`_blank`);break;case`duplicate`:{let e=s.lastIndexOf(`.`),t=e>0?`${s.slice(0,e)}_copy${s.slice(e)}`:`${s}_copy`,n=await r();if(await mL(n,t)&&!confirm(`${t} already exists. Overwrite?`))break;await pL(n,s,t);break}case`delete`:confirm(`Delete ${s}?`)&&await(await r()).rm(s);break;case`rename`:await hL(await r(),s)}}catch(e){o.error(`Overflow action "${n}" failed`,e)}})}var _L=`slicc-agent-message`,vL=`slicc-user-message`,yL=`${_L},${vL}`,bL=[`streaming`,`text`,`timestamp`,`queued`];function xL(e){return e.tagName.toLowerCase()===vL?e.shadowRoot?.querySelector(`.b`)??null:e.querySelector(`.body`)??e}function SL(e){try{return CL(e)}catch(t){return e.log.error(`Base64 preview wiring failed; continuing without it`,t),()=>{}}}function CL(e){let{thread:t,log:n}=e;if(!(t instanceof Node))return()=>{};let r=e=>{if(!(e instanceof HTMLElement)||e.hasAttribute(`streaming`))return;let t=xL(e);if(t&&OI(t.textContent??``).length!==0)try{ZI(t)}catch(e){n.error(`Base64 elision failed`,e)}},i=e=>{for(let t of e.querySelectorAll(yL))r(t)};i(t);let a=new MutationObserver(e=>{for(let t of e){let e=t.target;if(t.type===`attributes`){e&&r(e);continue}for(let e of t.addedNodes)e instanceof HTMLElement&&(e.matches(yL)?r(e):i(e));let n=e?.closest?.(yL);n&&r(n)}});a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:bL});let o=e=>{let{payload:t}=e.detail;try{wL(t)}catch(e){n.error(`Base64 preview failed`,e)}};return t.addEventListener(GI,o),()=>{a.disconnect(),t.removeEventListener(GI,o)}}function wL(e){if(!e.text){Ap.open({path:e.name,content:e.bytes.buffer,mimeType:e.mime,text:!1});return}let t=new TextDecoder().decode(e.bytes),n=uL(e.name,e.mime,t);Ap.open({path:e.name,content:t,mimeType:e.mime,text:!0,...n?{rendered:n}:{}})}var TL;function EL(){if(TL)return TL;let e=new Worker(new URL(`/assets/agent-question-worker-oT1IOgNo.js`,``+import.meta.url),{type:`module`}),t=new Map,n=0;return e.addEventListener(`message`,e=>{let n=e.data,r=t.get(n.id);r&&(t.delete(n.id),`error`in n?r.reject(Error(n.error)):r.resolve(n.questions))}),e.addEventListener(`error`,n=>{for(let e of t.values())e.reject(Error(n.message));t.clear(),TL=void 0,e.terminate()}),TL={parse(r){let i=++n,a=new URL(`assets/gpu-ask-258b878401128d27/`,new URL(`/`,location.origin)).href;return new Promise((n,o)=>{t.set(i,{resolve:n,reject:o}),e.postMessage({id:i,text:r,baseUrl:a})})}},TL}var DL=`[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})`,OL=`[A-Za-z0-9._-]{1,100}`,kL=new Set(`about.account.apps.codespaces.collections.copilot.customer-stories.dashboard.discussions.enterprise.events.explore.features.login.marketplace.new.notifications.orgs.organizations.pricing.projects.pulls.issues.search.security.settings.sponsors.stars.topics.trending.users.watching`.split(`.`));function AL(e,t){return!kL.has(e.toLowerCase())&&t!==`.`&&t!==`..`}function jL(e){return e.replace(/\.git$/i,``)}function ML(e){let t;try{t=new URL(e)}catch{return null}return t.hostname!==`github.com`&&t.hostname!==`www.github.com`?null:t}function NL(e){let t=ML(e);if(!t)return null;let n=RegExp(`^/(${DL})/(${OL})/(issues|pull)/(\\d{1,7})(?:/|$)`).exec(t.pathname);if(!n)return null;let[,r=``,i=``,a,o=`0`]=n;return AL(r,i)?{owner:r,repo:jL(i),number:Number(o),kind:a===`pull`?`pull`:`issue`}:null}function PL(e){return`https://github.com/${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`}function FL(e){return`https://opengraph.githubassets.com/slicc/${e}`}function IL(e){return FL(`${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`)}function LL(e){return e.kind===`pull`?`PR #${e.number}`:e.kind===`issue`?`Issue #${e.number}`:`#${e.number}`}function RL(e){return{kind:e.kind===`pull`?`pull`:`issue`,title:`${e.owner}/${e.repo}#${e.number}`,image:IL(e),badge:LL(e)}}function zL(e){try{return decodeURIComponent(e)}catch{return e}}var BL=RegExp(`^/(orgs|users)/(${DL})/(projects|discussions)/(\\d{1,7})(?:/|$)`),VL=RegExp(`^/(${DL})/(${OL})(?:/(.*))?$`),HL=/^discussions\/(\d{1,7})(?:\/|$)/,UL=/^commit\/([0-9a-fA-F]{7,40})(?:\/|$)/,WL=/^releases\/tag\/([^/?#]{1,128})(?:\/|$)/,GL=/^(?:raw|releases\/download)\//;function KL(e,t,n){if(GL.test(n))return null;let r=`${e}/${t}`,i=HL.exec(n);if(i){let e=Number(i[1]??0);return{kind:`discussion`,title:`${r}#${e}`,image:FL(`${r}/discussions/${e}`),badge:`Discussion #${e}`}}let a=UL.exec(n);if(a){let e=a[1]??``;return{kind:`commit`,title:`${r}@${e.slice(0,7)}`,image:FL(`${r}/commit/${e}`),badge:`Commit`}}let o=WL.exec(n);if(o){let e=o[1]??``;return{kind:`release`,title:`${r}@${zL(e)}`,image:FL(`${r}/releases/tag/${e}`),badge:`Release`}}return{kind:`repo`,title:r,image:FL(r),badge:`Repository`}}function qL(e){let t=NL(e);if(t)return RL(t);let n=ML(e);if(!n)return null;let r=BL.exec(n.pathname);if(r){let[,e=``,t=``,n=``,i=`0`]=r;if(n===`discussions`&&e!==`orgs`)return null;let a=n===`projects`;return{kind:a?`project`:`discussion`,title:`${t}#${i}`,image:FL(`${e}/${t}/${n}/${i}`),badge:`${a?`Project`:`Discussion`} #${i}`}}let i=VL.exec(n.pathname);if(!i)return null;let[,a=``,o=``,s=``]=i;return AL(a,o)?KL(a,jL(o),s):null}var JL=RegExp(`(^|[^\\w/.-])(${DL})/(${OL})#(\\d{1,7})\\b`,`g`),YL=/\b(PRs?|pull requests?|issues?)\s+#?(\d{1,7})\b/gi,XL=/(^|[^\w&/#])#(\d{1,6})\b/g;function ZL(e){return/^p/i.test(e)?`pull`:`issue`}function QL(e){let t=[],n=(e,n)=>t.some(t=>e<t.end&&n>t.start);for(let n of e.matchAll(JL)){let[e,r=``,i=``,a=``,o=`0`]=n,s=(n.index??0)+r.length,c=e.slice(r.length);AL(i,a)&&t.push({start:s,end:s+c.length,raw:c,number:Number(o),kind:`unknown`,owner:i,repo:jL(a)})}for(let r of e.matchAll(YL)){let[e,i=``,a=`0`]=r,o=r.index??0;n(o,o+e.length)||t.push({start:o,end:o+e.length,raw:e,number:Number(a),kind:ZL(i)})}for(let r of e.matchAll(XL)){let[e,i=``,a=`0`]=r,o=(r.index??0)+i.length,s=e.slice(i.length);n(o,o+s.length)||t.push({start:o,end:o+s.length,raw:s,number:Number(a),kind:`unknown`})}return t.sort((e,t)=>e.start-t.start)}var $L=RegExp(`github\\.com[/:](${DL})/(${OL}?)(?:\\.git)?(?=$|[/\\s#?"'\`)\\]>,;])`,`g`),eR=RegExp(`(?:^|\\s)(?:-R|--repo)(?:\\s+|=)(${DL})/(${OL})`,`g`),tR=RegExp(`\\bgh\\s+repo\\s+(?:clone|view|fork|sync)\\s+(${DL})/(${OL})`,`g`);function nR(e){let t=[],n=[[$L,1,2],[eR,1,2],[tR,1,2],[JL,2,3]];for(let[r,i,a]of n)for(let n of e.matchAll(r)){let e=n[i]??``,r=jL(n[a]??``);!e||!r||!AL(e,r)||t.push({index:n.index??0,slug:`${e}/${r}`})}t.sort((e,t)=>e.index-t.index);let r=new Set,i=[];for(let{slug:e}of t){let t=e.toLowerCase();r.has(t)||(r.add(t),i.push(e))}return i}function rR(e,t){if(e.owner&&e.repo)return{owner:e.owner,repo:e.repo,number:e.number,kind:e.kind};let n=t[t.length-1];if(!n)return null;let[r,i]=n.split(`/`);return!r||!i?null:{owner:r,repo:i,number:e.number,kind:e.kind}}var iR=12;function aR(e){let t=new Map,n=null;for(let r of e.split(/\r?\n/)){let e=r.trim(),i=/^\[remote\s+"([^"]+)"\]$/.exec(e);if(i){n=i[1]??null;continue}if(e.startsWith(`[`)){n=null;continue}let a=/^url\s*=\s*(.+)$/.exec(e);n&&a&&!t.has(n)&&t.set(n,(a[1]??``).trim())}let r=[t.get(`origin`),t.get(`upstream`),...t.values()].filter(e=>!!e);for(let e of r){let t=nR(e)[0];if(t)return t}return null}function oR(e){if(!e.startsWith(`/`))return[];let t=e.split(`/`).filter(Boolean);t.pop();let n=[];for(;t.length>0&&n.length<iR;)n.push(`/${t.join(`/`)}`),t.pop();return n}var sR=class{#e;#t=new Map;constructor(e){this.#e=e}async repoFor(e){let t=[...new Set(e.filter(e=>e.startsWith(`/`)))].slice(-6).reverse();for(let e of t)for(let t of oR(e)){let e=await this.#n(t);if(e)return e}return null}#n(e){let t=this.#t.get(e);if(t!=null)return t;let n=this.#r(`${e}/.git/config`);return this.#t.set(e,n),n}async#r(e){try{let t=await this.#e.readFile(e,{encoding:`utf-8`});return aR(typeof t==`string`?t:new TextDecoder().decode(t))}catch{return null}}},cR=.4,lR=6,uR=8,dR=2e3,fR=/\d|\b(?:today|tonight|tomorrow|yesterday|noon|midnight|morning|afternoon|evening|night|week|weekend|weekday|fortnight|month|year|day|days|hour|hours|minute|minutes|mon|tue|wed|thu|fri|sat|sun|jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec)\w*|\b(?:christmas|halloween|thanksgiving|daily|weekly|monthly|yearly|every)\b/i,pR=new Set([`now`,`right now`,`currently`,`then`,`soon`,`later`,`earlier`,`recently`,`once`,`first`,`second`,`today`,`day`,`a day`,`the day`]),mR=/([.!?;:])\s+|\n+|,\s+(?=(?:and|but|then|so|while|or)\b)/gi,hR=/\s+(?:and|but|then|so|or)\s+/gi;function gR(e){return e.length>=3&&fR.test(e)}function _R(e){let t=[],n=0,r=(n,r)=>{let i=e.slice(n,r),a=i.length-i.trimStart().length,o=i.trim();o&&t.push({offset:n+a,text:o})};for(let t of e.matchAll(mR)){let e=t.index??0;r(n,t[1]?e+1:e),n=e+t[0].length}return r(n,e.length),t}function vR(e){let t=[],n=0;for(let r of e.matchAll(hR)){let i=r.index??0;t.push({offset:n,text:e.slice(n,i)}),n=i+r[0].length}return t.push({offset:n,text:e.slice(n)}),t.filter(e=>e.text.trim().length>0)}function yR(e){return e.trim().split(/\s+/).length}function bR(e){let t=e.trim().toLowerCase().replace(/[.,;:!?]+$/,``);return!(t.length<3||pR.has(t)||/^\d+$/.test(t))}async function xR(e,t,n){let r=e.map(()=>[]),i=[];if(e.forEach((e,t)=>{if(gR(e))for(let n of _R(e.slice(0,dR)))gR(n.text)&&i.push({textIndex:t,...n})}),i.length===0)return r;let a=await n.parseMany(i.map(e=>e.text),t),o=[],s=[];if(a.forEach((e,t)=>{let n=i[t];if(n)for(let t of e.spans){let e={textIndex:n.textIndex,start:n.offset+t.start,end:n.offset+t.end,text:t.text,confidence:t.confidence},r=vR(t.text);r.length>1&&yR(t.text)>lR&&t.confidence>=cR?s.push({base:e,parts:r}):t.confidence>=.8&&bR(t.text)&&o.push(e)}}),s.length>0){let e=s.flatMap(({base:e,parts:t})=>t.map(t=>({base:e,part:t})));(await n.parseMany(e.map(({part:e})=>e.text),t)).forEach((t,n)=>{let r=e[n];if(r)for(let e of t.spans){if(e.confidence<.8||!bR(e.text))continue;let t=r.base.start+r.part.offset+e.start;o.push({textIndex:r.base.textIndex,start:t,end:t+(e.end-e.start),text:e.text,confidence:e.confidence})}})}if(o.length===0)return r;(await n.parseMany(o.map(e=>e.text),t)).forEach((e,t)=>{let n=o[t];!n||e.occurrences.length===0||r[n.textIndex]?.push({start:n.start,end:n.end,text:n.text,confidence:n.confidence,occurrences:e.occurrences.slice(0,uR).map(e=>({start:e.start,...e.end?{end:e.end}:{},allDay:e.allDay,...e.open?{open:e.open}:{}})),rrules:[...e.rrules]})});for(let e of r){e.sort((e,t)=>e.start-t.start);for(let t=e.length-1;t>0;--t){let n=e[t-1],r=e[t];n&&r&&r.start<n.end&&e.splice(t,1)}}return r}var SR=null;function CR(){return SR??=t(async()=>{let{defineParser:e}=await import(`./dist-C8ZpEU8V.js`);return{defineParser:e}},[]).then(({defineParser:e})=>e({backend:`cpu`})).then(e=>({parseMany:(t,n)=>e.parseMany(t,n)})).catch(e=>{throw SR=null,e}),SR}function wR(e=new Date){let t=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`;return{reference:e.toISOString(),timeZone:t}}var TR=262144,ER=400,DR=/<meta\b[^>]*>/gi,OR=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g,kR=/<title\b[^>]*>([\s\S]*?)<\/title>/i,AR={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,nbsp:`\xA0`,hellip:`…`,mdash:`—`,ndash:`–`,rsquo:`’`,lsquo:`‘`,rdquo:`”`,ldquo:`“`};function jR(e){return e.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,t)=>{if(t[0]===`#`){let n=t[1]===`x`||t[1]===`X`?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(n)&&n>0&&n<=1114111?String.fromCodePoint(n):e}return AR[t.toLowerCase()]??e})}function MR(e){let t=new Map;for(let n of e.matchAll(OR)){let e=n[1]?.toLowerCase();e&&t.set(e,n[2]??n[3]??n[4]??``)}return t}function NR(e){if(!e)return;let t=jR(e).replace(/\s+/g,` `).trim();if(t)return t.length>ER?`${t.slice(0,399)}…`:t}function PR(e,t){if(e)try{let n=new URL(jR(e).trim(),t);return n.protocol===`https:`||n.protocol===`http:`?n.href:void 0}catch{return}}function FR(e,t){let n=e.search(/<\/head\s*>/i),r=e.slice(0,n>=0?n:TR),i=new Map;for(let e of r.matchAll(DR)){let t=MR(e[0]),n=(t.get(`property`)??t.get(`name`)??``).toLowerCase(),r=t.get(`content`);n&&r!==void 0&&!i.has(n)&&i.set(n,r)}let a=(...e)=>{for(let t of e){let e=i.get(t);if(e?.trim())return e}},o={},s=NR(a(`og:title`,`twitter:title`)??kR.exec(r)?.[1]),c=NR(a(`og:description`,`twitter:description`,`description`)),l=PR(a(`og:image:secure_url`,`og:image`,`og:image:url`,`twitter:image`,`twitter:image:src`),t),u=NR(a(`og:site_name`,`application-name`));return s&&(o.title=s),c&&(o.description=c),l&&(o.image=l),u&&(o.siteName=u),o}var IR=/\.(png|jpe?g|gif|webp|avif|svg|bmp|ico)$/i,LR=524288,RR=2097152,zR=8e3,BR=200;function VR(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}function HR(e,t){return e[t]??e[t.toLowerCase()]??``}function UR(e,t){return{url:e,state:`ready`,title:t.title,image:t.image,siteName:`GitHub`,badge:t.badge}}function WR(e,t){return UR(e,RL(t))}var GR=class{#e;#t;#n;#r=new Map;constructor(e){this.#e=e.getFetch,this.#t=e.timeoutMs??zR,this.#n=e.maxEntries??BR}peek(e){return this.#r.get(e)}preview(e){let t=this.#r.get(e);if(t!=null)return t;let n=this.#i(e).catch(()=>({url:e,state:`error`}));if(this.#r.set(e,n),this.#r.size>this.#n){let e=this.#r.keys().next().value;e!==void 0&&this.#r.delete(e)}return n}async#i(e){let t=VR(e);if(!t)return{url:e,state:`error`};let n=qL(e);if(n)return UR(e,n);if(IR.test(t.pathname))return{url:e,state:`ready`,image:t.href,title:t.pathname.split(`/`).pop()};let r=await this.#e(),i=await this.#a(e=>r(t.href,{method:`GET`,headers:{accept:`text/html,application/xhtml+xml;q=0.9,image/*;q=0.8,*/*;q=0.5`},signal:e}));if(i.status<200||i.status>=300)return{url:e,state:`error`};let a=HR(i.headers,`content-type`).toLowerCase();if(a.startsWith(`image/`))return{url:e,state:`ready`,image:t.href,title:t.pathname.split(`/`).pop()};if(!a.includes(`html`))return{url:e,state:`error`};let o=FR(new TextDecoder().decode(i.body.subarray(0,LR)),i.url||t.href);return!o.title&&!o.image&&!o.description?{url:e,state:`error`}:{url:e,state:`ready`,...o}}#a(e){let t=new AbortController,n,r=new Promise((e,r)=>{n=setTimeout(()=>{t.abort(),r(Error(`link preview timed out`))},this.#t)});return Promise.race([e(t.signal),r]).finally(()=>clearTimeout(n))}},KR=new Set(`am.are.can.could.did.do.does.had.has.have.is.may.might.must.shall.should.want.was.were.will.would.isn't.aren't.don't.doesn't.didn't.won't.wouldn't.shouldn't.can't.couldn't`.split(`.`)),qR=/^(?:(?:so|ok(?:ay)?|also|now|then|and|but|alright|great|next|finally|lastly|quick question)\b[,:\s]*)+/i,JR=/[.!?]+(?=\s|$)|\n+/g,YR=/,?\s+or\s+(?!not\b)\S/i;function XR(e){let t=e.toLowerCase();return/^(?:when|what time|what day|what date|by when|until when|how soon)\b/.test(t)?/^(?:what day|what date)\b/.test(t)?`date`:`datetime`:/^how (?:many|much)\b/.test(t)?`number`:/^(?:what|which)(?:'s| is| should be)? (?:your |the )?e-?mail\b/.test(t)?`email`:/^(?:what|which|who|whom|whose|where|why|how)\b/.test(t)?`text`:null}function ZR(e){let t=e.trim();if(!t.endsWith(`?`))return null;let n=t.replace(qR,``).trim(),r=n.split(/[\s,]+/)[0]?.toLowerCase()??``;return KR.has(r)?YR.test(n)?`text`:`yes-no`:XR(n)}function QR(e){let t=[],n=0,r=(n,r)=>{let i=e.slice(n,r),a=i.length-i.trimStart().length,o=i.trim();o&&t.push({start:n+a,text:o})};for(let t of e.matchAll(JR)){let e=t.index??0,i=t[0].startsWith(`
9167
+ `&&n.node.nodeType===Node.ELEMENT_NODE){t.some(e=>e.start<=n.start&&n.end<=e.end)||a.appendChild(i.createElement(`br`));continue}let r=n.start;for(let[s,c]of t.entries()){if(c.end<=n.start||c.start>=n.end)continue;let t=Math.min(Math.max(c.start,n.start),n.end);t>r&&a.appendChild(i.createTextNode(e.text.slice(r,t))),o.has(s)||(a.appendChild(nL(i,c.payload)),o.add(s)),r=Math.max(r,Math.min(c.end,n.end))}r<n.end&&a.appendChild(i.createTextNode(e.text.slice(r,n.end)))}r.insertBefore(a,n);for(let t of e.parts)t.node.remove()}function nL(e,t){let n=t.bytes.byteLength,r=e.createElement(WI);return r.setAttribute(`icon`,XI(t.mime)),r.setAttribute(`label`,`${mp(t.mime)} · ${T(n)}`),r.title=`${t.mime} · ${n.toLocaleString()} bytes\nClick to preview`,r.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation();let n={payload:t};r.dispatchEvent(new CustomEvent(GI,{detail:n,bubbles:!0,composed:!0}))}),r}var rL=24;async function iL(e,t){let n=t.slice(0,Math.max(t.lastIndexOf(`/`),0))||`/`;for(let t=0;t<rL;t+=1){try{return await e.stat(n===`/`?`/.git`:`${n}/.git`),n===``?`/`:n}catch{}if(n===`/`||n===``)return null;n=n.slice(0,Math.max(n.lastIndexOf(`/`),0))||`/`}return null}function aL(e){let t=async t=>{let n=await e.stat(t),r=n.type===`directory`;return{type:r?`dir`:`file`,mode:r?16877:33188,size:n.size,ino:0,mtimeMs:n.mtime,ctimeMs:n.ctime,uid:1,gid:1,dev:1,isFile:()=>!r,isDirectory:()=>r,isSymbolicLink:()=>n.isSymlink===!0}};return{promises:{readFile:(t,n)=>{let r=typeof n==`string`?n:n?.encoding;return e.readFile(t,r===`utf8`?{encoding:`utf-8`}:{encoding:`binary`})},readdir:async t=>(await e.readDir(t)).map(e=>e.name),stat:t,lstat:t,readlink:async t=>(await e.stat(t)).symlinkTarget??``}}}async function oL(e,n,r){let i=await iL(e,n);if(!i)return null;let a=n.slice(i===`/`?1:i.length+1);if(a.length===0)return null;try{let n=await t(()=>import(`./isomorphic-git-CL-UvciX.js`),__vite__mapDeps([38,1,39])),o=aL(e),s=await n.resolveRef({fs:o,dir:i,ref:`HEAD`}),{blob:c}=await n.readBlob({fs:o,dir:i,oid:s,filepath:a}),l=new TextDecoder().decode(c);return l===r?null:{baseContent:l,status:`modified`,repoRoot:i}}catch{return null}}function sL(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return t===`.html`||t===`.svg`}async function cL(e,t){let n=await e.readFile(t,{encoding:`binary`}),r=new Uint8Array(new ArrayBuffer(n.length));r.set(n);let{mime:i,text:a}=LI(t,r);return{mime:i,text:a,bytes:r}}var lL=524288;function uL(e,t,n){if(n.length>lL)return null;switch(BI(e,t)){case`markdown`:return{mount:`inline`,html:QM(n)};case`html`:return{mount:`sandbox`,html:n};default:return null}}async function dL(e,t,n={}){let{mime:r,text:i,bytes:a}=await cL(e,t);if(!i){Ap.open({path:t,content:a.buffer,mimeType:r,text:!1});return}let o=new TextDecoder().decode(a),s=await oL(e,t,o),c=uL(t,r,o);Ap.open({path:t,content:o,mimeType:r,text:!0,...s?{baseContent:s.baseContent,gitStatus:s.status}:{},...c?{rendered:c}:{},...n.line===void 0?{}:{line:n.line}})}async function fL(e,t){let{mime:n,bytes:r}=await cL(e,t),i=new Blob([r],{type:n}),a=URL.createObjectURL(i);try{let e=document.createElement(`a`);e.href=a,e.download=t.split(`/`).pop()||`download`,e.click()}finally{URL.revokeObjectURL(a)}}async function pL(e,t,n){let r=await e.readFile(t,{encoding:`binary`}),i=typeof r==`string`?r:Uint8Array.from(r);await e.writeFile(n,i)}async function mL(e,t){try{return await e.stat(t),!0}catch{return!1}}async function hL(e,t){let n=t.split(`/`).pop()??``,r=prompt(`Rename ${t} to:`,n)?.trim();if(!r||r===n||r.includes(`/`))return;let i=`${t.slice(0,t.length-n.length)}${r}`,a=await e.stat(t);try{let t=await e.stat(i);if(p(a,t))return}catch{}await mL(e,i)&&!confirm(`${i} already exists. Overwrite?`)||(await pL(e,t,i),await e.rm(t))}function gL(e){let{fileTree:t,openFs:n,openWriter:r,insertReference:i,toPreviewUrl:a,log:o}=e;t.addEventListener(`file-preview`,async e=>{let{path:t}=e.detail;try{await dL(await n(),t)}catch(e){o.error(`File preview failed`,e)}}),t.addEventListener(`file-reference`,e=>{let{path:t}=e.detail;i(t)}),t.addEventListener(`file-download`,async e=>{let{path:t}=e.detail;try{await fL(await n(),t)}catch(e){o.error(`File download failed`,e)}}),t.addEventListener(`file-overflow`,e=>{let{path:n,anchor:r,kind:i}=e.detail,a=i!==`directory`,o=[{id:`preview`,label:`Preview`,visible:a},{id:`reference`,label:`Reference in chat`,visible:a},{id:`download`,label:`Download`,visible:a},{id:`rename`,label:`Rename`,visible:a},{id:`duplicate`,label:`Duplicate`,visible:a},{id:`copy-path`,label:`Copy path`},{id:`open-browser`,label:`Open in browser`,visible:a&&sL(n)},{id:`delete`,label:`Delete`,destructive:!0,visible:a}];ku.show({anchor:r,items:o,context:{path:n},dispatchTarget:t})}),t.addEventListener(`overflow-action`,async e=>{let{action:n,context:i}=e.detail,{path:s}=i;try{switch(n){case`preview`:case`reference`:case`download`:t.dispatchEvent(new CustomEvent(`file-${n}`,{detail:{id:s,path:s},bubbles:!0,composed:!0}));break;case`copy-path`:await navigator.clipboard.writeText(s);break;case`open-browser`:window.open(a(s),`_blank`);break;case`duplicate`:{let e=s.lastIndexOf(`.`),t=e>0?`${s.slice(0,e)}_copy${s.slice(e)}`:`${s}_copy`,n=await r();if(await mL(n,t)&&!confirm(`${t} already exists. Overwrite?`))break;await pL(n,s,t);break}case`delete`:confirm(`Delete ${s}?`)&&await(await r()).rm(s);break;case`rename`:await hL(await r(),s)}}catch(e){o.error(`Overflow action "${n}" failed`,e)}})}var _L=`slicc-agent-message`,vL=`slicc-user-message`,yL=`${_L},${vL}`,bL=[`streaming`,`text`,`timestamp`,`queued`];function xL(e){return e.tagName.toLowerCase()===vL?e.shadowRoot?.querySelector(`.b`)??null:e.querySelector(`.body`)??e}function SL(e){try{return CL(e)}catch(t){return e.log.error(`Base64 preview wiring failed; continuing without it`,t),()=>{}}}function CL(e){let{thread:t,log:n}=e;if(!(t instanceof Node))return()=>{};let r=e=>{if(!(e instanceof HTMLElement)||e.hasAttribute(`streaming`))return;let t=xL(e);if(t&&OI(t.textContent??``).length!==0)try{ZI(t)}catch(e){n.error(`Base64 elision failed`,e)}},i=e=>{for(let t of e.querySelectorAll(yL))r(t)};i(t);let a=new MutationObserver(e=>{for(let t of e){let e=t.target;if(t.type===`attributes`){e&&r(e);continue}for(let e of t.addedNodes)e instanceof HTMLElement&&(e.matches(yL)?r(e):i(e));let n=e?.closest?.(yL);n&&r(n)}});a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:bL});let o=e=>{let{payload:t}=e.detail;try{wL(t)}catch(e){n.error(`Base64 preview failed`,e)}};return t.addEventListener(GI,o),()=>{a.disconnect(),t.removeEventListener(GI,o)}}function wL(e){if(!e.text){Ap.open({path:e.name,content:e.bytes.buffer,mimeType:e.mime,text:!1});return}let t=new TextDecoder().decode(e.bytes),n=uL(e.name,e.mime,t);Ap.open({path:e.name,content:t,mimeType:e.mime,text:!0,...n?{rendered:n}:{}})}var TL;function EL(){if(TL)return TL;let e=new Worker(new URL(`/assets/agent-question-worker-oT1IOgNo.js`,``+import.meta.url),{type:`module`}),t=new Map,n=0;return e.addEventListener(`message`,e=>{let n=e.data,r=t.get(n.id);r&&(t.delete(n.id),`error`in n?r.reject(Error(n.error)):r.resolve(n.questions))}),e.addEventListener(`error`,n=>{for(let e of t.values())e.reject(Error(n.message));t.clear(),TL=void 0,e.terminate()}),TL={parse(r){let i=++n,a=new URL(`assets/gpu-ask-258b878401128d27/`,new URL(`/`,location.origin)).href;return new Promise((n,o)=>{t.set(i,{resolve:n,reject:o}),e.postMessage({id:i,text:r,baseUrl:a})})}},TL}var DL=`[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})`,OL=`[A-Za-z0-9._-]{1,100}`,kL=new Set(`about.account.apps.codespaces.collections.copilot.customer-stories.dashboard.discussions.enterprise.events.explore.features.login.marketplace.new.notifications.orgs.organizations.pricing.projects.pulls.issues.search.security.settings.sponsors.stars.topics.trending.users.watching`.split(`.`));function AL(e,t){return!kL.has(e.toLowerCase())&&t!==`.`&&t!==`..`}function jL(e){return e.replace(/\.git$/i,``)}function ML(e){let t;try{t=new URL(e)}catch{return null}return t.hostname!==`github.com`&&t.hostname!==`www.github.com`?null:t}function NL(e){let t=ML(e);if(!t)return null;let n=RegExp(`^/(${DL})/(${OL})/(issues|pull)/(\\d{1,7})(?:/|$)`).exec(t.pathname);if(!n)return null;let[,r=``,i=``,a,o=`0`]=n;return AL(r,i)?{owner:r,repo:jL(i),number:Number(o),kind:a===`pull`?`pull`:`issue`}:null}function PL(e){return`https://github.com/${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`}function FL(e){return`https://opengraph.githubassets.com/slicc/${e}`}function IL(e){return FL(`${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`)}function LL(e){return e.kind===`pull`?`PR #${e.number}`:e.kind===`issue`?`Issue #${e.number}`:`#${e.number}`}function RL(e){return{kind:e.kind===`pull`?`pull`:`issue`,title:`${e.owner}/${e.repo}#${e.number}`,image:IL(e),badge:LL(e)}}function zL(e){try{return decodeURIComponent(e)}catch{return e}}var BL=RegExp(`^/(orgs|users)/(${DL})/(projects|discussions)/(\\d{1,7})(?:/|$)`),VL=RegExp(`^/(${DL})/(${OL})(?:/(.*))?$`),HL=/^discussions\/(\d{1,7})(?:\/|$)/,UL=/^commit\/([0-9a-fA-F]{7,40})(?:\/|$)/,WL=/^releases\/tag\/([^/?#]{1,128})(?:\/|$)/,GL=/^(?:raw|releases\/download)\//;function KL(e,t,n){if(GL.test(n))return null;let r=`${e}/${t}`,i=HL.exec(n);if(i){let e=Number(i[1]??0);return{kind:`discussion`,title:`${r}#${e}`,image:FL(`${r}/discussions/${e}`),badge:`Discussion #${e}`}}let a=UL.exec(n);if(a){let e=a[1]??``;return{kind:`commit`,title:`${r}@${e.slice(0,7)}`,image:FL(`${r}/commit/${e}`),badge:`Commit`}}let o=WL.exec(n);if(o){let e=o[1]??``;return{kind:`release`,title:`${r}@${zL(e)}`,image:FL(`${r}/releases/tag/${e}`),badge:`Release`}}return{kind:`repo`,title:r,image:FL(r),badge:`Repository`}}function qL(e){let t=NL(e);if(t)return RL(t);let n=ML(e);if(!n)return null;let r=BL.exec(n.pathname);if(r){let[,e=``,t=``,n=``,i=`0`]=r;if(n===`discussions`&&e!==`orgs`)return null;let a=n===`projects`;return{kind:a?`project`:`discussion`,title:`${t}#${i}`,image:FL(`${e}/${t}/${n}/${i}`),badge:`${a?`Project`:`Discussion`} #${i}`}}let i=VL.exec(n.pathname);if(!i)return null;let[,a=``,o=``,s=``]=i;return AL(a,o)?KL(a,jL(o),s):null}var JL=RegExp(`(^|[^\\w/.-])(${DL})/(${OL})#(\\d{1,7})\\b`,`g`),YL=/\b(PRs?|pull requests?|issues?)\s+#?(\d{1,7})\b/gi,XL=/(^|[^\w&/#])#(\d{1,6})\b/g;function ZL(e){return/^p/i.test(e)?`pull`:`issue`}function QL(e){let t=[],n=(e,n)=>t.some(t=>e<t.end&&n>t.start);for(let n of e.matchAll(JL)){let[e,r=``,i=``,a=``,o=`0`]=n,s=(n.index??0)+r.length,c=e.slice(r.length);AL(i,a)&&t.push({start:s,end:s+c.length,raw:c,number:Number(o),kind:`unknown`,owner:i,repo:jL(a)})}for(let r of e.matchAll(YL)){let[e,i=``,a=`0`]=r,o=r.index??0;n(o,o+e.length)||t.push({start:o,end:o+e.length,raw:e,number:Number(a),kind:ZL(i)})}for(let r of e.matchAll(XL)){let[e,i=``,a=`0`]=r,o=(r.index??0)+i.length,s=e.slice(i.length);n(o,o+s.length)||t.push({start:o,end:o+s.length,raw:s,number:Number(a),kind:`unknown`})}return t.sort((e,t)=>e.start-t.start)}var $L=RegExp(`github\\.com[/:](${DL})/(${OL}?)(?:\\.git)?(?=$|[/\\s#?"'\`)\\]>,;])`,`g`),eR=RegExp(`(?:^|\\s)(?:-R|--repo)(?:\\s+|=)(${DL})/(${OL})`,`g`),tR=RegExp(`\\bgh\\s+repo\\s+(?:clone|view|fork|sync)\\s+(${DL})/(${OL})`,`g`);function nR(e){let t=[],n=[[$L,1,2],[eR,1,2],[tR,1,2],[JL,2,3]];for(let[r,i,a]of n)for(let n of e.matchAll(r)){let e=n[i]??``,r=jL(n[a]??``);!e||!r||!AL(e,r)||t.push({index:n.index??0,slug:`${e}/${r}`})}t.sort((e,t)=>e.index-t.index);let r=new Set,i=[];for(let{slug:e}of t){let t=e.toLowerCase();r.has(t)||(r.add(t),i.push(e))}return i}function rR(e,t){if(e.owner&&e.repo)return{owner:e.owner,repo:e.repo,number:e.number,kind:e.kind};let n=t[t.length-1];if(!n)return null;let[r,i]=n.split(`/`);return!r||!i?null:{owner:r,repo:i,number:e.number,kind:e.kind}}var iR=12;function aR(e){let t=new Map,n=null;for(let r of e.split(/\r?\n/)){let e=r.trim(),i=/^\[remote\s+"([^"]+)"\]$/.exec(e);if(i){n=i[1]??null;continue}if(e.startsWith(`[`)){n=null;continue}let a=/^url\s*=\s*(.+)$/.exec(e);n&&a&&!t.has(n)&&t.set(n,(a[1]??``).trim())}let r=[t.get(`origin`),t.get(`upstream`),...t.values()].filter(e=>!!e);for(let e of r){let t=nR(e)[0];if(t)return t}return null}function oR(e){if(!e.startsWith(`/`))return[];let t=e.split(`/`).filter(Boolean);t.pop();let n=[];for(;t.length>0&&n.length<iR;)n.push(`/${t.join(`/`)}`),t.pop();return n}var sR=class{#e;#t=new Map;constructor(e){this.#e=e}async repoFor(e){let t=[...new Set(e.filter(e=>e.startsWith(`/`)))].slice(-6).reverse();for(let e of t)for(let t of oR(e)){let e=await this.#n(t);if(e)return e}return null}#n(e){let t=this.#t.get(e);if(t!=null)return t;let n=this.#r(`${e}/.git/config`);return this.#t.set(e,n),n}async#r(e){try{let t=await this.#e.readFile(e,{encoding:`utf-8`});return aR(typeof t==`string`?t:new TextDecoder().decode(t))}catch{return null}}},cR=.4,lR=6,uR=8,dR=2e3,fR=/\d|\b(?:today|tonight|tomorrow|yesterday|noon|midnight|morning|afternoon|evening|night|week|weekend|weekday|fortnight|month|year|day|days|hour|hours|minute|minutes|mon|tue|wed|thu|fri|sat|sun|jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec)\w*|\b(?:christmas|halloween|thanksgiving|daily|weekly|monthly|yearly|every)\b/i,pR=new Set([`now`,`right now`,`currently`,`then`,`soon`,`later`,`earlier`,`recently`,`once`,`first`,`second`,`today`,`day`,`a day`,`the day`]),mR=/([.!?;:])\s+|\n+|,\s+(?=(?:and|but|then|so|while|or)\b)/gi,hR=/\s+(?:and|but|then|so|or)\s+/gi;function gR(e){return e.length>=3&&fR.test(e)}function _R(e){let t=[],n=0,r=(n,r)=>{let i=e.slice(n,r),a=i.length-i.trimStart().length,o=i.trim();o&&t.push({offset:n+a,text:o})};for(let t of e.matchAll(mR)){let e=t.index??0;r(n,t[1]?e+1:e),n=e+t[0].length}return r(n,e.length),t}function vR(e){let t=[],n=0;for(let r of e.matchAll(hR)){let i=r.index??0;t.push({offset:n,text:e.slice(n,i)}),n=i+r[0].length}return t.push({offset:n,text:e.slice(n)}),t.filter(e=>e.text.trim().length>0)}function yR(e){return e.trim().split(/\s+/).length}function bR(e){let t=e.trim().toLowerCase().replace(/[.,;:!?]+$/,``);return!(t.length<3||pR.has(t)||/^\d+$/.test(t))}async function xR(e,t,n){let r=e.map(()=>[]),i=[];if(e.forEach((e,t)=>{if(gR(e))for(let n of _R(e.slice(0,dR)))gR(n.text)&&i.push({textIndex:t,...n})}),i.length===0)return r;let a=await n.parseMany(i.map(e=>e.text),t),o=[],s=[];if(a.forEach((e,t)=>{let n=i[t];if(n)for(let t of e.spans){let e={textIndex:n.textIndex,start:n.offset+t.start,end:n.offset+t.end,text:t.text,confidence:t.confidence},r=vR(t.text);r.length>1&&yR(t.text)>lR&&t.confidence>=cR?s.push({base:e,parts:r}):t.confidence>=.8&&bR(t.text)&&o.push(e)}}),s.length>0){let e=s.flatMap(({base:e,parts:t})=>t.map(t=>({base:e,part:t})));(await n.parseMany(e.map(({part:e})=>e.text),t)).forEach((t,n)=>{let r=e[n];if(r)for(let e of t.spans){if(e.confidence<.8||!bR(e.text))continue;let t=r.base.start+r.part.offset+e.start;o.push({textIndex:r.base.textIndex,start:t,end:t+(e.end-e.start),text:e.text,confidence:e.confidence})}})}if(o.length===0)return r;(await n.parseMany(o.map(e=>e.text),t)).forEach((e,t)=>{let n=o[t];!n||e.occurrences.length===0||r[n.textIndex]?.push({start:n.start,end:n.end,text:n.text,confidence:n.confidence,occurrences:e.occurrences.slice(0,uR).map(e=>({start:e.start,...e.end?{end:e.end}:{},allDay:e.allDay,...e.open?{open:e.open}:{}})),rrules:[...e.rrules]})});for(let e of r){e.sort((e,t)=>e.start-t.start);for(let t=e.length-1;t>0;--t){let n=e[t-1],r=e[t];n&&r&&r.start<n.end&&e.splice(t,1)}}return r}var SR=null;function CR(){return SR??=t(async()=>{let{defineParser:e}=await import(`./dist-C8ZpEU8V.js`);return{defineParser:e}},[]).then(({defineParser:e})=>e({backend:`cpu`})).then(e=>({parseMany:(t,n)=>e.parseMany(t,n)})).catch(e=>{throw SR=null,e}),SR}function wR(e=new Date){let t=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`;return{reference:e.toISOString(),timeZone:t}}var TR=262144,ER=400,DR=/<meta\b[^>]*>/gi,OR=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g,kR=/<title\b[^>]*>([\s\S]*?)<\/title>/i,AR={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,nbsp:`\xA0`,hellip:`…`,mdash:`—`,ndash:`–`,rsquo:`’`,lsquo:`‘`,rdquo:`”`,ldquo:`“`};function jR(e){return e.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,t)=>{if(t[0]===`#`){let n=t[1]===`x`||t[1]===`X`?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(n)&&n>0&&n<=1114111?String.fromCodePoint(n):e}return AR[t.toLowerCase()]??e})}function MR(e){let t=new Map;for(let n of e.matchAll(OR)){let e=n[1]?.toLowerCase();e&&t.set(e,n[2]??n[3]??n[4]??``)}return t}function NR(e){if(!e)return;let t=jR(e).replace(/\s+/g,` `).trim();if(t)return t.length>ER?`${t.slice(0,399)}…`:t}function PR(e,t){if(e)try{let n=new URL(jR(e).trim(),t);return n.protocol===`https:`||n.protocol===`http:`?n.href:void 0}catch{return}}function FR(e,t){let n=e.search(/<\/head\s*>/i),r=e.slice(0,n>=0?n:TR),i=new Map;for(let e of r.matchAll(DR)){let t=MR(e[0]),n=(t.get(`property`)??t.get(`name`)??``).toLowerCase(),r=t.get(`content`);n&&r!==void 0&&!i.has(n)&&i.set(n,r)}let a=(...e)=>{for(let t of e){let e=i.get(t);if(e?.trim())return e}},o={},s=NR(a(`og:title`,`twitter:title`)??kR.exec(r)?.[1]),c=NR(a(`og:description`,`twitter:description`,`description`)),l=PR(a(`og:image:secure_url`,`og:image`,`og:image:url`,`twitter:image`,`twitter:image:src`),t),u=NR(a(`og:site_name`,`application-name`));return s&&(o.title=s),c&&(o.description=c),l&&(o.image=l),u&&(o.siteName=u),o}var IR=/\.(png|jpe?g|gif|webp|avif|svg|bmp|ico)$/i,LR=524288,RR=2097152,zR=8e3,BR=200;function VR(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}function HR(e,t){return e[t]??e[t.toLowerCase()]??``}function UR(e,t){return{url:e,state:`ready`,title:t.title,image:t.image,siteName:`GitHub`,badge:t.badge}}function WR(e,t){return UR(e,RL(t))}var GR=class{#e;#t;#n;#r=new Map;constructor(e){this.#e=e.getFetch,this.#t=e.timeoutMs??zR,this.#n=e.maxEntries??BR}peek(e){return this.#r.get(e)}preview(e){let t=this.#r.get(e);if(t!=null)return t;let n=this.#i(e).catch(()=>({url:e,state:`error`}));if(this.#r.set(e,n),this.#r.size>this.#n){let e=this.#r.keys().next().value;e!==void 0&&this.#r.delete(e)}return n}async#i(e){let t=VR(e);if(!t)return{url:e,state:`error`};let n=qL(e);if(n)return UR(e,n);if(IR.test(t.pathname))return{url:e,state:`ready`,image:t.href,title:t.pathname.split(`/`).pop()};let r=await this.#e(),i=await this.#a(e=>r(t.href,{method:`GET`,headers:{accept:`text/html,application/xhtml+xml;q=0.9,image/*;q=0.8,*/*;q=0.5`},signal:e}));if(i.status<200||i.status>=300)return{url:e,state:`error`};let a=HR(i.headers,`content-type`).toLowerCase();if(a.startsWith(`image/`))return{url:e,state:`ready`,image:t.href,title:t.pathname.split(`/`).pop()};if(!a.includes(`html`))return{url:e,state:`error`};let o=FR(new TextDecoder().decode(i.body.subarray(0,LR)),i.url||t.href);return!o.title&&!o.image&&!o.description?{url:e,state:`error`}:{url:e,state:`ready`,...o}}#a(e){let t=new AbortController,n,r=new Promise((e,r)=>{n=setTimeout(()=>{t.abort(),r(Error(`link preview timed out`))},this.#t)});return Promise.race([e(t.signal),r]).finally(()=>clearTimeout(n))}},KR=new Set(`am.are.can.could.did.do.does.had.has.have.is.may.might.must.shall.should.want.was.were.will.would.isn't.aren't.don't.doesn't.didn't.won't.wouldn't.shouldn't.can't.couldn't`.split(`.`)),qR=/^(?:(?:so|ok(?:ay)?|also|now|then|and|but|alright|great|next|finally|lastly|quick question)\b[,:\s]*)+/i,JR=/[.!?]+(?=\s|$)|\n+/g,YR=/,?\s+or\s+(?!not\b)\S/i;function XR(e){let t=e.toLowerCase();return/^(?:when|what time|what day|what date|by when|until when|how soon)\b/.test(t)?/^(?:what day|what date)\b/.test(t)?`date`:`datetime`:/^how (?:many|much)\b/.test(t)?`number`:/^(?:what|which)(?:'s| is| should be)? (?:your |the )?e-?mail\b/.test(t)?`email`:/^(?:what|which|who|whom|whose|where|why|how)\b/.test(t)?`text`:null}function ZR(e){let t=e.trim();if(!t.endsWith(`?`))return null;let n=t.replace(qR,``).trim(),r=n.split(/[\s,]+/)[0]?.toLowerCase()??``;return KR.has(r)?YR.test(n)?`text`:`yes-no`:XR(n)}function QR(e){let t=[],n=0,r=(n,r)=>{let i=e.slice(n,r),a=i.length-i.trimStart().length,o=i.trim();o&&t.push({start:n+a,text:o})};for(let t of e.matchAll(JR)){let e=t.index??0,i=t[0].startsWith(`
8954
9168
  `);r(n,i?e:e+t[0].length),n=e+t[0].length}return r(n,e.length),t}function $R(e){let t=[];for(let{start:n,text:r}of QR(e)){if(r.length<4)continue;let e=ZR(r);e&&t.push({start:n,end:n+r.length,text:r,kind:e})}return t}var ez=`data-preview`,tz=`github-mention`,nz=`time-mention`,rz=`agent-question`,iz=`data-question`,az=`data-question-kind`,oz=`data-question-id`,sz=`data-question-controls`,cz=`data-question-options`,lz=`data-question-default`,uz=`data-question-multi`,dz={owner:`data-gh-owner`,repo:`data-gh-repo`,number:`data-gh-number`,kind:`data-gh-kind`},fz=`data-answered`,pz=`agent-question-answer`,mz=`data-mention-previews`,hz=new Set([`A`,`PRE`,`SCRIPT`,`STYLE`,`TEXTAREA`,`BUTTON`,`SLICC-QUESTION-PROMPT`]),gz=new Set([...hz,`CODE`,`KBD`,`SAMP`]),_z=`p,li,h1,h2,h3,h4,h5,h6,td,th,blockquote,dd,dt,figcaption`,vz=new WeakMap;function yz(e){return vz.get(e)}function bz(e){let t=e.getAttribute(dz.owner),n=e.getAttribute(dz.repo),r=Number(e.getAttribute(dz.number)),i=e.getAttribute(dz.kind);return!t||!n||!Number.isInteger(r)||r<=0?null:{owner:t,repo:n,number:r,kind:i===`pull`||i===`issue`?i:`unknown`}}function xz(e){return`${e.childNodes.length}:${e.textContent?.length??0}`}function Sz(e,t,n,r){for(let i=e.parentElement;i&&i!==t;i=i.parentElement)if(n.has(i.tagName)||r&&i.classList.contains(r))return!0;return!1}function Cz(e,t,n){let r=[],i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let a=i.nextNode();a;a=i.nextNode()){let i=a;i.data.trim()&&(Sz(i,e,t,n)||r.push(i))}return r}function wz(e,t,n){let r=[];for(let i=t.length-1;i>=0;--i){let a=t[i];if(!a||a.end<=a.start||a.end>e.data.length)continue;let o=e.splitText(a.start);o.splitText(a.end-a.start);let s=n(o.data,i);o.replaceWith(s),s.append(o),r.unshift(s)}return r}function Tz(e){for(let t of e.querySelectorAll(`a[href]`))t.hasAttribute(`data-preview`)||t.closest(`pre`)||/^https?:\/\//i.test(t.getAttribute(`href`)??``)&&t.setAttribute(ez,`link`)}var Ez=0;function Dz(e){let t=e.options.map((e,t)=>({option:e,index:t})).filter(({option:e})=>!!e),n=t.map(({option:e})=>e),r=e.default===null?null:t.findIndex(({index:t})=>t===e.default);return{start:e.span[0],end:e.span[1],text:e.prompt,kind:n.length>=2?`choice`:e.kind===`yes_no`?`yes-no`:ZR(e.prompt)??`text`,options:n,defaultIndex:r===-1?null:r,multiSelect:e.multiSelect}}function Oz(e){let t=``,n=null,r=[];for(let i of Cz(e,hz,rz)){let a=i.parentElement?.closest(`li`)??i.parentElement?.closest(_z)??e;n&&a!==n&&(t+=`
8955
- `),a.tagName===`LI`&&a!==n&&(t+=`- `),n=a;let o=t.length;t+=i.data,r.push({node:i,block:a,start:o,end:t.length})}return{text:t,spans:r}}function kz(e,t,n){let r=t.filter(({start:e,end:t})=>n.start<t&&n.end>e);if(r.length===0)return;let i=Mz(n.start,e);for(let{node:e,start:t,end:a}of r){if(!e.isConnected)continue;let o=Math.max(n.start,t),s=Math.min(n.end,a);wz(e,[{start:o-t,end:s-t}],()=>{let t=e.ownerDocument.createElement(`span`);return t.className=rz,t.setAttribute(ez,`question`),t.setAttribute(oz,i),t.setAttribute(iz,n.text),t.setAttribute(az,n.kind),r[0]?.node===e&&(t.tabIndex=0),t})}let a=e.ownerDocument.createElement(`slicc-question-prompt`);a.setAttribute(sz,i),a.setAttribute(`inline`,``),a.setAttribute(`question`,n.text),a.setAttribute(`kind`,n.kind),a.setAttribute(cz,JSON.stringify(n.options)),n.defaultIndex!==null&&a.setAttribute(lz,String(n.defaultIndex)),n.multiSelect&&a.setAttribute(uz,``);let o=r[r.length-1]?.block;o===e||o?.tagName===`LI`?o.append(a):o?.after(a)}async function Az(e,t){if(e.querySelector(`.agent-question`))return;let{text:n,spans:r}=Oz(e);if(!/[??]/.test(n)&&(!t.getQuestionParser||!/:\s*\n/.test(n)))return;let i;if(t.getQuestionParser)try{i=(await t.getQuestionParser().parse(n)).map(Dz)}catch{i=$R(n).map(e=>({...e,options:[],defaultIndex:null,multiSelect:!1}))}else i=$R(n).map(e=>({...e,options:[],defaultIndex:null,multiSelect:!1}));if(e.isConnected)for(let t of i.reverse())kz(e,r,t)}var jz=new WeakMap;function Mz(e,t){let n=jz.get(t);n||(n=new Map,jz.set(t,n));let r=n.get(e);return r||(Ez+=1,r=`q${Ez}`,n.set(e,r)),r}async function Nz(e,t){let n=Cz(e,gz).map(e=>({node:e,data:e.data,mentions:QL(e.data)})).filter(e=>e.mentions.length>0);if(n.length===0)return;let r=t.repoHints;if(n.some(e=>e.mentions.some(e=>!e.owner))&&r.length===0&&t.resolveRepoFallback){let e=await t.resolveRepoFallback().catch(()=>null);e&&(r=[e])}for(let{node:e,data:t,mentions:i}of n){if(!e.isConnected||e.data!==t)continue;let n=i.map(e=>({mention:e,ref:rR(e,r)})).filter(e=>e.ref!==null);n.length!==0&&wz(e,n.map(({mention:e})=>e),(t,r)=>{let i=n[r].ref,a=e.ownerDocument.createElement(`a`);return a.className=tz,a.href=PL(i),a.target=`_blank`,a.rel=`noopener noreferrer`,a.setAttribute(ez,`github`),a.setAttribute(dz.owner,i.owner),a.setAttribute(dz.repo,i.repo),a.setAttribute(dz.number,String(i.number)),a.setAttribute(dz.kind,i.kind),a.setAttribute(`aria-label`,`${i.owner}/${i.repo} ${LL(i)}`),a})}}async function Pz(e,t){if(!t.getTimeParser||!t.timeContext)return;let n=Cz(e,gz,nz).filter(e=>gR(e.data));if(n.length===0)return;let r=n.map(e=>e.data),i=await t.getTimeParser(),a=await xR(r,t.timeContext,i);n.forEach((e,t)=>{let n=a[t]??[];n.length!==0&&(!e.isConnected||e.data!==r[t]||wz(e,n,(t,r)=>{let i=e.ownerDocument.createElement(`span`);i.className=nz,i.setAttribute(ez,`time`);let a=n[r];return a&&vz.set(i,a),i}))})}function Fz(e,t,n=()=>{}){let r=Iz.get(e);if(r)return r.rerun={ctx:t,onError:n},r.promise;let i={promise:Promise.resolve(),rerun:null};return i.promise=(async()=>{try{for(await Lz(e,t,n);i.rerun;){let t=i.rerun;i.rerun=null,await Lz(e,t.ctx,t.onError)}}finally{Iz.delete(e)}})(),Iz.set(e,i),i.promise}var Iz=new WeakMap;async function Lz(e,t,n){let r=xz(e);if(e.getAttribute(mz)===r)return;let i=async(e,t)=>{try{await t()}catch(t){n(e,t)}};await i(`links`,()=>Tz(e)),t.questions&&await i(`questions`,()=>Az(e,t)),await i(`github`,()=>Nz(e,t)),await i(`times`,()=>Pz(e,t)),e.setAttribute(mz,xz(e))}var Rz=`slicc-agent-message`,zz=`slicc-user-message`,Bz=`slicc-action-row`,Vz=`[${ez}]`,Hz=2e4,Uz=280,Wz=`data-msg-time`;function Gz(e,t){let n=Number(e.getAttribute(Wz));return Number.isFinite(n)&&n>0?new Date(n):t()}var Kz=900,qz=new WeakMap;function Jz(e,t){qz.set(e,t)}function Yz(e){let t=globalThis.requestIdleCallback;typeof t==`function`?t(e):setTimeout(e,0)}function Xz(e,t,n){let r=[];for(let i of e.querySelectorAll(n)){if(i===t||t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)break;r.push(i)}return r.slice(-40)}function Zz(e){if(e.tagName.toLowerCase()===zz)return e.getAttribute(`text`)??``;let t=Array.from(e.querySelectorAll(`a[href]`),e=>e.getAttribute(`href`)??``);return`${(e.textContent??``).slice(0,Hz)} ${t.join(` `)}`}function Qz(e,t){let n=Xz(e,t,`${Bz},${Rz},${zz}`),r=[];for(let e of[...n,t])for(let t of nR(Zz(e))){let e=r.findIndex(e=>e.toLowerCase()===t.toLowerCase());e>=0&&r.splice(e,1),r.push(t)}return r}function $z(e,t){return Xz(e,t,`${Bz}[${UO}]`).flatMap(e=>ZO(e.getAttribute(`data-file-paths`)??``))}function eB(){return t(async()=>{let{createProxiedFetch:e}=await import(`./proxied-fetch-4VBgrEIu.js`).then(e=>e.i);return{createProxiedFetch:e}},__vite__mapDeps([17,1,2,18,19,20,21])).then(({createProxiedFetch:e})=>{let t=e({maxResponseBytes:RR});return(e,n)=>t(e,n)})}function tB(e){try{return pB(e)}catch(t){return e.log.error(`Mention preview wiring failed; continuing without it`,t),()=>{}}}function nB(e){let t=new Set,n=e=>e?.tagName.toLowerCase()===Rz;for(let r of e){let e=r.target;if(r.type===`attributes`){e&&n(e)&&t.add(e);continue}for(let e of r.addedNodes)if(e instanceof HTMLElement){if(n(e))t.add(e);else for(let n of e.querySelectorAll(Rz))t.add(n)}let i=e?.closest?.(Rz);i&&t.add(i)}return t}function rB(e,t,n){for(let n of e.querySelectorAll(Rz))t(n);let r=new MutationObserver(e=>{for(let n of nB(e))t(n);n()});return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`streaming`]}),()=>r.disconnect()}var iB=class{thread;isReadOnly;onAnswered;#e=new Map;constructor(e,t,n=()=>{}){this.thread=e,this.isReadOnly=t,this.onAnswered=n}#t(e,t){return`${e?.getAttribute(`data-msg-id`)??``}\u0000${t}`}mark(e){for(let t of e.querySelectorAll(`[${iz}]`)){let n=this.#t(e,t.getAttribute(`data-question`)??``);t.toggleAttribute(fz,this.#e.has(n))}for(let t of e.querySelectorAll(`[${sz}]`)){let n=t.getAttribute(sz),r=Array.from(e.querySelectorAll(`[${oz}]`)).find(e=>e.getAttribute(oz)===n);if(!r)continue;let{state:i,note:a,answer:o}=this.statusOf(r);t.getAttribute(`state`)!==i&&t.setAttribute(`state`,i),a?t.setAttribute(`note`,a):t.removeAttribute(`note`),o!==void 0&&t.setAttribute(`answer`,o)}}refresh(){for(let e of this.thread.querySelectorAll(Rz))this.mark(e)}statusOf(e){let t=e.closest(Rz),n=this.#e.get(this.#t(t,e.getAttribute(`data-question`)??``));if(n!==void 0)return{state:`answered`,answer:n};if(this.isReadOnly())return{state:`inert`,note:`This conversation is read-only.`};if(!t||t.hasAttribute(`streaming`))return{state:`inert`};let r=this.thread.querySelectorAll(Rz);if(r[r.length-1]!==t)return{state:`inert`,note:`Only the latest question can be answered here.`};for(let e of this.thread.querySelectorAll(zz))if(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)return{state:`inert`,note:`You already replied to this message.`};return{state:`open`}}answer(e,t){if(this.statusOf(e).state!==`open`)return!1;let n=e.closest(Rz),r=e.getAttribute(`data-question`)??``;this.#e.set(this.#t(n,r),t.answer),n&&this.mark(n),this.onAnswered();let i=n?.getAttribute(`data-msg-id`),a={question:r,kind:t.kind,answer:t.answer,...i?{messageId:i}:{}};return this.thread.dispatchEvent(new CustomEvent(pz,{detail:a,bubbles:!0,composed:!0})),!0}};function aB(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function oB(e,t){e.setAttribute(`url`,t.url),e.setAttribute(`state`,t.state),aB(e,`heading`,t.title),aB(e,`description`,t.description),aB(e,`image`,t.image),aB(e,`site`,t.siteName),aB(e,`badge`,t.badge)}function sB(e,t,n){let r=document.createElement(`slicc-link-preview`),i=e.href;return oB(r,{url:i,state:`loading`}),n.fetcher.preview(i).then(n=>{t.anchor===e&&(oB(r,n),t.reposition())}),r}function cB(e){let t=bz(e);if(!t)return null;let n=WR(PL(t),t),r=document.createElement(`slicc-link-preview`);return oB(r,{...n,siteName:n.siteName??`GitHub`}),r}function lB(e,t){let n=yz(e);if(!n)return null;let r=wR(t.now()),i=document.createElement(`slicc-time-preview`);return i.data={text:n.text,reference:r.reference,timeZone:r.timeZone,occurrences:n.occurrences,rrules:n.rrules},i}function uB(e,t,n){let r=document.createElement(`slicc-question-prompt`),{state:i,note:a,answer:o}=n.questions.statusOf(e);r.setAttribute(`question`,e.getAttribute(`data-question`)??``),r.setAttribute(`kind`,e.getAttribute(`data-question-kind`)??`text`);let s=e.getAttribute(oz),c=Array.from(e.closest(Rz)?.querySelectorAll(`[data-question-controls]`)??[]).find(e=>e.getAttribute(sz)===s);for(let e of[cz,lz,uz]){let t=c?.getAttribute(e);t!=null&&r.setAttribute(e,t)}return r.setAttribute(`state`,i),a&&r.setAttribute(`note`,a),o!==void 0&&r.setAttribute(`answer`,o),r.addEventListener(`question-answer`,i=>{let a=i.detail;n.questions.answer(e,a)&&(r.setAttribute(`answer`,a.answer),r.setAttribute(`state`,`answered`),t.scheduleHide(Kz))}),r}function dB(e,t,n){switch(e.getAttribute(ez)){case`link`:return e instanceof HTMLAnchorElement?sB(e,t,n):null;case`github`:return e instanceof HTMLAnchorElement?cB(e):null;case`time`:return lB(e,n);case`question`:return uB(e,t,n);default:return null}}function fB({thread:e,getCard:t,content:n,hoverDelay:r,log:i}){let a=null,o=()=>{a&&clearTimeout(a.timer),a=null},s=(e,r=!1)=>{try{let i=t();if(i.anchor===e&&i.open){i.cancelHide();return}let a=n(e,i);if(!a)return;i.showFor(e,a),r&&requestAnimationFrame(()=>a.focus())}catch(e){i.error(`Mention preview card failed`,e)}},c=t=>{if(!(t instanceof Element))return null;let n=t.closest(Vz);return n&&e.contains(n)?n:null},l=e=>e instanceof Element&&e.closest(`slicc-hover-card`)!==null,u=e=>{let n=t();n.anchor===e&&n.scheduleHide()},d=e=>{let t=c(e.target);return t?.getAttribute(`data-preview`)===`question`?t:null},f={pointerover:e=>{let t=c(e.target);!t||a?.anchor===t||(o(),a={anchor:t,timer:setTimeout(()=>{a=null,s(t)},r)})},pointerout:e=>{let t=c(e.target);if(!t)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||(a?.anchor===t&&o(),l(n)||u(t))},focusin:e=>{let t=c(e.target);t&&s(t)},focusout:e=>{let t=c(e.target);t&&!l(e.relatedTarget)&&u(t)},keydown:e=>{let t=e.key;if(t!==`Enter`&&t!==` `)return;let n=d(e);n&&(e.preventDefault(),s(n,!0))},click:e=>{let t=d(e);t&&(o(),s(t,!0))}},p=()=>t().reposition();for(let[t,n]of Object.entries(f))e.addEventListener(t,n);return document.addEventListener(`link-preview-resize`,p),()=>{o();for(let[t,n]of Object.entries(f))e.removeEventListener(t,n);document.removeEventListener(`link-preview-resize`,p)}}function pB(e){let{thread:t,log:n}=e;if(!(t instanceof Node))return()=>{};let r=e.now??(()=>new Date),i=e.getTimeParser??CR,a=new iB(t,e.isReadOnly,()=>s()),o=[],s=()=>{let n=e.inputCard;if(!n)return;let r=Array.from(t.querySelectorAll(`[${sz}]`));for(let e of r)e.hidden||=!0;let i=r.map(e=>{let t=e.closest(Rz),n=e.getAttribute(sz),r=Array.from(t?.querySelectorAll(`[data-question-id]`)??[]).find(e=>e.getAttribute(oz)===n);return r&&a.statusOf(r).state===`open`?{source:e,span:r}:null}).filter(e=>e!==null);if(n.disabled&&(i.length=0),i.length===o.length&&i.every(({source:e},t)=>e===o[t]))return;o=i.map(({source:e})=>e);let s=i.map(({source:e,span:t})=>{let r=document.createElement(`slicc-question-prompt`);for(let t of[`question`,`kind`,cz,lz,uz]){let n=e.getAttribute(t);n!==null&&r.setAttribute(t,n)}return r.setAttribute(`composer`,``),r.addEventListener(`question-answer`,e=>{n.disabled||a.answer(t,e.detail)&&n.focus()}),r});n.setQuestionContent(s)},c=e=>{let t=e.target;if(!(t instanceof Element)||!t.hasAttribute(`data-question-controls`))return;let n=t.closest(Rz),r=t.getAttribute(sz),i=Array.from(n?.querySelectorAll(`[data-question-id]`)??[]).find(e=>e.getAttribute(oz)===r);i&&a.answer(i,e.detail)};t.addEventListener(`question-answer`,c);let l={fetcher:new GR({getFetch:e.getFetch??eB}),questions:a,now:r},u=null,d=e=>async()=>{let n=qz.get(t);if(!n)return null;u?.opener!==n&&(u={opener:n,resolver:n().then(e=>new sR(e))});let r=$z(t,e);return r.length===0?null:(await u.resolver).repoFor(r)},f=rB(t,o=>{if(!(o instanceof HTMLElement)||o.hasAttribute(`streaming`))return;let c=o.querySelector(`.body`)??o;Yz(()=>{c.isConnected&&Fz(c,{repoHints:Qz(t,o),resolveRepoFallback:d(o),getTimeParser:i,timeContext:wR(Gz(o,r)),questions:!0,getQuestionParser:e.getQuestionParser??(typeof Worker==`function`?EL:void 0)},(e,t)=>n.error(`Mention preview step "${e}" failed`,t)).then(()=>{a.mark(o),s()})})},()=>{a.refresh(),s()}),p=new MutationObserver(s);if(e.inputCard){p.observe(e.inputCard,{attributes:!0,attributeFilter:[`disabled`]});let t=e.inputCard.closest(`slicc-composer`);t&&p.observe(t,{attributes:!0,attributeFilter:[`hidden`]})}let m=fB({thread:t,getCard:e.getCard??(()=>Hu.shared(document)),content:(e,t)=>dB(e,t,l),hoverDelay:e.hoverDelayMs??Uz,log:n});return()=>{t.removeEventListener(`question-answer`,c),m(),f(),p.disconnect(),e.inputCard?.setQuestionContent(null);for(let e of t.querySelectorAll(`[${sz}]`))e.hidden&&=!1}}var mB=e({FREEZER_TINT:()=>hB,applyComposerAvailability:()=>OB,applyShellContext:()=>DB,buildWcShellFrame:()=>EB,mountWcUiPreview:()=>jB,submittedSteer:()=>AB,submittedText:()=>kB}),hB=`#3b6cb2`,gB=`slicc-wcui-style`,_B=[`html,body{margin:0;padding:0;height:100%;overscroll-behavior:none;}`,`.wcui-frame{position:relative;transform:translateZ(0);width:100%;height:100vh;`,`overflow:hidden;background:var(--bg);font-family:var(--ui);}`,`.wcui-shader{position:absolute;inset:0;z-index:0;}`,`.wcui-frame slicc-chatpane{position:relative;background:transparent;}`,`.wcui-appcol{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;`,`box-sizing:border-box;padding-left:var(--rail-w,44px);`,`transition:padding-left .4s cubic-bezier(.4,0,.2,1);}`,`@media (max-width:560px){.wcui-appcol{padding-left:44px;}}`,`.wcui-term{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px 4px 8px 10px;`,`box-sizing:border-box;background:var(--term-bg,#0c0c0e);}`,`.wcui-term .terminal-panel__terminal-host{flex:1 1 auto;min-height:0;}`,`.wcui-term .terminal-panel__terminal-host slicc-terminal{display:block;border-radius:0;}`,`.wcui-term .terminal-panel__preview{flex:0 0 auto;}`,`.wcui-term .terminal-panel__preview-label{color:var(--term-fg,#e7e7ea);font:11px var(--ui,ui-sans-serif,system-ui,sans-serif);padding:4px 0;}`,`.wcui-frame slicc-file-tree{width:100%;border-right:none;}`,`.wcui-memory{flex:1;min-height:0;overflow:hidden;}`,`.wcui-monitor{flex:1;min-height:0;}`,`.wcui-placeholder{flex:1;display:flex;align-items:center;justify-content:center;`,`padding:24px;color:var(--txt-2);font-size:13px;text-align:center;}`,`.wcui-backpressure{align-self:flex-end;max-width:80%;box-sizing:border-box;`,`padding:8px 12px;border:1px solid var(--line);border-radius:14px;`,`background:var(--canvas);color:var(--txt-2);font-size:12px;line-height:1.4;}`,`.wcui-backpressure[hidden]{display:none;}`,QD].join(``);function vB(e){if(e.getElementById(gB))return;let t=e.createElement(`style`);t.id=gB,t.textContent=_B,e.head.appendChild(t)}var yB=null;function bB(){yB?.(),yB=ag()}function $(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function xB(e){let t=$(`slicc-nav`,{accent:`var(--waffle)`}),n=$(`slicc-agent-tabs`);n.scoops=[...e.scoops];let r=$(`slicc-floatbar`,{label:e.floatLabel,spent:`0.00`}),i=document.createElement(`slicc-avatar-menu`);return i.append($(`slicc-avatar`,{name:`SLICC`})),t.append(n,r,i),{nav:t,switcher:n,floatbar:r,avatarMenu:i}}function SB(e){let t=$(`slicc-composer`),n=$(`div`,{class:`wcui-backpressure`,role:`status`,"aria-live":`polite`,hidden:``}),r=$(`slicc-queued-stack`);r.style.position=`relative`,r.style.zIndex=`0`,r.style.marginBottom=`-32px`,r.style.minHeight=`76px`;let i=$(`slicc-input-card`,{placeholder:e.placeholder});i.style.position=`relative`,i.style.zIndex=`1`;let a=$(`slicc-composer-meta`,{model:`Preview`,thinking:`off`});return t.append(n,r,i,a),{composer:t,inputCard:i,composerMeta:a,queuedStack:r,lickBackpressureNotice:n}}function CB(){let e=$(`slicc-dock-tree`),t=$(`slicc-surface`,{"surface-id":`files`,layout:`flex`}),n=$(`slicc-file-tree`);t.append(n);let r=$(`slicc-surface`,{"surface-id":`term`,layout:`flex`}),i=$(`div`,{class:`wcui-term`});r.append(i);let a=$(`slicc-surface`,{"surface-id":`memory`,layout:`flex`}),o=$(`slicc-memory-panel`,{class:`wcui-memory`});a.append(o);let s=$(`slicc-surface`,{"surface-id":`monitor`,layout:`flex`}),c=$(`slicc-monitor`,{class:`wcui-monitor`});s.append(c);let l=$(`slicc-surface`,{"surface-id":`browser`,layout:`flex`}),u=$(`div`,{class:`wcui-placeholder`});return u.textContent=`The tab switcher runs on the leader. This float has no browser of its own to show — ask the leader to open, focus, or close tabs through chat.`,l.append(u),e.append(t,r,a,s,l),{dockTree:e,tree:n,termSurface:i,memoryHost:o,monitor:c}}function wB(e,t){e.addEventListener(`slicc-dock-select`,e=>{let n=e.detail?.id;!n||t.has(n)})}function TB(e,t){e.addEventListener(`pointerdown`,e=>{let n=(e.target?.closest?.(`slicc-dock-item`))?.getAttribute(`item-id`);!n?.startsWith(`sprinkle:`)||!t.tilesMovable||t.beginExternalDrag(n,e.pointerId)})}function EB(e,t){ng(document),vB(document),bB();let r=$(`div`,{class:`wcui-frame`}),i=$(`slicc-shader`,{mode:`cone`,class:`wcui-shader`}),a=$(`slicc-freezer`);a.append($(`slicc-freezer-new`));let o=$(`div`,{class:`wcui-appcol`}),s=t.urlState?{"url-state":``}:{},c=$(`slicc-shell`,s),l=$(`slicc-chatpane`),u=$(`slicc-chat-thread`,{context:`cone`,accent:`var(--waffle)`,...s});u.append(...kP(t.messages));let{composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h}=SB(t);l.append(u,d);let{dockTree:g,tree:_,termSurface:v,memoryHost:y,monitor:b}=CB(),x=$(`slicc-surface`,{"surface-id":`chat`,layout:`flex`});x.append(l),g.append(x);let S=g;S.setPinned([`chat`]),S.placeSurface(`chat`,`left`);let C=$(`slicc-dock`,{"system-tools":``});c.append(g,C);let ee=new Set;wB(C,ee),TB(C,g),a.addEventListener(`freezer-toggle`,e=>{let t=e.detail?.open===!0;o.style.setProperty(`--rail-w`,t?`260px`:`44px`)});let w=0;u.addEventListener(`scroll`,()=>{w||=requestAnimationFrame(()=>{w=0,i.setAttribute(`scroll`,String(Math.round(u.scrollTop)))})},{passive:!0});let{nav:T,switcher:te,floatbar:ne,avatarMenu:re}=xB(t);o.append(T,c);let ie=gI({switcher:te,dock:C,freezer:a,composerMeta:p,composer:d,chatPane:l,inputCard:f,thread:u,frame:r,dockTree:g,fileTree:_,memoryHost:y}),{panelHost:ae,trustedLayer:E}=$D(document);return ae.append(i,a,o),r.append(ae,E),e.replaceChildren(r),SL({thread:u,log:n(`base64-preview`)}),tB({thread:u,inputCard:f,isReadOnly:()=>d.hasAttribute(`hidden`),log:n(`mention-preview`)}),{frame:r,panelHost:ae,trustedLayer:E,shader:i,chatPane:l,thread:u,composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h,switcher:te,floatbar:ne,shell:c,dockTree:g,dock:C,freezer:a,fileTree:_,termSurface:v,memoryHost:y,monitor:b,avatarMenu:re,shortcuts:ie,overlaySurfaces:ee}}function DB(e,t){let{shader:n,frame:r,freezer:i}=e;t.kind===`cone`?(n.removeAttribute(`tint`),r.style.removeProperty(`--ctx`),i.removeAttribute(`ctx`),n.setAttribute(`mode`,`cone`)):t.kind===`scoop`?(n.setAttribute(`tint`,t.accent),r.style.setProperty(`--ctx`,t.accent),i.removeAttribute(`ctx`),n.setAttribute(`mode`,`scoop`)):(n.setAttribute(`mode`,`freezer`),n.setAttribute(`tint`,hB),r.style.setProperty(`--ctx`,hB),i.setAttribute(`ctx`,``))}function OB(e,t){e.composer.toggleAttribute(`hidden`,t),t&&e.inputCard.setAttribute(`disabled`,``)}function kB(e){return e.detail?.value}function AB(e){return e.detail?.steer===!0}function jB(e){let t=EB(e,{messages:MO(),scoops:[{key:`cone`,type:`cone`,color:`#b07823`,label:`sliccy`,eyes:`open`,state:`working`},{key:SO,type:`scoop`,color:`#06b6d4`,label:SO,eyes:`open`,state:`broken`}],floatLabel:`standalone · preview`,placeholder:`Preview harness — submissions echo into the thread…`});t.fileTree.items=[{kind:`dir`,id:`/workspace`,label:`workspace`,open:!0,children:[{kind:`file`,id:`/workspace/CLAUDE.md`,label:`CLAUDE.md`,size:3200}]},{kind:`dir`,id:`/shared`,label:`shared`,open:!0,children:[{kind:`file`,id:`/shared/CLAUDE.md`,label:`CLAUDE.md`,size:1800}]}],t.switcher.setAttribute(`attention`,`cone`),t.inputCard.addEventListener(`submit`,e=>{let n=kB(e)?.trim();if(!n)return;let r={id:`wc-echo-${t.thread.childElementCount}`,role:`user`,content:n,timestamp:Date.now()};t.thread.append(...TP(r))})}export{fn as $,vO as A,Bn as B,TP as C,ue as Ct,UO as D,te as Dt,QM as E,de as Et,yd as F,zn as G,ar as H,Yl as I,An as J,Fn as K,Gs as L,eO as M,YD as N,ZO as O,ne as Ot,sf as P,pn as Q,qs as R,OP as S,ce as St,iP as T,ie as Tt,Xn as U,Zn as V,$n as W,yn as X,Mn as Y,bn as Z,jP as _,Le as _t,AB as a,an as at,LN as b,he as bt,Jz as c,Bt as ct,gL as d,Lt as dt,dn as et,iF as f,It as ft,eF as g,je as gt,aF as h,ze as ht,EB as i,on as it,hO as j,HO as k,pz as l,F as lt,rF as m,ge as mt,OB as n,cn as nt,kB as o,sn as ot,AP as p,gt as pt,On as q,DB as r,Xt as rt,mB as s,Yt as st,hB as t,rn as tt,dL as u,Rt as ut,zN as v,Be as vt,mP as w,le as wt,EP as x,ae as xt,RN as y,fe as yt,Vn as z};
9169
+ `),a.tagName===`LI`&&a!==n&&(t+=`- `),n=a;let o=t.length;t+=i.data,r.push({node:i,block:a,start:o,end:t.length})}return{text:t,spans:r}}function kz(e,t,n){let r=t.filter(({start:e,end:t})=>n.start<t&&n.end>e);if(r.length===0)return;let i=Mz(n.start,e);for(let{node:e,start:t,end:a}of r){if(!e.isConnected)continue;let o=Math.max(n.start,t),s=Math.min(n.end,a);wz(e,[{start:o-t,end:s-t}],()=>{let t=e.ownerDocument.createElement(`span`);return t.className=rz,t.setAttribute(ez,`question`),t.setAttribute(oz,i),t.setAttribute(iz,n.text),t.setAttribute(az,n.kind),r[0]?.node===e&&(t.tabIndex=0),t})}let a=e.ownerDocument.createElement(`slicc-question-prompt`);a.setAttribute(sz,i),a.setAttribute(`inline`,``),a.setAttribute(`question`,n.text),a.setAttribute(`kind`,n.kind),a.setAttribute(cz,JSON.stringify(n.options)),n.defaultIndex!==null&&a.setAttribute(lz,String(n.defaultIndex)),n.multiSelect&&a.setAttribute(uz,``);let o=r[r.length-1]?.block;o===e||o?.tagName===`LI`?o.append(a):o?.after(a)}async function Az(e,t){if(e.querySelector(`.agent-question`))return;let{text:n,spans:r}=Oz(e);if(!/[??]/.test(n)&&(!t.getQuestionParser||!/:\s*\n/.test(n)))return;let i;if(t.getQuestionParser)try{i=(await t.getQuestionParser().parse(n)).map(Dz)}catch{i=$R(n).map(e=>({...e,options:[],defaultIndex:null,multiSelect:!1}))}else i=$R(n).map(e=>({...e,options:[],defaultIndex:null,multiSelect:!1}));if(e.isConnected)for(let t of i.reverse())kz(e,r,t)}var jz=new WeakMap;function Mz(e,t){let n=jz.get(t);n||(n=new Map,jz.set(t,n));let r=n.get(e);return r||(Ez+=1,r=`q${Ez}`,n.set(e,r)),r}async function Nz(e,t){let n=Cz(e,gz).map(e=>({node:e,data:e.data,mentions:QL(e.data)})).filter(e=>e.mentions.length>0);if(n.length===0)return;let r=t.repoHints;if(n.some(e=>e.mentions.some(e=>!e.owner))&&r.length===0&&t.resolveRepoFallback){let e=await t.resolveRepoFallback().catch(()=>null);e&&(r=[e])}for(let{node:e,data:t,mentions:i}of n){if(!e.isConnected||e.data!==t)continue;let n=i.map(e=>({mention:e,ref:rR(e,r)})).filter(e=>e.ref!==null);n.length!==0&&wz(e,n.map(({mention:e})=>e),(t,r)=>{let i=n[r].ref,a=e.ownerDocument.createElement(`a`);return a.className=tz,a.href=PL(i),a.target=`_blank`,a.rel=`noopener noreferrer`,a.setAttribute(ez,`github`),a.setAttribute(dz.owner,i.owner),a.setAttribute(dz.repo,i.repo),a.setAttribute(dz.number,String(i.number)),a.setAttribute(dz.kind,i.kind),a.setAttribute(`aria-label`,`${i.owner}/${i.repo} ${LL(i)}`),a})}}async function Pz(e,t){if(!t.getTimeParser||!t.timeContext)return;let n=Cz(e,gz,nz).filter(e=>gR(e.data));if(n.length===0)return;let r=n.map(e=>e.data),i=await t.getTimeParser(),a=await xR(r,t.timeContext,i);n.forEach((e,t)=>{let n=a[t]??[];n.length!==0&&(!e.isConnected||e.data!==r[t]||wz(e,n,(t,r)=>{let i=e.ownerDocument.createElement(`span`);i.className=nz,i.setAttribute(ez,`time`);let a=n[r];return a&&vz.set(i,a),i}))})}function Fz(e,t,n=()=>{}){let r=Iz.get(e);if(r)return r.rerun={ctx:t,onError:n},r.promise;let i={promise:Promise.resolve(),rerun:null};return i.promise=(async()=>{try{for(await Lz(e,t,n);i.rerun;){let t=i.rerun;i.rerun=null,await Lz(e,t.ctx,t.onError)}}finally{Iz.delete(e)}})(),Iz.set(e,i),i.promise}var Iz=new WeakMap;async function Lz(e,t,n){let r=xz(e);if(e.getAttribute(mz)===r)return;let i=async(e,t)=>{try{await t()}catch(t){n(e,t)}};await i(`links`,()=>Tz(e)),t.questions&&await i(`questions`,()=>Az(e,t)),await i(`github`,()=>Nz(e,t)),await i(`times`,()=>Pz(e,t)),e.setAttribute(mz,xz(e))}var Rz=`slicc-agent-message`,zz=`slicc-user-message`,Bz=`slicc-action-row`,Vz=`[${ez}]`,Hz=2e4,Uz=280,Wz=`data-msg-time`;function Gz(e,t){let n=Number(e.getAttribute(Wz));return Number.isFinite(n)&&n>0?new Date(n):t()}var Kz=900,qz=new WeakMap;function Jz(e,t){qz.set(e,t)}function Yz(e){let t=globalThis.requestIdleCallback;typeof t==`function`?t(e):setTimeout(e,0)}function Xz(e,t,n){let r=[];for(let i of e.querySelectorAll(n)){if(i===t||t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)break;r.push(i)}return r.slice(-40)}function Zz(e){if(e.tagName.toLowerCase()===zz)return e.getAttribute(`text`)??``;let t=Array.from(e.querySelectorAll(`a[href]`),e=>e.getAttribute(`href`)??``);return`${(e.textContent??``).slice(0,Hz)} ${t.join(` `)}`}function Qz(e,t){let n=Xz(e,t,`${Bz},${Rz},${zz}`),r=[];for(let e of[...n,t])for(let t of nR(Zz(e))){let e=r.findIndex(e=>e.toLowerCase()===t.toLowerCase());e>=0&&r.splice(e,1),r.push(t)}return r}function $z(e,t){return Xz(e,t,`${Bz}[${UO}]`).flatMap(e=>ZO(e.getAttribute(`data-file-paths`)??``))}function eB(){return t(async()=>{let{createProxiedFetch:e}=await import(`./proxied-fetch-4VBgrEIu.js`).then(e=>e.i);return{createProxiedFetch:e}},__vite__mapDeps([18,1,2,19,20,21,22])).then(({createProxiedFetch:e})=>{let t=e({maxResponseBytes:RR});return(e,n)=>t(e,n)})}function tB(e){try{return pB(e)}catch(t){return e.log.error(`Mention preview wiring failed; continuing without it`,t),()=>{}}}function nB(e){let t=new Set,n=e=>e?.tagName.toLowerCase()===Rz;for(let r of e){let e=r.target;if(r.type===`attributes`){e&&n(e)&&t.add(e);continue}for(let e of r.addedNodes)if(e instanceof HTMLElement){if(n(e))t.add(e);else for(let n of e.querySelectorAll(Rz))t.add(n)}let i=e?.closest?.(Rz);i&&t.add(i)}return t}function rB(e,t,n){for(let n of e.querySelectorAll(Rz))t(n);let r=new MutationObserver(e=>{for(let n of nB(e))t(n);n()});return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`streaming`]}),()=>r.disconnect()}var iB=class{thread;isReadOnly;onAnswered;#e=new Map;constructor(e,t,n=()=>{}){this.thread=e,this.isReadOnly=t,this.onAnswered=n}#t(e,t){return`${e?.getAttribute(`data-msg-id`)??``}\u0000${t}`}mark(e){for(let t of e.querySelectorAll(`[${iz}]`)){let n=this.#t(e,t.getAttribute(`data-question`)??``);t.toggleAttribute(fz,this.#e.has(n))}for(let t of e.querySelectorAll(`[${sz}]`)){let n=t.getAttribute(sz),r=Array.from(e.querySelectorAll(`[${oz}]`)).find(e=>e.getAttribute(oz)===n);if(!r)continue;let{state:i,note:a,answer:o}=this.statusOf(r);t.getAttribute(`state`)!==i&&t.setAttribute(`state`,i),a?t.setAttribute(`note`,a):t.removeAttribute(`note`),o!==void 0&&t.setAttribute(`answer`,o)}}refresh(){for(let e of this.thread.querySelectorAll(Rz))this.mark(e)}statusOf(e){let t=e.closest(Rz),n=this.#e.get(this.#t(t,e.getAttribute(`data-question`)??``));if(n!==void 0)return{state:`answered`,answer:n};if(this.isReadOnly())return{state:`inert`,note:`This conversation is read-only.`};if(!t||t.hasAttribute(`streaming`))return{state:`inert`};let r=this.thread.querySelectorAll(Rz);if(r[r.length-1]!==t)return{state:`inert`,note:`Only the latest question can be answered here.`};for(let e of this.thread.querySelectorAll(zz))if(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)return{state:`inert`,note:`You already replied to this message.`};return{state:`open`}}answer(e,t){if(this.statusOf(e).state!==`open`)return!1;let n=e.closest(Rz),r=e.getAttribute(`data-question`)??``;this.#e.set(this.#t(n,r),t.answer),n&&this.mark(n),this.onAnswered();let i=n?.getAttribute(`data-msg-id`),a={question:r,kind:t.kind,answer:t.answer,...i?{messageId:i}:{}};return this.thread.dispatchEvent(new CustomEvent(pz,{detail:a,bubbles:!0,composed:!0})),!0}};function aB(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function oB(e,t){e.setAttribute(`url`,t.url),e.setAttribute(`state`,t.state),aB(e,`heading`,t.title),aB(e,`description`,t.description),aB(e,`image`,t.image),aB(e,`site`,t.siteName),aB(e,`badge`,t.badge)}function sB(e,t,n){let r=document.createElement(`slicc-link-preview`),i=e.href;return oB(r,{url:i,state:`loading`}),n.fetcher.preview(i).then(n=>{t.anchor===e&&(oB(r,n),t.reposition())}),r}function cB(e){let t=bz(e);if(!t)return null;let n=WR(PL(t),t),r=document.createElement(`slicc-link-preview`);return oB(r,{...n,siteName:n.siteName??`GitHub`}),r}function lB(e,t){let n=yz(e);if(!n)return null;let r=wR(t.now()),i=document.createElement(`slicc-time-preview`);return i.data={text:n.text,reference:r.reference,timeZone:r.timeZone,occurrences:n.occurrences,rrules:n.rrules},i}function uB(e,t,n){let r=document.createElement(`slicc-question-prompt`),{state:i,note:a,answer:o}=n.questions.statusOf(e);r.setAttribute(`question`,e.getAttribute(`data-question`)??``),r.setAttribute(`kind`,e.getAttribute(`data-question-kind`)??`text`);let s=e.getAttribute(oz),c=Array.from(e.closest(Rz)?.querySelectorAll(`[data-question-controls]`)??[]).find(e=>e.getAttribute(sz)===s);for(let e of[cz,lz,uz]){let t=c?.getAttribute(e);t!=null&&r.setAttribute(e,t)}return r.setAttribute(`state`,i),a&&r.setAttribute(`note`,a),o!==void 0&&r.setAttribute(`answer`,o),r.addEventListener(`question-answer`,i=>{let a=i.detail;n.questions.answer(e,a)&&(r.setAttribute(`answer`,a.answer),r.setAttribute(`state`,`answered`),t.scheduleHide(Kz))}),r}function dB(e,t,n){switch(e.getAttribute(ez)){case`link`:return e instanceof HTMLAnchorElement?sB(e,t,n):null;case`github`:return e instanceof HTMLAnchorElement?cB(e):null;case`time`:return lB(e,n);case`question`:return uB(e,t,n);default:return null}}function fB({thread:e,getCard:t,content:n,hoverDelay:r,log:i}){let a=null,o=()=>{a&&clearTimeout(a.timer),a=null},s=(e,r=!1)=>{try{let i=t();if(i.anchor===e&&i.open){i.cancelHide();return}let a=n(e,i);if(!a)return;i.showFor(e,a),r&&requestAnimationFrame(()=>a.focus())}catch(e){i.error(`Mention preview card failed`,e)}},c=t=>{if(!(t instanceof Element))return null;let n=t.closest(Vz);return n&&e.contains(n)?n:null},l=e=>e instanceof Element&&e.closest(`slicc-hover-card`)!==null,u=e=>{let n=t();n.anchor===e&&n.scheduleHide()},d=e=>{let t=c(e.target);return t?.getAttribute(`data-preview`)===`question`?t:null},f={pointerover:e=>{let t=c(e.target);!t||a?.anchor===t||(o(),a={anchor:t,timer:setTimeout(()=>{a=null,s(t)},r)})},pointerout:e=>{let t=c(e.target);if(!t)return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||(a?.anchor===t&&o(),l(n)||u(t))},focusin:e=>{let t=c(e.target);t&&s(t)},focusout:e=>{let t=c(e.target);t&&!l(e.relatedTarget)&&u(t)},keydown:e=>{let t=e.key;if(t!==`Enter`&&t!==` `)return;let n=d(e);n&&(e.preventDefault(),s(n,!0))},click:e=>{let t=d(e);t&&(o(),s(t,!0))}},p=()=>t().reposition();for(let[t,n]of Object.entries(f))e.addEventListener(t,n);return document.addEventListener(`link-preview-resize`,p),()=>{o();for(let[t,n]of Object.entries(f))e.removeEventListener(t,n);document.removeEventListener(`link-preview-resize`,p)}}function pB(e){let{thread:t,log:n}=e;if(!(t instanceof Node))return()=>{};let r=e.now??(()=>new Date),i=e.getTimeParser??CR,a=new iB(t,e.isReadOnly,()=>s()),o=[],s=()=>{let n=e.inputCard;if(!n)return;let r=Array.from(t.querySelectorAll(`[${sz}]`));for(let e of r)e.hidden||=!0;let i=r.map(e=>{let t=e.closest(Rz),n=e.getAttribute(sz),r=Array.from(t?.querySelectorAll(`[data-question-id]`)??[]).find(e=>e.getAttribute(oz)===n);return r&&a.statusOf(r).state===`open`?{source:e,span:r}:null}).filter(e=>e!==null);if(n.disabled&&(i.length=0),i.length===o.length&&i.every(({source:e},t)=>e===o[t]))return;o=i.map(({source:e})=>e);let s=i.map(({source:e,span:t})=>{let r=document.createElement(`slicc-question-prompt`);for(let t of[`question`,`kind`,cz,lz,uz]){let n=e.getAttribute(t);n!==null&&r.setAttribute(t,n)}return r.setAttribute(`composer`,``),r.addEventListener(`question-answer`,e=>{n.disabled||a.answer(t,e.detail)&&n.focus()}),r});n.setQuestionContent(s)},c=e=>{let t=e.target;if(!(t instanceof Element)||!t.hasAttribute(`data-question-controls`))return;let n=t.closest(Rz),r=t.getAttribute(sz),i=Array.from(n?.querySelectorAll(`[data-question-id]`)??[]).find(e=>e.getAttribute(oz)===r);i&&a.answer(i,e.detail)};t.addEventListener(`question-answer`,c);let l={fetcher:new GR({getFetch:e.getFetch??eB}),questions:a,now:r},u=null,d=e=>async()=>{let n=qz.get(t);if(!n)return null;u?.opener!==n&&(u={opener:n,resolver:n().then(e=>new sR(e))});let r=$z(t,e);return r.length===0?null:(await u.resolver).repoFor(r)},f=rB(t,o=>{if(!(o instanceof HTMLElement)||o.hasAttribute(`streaming`))return;let c=o.querySelector(`.body`)??o;Yz(()=>{c.isConnected&&Fz(c,{repoHints:Qz(t,o),resolveRepoFallback:d(o),getTimeParser:i,timeContext:wR(Gz(o,r)),questions:!0,getQuestionParser:e.getQuestionParser??(typeof Worker==`function`?EL:void 0)},(e,t)=>n.error(`Mention preview step "${e}" failed`,t)).then(()=>{a.mark(o),s()})})},()=>{a.refresh(),s()}),p=new MutationObserver(s);if(e.inputCard){p.observe(e.inputCard,{attributes:!0,attributeFilter:[`disabled`]});let t=e.inputCard.closest(`slicc-composer`);t&&p.observe(t,{attributes:!0,attributeFilter:[`hidden`]})}let m=fB({thread:t,getCard:e.getCard??(()=>Hu.shared(document)),content:(e,t)=>dB(e,t,l),hoverDelay:e.hoverDelayMs??Uz,log:n});return()=>{t.removeEventListener(`question-answer`,c),m(),f(),p.disconnect(),e.inputCard?.setQuestionContent(null);for(let e of t.querySelectorAll(`[${sz}]`))e.hidden&&=!1}}var mB=e({FREEZER_TINT:()=>hB,applyComposerAvailability:()=>OB,applyShellContext:()=>DB,buildWcShellFrame:()=>EB,mountWcUiPreview:()=>jB,submittedSteer:()=>AB,submittedText:()=>kB}),hB=`#3b6cb2`,gB=`slicc-wcui-style`,_B=[`html,body{margin:0;padding:0;height:100%;overscroll-behavior:none;}`,`.wcui-frame{position:relative;transform:translateZ(0);width:100%;height:100vh;`,`overflow:hidden;background:var(--bg);font-family:var(--ui);}`,`.wcui-shader{position:absolute;inset:0;z-index:0;}`,`.wcui-frame slicc-chatpane{position:relative;background:transparent;}`,`.wcui-appcol{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;`,`box-sizing:border-box;padding-left:var(--rail-w,44px);`,`transition:padding-left .4s cubic-bezier(.4,0,.2,1);}`,`@media (max-width:560px){.wcui-appcol{padding-left:44px;}}`,`.wcui-term{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px 4px 8px 10px;`,`box-sizing:border-box;background:var(--term-bg,#0c0c0e);}`,`.wcui-term .terminal-panel__terminal-host{flex:1 1 auto;min-height:0;}`,`.wcui-term .terminal-panel__terminal-host slicc-terminal{display:block;border-radius:0;}`,`.wcui-term .terminal-panel__preview{flex:0 0 auto;}`,`.wcui-term .terminal-panel__preview-label{color:var(--term-fg,#e7e7ea);font:11px var(--ui,ui-sans-serif,system-ui,sans-serif);padding:4px 0;}`,`.wcui-frame slicc-file-tree{width:100%;border-right:none;}`,`.wcui-memory{flex:1;min-height:0;overflow:hidden;}`,`.wcui-monitor{flex:1;min-height:0;}`,`.wcui-placeholder{flex:1;display:flex;align-items:center;justify-content:center;`,`padding:24px;color:var(--txt-2);font-size:13px;text-align:center;}`,`.wcui-backpressure{align-self:flex-end;max-width:80%;box-sizing:border-box;`,`padding:8px 12px;border:1px solid var(--line);border-radius:14px;`,`background:var(--canvas);color:var(--txt-2);font-size:12px;line-height:1.4;}`,`.wcui-backpressure[hidden]{display:none;}`,QD].join(``);function vB(e){if(e.getElementById(gB))return;let t=e.createElement(`style`);t.id=gB,t.textContent=_B,e.head.appendChild(t)}var yB=null;function bB(){yB?.(),yB=ag()}function $(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function xB(e){let t=$(`slicc-nav`,{accent:`var(--waffle)`}),n=$(`slicc-agent-tabs`);n.scoops=[...e.scoops];let r=$(`slicc-floatbar`,{label:e.floatLabel,spent:`0.00`}),i=document.createElement(`slicc-avatar-menu`);return i.append($(`slicc-avatar`,{name:`SLICC`})),t.append(n,r,i),{nav:t,switcher:n,floatbar:r,avatarMenu:i}}function SB(e){let t=$(`slicc-composer`),n=$(`div`,{class:`wcui-backpressure`,role:`status`,"aria-live":`polite`,hidden:``}),r=$(`slicc-queued-stack`);r.style.position=`relative`,r.style.zIndex=`0`,r.style.marginBottom=`-32px`,r.style.minHeight=`76px`;let i=$(`slicc-input-card`,{placeholder:e.placeholder});i.style.position=`relative`,i.style.zIndex=`1`;let a=$(`slicc-composer-meta`,{model:`Preview`,thinking:`off`});return t.append(n,r,i,a),{composer:t,inputCard:i,composerMeta:a,queuedStack:r,lickBackpressureNotice:n}}function CB(){let e=$(`slicc-dock-tree`),t=$(`slicc-surface`,{"surface-id":`files`,layout:`flex`}),n=$(`slicc-file-tree`);t.append(n);let r=$(`slicc-surface`,{"surface-id":`term`,layout:`flex`}),i=$(`div`,{class:`wcui-term`});r.append(i);let a=$(`slicc-surface`,{"surface-id":`memory`,layout:`flex`}),o=$(`slicc-memory-panel`,{class:`wcui-memory`});a.append(o);let s=$(`slicc-surface`,{"surface-id":`monitor`,layout:`flex`}),c=$(`slicc-monitor`,{class:`wcui-monitor`});s.append(c);let l=$(`slicc-surface`,{"surface-id":`browser`,layout:`flex`}),u=$(`div`,{class:`wcui-placeholder`});return u.textContent=`The tab switcher runs on the leader. This float has no browser of its own to show — ask the leader to open, focus, or close tabs through chat.`,l.append(u),e.append(t,r,a,s,l),{dockTree:e,tree:n,termSurface:i,memoryHost:o,monitor:c}}function wB(e,t){e.addEventListener(`slicc-dock-select`,e=>{let n=e.detail?.id;!n||t.has(n)})}function TB(e,t){e.addEventListener(`pointerdown`,e=>{let n=(e.target?.closest?.(`slicc-dock-item`))?.getAttribute(`item-id`);!n?.startsWith(`sprinkle:`)||!t.tilesMovable||t.beginExternalDrag(n,e.pointerId)})}function EB(e,t){ng(document),vB(document),bB();let r=$(`div`,{class:`wcui-frame`}),i=$(`slicc-shader`,{mode:`cone`,class:`wcui-shader`}),a=$(`slicc-freezer`);a.append($(`slicc-freezer-new`));let o=$(`div`,{class:`wcui-appcol`}),s=t.urlState?{"url-state":``}:{},c=$(`slicc-shell`,s),l=$(`slicc-chatpane`),u=$(`slicc-chat-thread`,{context:`cone`,accent:`var(--waffle)`,...s});u.append(...kP(t.messages));let{composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h}=SB(t);l.append(u,d);let{dockTree:g,tree:_,termSurface:v,memoryHost:y,monitor:b}=CB(),x=$(`slicc-surface`,{"surface-id":`chat`,layout:`flex`});x.append(l),g.append(x);let S=g;S.setPinned([`chat`]),S.placeSurface(`chat`,`left`);let C=$(`slicc-dock`,{"system-tools":``});c.append(g,C);let ee=new Set;wB(C,ee),TB(C,g),a.addEventListener(`freezer-toggle`,e=>{let t=e.detail?.open===!0;o.style.setProperty(`--rail-w`,t?`260px`:`44px`)});let w=0;u.addEventListener(`scroll`,()=>{w||=requestAnimationFrame(()=>{w=0,i.setAttribute(`scroll`,String(Math.round(u.scrollTop)))})},{passive:!0});let{nav:T,switcher:te,floatbar:ne,avatarMenu:re}=xB(t);o.append(T,c);let ie=gI({switcher:te,dock:C,freezer:a,composerMeta:p,composer:d,chatPane:l,inputCard:f,thread:u,frame:r,dockTree:g,fileTree:_,memoryHost:y}),{panelHost:ae,trustedLayer:E}=$D(document);return ae.append(i,a,o),r.append(ae,E),e.replaceChildren(r),SL({thread:u,log:n(`base64-preview`)}),tB({thread:u,inputCard:f,isReadOnly:()=>d.hasAttribute(`hidden`),log:n(`mention-preview`)}),{frame:r,panelHost:ae,trustedLayer:E,shader:i,chatPane:l,thread:u,composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h,switcher:te,floatbar:ne,shell:c,dockTree:g,dock:C,freezer:a,fileTree:_,termSurface:v,memoryHost:y,monitor:b,avatarMenu:re,shortcuts:ie,overlaySurfaces:ee}}function DB(e,t){let{shader:n,frame:r,freezer:i}=e;t.kind===`cone`?(n.removeAttribute(`tint`),r.style.removeProperty(`--ctx`),i.removeAttribute(`ctx`),n.setAttribute(`mode`,`cone`)):t.kind===`scoop`?(n.setAttribute(`tint`,t.accent),r.style.setProperty(`--ctx`,t.accent),i.removeAttribute(`ctx`),n.setAttribute(`mode`,`scoop`)):(n.setAttribute(`mode`,`freezer`),n.setAttribute(`tint`,hB),r.style.setProperty(`--ctx`,hB),i.setAttribute(`ctx`,``))}function OB(e,t){e.composer.toggleAttribute(`hidden`,t),t&&e.inputCard.setAttribute(`disabled`,``)}function kB(e){return e.detail?.value}function AB(e){return e.detail?.steer===!0}function jB(e){let t=EB(e,{messages:MO(),scoops:[{key:`cone`,type:`cone`,color:`#b07823`,label:`sliccy`,eyes:`open`,state:`working`},{key:SO,type:`scoop`,color:`#06b6d4`,label:SO,eyes:`open`,state:`broken`}],floatLabel:`standalone · preview`,placeholder:`Preview harness — submissions echo into the thread…`});t.fileTree.items=[{kind:`dir`,id:`/workspace`,label:`workspace`,open:!0,children:[{kind:`file`,id:`/workspace/CLAUDE.md`,label:`CLAUDE.md`,size:3200}]},{kind:`dir`,id:`/shared`,label:`shared`,open:!0,children:[{kind:`file`,id:`/shared/CLAUDE.md`,label:`CLAUDE.md`,size:1800}]}],t.switcher.setAttribute(`attention`,`cone`),t.inputCard.addEventListener(`submit`,e=>{let n=kB(e)?.trim();if(!n)return;let r={id:`wc-echo-${t.thread.childElementCount}`,role:`user`,content:n,timestamp:Date.now()};t.thread.append(...TP(r))})}export{fn as $,vO as A,Bn as B,TP as C,ue as Ct,UO as D,te as Dt,QM as E,de as Et,yd as F,zn as G,ar as H,Yl as I,An as J,Fn as K,Gs as L,eO as M,YD as N,ZO as O,ne as Ot,sf as P,pn as Q,qs as R,OP as S,ce as St,iP as T,ie as Tt,Xn as U,Zn as V,$n as W,yn as X,Mn as Y,bn as Z,jP as _,Le as _t,AB as a,an as at,LN as b,he as bt,Jz as c,Bt as ct,gL as d,Lt as dt,dn as et,iF as f,It as ft,eF as g,je as gt,aF as h,ze as ht,EB as i,on as it,hO as j,HO as k,pz as l,F as lt,rF as m,ge as mt,OB as n,cn as nt,kB as o,sn as ot,AP as p,gt as pt,On as q,DB as r,Xt as rt,mB as s,Yt as st,hB as t,rn as tt,dL as u,Rt as ut,zN as v,Be as vt,mP as w,le as wt,EP as x,ae as xt,RN as y,fe as yt,Vn as z};