sliccy 6.199.0 → 6.200.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/node-server/cloud-status.d.ts +7 -0
- package/dist/node-server/cloud-status.js +10 -0
- package/dist/node-server/index.js +3 -3
- package/dist/ui/.vite/manifest.json +182 -182
- package/dist/ui/assets/{SKILL-Cw2kRKxn.js → SKILL-BGRdm7JZ.js} +1 -1
- package/dist/ui/assets/{account-store-Cx-zMFBD.js → account-store-BxJt4yS8.js} +1 -1
- package/dist/ui/assets/{account-store-EoBfJmnP.js → account-store-BzBJdOjG.js} +1 -1
- package/dist/ui/assets/{adobe-DNks8ueK.js → adobe-CfZI9e_s.js} +1 -1
- package/dist/ui/assets/{adobe-D4lN-fe9.js → adobe-Duxzk6rb.js} +1 -1
- package/dist/ui/assets/{agent-panels-DfH2RfRc.js → agent-panels-Dw6pMIG7.js} +1 -1
- package/dist/ui/assets/agent-question-worker-oT1IOgNo.js +15 -0
- package/dist/ui/assets/{almost-bash-shell-headless-CJIpcyA_.js → almost-bash-shell-headless-DqbR046s.js} +513 -512
- package/dist/ui/assets/{apply-layout-ycn-YWV8.js → apply-layout-Dvq9FNPi.js} +1 -1
- package/dist/ui/assets/{apps-CwMp0IaY.js → apps-CkzkOBHh.js} +1 -1
- package/dist/ui/assets/{azure-openai-2XjV814_.js → azure-openai-C38Ok-Gx.js} +1 -1
- package/dist/ui/assets/{azure-openai--kdMGYQe.js → azure-openai-ir8YhFwn.js} +1 -1
- package/dist/ui/assets/{backend-hostfs-DmwXuxc_.js → backend-hostfs-CTkrA6w4.js} +1 -1
- package/dist/ui/assets/{bsh-watchdog-CCz8gp5d.js → bsh-watchdog-xbXqblUt.js} +1 -1
- package/dist/ui/assets/{cdp-C8iHjGeB.js → cdp-DriOLbXw.js} +1 -1
- package/dist/ui/assets/{cerebras-Bj8IbswC.js → cerebras-CWN_IdZZ.js} +1 -1
- package/dist/ui/assets/{cerebras-B2MfjfTb.js → cerebras-CzWnVMYU.js} +1 -1
- package/dist/ui/assets/{composer-speech-B7jpqEUd.js → composer-speech-Da0U11dE.js} +1 -1
- package/dist/ui/assets/{connect-surface-Dsv-VRdA.js → connect-surface-EGNJlwL7.js} +1 -1
- package/dist/ui/assets/{core-5TgOcN68.js → core-VO3EvqHP.js} +1 -1
- package/dist/ui/assets/{directed-approval-BY11fbfk.js → directed-approval-5zcBx_8Q.js} +1 -1
- package/dist/ui/assets/emscripten-vfs-hook-0t5cbJA-.js +1 -0
- package/dist/ui/assets/{emscripten-vfs-hook-rDtZMlJd.js → emscripten-vfs-hook-Con-EaZe.js} +1 -1
- package/dist/ui/assets/{ensure-speech-assets-Bnwq1rHN.js → ensure-speech-assets-Bxb0T3I7.js} +1 -1
- package/dist/ui/assets/{esbuild-wasm-CbTVjIj0.js → esbuild-wasm-BqY5rzxc.js} +1 -1
- package/dist/ui/assets/{ffmpeg-wasm-CmLVzRDe.js → ffmpeg-wasm-NIvl0oHG.js} +1 -1
- package/dist/ui/assets/{frozen-archive-writer-SpOL-8Rw.js → frozen-archive-writer-DXD3HNGv.js} +1 -1
- package/dist/ui/assets/{fs-j0imIjve.js → fs-DixNKUU2.js} +2 -2
- package/dist/ui/assets/{fs-COFN8LYS.js → fs-Dwrhp8ic.js} +1 -1
- package/dist/ui/assets/{gelatiere-store-DMxpxFl5.js → gelatiere-store-CXO9x_ym.js} +1 -1
- package/dist/ui/assets/{gelatiere-unit-BVxUEyjY.js → gelatiere-unit-C-RaaAN4.js} +1 -1
- package/dist/ui/assets/{github-CP2HmcKt.js → github-Dx70XiCa.js} +2 -2
- package/dist/ui/assets/{github-BBpjYbca.js → github-PitZcrvG.js} +1 -1
- package/dist/ui/assets/{github-auth-BGeZvDDK.js → github-auth-CrVMVbq1.js} +1 -1
- package/dist/ui/assets/{github-copilot-z_3tgxne.js → github-copilot-2AG326AA.js} +1 -1
- package/dist/ui/assets/{github-copilot-C8HzPVks.js → github-copilot-Bq647loV.js} +1 -1
- package/dist/ui/assets/{github-install-BuHsKLmH.js → github-install-BX21YoQ9.js} +1 -1
- package/dist/ui/assets/{github-zip-CdhraPsW.js → github-zip-BZ1xXXrZ.js} +1 -1
- package/dist/ui/assets/global-prefix-DqCuANmV.js +1 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/runtime/inference.mjs +59 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/runtime/inference.wasm +0 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/v13/config.json +29 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/v13/crf.json +1 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/v13/manifest.json +27 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/v13/member0.onnx +0 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/v13/member1.onnx +0 -0
- package/dist/ui/assets/gpu-ask-258b878401128d27/v13/static_vocab.json +1 -0
- package/dist/ui/assets/{guest-tool-gate-ChWgxyey.js → guest-tool-gate-BzUxTS0o.js} +1 -1
- package/dist/ui/assets/{hear-B3_6gBpO.js → hear-B2jOUJBd.js} +1 -1
- package/dist/ui/assets/{help-DEBF1lg7.js → help-DeCzUHHm.js} +1 -1
- package/dist/ui/assets/{installer-CRB9PB6D.js → installer-BP2BgIQj.js} +2 -2
- package/dist/ui/assets/{interrupted-work-recovery-iVZtmHsZ.js → interrupted-work-recovery-DkaikSRv.js} +1 -1
- package/dist/ui/assets/{ipk-mamba-DWCiJ0YO.js → ipk-mamba-Bu6lP-yN.js} +1 -1
- package/dist/ui/assets/{js-realm-worker-9qNmSeMt.js → js-realm-worker-DGzo9e6m.js} +2 -2
- package/dist/ui/assets/{jsh-executor-Bv_veUM_.js → jsh-executor-F0CFLkaz.js} +2 -2
- package/dist/ui/assets/{kernel-worker-B_7I-3sG.js → kernel-worker-ZLEuzNnF.js} +10 -10
- package/dist/ui/assets/{lick-ws-bridge-5HuXfp92.js → lick-ws-bridge-BxjNZ6mT.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-BJwcfwUG.js → lick-ws-bridge-Dhr971ns.js} +1 -1
- package/dist/ui/assets/{live-session-curation-BFmvB-0m.js → live-session-curation-DdnOrBLX.js} +1 -1
- package/dist/ui/assets/{live-session-snapshot-BzqcwvnN.js → live-session-snapshot-C3mWxsFX.js} +1 -1
- package/dist/ui/assets/{local-llm-B-rO-waH.js → local-llm-BPvhp-xI.js} +1 -1
- package/dist/ui/assets/{local-llm-CbMyPbKh.js → local-llm-BX18gu-_.js} +1 -1
- package/dist/ui/assets/{magick-wasm-BATj-KUu.js → magick-wasm-DjyHtD1t.js} +1 -1
- package/dist/ui/assets/{main-A0IDHjYB.js → main-Dlhq0ECg.js} +3 -3
- package/dist/ui/assets/{main-cherry-BjDYCEBf.js → main-cherry-YHj3bFYw.js} +1 -1
- package/dist/ui/assets/{memory-curation-seam-DpIeuHCo.js → memory-curation-seam-DLjNyX6I.js} +1 -1
- package/dist/ui/assets/{memory-health-DCVHFlpU.js → memory-health-er4gWnBp.js} +1 -1
- package/dist/ui/assets/{memory-write-execute-CCRzz7oL.js → memory-write-execute-CdG4BhZ9.js} +1 -1
- package/dist/ui/assets/{merge-folded-cost-into-frozen-DAmJAikz.js → merge-folded-cost-into-frozen-BrMZ9Z4i.js} +1 -1
- package/dist/ui/assets/{mount-DajU3MBA.js → mount-BClA1VZ3.js} +3 -3
- package/dist/ui/assets/{mount-CyPrJ0Dn.js → mount-ovHiMqAC.js} +1 -1
- package/dist/ui/assets/{new-session-DqnJYTgI.js → new-session-BS2bMoRG.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-6HPPzWmI.js → oauth-bootstrap-DNCeTDQS.js} +2 -2
- package/dist/ui/assets/{onboarding-orchestrator-CgakRFkk.js → onboarding-orchestrator-Ywkh0Vff.js} +1 -1
- package/dist/ui/assets/{openai-codex-DKHDJx7V.js → openai-codex-Copgpc1l.js} +1 -1
- package/dist/ui/assets/{openai-codex-bVm3p-UR.js → openai-codex-ggQD9llh.js} +1 -1
- package/dist/ui/assets/{openrouter-axjw9vxd.js → openrouter-Bg6XJT8w.js} +1 -1
- package/dist/ui/assets/{openrouter-imALD05G.js → openrouter-CDTp1b5L.js} +1 -1
- package/dist/ui/assets/{openrouter-free-ZOjmQipE.js → openrouter-free-DpEJ8N1H.js} +1 -1
- package/dist/ui/assets/{openrouter-free-DoT4iD1_.js → openrouter-free-DuS4wwr7.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-CL-Mvzf2.js → openrouter-oauth-C00UCg4n.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-tL5bQcLP.js → openrouter-oauth-C_qDKVGx.js} +1 -1
- package/dist/ui/assets/{opfs-mount-Bh50Ihzc.js → opfs-mount-BZuRvWgk.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-SJZUazHr.js → panel-rpc-handlers-C5I8S3Ox.js} +2 -2
- package/dist/ui/assets/{panelize-shell-CMNQNMKL.js → panelize-shell-BfM7D7GU.js} +1 -1
- package/dist/ui/assets/{pi-edit-execution-DdqXe8fR.js → pi-edit-execution-zM5AjgsN.js} +1 -1
- package/dist/ui/assets/process-worker-Dp3NuRKM.js +3 -0
- package/dist/ui/assets/{provider-BY7JJQ6C.js → provider-72FGuRVI.js} +2 -2
- package/dist/ui/assets/{provider-BJWASjRb.js → provider-Caqy6sQ9.js} +1 -1
- package/dist/ui/assets/{provider-settings-CpxxDUGX.js → provider-settings-CyRvW-sr.js} +1 -1
- package/dist/ui/assets/provider-store-access-B1DGSCi_.js +1 -0
- package/dist/ui/assets/provider-store-access-CdNwzR2X.js +1 -0
- package/dist/ui/assets/{providers-Cu9hF00M.js → providers-BO8z0UDJ.js} +1 -1
- package/dist/ui/assets/{providers-Bdna_Mfl.js → providers-CClQxLrp.js} +2 -2
- package/dist/ui/assets/{quick-llm-yC5FFRut.js → quick-llm-FkwEdyGU.js} +1 -1
- package/dist/ui/assets/{realm-inprocess-mlxB_Jft.js → realm-inprocess-evHZU-xc.js} +2 -2
- package/dist/ui/assets/{realm-unhandled-rejections-DTlyLSbk.js → realm-unhandled-rejections-B3RTHl-M.js} +1 -1
- package/dist/ui/assets/{realm-unhandled-rejections-pcAKQKxI.js → realm-unhandled-rejections-ChjWX2Mi.js} +1 -1
- package/dist/ui/assets/{recovery-screen-VOpbkVaX.js → recovery-screen-CEzQ-e0n.js} +1 -1
- package/dist/ui/assets/{remote-terminal-view-DCbE72Di.js → remote-terminal-view-BFwZA41k.js} +2 -2
- package/dist/ui/assets/{require-guards-idkispmW.js → require-guards-Dd9Pt0Fl.js} +1 -1
- package/dist/ui/assets/{restore-INu3JzKu.js → restore-BITUqyY6.js} +1 -1
- package/dist/ui/assets/{run-CKXEa8SO.js → run-127C4O6D.js} +1 -1
- package/dist/ui/assets/{run-Dg-St-RH.js → run-BKqRP8Pt.js} +1 -1
- package/dist/ui/assets/{run-xIOKpcaY.js → run-BYmK0SKZ.js} +2 -2
- package/dist/ui/assets/run-BciZIAEy.js +4 -0
- package/dist/ui/assets/{run-rx7i3htt.js → run-Bs946HA6.js} +2 -2
- package/dist/ui/assets/{run-B299BzVX.js → run-C9yHyWW8.js} +1 -1
- package/dist/ui/assets/{run-C2U8vrlj.js → run-CH4X8Dfz.js} +1 -1
- package/dist/ui/assets/{run-C-SsGj7G.js → run-DVX00_wa.js} +2 -2
- package/dist/ui/assets/{run-B8XEuF9O.js → run-DYBjhBJJ.js} +1 -1
- package/dist/ui/assets/{run-D8oYYvDP.js → run-OtfZUGcj.js} +1 -1
- package/dist/ui/assets/{screencapture-run-jNQom_As.js → screencapture-run-B6e616vU.js} +1 -1
- package/dist/ui/assets/script-catalog-ByM8lrb_.js +2 -0
- package/dist/ui/assets/{session-command-memory-CIlH12-t.js → session-command-memory-DMFFn99v.js} +2 -2
- package/dist/ui/assets/{session-jsonl-CbRjD436.js → session-jsonl-CkoP0xfM.js} +1 -1
- package/dist/ui/assets/{session-jsonl-DfIHsO8b.js → session-jsonl-l6ZgVDSg.js} +1 -1
- package/dist/ui/assets/{session-search-index-Dy-PfRqQ.js → session-search-index-BSUmgKdo.js} +1 -1
- package/dist/ui/assets/{setup-feature-flags-remote-CR7KSNE7.js → setup-feature-flags-remote-BdDyXHel.js} +1 -1
- package/dist/ui/assets/{setup-model-catalog-DXEif6eM.js → setup-model-catalog-DfNMuwij.js} +1 -1
- package/dist/ui/assets/shared-Bi8EHIOr.js +4 -0
- package/dist/ui/assets/{signed-fetch-By29jUjE.js → signed-fetch-CQ2uIDVn.js} +1 -1
- package/dist/ui/assets/{silent-renew-backoff-CNtrArsp.js → silent-renew-backoff-lgGx23mg.js} +1 -1
- package/dist/ui/assets/slicc-version-C9H8f3Hv.js +1 -0
- package/dist/ui/assets/{snapshot-DGKjtXNh.js → snapshot-Cu4EX8rn.js} +1 -1
- package/dist/ui/assets/{snapshot-features-DzVoIfFL.js → snapshot-features-CrEZZ-2O.js} +1 -1
- package/dist/ui/assets/{soundscape-CnOrBnbw.js → soundscape-CPZxNMih.js} +1 -1
- package/dist/ui/assets/{speak-BloUZd1x.js → speak-B70svz4B.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-IklvIg9J.js → sprinkle-manager-8pziQBT8.js} +1 -1
- package/dist/ui/assets/{sprinkle-renderer-B66ykiYM.js → sprinkle-renderer-BOAQN3uY.js} +1 -1
- package/dist/ui/assets/{ssh-DUF6fIeK.js → ssh-DscQolch.js} +1 -1
- package/dist/ui/assets/{state--dO2CNjQ.js → state-uHiY8LS_.js} +1 -1
- package/dist/ui/assets/{store-B7Q2yFWb.js → store-CGNPgQnE.js} +1 -1
- package/dist/ui/assets/{store-B9vKhxq-.js → store-DW6wS3OD.js} +1 -1
- package/dist/ui/assets/{sudo-C7vQszbT.js → sudo-7XIo23jh.js} +1 -1
- package/dist/ui/assets/{supervisor-B8XLC5F4.js → supervisor-C3xYG4Bn.js} +1 -1
- package/dist/ui/assets/{sync-dialog-DYkdAR7f.js → sync-dialog-7PsyGY7q.js} +1 -1
- package/dist/ui/assets/{transformers-env-BoqfFDpp.js → transformers-env-CVRfNycv.js} +1 -1
- package/dist/ui/assets/{tray-leader-Be9y1qqN.js → tray-leader-BAqGiVBM.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-Dc4M6lXI.js → tray-leave-runtime-CNeE6PSE.js} +1 -1
- package/dist/ui/assets/{tray-sidecar-DQvMF1Ao.js → tray-sidecar-5ZkBkfDl.js} +1 -1
- package/dist/ui/assets/{turn-journal-1vL_oov2.js → turn-journal-C1eVrq7Y.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-DyxZBRHK.js → upgrade-detection-Bv34xSKT.js} +1 -1
- package/dist/ui/assets/{upskill-lick-skip-ByW1Kcmd.js → upskill-lick-skip-BDwrQPt0.js} +1 -1
- package/dist/ui/assets/{voice-reply-7yEUC8s_.js → voice-reply-DeLsESWh.js} +1 -1
- package/dist/ui/assets/wasm-programs-h3UCRQyB.js +1 -0
- package/dist/ui/assets/{wc-attach-Cht5GxYL.js → wc-attach-Bdjm3chp.js} +2 -2
- package/dist/ui/assets/{wc-browser-CNPt07ut.js → wc-browser-Dnww_Ca5.js} +1 -1
- package/dist/ui/assets/{wc-computers-mfAtMwPf.js → wc-computers-DQtpsimi.js} +1 -1
- package/dist/ui/assets/{wc-detached-B9yxZ-n5.js → wc-detached-DuvST6zZ.js} +1 -1
- package/dist/ui/assets/{wc-extension-CEYQ0jRT.js → wc-extension-BsKdJwbY.js} +2 -2
- package/dist/ui/assets/{wc-follower-Dig1L7XU.js → wc-follower-BJrRVyyK.js} +3 -3
- package/dist/ui/assets/{wc-follower-oauth-CoNuNT7_.js → wc-follower-oauth-CybgZQ48.js} +1 -1
- package/dist/ui/assets/{wc-gelatiere-DV7qZCcd.js → wc-gelatiere-BA5XFm2f.js} +1 -1
- package/dist/ui/assets/{wc-live-DqGa1g7s.js → wc-live-B2BtE9JR.js} +5 -5
- package/dist/ui/assets/{wc-nav-MxkWV7Eh.js → wc-nav-DJT6pnqH.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-B8k9BOPK.js → wc-onboarding-CX5J5YkZ.js} +2 -2
- package/dist/ui/assets/{wc-permissions-D0gWVZDW.js → wc-permissions-ApmoeEqE.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-CZPgqag0.js → wc-placeholder-Dwt4gRKR.js} +3 -3
- package/dist/ui/assets/{wc-secret-request-Czx6L_Ak.js → wc-secret-request-B_TAGBwI.js} +1 -1
- package/dist/ui/assets/{wc-settings-DDLOvAjU.js → wc-settings-CyB10XjG.js} +3 -3
- package/dist/ui/assets/{wc-shell-BXVz8icy.js → wc-shell-DrXhF-lo.js} +53 -9
- package/dist/ui/assets/{wc-shortcut-config-CafKSWSR.js → wc-shortcut-config--h2Ha3bK.js} +1 -1
- package/dist/ui/assets/{wc-sprinkles-DCQquR-P.js → wc-sprinkles-ChCdCWmX.js} +2 -2
- package/dist/ui/assets/{wc-transcript-export-Cws1KmDm.js → wc-transcript-export-DSXMPEI7.js} +2 -2
- package/dist/ui/assets/{wc-tray-BYuoSJJ1.js → wc-tray-D-LjL8jH.js} +4 -4
- package/dist/ui/assets/welcome-detection-BJ0L9A1b.js +1 -0
- package/dist/ui/assets/{whisper-session-wPvWHvD6.js → whisper-session-TLzKerEw.js} +2 -2
- package/dist/ui/assets/{xai-grok-BfoEWDbt.js → xai-grok-CJ-VDQl7.js} +1 -1
- package/dist/ui/assets/{xai-grok-nd89A_Xv.js → xai-grok-NkEyHfe_.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/ui/packages/webapp/index.html +3 -3
- package/package.json +1 -1
- package/dist/ui/assets/emscripten-vfs-hook-BAyewmw_.js +0 -1
- package/dist/ui/assets/process-worker-B4TKhwWE.js +0 -2
- package/dist/ui/assets/provider-store-access-B8DU_2PF.js +0 -1
- package/dist/ui/assets/provider-store-access-DcvCWnpM.js +0 -1
- package/dist/ui/assets/run-DZ0a3If_.js +0 -3
- package/dist/ui/assets/script-catalog-DZtOMxvi.js +0 -2
- package/dist/ui/assets/shared-2XhBobrM.js +0 -4
- package/dist/ui/assets/slicc-version-DiHRD5WU.js +0 -1
- package/dist/ui/assets/welcome-detection-CdpDLz5b.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-
|
|
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{A as u,h as d}from"./account-store-Cx-zMFBD.js";import{n as f}from"./runtime-env-Dlaokqg1.js";import{n as p}from"./image-markers-q8JQTtid.js";import{d as m,f as h,i as g,m as _,u as v}from"./telemetry-CKoAhRMv.js";import{t as y}from"./types-D8gIX-W-.js";import{t as b}from"./same-file-identity-DuEcSmPX.js";import{a as x,n as S,r as C,t as w}from"./icons-dEBJiC8z.js";function ee(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}, ${ee(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/quick-llm-FkwEdyGU.js","assets/compat-qQM4gjF_.js","assets/models-BSkXF4T6.js","assets/diagnostics-DN_idNHx.js","assets/provider-env-CTOcDKrQ.js","assets/__vite-browser-external-5eBdwsFd.js","assets/openrouter.models-B-zmcypy.js","assets/logger-DDBAeTLF.js","assets/account-store-BxJt4yS8.js","assets/core-DEHCydPY.js","assets/libesm-BypnjKEL.js","assets/feature-flags-DvsApnS-.js","assets/proxied-fetch-DiXk_XGs.js","assets/base64-ELzoYfwP.js","assets/fetch-body-1l9I58Vk.js","assets/api-endpoint-DuEQRZ4g.js","assets/runtime-env-Dlaokqg1.js","assets/secret-topology-CZv6A9HW.js","assets/float-topology-B0_dG7En.js","assets/secrets-bridge-client-B_CG-HIg.js","assets/port-bridge-client-BiWcfZSc.js","assets/image-markers-q8JQTtid.js","assets/tool-ui-eSQ1g2I1.js","assets/providers-CClQxLrp.js","assets/panel-rpc-D3EPRnmw.js","assets/bedrock-camp-compat-Bz7u6y4g.js","assets/bedrock-camp-extra-models-IBZyfEdZ.js","assets/claude-model-version-DZmbk9E2.js","assets/llm-session-id-bZQs6gBN.js","assets/icons-dEBJiC8z.js","assets/isomorphic-git-C3lNgE6Y.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{A as u,h as d}from"./account-store-BxJt4yS8.js";import{n as f}from"./runtime-env-Dlaokqg1.js";import{n as p}from"./image-markers-q8JQTtid.js";import{d as m,f as h,i as g,m as _,u as v}from"./telemetry-CKoAhRMv.js";import{t as y}from"./types-D8gIX-W-.js";import{t as b}from"./same-file-identity-DuEcSmPX.js";import{a as x,n as S,r as C,t as w}from"./icons-dEBJiC8z.js";function ee(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}, ${ee(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=oe(r,e,s);n[o]=t.value,e=t.lastIndex}else if(t.scalarKeys.has(o)&&s.trim())n[o]=E(s);else throw Error(`Unsupported or empty frontmatter field: ${o}`)}return n}function oe(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?T(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(E(se(t[1]))),i=n}return{value:r,lastIndex:i}}function T(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(E(e.slice(n,i))),n=i+1)}if(r)throw Error(`Unclosed quoted value`);return t.push(E(e.slice(n))),t}function se(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 E(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 D=`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:()=>D,GELATIERE_INSTRUCTIONS_PATH:()=>ve,GELATIERE_NIGHTLY_CRON_NAME:()=>pe,GELATIERE_OWNER_JID:()=>me,GELATIERE_SKILL_PATH:()=>k,GELATIERE_SPRINKLE_NAME:()=>fe,GELATIERE_STATE_PATH:()=>O,GELATIERE_SUGGESTIONS_ACTION:()=>xe,GELATIERE_SUGGESTIONS_PATH:()=>be,LICK_SUGGESTION_LIMIT:()=>5,MAX_STORED_SUGGESTIONS:()=>40,MAX_SUGGESTIONS_PER_PASS:()=>10,buildGelatiereLickBody:()=>lt,coerceSuggestions:()=>it,describeGelatiereLick:()=>M,dismissGelatiereSuggestion:()=>Ke,isGelatiereUnit:()=>he,isNewSince:()=>We,isPassDue:()=>ze,loadGelatiereConfig:()=>A,mergeSuggestions:()=>at,openSuggestions:()=>Ve,parseGelatiereDocument:()=>ke,readGelatiereState:()=>Le,readGelatiereSuggestions:()=>Pe,recordGelatiereTrigger:()=>Be,recordPass:()=>ct,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`,O=`${ye}/state.json`,xe=`gelatiere-suggestions`,k=`/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:je(n.intervalHours,`intervalHours`,24),nightly:r.trim(),maxSuggestions:Math.min(10,je(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 je(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 A(e){try{return ke(await Me(e,ve))}catch(e){return _e.warn(`Could not load valid GELATIERE.md; using built-in default`,{error:ut(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 y&&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=rt(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,O);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(O,`${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 j(e,t){if(typeof e!=`string`)return;let n=e.trim();return n?n.slice(0,t):void 0}function Qe(e){if(e)try{let t=new URL(e).protocol;return t===`http:`||t===`https:`?e:void 0}catch{return}}var $e=/^[A-Za-z0-9@._/:=-]+$/;function et(e){if(!e)return;let t=e.split(/\s+/);if(!(t[0]!==`upskill`||t.length<2))return t.slice(1).every(e=>$e.test(e))?e:void 0}var tt=/^[a-z0-9][a-z0-9_-]*$/i;function nt(e){let t=(typeof e==`string`?[e]:Array.isArray(e)?e:[]).map(e=>j(e,80)).filter(e=>e!==void 0&&tt.test(e)),n=[...new Set(t)].slice(0,Ce);return n.length>0?n:void 0}function rt(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=typeof n.kind==`string`?n.kind:``,i=j(n.title,200),a=j(n.body,1e3);if(!De.has(r)||!i||!a)return null;let o=Ze(j(n.id,80)??`${r}-${i}`)||Ze(`${r}-${i}`);if(!o)return null;let s=t??j(n.createdAt,40)??``,c=n.skill===void 0?void 0:j(n.skill,120),l=n.install===void 0?void 0:et(j(n.install,300)),u=n.prompt===void 0?void 0:j(n.prompt,1e3);if(r===`skill`&&(!c||!l)||Oe.has(r)&&!u)return null;let d=nt(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:Qe(j(n.url,500))},...n.evidence===void 0?{}:{evidence:j(n.evidence,500)},...d?{cones:d}:{},createdAt:s}}function it(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=rt(e,t);if(!(!r||i.has(r.id))&&(i.add(r.id),a.push(r),a.length>=n))break}return a}function at(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=>ot(e,r.get(e.id)))];for(;o.length>n;){let e=st(o,e=>!!e.dismissedAt),t=e>=0?e:st(o,e=>!!e.takenAt);o.splice(t>=0?t:o.length-1,1)}return{merged:o,added:a}}function ot(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 st(e,t){for(let n=e.length-1;n>=0;--n)if(t(e[n]))return n;return-1}async function ct(e,t,n=new Date){let r=await A(e),i=it(t,n.toISOString(),r.maxSuggestions),{merged:a,added:o}=at(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 lt(e,t){return{action:xe,data:{added:e.length,open:t.length,suggestions:t.slice(0,5),path:be,skill:k}}}function ut(e){return e instanceof Error?e.message:String(e)}function M(e){let t=dt(e);if(!t)return null;let{action:n,bag:r}=t;return n===`gelatiere-suggestions`?N(n,r):n===`session-settled`?ft(n,r):n===`run`?pt(n,r):{action:n,headline:`gelatiere: ${n}`,titles:[]}}function dt(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 N(e,t){let n=P(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 P(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 ft(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 pt(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 mt=new Set([`webhook`,`cron`,`sprinkle`,`fswatch`,`session-reload`,`navigate`,`discovery`,`upgrade`,`workflow`,`bash`,`jshd`,`preview`,`scoop-notify`,`scoop-idle`,`scoop-wait`,`sudo-request`]);function ht(e){return e!=null&&mt.has(e)}var gt=new Set([`send_message`,`list_scoops`,`list_tasks`,`sudo_request`,`list_sudo_requests`,`lick_confirm`,`lick_dismiss`]),_t=65536;function vt(e,t=_t){return e.length<=t?e:`${e.slice(0,t)}\n… [tool output truncated for the chat transcript: showing ${F(t)} of ${F(e.length)} — the agent received the full output]`}var yt=4;function bt(e,t=_t,n=yt){if(typeof e==`string`)return vt(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=bt(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=bt(a,t,n-1);o!==a&&(r??={...e},r[i]=o)}return r??e}function F(e){return e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.round(e/1024)} KB`}var xt=e({agentMessagesToChatMessages:()=>St,lickChannelFromBody:()=>Lt,lickChannelFromSenderName:()=>It,lickIdFromBody:()=>Rt,splitEnvelopes:()=>Ft,unwrapMessageEnvelope:()=>Pt});function St(e,t={}){let{source:n=`cone`,idSeed:r=Nt,hiddenToolNames:i=gt,uncapped:a=!1}=t,o=[],s=null,c=new Set;for(let t of e)Et(t)?(o.push(...Ct(t,r)),s=null):Dt(t)?(s=wt(t,n,r,i,c,a),o.push(s)):Ot(t)&&Tt(t,s,c,a);return o}function Ct(e,t){let n=kt(e.content);if(n.length===0)return[];let r=[];for(let i of Ft(n)){if(i.body.length===0&&i.sender==null)continue;let n=(i.sender?It(i.sender):null)??Lt(i.body),a=n?Rt(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 wt(e,t,n,r,i,a=!1){let o=[];for(let t of Mt(e,a))r.has(t.name)?i.add(t.id):o.push(t);let s={id:n(),role:`assistant`,content:kt(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 Tt(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=kt(e.content);i.result=r?a:vt(a),i.isError=e.isError}function Et(e){return e.role===`user`}function Dt(e){return e.role===`assistant`}function Ot(e){return e.role===`toolResult`}function kt(e){if(typeof e==`string`)return e;if(!Array.isArray(e))return``;let t=[];for(let n of e)At(n)&&t.push(n.text);return t.join(``)}function At(e){return e.type===`text`}function jt(e){return e.type===`toolCall`}function Mt(e,t=!1){if(!Array.isArray(e.content))return[];let n=[];for(let r of e.content)jt(r)&&n.push({id:r.id,name:r.name,input:t?r.arguments:bt(r.arguments)});return n}function Nt(){return Date.now().toString(36)+Math.random().toString(36).slice(2,8)}function Pt(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 mt){let t=`${e}:`;if(!n.startsWith(t))continue;let r=n.indexOf(`
|
|
@@ -1470,13 +1470,20 @@ a:focus-visible{outline:2px solid var(--ctx,currentColor);outline-offset:-2px;}
|
|
|
1470
1470
|
@keyframes shimmer{from{background-position:100% 0}to{background-position:-100% 0}}
|
|
1471
1471
|
@media (prefers-reduced-motion: reduce){.skeleton{animation:none;}}
|
|
1472
1472
|
.empty{font-size:12px;color:color-mix(in srgb,var(--ink) 60%,transparent);}
|
|
1473
|
-
`);function Ra(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?t.href:null}catch{return null}}function za(e){return Ra(e)!==null||/^data:image\//i.test(e)}function Ba(e){try{return new URL(e).host}catch{return e}}var Va=class extends HTMLElement{static observedAttributes=[`url`,`state`,`heading`,`description`,`image`,`site`,`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[La]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get url(){return this.getAttribute(`url`)??``}set url(e){this.setAttribute(`url`,e)}get state(){let e=this.getAttribute(`state`);return e&&Ia.has(e)?e:`ready`}set state(e){this.setAttribute(`state`,e)}#t(e){return this.getAttribute(e)?.trim()??``}#n(){let e=this.url,t=Ra(e),n=this.#t(`site`)||Ba(e),r=this.#t(`badge`),i=L(`div`,{class:`site`,part:`site`},S(`globe`,{size:12}),L(`span`,null,n),r?L(`span`,{class:`badge`,part:`badge`},r):null),a;if(this.state===`loading`)a=L(`div`,{"aria-busy":`true`},L(`span`,{class:`skeleton media`}),L(`div`,{class:`body`},i,L(`span`,{class:`skeleton w80`}),L(`span`,{class:`skeleton w55`})));else if(this.state===`error`)a=L(`div`,{class:`body`},i,L(`div`,{class:`title`,part:`title`},this.#t(`heading`)||e),L(`div`,{class:`empty`},`No preview available`));else{let t=this.#t(`image`),n=this.#t(`description`);a=L(`div`,null,t&&za(t)?this.#r(t):null,L(`div`,{class:`body`},i,L(`div`,{class:`title`,part:`title`},this.#t(`heading`)||e),n?L(`div`,{class:`desc`,part:`description`},n):null))}if(t){let e=L(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,part:`link`});e.append(a),this.#e.replaceChildren(e)}else this.#e.replaceChildren(a)}#r(e){let t=L(`img`,{class:`media`,part:`image`,alt:``,src:e,loading:`lazy`,decoding:`async`,referrerpolicy:`no-referrer`}),n=()=>{this.dispatchEvent(new CustomEvent(`link-preview-resize`,{bubbles:!0,composed:!0}))};return t.addEventListener(`load`,n,{once:!0}),t.addEventListener(`error`,()=>{t.remove(),n()},{once:!0}),t}};I(`slicc-link-preview`,Va);var Ha=new Set([`yes-no`,`text`,`number`,`datetime`,`date`,`email`]),Ua=new Set([`open`,`answered`,`inert`]),Wa={text:`text`,number:`number`,datetime:`datetime-local`,date:`date`,email:`email`};function Ga(e){if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/.test(e))return e;let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=-t.getTimezoneOffset(),r=n<0?`-`:`+`,i=Math.abs(n);return`${e}${r}${String(Math.floor(i/60)).padStart(2,`0`)}:${String(i%60).padStart(2,`0`)}`}var Ka=R(`
|
|
1473
|
+
`);function Ra(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?t.href:null}catch{return null}}function za(e){return Ra(e)!==null||/^data:image\//i.test(e)}function Ba(e){try{return new URL(e).host}catch{return e}}var Va=class extends HTMLElement{static observedAttributes=[`url`,`state`,`heading`,`description`,`image`,`site`,`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[La]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get url(){return this.getAttribute(`url`)??``}set url(e){this.setAttribute(`url`,e)}get state(){let e=this.getAttribute(`state`);return e&&Ia.has(e)?e:`ready`}set state(e){this.setAttribute(`state`,e)}#t(e){return this.getAttribute(e)?.trim()??``}#n(){let e=this.url,t=Ra(e),n=this.#t(`site`)||Ba(e),r=this.#t(`badge`),i=L(`div`,{class:`site`,part:`site`},S(`globe`,{size:12}),L(`span`,null,n),r?L(`span`,{class:`badge`,part:`badge`},r):null),a;if(this.state===`loading`)a=L(`div`,{"aria-busy":`true`},L(`span`,{class:`skeleton media`}),L(`div`,{class:`body`},i,L(`span`,{class:`skeleton w80`}),L(`span`,{class:`skeleton w55`})));else if(this.state===`error`)a=L(`div`,{class:`body`},i,L(`div`,{class:`title`,part:`title`},this.#t(`heading`)||e),L(`div`,{class:`empty`},`No preview available`));else{let t=this.#t(`image`),n=this.#t(`description`);a=L(`div`,null,t&&za(t)?this.#r(t):null,L(`div`,{class:`body`},i,L(`div`,{class:`title`,part:`title`},this.#t(`heading`)||e),n?L(`div`,{class:`desc`,part:`description`},n):null))}if(t){let e=L(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,part:`link`});e.append(a),this.#e.replaceChildren(e)}else this.#e.replaceChildren(a)}#r(e){let t=L(`img`,{class:`media`,part:`image`,alt:``,src:e,loading:`lazy`,decoding:`async`,referrerpolicy:`no-referrer`}),n=()=>{this.dispatchEvent(new CustomEvent(`link-preview-resize`,{bubbles:!0,composed:!0}))};return t.addEventListener(`load`,n,{once:!0}),t.addEventListener(`error`,()=>{t.remove(),n()},{once:!0}),t}};I(`slicc-link-preview`,Va);var Ha=new Set([`yes-no`,`choice`,`text`,`number`,`datetime`,`date`,`email`]),Ua=new Set([`open`,`answered`,`inert`]),Wa={text:`text`,number:`number`,datetime:`datetime-local`,date:`date`,email:`email`};function Ga(e){if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/.test(e))return e;let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=-t.getTimezoneOffset(),r=n<0?`-`:`+`,i=Math.abs(n);return`${e}${r}${String(Math.floor(i/60)).padStart(2,`0`)}:${String(i%60).padStart(2,`0`)}`}var Ka=R(`
|
|
1474
1474
|
:host{display:block;width:300px;max-width:100%;color:var(--ink);}
|
|
1475
1475
|
:host([hidden]){display:none;}
|
|
1476
|
+
:host([inline]){width:100%;margin:4px 0 10px;}
|
|
1477
|
+
:host([composer]){width:100%;max-width:none;}
|
|
1476
1478
|
.wrap{display:flex;flex-direction:column;gap:10px;padding:12px;}
|
|
1479
|
+
:host([inline]) .wrap{padding:0;gap:6px;}
|
|
1480
|
+
:host([composer]) .wrap{padding:0;gap:8px;}
|
|
1481
|
+
:host([inline]) .q{display:none;}
|
|
1477
1482
|
.q{display:flex;gap:8px;align-items:flex-start;font-size:13px;line-height:1.35;font-weight:550;}
|
|
1478
1483
|
.q svg{flex:0 0 auto;margin-top:2px;color:var(--ctx,currentColor);}
|
|
1479
|
-
.
|
|
1484
|
+
:host([composer]) .q{font-size:12.5px;}
|
|
1485
|
+
:host([composer]) .q svg{display:none;}
|
|
1486
|
+
.row{display:flex;gap:6px;flex-wrap:wrap;}
|
|
1480
1487
|
button{
|
|
1481
1488
|
-webkit-appearance:none;appearance:none;
|
|
1482
1489
|
display:inline-flex;align-items:center;justify-content:center;gap:5px;
|
|
@@ -1489,6 +1496,27 @@ button:hover:not(:disabled){background:color-mix(in srgb,var(--ink) 12%,transpar
|
|
|
1489
1496
|
button:focus-visible,input:focus-visible{outline:2px solid var(--ctx,currentColor);outline-offset:1px;}
|
|
1490
1497
|
button.primary{color:var(--canvas,#fff);background:var(--ctx,var(--ink));border-color:transparent;}
|
|
1491
1498
|
button.primary:hover:not(:disabled){filter:brightness(1.08);background:var(--ctx,var(--ink));}
|
|
1499
|
+
.choices{display:flex;flex-wrap:wrap;gap:6px;}
|
|
1500
|
+
.choices button{flex:0 1 auto;min-height:34px;text-align:left;}
|
|
1501
|
+
.choices button.recommended{border-color:var(--ctx,var(--ink));}
|
|
1502
|
+
.choices small{font-size:10px;font-weight:500;opacity:.7;}
|
|
1503
|
+
:host([inline]) button{flex:0 1 auto;min-height:30px;padding:0 10px;border-radius:7px;font-weight:550;background:color-mix(in srgb,var(--canvas) 78%,transparent);}
|
|
1504
|
+
:host([inline]) button.primary{color:var(--ink);background:color-mix(in srgb,var(--ctx) 12%,var(--canvas));border-color:color-mix(in srgb,var(--ctx) 35%,transparent);}
|
|
1505
|
+
:host([inline]) button:hover:not(:disabled){background:color-mix(in srgb,var(--ink) 9%,var(--canvas));}
|
|
1506
|
+
:host([inline]) button.primary:hover:not(:disabled){background:color-mix(in srgb,var(--ctx) 18%,var(--canvas));filter:none;}
|
|
1507
|
+
:host([inline]) .choices button{min-height:30px;}
|
|
1508
|
+
:host([inline]) .choices button.recommended{border-color:color-mix(in srgb,var(--ctx) 45%,transparent);}
|
|
1509
|
+
:host([inline]) .choices small{opacity:.58;}
|
|
1510
|
+
:host([composer]) button{flex:0 1 auto;min-height:30px;padding:0 10px;border-radius:7px;font-weight:550;background:color-mix(in srgb,var(--ink) 5%,transparent);}
|
|
1511
|
+
:host([composer]) button.primary{color:var(--ink);background:color-mix(in srgb,var(--ctx) 12%,var(--canvas));border-color:color-mix(in srgb,var(--ctx) 35%,transparent);}
|
|
1512
|
+
:host([composer]) button:hover:not(:disabled){background:color-mix(in srgb,var(--ink) 9%,var(--canvas));}
|
|
1513
|
+
:host([composer]) button.primary:hover:not(:disabled){background:color-mix(in srgb,var(--ctx) 18%,var(--canvas));filter:none;}
|
|
1514
|
+
:host([composer]) .choices button{min-height:30px;}
|
|
1515
|
+
:host([composer]) .choices button.recommended{border-color:color-mix(in srgb,var(--ctx) 45%,transparent);}
|
|
1516
|
+
:host([composer]) .choices small{opacity:.58;}
|
|
1517
|
+
.multi{display:flex;flex-direction:column;gap:8px;align-items:flex-start;}
|
|
1518
|
+
.multi label{display:flex;gap:6px;align-items:center;font-size:12.5px;}
|
|
1519
|
+
.multi button{flex:none;}
|
|
1492
1520
|
button.send{flex:0 0 auto;padding:0 10px;}
|
|
1493
1521
|
button:disabled,input:disabled{opacity:.5;cursor:default;}
|
|
1494
1522
|
input{
|
|
@@ -1501,7 +1529,7 @@ input{
|
|
|
1501
1529
|
.answered{display:flex;align-items:center;gap:6px;font-size:12.5px;}
|
|
1502
1530
|
.answered svg{color:var(--ctx,currentColor);}
|
|
1503
1531
|
.answered b{font-weight:650;}
|
|
1504
|
-
`),qa=class extends HTMLElement{static observedAttributes=[`question`,`kind`,`state`,`answer`,`note`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ka]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get question(){return this.getAttribute(`question`)??``}set question(e){this.setAttribute(`question`,e)}get kind(){let e=this.getAttribute(`kind`);return e&&Ha.has(e)?e:`yes-no`}set kind(e){this.setAttribute(`kind`,e)}get state(){let e=this.getAttribute(`state`);return e&&Ua.has(e)?e:`open`}set state(e){this.setAttribute(`state`,e)}get answer(){return this.getAttribute(`answer`)??``}set answer(e){this.setAttribute(`answer`,e)}focus(e){let t=this.#e.querySelector(`input,button:not(:disabled)`);t?t.focus(e):super.focus(e)}#t(e){let t=e.trim();if(!t||this.state!==`open`)return;let n=this.kind===`datetime`?Ga(t):t,r={question:this.question,kind:this.kind,answer:n};this.dispatchEvent(new CustomEvent(`question-answer`,{detail:r,bubbles:!0,composed:!0}))}#n(){let e=this.state,t=L(`div`,{class:`q`,part:`question`},S(`message-circle-question`,{size:14}),L(`span`,null,this.question)),n;n=e===`answered`?L(`div`,{class:`answered`,part:`answered`},S(`circle-check`,{size:14}),L(`span`,null,`You answered `),L(`b`,null,this.answer)):this.kind===`yes-no`?this.#r(e):this.#
|
|
1532
|
+
`),qa=class extends HTMLElement{static observedAttributes=[`question`,`kind`,`state`,`answer`,`note`,`data-question-options`,`data-question-default`,`data-question-multi`,`inline`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ka]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get question(){return this.getAttribute(`question`)??``}set question(e){this.setAttribute(`question`,e)}get kind(){let e=this.getAttribute(`kind`);return e&&Ha.has(e)?e:`yes-no`}set kind(e){this.setAttribute(`kind`,e)}get state(){let e=this.getAttribute(`state`);return e&&Ua.has(e)?e:`open`}set state(e){this.setAttribute(`state`,e)}get answer(){return this.getAttribute(`answer`)??``}set answer(e){this.setAttribute(`answer`,e)}get options(){try{let e=JSON.parse(this.getAttribute(`data-question-options`)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}focus(e){let t=this.#e.querySelector(`input,button:not(:disabled)`);t?t.focus(e):super.focus(e)}#t(e){let t=e.trim();if(!t||this.state!==`open`)return;let n=this.kind===`datetime`?Ga(t):t,r={question:this.question,kind:this.kind,answer:n};this.dispatchEvent(new CustomEvent(`question-answer`,{detail:r,bubbles:!0,composed:!0}))}#n(){let e=this.state,t=L(`div`,{class:`q`,part:`question`},S(`message-circle-question`,{size:14}),L(`span`,null,this.question)),n;n=e===`answered`?L(`div`,{class:`answered`,part:`answered`},S(`circle-check`,{size:14}),L(`span`,null,`You answered `),L(`b`,null,this.answer)):this.kind===`choice`&&this.options.length>=2?this.#i(e):this.kind===`yes-no`?this.#r(e):this.#a(e);let r=this.getAttribute(`note`);this.#e.replaceChildren(L(`div`,{class:`wrap`,role:`group`,"aria-label":this.question},t,n,e===`inert`&&r?L(`div`,{class:`note`,part:`note`},r):null))}#r(e){let t=e!==`open`,n=(e,n,r)=>{let i=L(`button`,{class:r?`primary`:``,part:`answer-${e.toLowerCase()}`},S(n,{size:13}),e);return i.type=`button`,i.disabled=t,i.addEventListener(`click`,()=>this.#t(e.toLowerCase())),i};return L(`div`,{class:`row`},n(`Yes`,`check`,!0),n(`No`,`x`,!1))}#i(e){let t=this.options,n=this.getAttribute(`data-question-default`),r=n===null?-1:Number(n);if(this.hasAttribute(`data-question-multi`)){let n=t.map((t,n)=>{let i=L(`input`,{type:`checkbox`,value:t});return i.disabled=e!==`open`,L(`label`,null,i,L(`span`,null,t),n===r?L(`small`,null,`Recommended`):null)}),i=L(`button`,{class:`primary`},`Send choices`);i.type=`submit`,i.disabled=e!==`open`;let a=L(`form`,{class:`multi`},...n,i);return a.addEventListener(`submit`,e=>{e.preventDefault();let t=Array.from(a.querySelectorAll(`input:checked`),e=>e.value);this.#t(t.join(`, `))}),a}return L(`div`,{class:`choices`,part:`choices`},...t.map((t,n)=>{let i=L(`button`,{class:n===r?`recommended`:``,part:`choice`},L(`span`,null,t),n===r?L(`small`,null,`Recommended`):null);return i.type=`button`,i.disabled=e!==`open`,i.addEventListener(`click`,()=>this.#t(t)),i}))}#a(e){let t=this.kind,n=e!==`open`,r=L(`input`,{type:Wa[t]??`text`,part:`input`,"aria-label":this.question||`Answer`,placeholder:t===`text`?`Type an answer…`:null});r.disabled=n;let i=L(`button`,{class:`primary send`,part:`send`,"aria-label":`Send answer`},S(`arrow-up`,{size:14}));i.type=`submit`,i.disabled=n;let a=L(`form`,{class:`row`},r,i);return a.addEventListener(`submit`,e=>{e.preventDefault(),this.#t(r.value)}),a}};I(`slicc-question-prompt`,qa);var Ja=864e5;function Ya(e,t){let n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}).formatToParts(new Date(e)),r=e=>Number(n.find(t=>t.type===e)?.value??0);return{year:r(`year`),month:r(`month`),day:r(`day`),minutes:r(`hour`)%24*60+r(`minute`)}}function Xa(e,t){let{year:n,month:r,day:i}=Ya(e,t);return`${n}-${String(r).padStart(2,`0`)}-${String(i).padStart(2,`0`)}`}var Za=/^\d{4}-\d{2}-\d{2}$/;function Qa(e,t){if(Za.test(e.start))return e.start;let n=Date.parse(e.start);return Number.isNaN(n)?null:Xa(n,t)}function $a(e,t){return new Intl.DateTimeFormat(t.locale,{weekday:`short`,month:`short`,day:`numeric`,timeZone:`UTC`}).format(new Date(eo(e)))}function eo(e){let[t,n,r]=e.split(`-`).map(Number);return Date.UTC(t??1970,(n??1)-1,r??1)}function to(e,t){return new Date(eo(e)+t*Ja).toISOString().slice(0,10)}function no(e){return(new Date(eo(e)).getUTCDay()+6)%7}function ro(e,t,n){let r=e-t,i=Math.abs(r),a=new Intl.RelativeTimeFormat(n,{numeric:`auto`}),o=[[`year`,365*Ja],[`month`,30*Ja],[`week`,7*Ja],[`day`,Ja],[`hour`,36e5],[`minute`,6e4]];for(let[e,t]of o)if(i>=(e===`week`||e===`month`?2*t:t))return a.format(Math.round(r/t),e);return a.format(0,`second`)}function io(e){let t=Math.round(e/6e4);if(t<60)return`${t} min`;if(t<2880){let e=Math.floor(t/60),n=t%60;return n?`${e} h ${n} min`:`${e} h`}return`${Math.round(t/1440)} days`}var ao={MO:`Mon`,TU:`Tue`,WE:`Wed`,TH:`Thu`,FR:`Fri`,SA:`Sat`,SU:`Sun`},oo={1:`first`,2:`second`,3:`third`,4:`fourth`,"-1":`last`,"-2":`second-to-last`};function so(e){let t=e.map(e=>e.replace(/^[+-]?\d+/,``)),n=new Set(t);return n.size===5&&[`MO`,`TU`,`WE`,`TH`,`FR`].every(e=>n.has(e))?`weekdays`:n.size===2&&n.has(`SA`)&&n.has(`SU`)?`weekends`:e.map(e=>{let t=/^([+-]?\d+)?([A-Z]{2})$/.exec(e);if(!t)return e;let n=ao[t[2]??``]??t[2],r=t[1]?oo[t[1].replace(`+`,``)]:void 0;return r?`the ${r} ${n}`:n}).join(`, `)}function co(e){let t=e.split(/\r?\n/).find(e=>e.startsWith(`RRULE:`));if(!t)return`Repeats`;let n=new Map;for(let e of t.slice(6).split(`;`)){let[t,r]=e.split(`=`);t&&r&&n.set(t,r)}let r=n.get(`FREQ`),i=Number(n.get(`INTERVAL`)??`1`)||1,a=n.get(`BYDAY`)?.split(`,`)??[],o=n.get(`BYMONTHDAY`),s=r?{HOURLY:[`Hourly`,`hours`],DAILY:[`Daily`,`days`],WEEKLY:[`Weekly`,`weeks`],MONTHLY:[`Monthly`,`months`],YEARLY:[`Yearly`,`years`]}[r]:void 0;if(!s)return`Repeats`;let c=a.length?so(a):``;if(r===`WEEKLY`&&i===1&&(c===`weekdays`||c===`weekends`))return`Every ${c.slice(0,-1)}`;let l=i===1?s[0]:`Every ${i} ${s[1]}`;return c?`${l} on ${c}`:o?`${l} on day ${o}`:l}function lo(e){let t=Date.parse(e.reference),n=Number.isNaN(t)?``:Xa(t,e.timeZone),r=(e.occurrences[0]?Qa(e.occurrences[0],e.timeZone):null)??(n||Xa(Date.now(),e.timeZone)),i=to(r,-no(r)),a=new Set(e.occurrences.map(t=>Qa(t,e.timeZone)).filter(e=>e!==null)),o=new Intl.DateTimeFormat(e.locale,{weekday:`narrow`,timeZone:`UTC`});return Array.from({length:7},(e,t)=>{let r=to(i,t);return{key:r,weekday:o.format(new Date(eo(r))),day:Number(r.slice(8,10)),marked:a.has(r),today:r===n}})}function uo(e,t){if(e.allDay)return null;let n=Date.parse(e.start);if(Number.isNaN(n))return null;let r=Ya(n,t.timeZone),i=Xa(n,t.timeZone),a=r.minutes/1440,o=a,s=e.end?Date.parse(e.end):NaN;!Number.isNaN(s)&&s>n?o=Xa(s,t.timeZone)===i?Ya(s,t.timeZone).minutes/1440:1:e.open===`end`&&(o=1);let c={from:a,to:o},l=Date.parse(t.reference);return!Number.isNaN(l)&&Xa(l,t.timeZone)===i&&(c.now=Ya(l,t.timeZone).minutes/1440),c}function fo(e,t){return new Intl.DateTimeFormat(t.locale,{weekday:`short`,month:`short`,day:`numeric`,timeZone:t.timeZone}).format(new Date(e))}function po(e,t){return new Intl.DateTimeFormat(t.locale,{hour:`numeric`,minute:`2-digit`,timeZone:t.timeZone}).format(new Date(e))}function mo(e,t){if(e.allDay)return`All day`;let n=Date.parse(e.start);if(Number.isNaN(n))return e.start;let r=po(n,t);if(e.open===`end`)return`after ${r}`;if(e.open===`start`)return`before ${r}`;let i=e.end?Date.parse(e.end):NaN;return Number.isNaN(i)?r:`${r} – ${Xa(n,t.timeZone)===Xa(i,t.timeZone)?po(i,t):`${fo(i,t)} ${po(i,t)}`}`}var ho=R(`
|
|
1505
1533
|
:host{display:block;width:300px;max-width:100%;color:var(--ink);}
|
|
1506
1534
|
:host([hidden]){display:none;}
|
|
1507
1535
|
.wrap{display:flex;flex-direction:column;gap:10px;padding:12px;}
|
|
@@ -1720,6 +1748,11 @@ slicc-composer[keys] > .slicc-composer__inner > * {
|
|
|
1720
1748
|
opacity: 0.55;
|
|
1721
1749
|
transition: opacity 160ms ease;
|
|
1722
1750
|
}
|
|
1751
|
+
/* An answerable question remains legible while the rest of the typing surface
|
|
1752
|
+
recedes in keyboard mode. The controls still accept pointer and key focus. */
|
|
1753
|
+
slicc-composer[keys] > .slicc-composer__inner > slicc-input-card[has-question] {
|
|
1754
|
+
opacity: 1;
|
|
1755
|
+
}
|
|
1723
1756
|
@media (prefers-reduced-motion: reduce) {
|
|
1724
1757
|
slicc-composer[keys] > .slicc-composer__inner > * {
|
|
1725
1758
|
transition: none;
|
|
@@ -2545,6 +2578,16 @@ slicc-input-card .ta {
|
|
|
2545
2578
|
max-height: 140px;
|
|
2546
2579
|
overflow-y: hidden;
|
|
2547
2580
|
}
|
|
2581
|
+
slicc-input-card .slicc-input-card__question {
|
|
2582
|
+
display: flex;
|
|
2583
|
+
flex-direction: column;
|
|
2584
|
+
gap: 12px;
|
|
2585
|
+
border-bottom: 1px solid var(--line);
|
|
2586
|
+
padding-bottom: 11px;
|
|
2587
|
+
}
|
|
2588
|
+
slicc-input-card .slicc-input-card__question[hidden] {
|
|
2589
|
+
display: none;
|
|
2590
|
+
}
|
|
2548
2591
|
slicc-input-card .ta::placeholder {
|
|
2549
2592
|
color: var(--txt-3);
|
|
2550
2593
|
/* Long (LLM-suggested) placeholders ellipsize instead of clipping when
|
|
@@ -2564,7 +2607,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2564
2607
|
flex: 1;
|
|
2565
2608
|
min-width: 0;
|
|
2566
2609
|
}
|
|
2567
|
-
`,Ds=`slicc-input-card-style`;function Os(e){if(e.getElementById(Ds))return;let t=e.createElement(`style`);t.id=Ds,t.textContent=Es,(e.head??e.documentElement).appendChild(t)}var ks=`Ask sliccy, or describe a change…`;function As(e){let t=e.activeElement;return!t||t===e.body||t===e.documentElement}var js=class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r=!1;#
|
|
2610
|
+
`,Ds=`slicc-input-card-style`;function Os(e){if(e.getElementById(Ds))return;let t=e.createElement(`style`);t.id=Ds,t.textContent=Es,(e.head??e.documentElement).appendChild(t)}var ks=`Ask sliccy, or describe a change…`;function As(e){let t=e.activeElement;return!t||t===e.body||t===e.documentElement}var js=class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r;#i=!1;#a=null;connectedCallback(){Os(this.ownerDocument),this.#o(),this.#s(),this.#p()}attributeChangedCallback(e,t,n){!this.#i||t===n||(this.#s(),e===`value`&&this.#p())}get value(){return this.#i?this.#n.value:this.getAttribute(`value`)??``}set value(e){let t=e??``;this.#i&&(this.#n.value=t,this.#p()),t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t)}get placeholder(){return this.getAttribute(`placeholder`)??ks}set placeholder(e){e==null?this.removeAttribute(`placeholder`):this.setAttribute(`placeholder`,e)}get suggestion(){return this.getAttribute(`suggestion`)}set suggestion(e){e==null||e===``?this.removeAttribute(`suggestion`):this.setAttribute(`suggestion`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}focus(e){this.#o(),this.#n.focus(e)}clear(){this.value=``}setQuestionContent(e){this.#o();let t=e===null?[]:Array.isArray(e)?e:[e];this.#t.replaceChildren(...t),this.#t.hidden=t.length===0,this.toggleAttribute(`has-question`,t.length>0)}#o(){if(this.#i)return;this.#i=!0;let e=this.ownerDocument,t=Array.from(this.children).filter(e=>e.getAttribute(`slot`)===`toolbar`);if(this.replaceChildren(),this.#e=e.createElement(`div`),this.#e.className=`slicc-input-card__card`,this.#e.setAttribute(`part`,`card`),this.#t=e.createElement(`div`),this.#t.className=`slicc-input-card__question`,this.#t.setAttribute(`part`,`question`),this.#t.hidden=!0,this.#n=e.createElement(`textarea`),this.#n.className=`ta`,this.#n.setAttribute(`part`,`textarea`),this.#n.rows=1,this.#r=e.createElement(`div`),this.#r.className=`toolbar`,this.#r.setAttribute(`part`,`toolbar`),t.length>0)for(let e of t)this.#r.appendChild(e);else this.#r.append(L(`slicc-add-menu`),L(`slicc-send-button`));this.#e.append(this.#t,this.#n,this.#r),this.appendChild(this.#e),this.#n.addEventListener(`input`,this.#l),this.#n.addEventListener(`keydown`,this.#u),this.#r.addEventListener(`send`,this.#d)}#s(){if(!this.#i)return;let e=this.#n;e.placeholder=this.suggestion??this.placeholder,this.#c(e);let t=this.getAttribute(`value`)??``;e.value!==t&&(e.value=t)}#c(e){let t=this.disabled;if(t===e.disabled)return;if(t){let t=e.getRootNode();this.#a=t.activeElement===e?{start:e.selectionStart,end:e.selectionEnd}:null,e.disabled=!0;return}e.disabled=!1;let n=this.#a;this.#a=null,!(!n||!As(this.ownerDocument))&&(e.focus({preventScroll:!0}),e.setSelectionRange(n.start,n.end))}#l=e=>{e.stopPropagation();let t=this.#n.value;t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t),this.#p(),this.dispatchEvent(new CustomEvent(`input`,{bubbles:!0,composed:!0,detail:{value:t}}))};#u=e=>{if(e.isComposing)return;if(e.key===`Enter`&&!e.shiftKey&&!e.altKey){e.preventDefault(),this.#f(void 0,e.ctrlKey||e.metaKey);return}if(e.key===`Tab`&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let t=this.suggestion;if(t&&this.#n.value===``){e.preventDefault(),this.removeAttribute(`suggestion`);let n=this.#n;n.value=t,n.setSelectionRange(t.length,t.length),n.dispatchEvent(new Event(`input`,{bubbles:!0}))}return}let t=this.#n,n=t.selectionStart===t.selectionEnd;e.key===`ArrowUp`&&n&&t.selectionStart===0?(e.preventDefault(),this.dispatchEvent(new CustomEvent(`history-up`,{bubbles:!0,composed:!0}))):e.key===`ArrowDown`&&n&&t.selectionStart===t.value.length&&this.dispatchEvent(new CustomEvent(`history-down`,{bubbles:!0,composed:!0}))};#d=e=>{e.stopPropagation(),this.#f()};submit(e){this.#o(),this.#f(e)}focusEnd(){if(!this.#i)return;let e=this.#n;e.focus();let t=e.value.length;e.setSelectionRange(t,t)}#f(e,t){if(this.disabled)return;let n=this.#n.value;n.trim()!==``&&(this.removeAttribute(`suggestion`),this.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:n,...e?{source:e}:{},...t?{steer:!0}:{}}})))}#p(){if(!this.#i)return;let e=this.#n;e.style.height=`auto`;let t=e.scrollHeight;e.style.height=`${Math.min(t,140)}px`,e.style.overflowY=t>140?`auto`:`hidden`}};I(`slicc-input-card`,js);var Ms={"⏎":`corner-down-left`,"↵":`corner-down-left`,Enter:`corner-down-left`,"←":`arrow-left`,"→":`arrow-right`,"↑":`arrow-up`,"↓":`arrow-down`,"⇥":`arrow-right-to-line`},Ns=`slicc-key-hud`,Ps=4,Fs=1600,Is=`[?] help · [i] or [⏎] to type`;function Ls(e,t){let n=Ms[e],r=L(`kbd`,{class:t?`cap cap-hint`:`cap`,part:`cap`,...n?{"aria-label":e}:{}});return n&&w(n)?r.append(S(n,{size:t?11:12,strokeWidth:2.2})):r.textContent=e,r}function Rs(e){return e.split(/(\[[^\]]+\])/).filter(e=>e!==``).map(e=>e.startsWith(`[`)&&e.endsWith(`]`)?Ls(e.slice(1,-1),!0):e)}var zs=R(`
|
|
2568
2611
|
:host{display:block;font-family:var(--ui);color:var(--ink);}
|
|
2569
2612
|
:host([hidden]){display:none;}
|
|
2570
2613
|
.hud{display:flex;align-items:center;gap:8px;font:600 11.5px/1 var(--ui);}
|
|
@@ -8812,7 +8855,7 @@ Example input:
|
|
|
8812
8855
|
2. bash: {"command":"ls /published"}
|
|
8813
8856
|
3. bash: {"command":"diff /drafts /published"}
|
|
8814
8857
|
Example output: Compare drafts against published files`;function UN(e){return e.length>=6&&/[a-zA-Z]/.test(e)&&/\s/.test(e.trim())}function WN(e,n){if(e.length===0)return;let r=VN(e);if(!r)return;let i=RN.get(r);if(i){n.setAttribute(`label`,i);return}let a=e[0]?.id;if(a){let e=BN.get(a);e&&n.setAttribute(`label`,e)}if(zN.has(r))return;zN.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(`
|
|
8815
|
-
`);t(async()=>{let{quickLabel:e}=await import(`./quick-llm-
|
|
8858
|
+
`);t(async()=>{let{quickLabel:e}=await import(`./quick-llm-FkwEdyGU.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])).then(({quickLabel:e})=>e({system:HN,prompt:`Label these tool calls (inputs only):\n${o}`,maxTokens:40})).then(e=>{let t=e?.replace(/^["']|["']$|\.$/g,``).trim()??``;UN(t)&&(RN.set(r,t),a&&BN.set(a,t),n.isConnected&&n.setAttribute(`label`,t))}).catch(()=>void 0).finally(()=>zN.delete(r))}function GN(e,t={}){let n=XM(`slicc-tool-cluster`,{count:String(e.length)});return t.open&&n.setAttribute(`open`,``),n.append(...e),t.toolCalls&&t.toolCalls.length>0&&WN(t.toolCalls,n),n}function KN(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=Sn(e.timestamp);return r&&n&&t.setAttribute(`timestamp`,r),e.isStreaming&&t.setAttribute(`streaming`,``),t.setBodyHtml(HM(e.content,e.isStreaming===!0)),n||t.setAttribute(`data-empty`,``),[t,...(e.toolCalls??[]).map(t=>FN(t,e.id))]}function qN(e,t){let n=e.querySelectorAll(`:scope > slicc-tool-cluster`);for(let e of n){let n=Array.from(e.querySelectorAll(`slicc-action-row`));JN(e,n,t);let r=e.parentNode;if(!r){e.remove();continue}for(let t of n)YN(t,r,e);e.remove()}}function JN(e,t,n){if(!e.hasAttribute(`open`))return;let r=t[0]?.dataset.msgId;r&&n.add(r)}function YN(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 XN=new Set([`slicc-user-message`,`slicc-lick-card`,`slicc-error-card`,`slicc-delegation-line`,`slicc-day-separator`,`slicc-compaction-marker`]);function ZN(e){return e instanceof HTMLElement?XN.has(e.tagName.toLowerCase()):!0}function QN(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-action-row`}function $N(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-agent-message`}function eP(e){let t=[],n=[];for(let r of e)$N(r)?!r.hasAttribute(`data-empty`)&&n.length>0&&(t.push(n),n=[]):QN(r)&&n.push(r);return n.length>0&&t.push(n),t}function tP(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 nP(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=GN(e,{open:!!(o&&t.openClusterAnchors.has(o)),toolCalls:t.toolCallLookup?tP(e,t.toolCallLookup):void 0});r.insertBefore(s,a)}function rP(e,t){qN(e,t.openClusterAnchors);let n=Array.from(e.children),r=0;for(;r<n.length;){if(ZN(n[r])){r++;continue}let e=r;for(;e<n.length&&!ZN(n[e]);)e++;let i=eP(n.slice(r,e));for(let e of i)e.length>=3&&nP(e,t);r=e}t.openClusterAnchors.clear()}function iP(e,t){return e.channel===`sprinkle`&&t?.[2]?.trim()===`gelatiere`}function aP(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 oP(e){let t=WM.exec(e.content),n=e.lickCount??1,r=JM.exec(e.content),i=r?YM(r[1]):null,a=iP(e,t),o=a?M(e.content)?.action:void 0,s=XM(`slicc-lick-card`,{kind:a?fe:e.channel??`webhook`,"event-label":a?(o??`suggestions`).replace(/^gelatiere-/,``):eN(e.content,e.channel,t,i),collapsible:``,collapsed:``});i&&s.setAttribute(`hue`,gO({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?aP(e):null;if(t){s.append(t);continue}let n=document.createElement(`div`);n.innerHTML=VM(KM(e)),s.append(n)}return s}function sP(e){let t=XM(`slicc-delegation-line`,{kind:`feed`,verb:`feed_scoop`,label:ZM(e.content.replace(/\*\*\[[^\]]*\]\*\*\s*/,``))}),n=document.createElement(`slicc-user-message`);return n.setBodyHtml(VM(e.content)),[t,n]}var cP=`Out of AI budget`;function lP(){try{return d(u())}catch{return[]}}function uP(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 dP(){return lP().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 fP(e,t){let n={message:e.content,"message-id":e.id},r=_(e.content);return r&&(n.label=cP,n.message=uP(r)),t?(n[`no-action`]=``,XM(`slicc-error-card`,n)):r?XM(`slicc-error-card`,{...n,...dP()}):(h(e.content)?n.action=`settings`:m(e.content)?n.action=`change-model`:v(e.content)&&(n.action=`login`),XM(`slicc-error-card`,n))}function pP(e){return XM(`slicc-compaction-marker`,{trigger:e.trigger,state:e.state,...e.transcriptPath?{transcript:e.transcriptPath}:{}})}function mP(e,t={}){if(e.compaction)return e.compaction.state===`discarded`?[]:[pP(e.compaction)];if(e.source===`lick`)return[oP(e)];if(e.source===`delegation`||e.channel===`delegation`)return sP(e);if(e.error)return[fP(e,t.readOnly===!0)];if(e.role===`assistant`)return KN(e);let n=qM(e.content);return n?[oP({...e,source:`lick`,channel:n})]:[IN(e)]}function hP(e){let t=[];for(let n of e){let e=n;if(!n.source&&n.role===`user`){let t=qM(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 gP(e){return new Date(e).toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`})}function _P(e){return XM(`slicc-day-separator`,{label:gP(e)})}function vP(e,t={}){let n=[],r=``;for(let i of e){let e=new Date(i.timestamp).toDateString();e!==r&&(n.push(_P(i.timestamp)),r=e),n.push(...mP(i,t))}let i=document.createElement(`div`);return i.append(...n),rP(i,{openClusterAnchors:new Set,toolCallLookup:(t,n)=>e.find(e=>e.id===t)?.toolCalls?.find(e=>e.id===n)}),Array.from(i.children)}var yP=`auto`;function bP(e){if(e===null)return null;if(e===`auto`||e===`esc`)return e}var xP=`slicc-shortcuts-style`,SP=`
|
|
8816
8859
|
/* The sheet grows a column at a time as the viewport allows, and the dialog
|
|
8817
8860
|
grows with it — one alphabetical column of thirty-odd rows is a reference
|
|
8818
8861
|
you read; three short labelled ones are a cheat sheet you scan. Capped at
|
|
@@ -8858,5 +8901,6 @@ slicc-dialog.wcsc-dialog::part(dialog){width:min(460px,92vw);}
|
|
|
8858
8901
|
`;function IF(e,t){let n=e.commands.map(e=>XP(t,e)).filter(e=>e!==null);return n.length===0?null:n.join(` `)}function LF(e){return{commands:[e],find:t=>{let n=WP(e);return n?t.root.ownerDocument.querySelector(`slicc-dock-item[item-id="${RF(n)}"]`):null}}}function RF(e){return typeof globalThis.CSS?.escape==`function`?globalThis.CSS.escape(e):e.replace(/["\\]/g,`\\$&`)}var zF=[{commands:[`prevAgent`,`nextAgent`],find:e=>e.switcher.scoops.length>1?e.root.ownerDocument.querySelector(`slicc-agent-tabs [part="track-frame"]`):null,placement:`end`},LF(`tabs`),LF(`files`),LF(`terminal`),LF(`memory`),LF(`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 BF(e,t,n=globalThis.innerWidth){return e.endsWith(`end`)&&t.right+jF>n?e.replace(/end$/,`start`):e.endsWith(`start`)&&t.left-jF<0?e.replace(/start$/,`end`):e}function VF(e){if(e.getElementById(PF))return;let t=e.createElement(`style`);t.id=PF,t.textContent=FF,(e.head??e.documentElement)?.append(t)}function HF(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&&zF.forEach((n,o)=>{let c=IF(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=NF;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=BF(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(VF(t),r=t.createElement(`div`),r.className=MF,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 UF=`slicc-dock-select`,WF=`freezer-toggle`;function GF(e){let t=e.detail;return typeof t?.id==`string`?t.id:null}function KF(e){let t=new Map,n=new Map,r=0,i=e=>{UP(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=GF(e);if(t===null)return;let n=GP(t);s(n??`sprinkles`)},l=()=>s(`leftRail`);return e.addEventListener(UF,c,!0),e.addEventListener(WF,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(UF,c,!0),e.removeEventListener(WF,l,!0),t.clear(),n.clear()}}}function qF(e){e.inputCard.dispatchEvent(new CustomEvent(`stop`,{bubbles:!0,composed:!0}))}function JF(e){e.inputCard.querySelector(`slicc-add-menu`)?.open?.()}function YF(e){e.composer.toggleHandsFree?.()}function XF(e){let t=e.thread.ownerDocument.querySelector(`slicc-tab-overlay`);t&&(t.peeking=!0),e.dock.selectItem?.(`browser`)}function ZF(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 QF(e,t){e.thread.querySelector(`.wc-copy-row slicc-press-button`)?.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:{}}))}function $F(e){QF(e,`short-click`)}function eI(e){QF(e,`long-press`)}function tI(e){if(!e)return null;try{return e.contentDocument}catch{return null}}function nI(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=tI(i)?.querySelector(`button[data-action]`);(r.querySelector(`button[data-action]:not([disabled])`)??a??i)?.focus?.(),r.scrollIntoView?.({block:`nearest`})}function rI(e){let t=e.dock.active;t&&Rn(e.frame??e.dockTree,t)}function iI(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 aI(e){return kF({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:()=>qF(e),toggleVoice:()=>YF(e),scrollMessage:t=>ZF(e,t),focusApproval:()=>nI(e),openAttachMenu:()=>JF(e),copyReply:()=>$F(e),copyChat:()=>eI(e),zoomSurface:()=>rI(e),peekTabs:()=>XF(e),lists:iI(e),caps:HF({inputCard:e.inputCard,root:e.chatPane,switcher:e.switcher}),usage:KF(e.chatPane.ownerDocument)})}var oI=/data:([\w.+-]+\/[\w.+-]+)(?:;[\w.+-]+=[^;,]*)*;base64,([A-Za-z0-9+/=]+)/g,sI=RegExp(`(?:^|[\\s"'\`(\\[{<,;:=])([A-Za-z0-9+/]{128,}={0,2})(?=$|[\\s"'\`)\\]}>,;:.!?])`,`g`),cI=16;function lI(e){let t=[],n=0;for(;;){let r=e.indexOf(`
|
|
8859
8902
|
`,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 uI=/^[A-Za-z0-9+/]+$/,dI=/^[A-Za-z0-9+/]+={0,2}$/;function fI(e){let t=lI(e),n=[];for(let r=0;r<t.length;r+=1){let i=pI(t,r);if(i===null)continue;let a=mI(t,r,i);if(a===r)continue;let o=t.slice(r,a+1),s=hI(t,r,i);s&&o.unshift(s);let c=gI(e,o);c&&n.push(c),r=a}return n}function pI(e,t){let n=e[t];if(!n)return null;let r=n.text.length;return r<cI||r%4!=0?null:uI.test(n.text)?r:null}function mI(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||!uI.test(t.text))break;r=i}let i=e[r+1];if(!i||i.text.length===0||i.text.length>=n||!dI.test(i.text))return r;let a=e[r+2];return a!==void 0&&a.text.length===n&&uI.test(a.text)?r:r+1}function hI(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!uI.test(a)||uI.test(r.text[i-1]??` `)?null:{start:r.start+i,end:r.end,text:a}}function gI(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 _I(e){let t=[],n=[],r=(e,t)=>n.some(([n,r])=>e<r&&t>n);oI.lastIndex=0;for(let r of e.matchAll(oI)){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 fI(e))r(i.start,i.end)||(t.push(i),n.push([i.start,i.end]));sI.lastIndex=0;for(let i of e.matchAll(sI)){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 vI=e=>Array.from(e,e=>e.charCodeAt(0)),yI=[{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:vI(`GIF87a`),mime:`image/gif`},{offset:0,bytes:vI(`GIF89a`),mime:`image/gif`},{offset:0,bytes:vI(`BM`),mime:`image/bmp`},{offset:0,bytes:vI(`RIFF`),also:{offset:8,bytes:vI(`WEBP`)},mime:`image/webp`},{offset:4,bytes:vI(`ftypavif`),mime:`image/avif`},{offset:0,bytes:[0,0,1,0],mime:`image/x-icon`},{offset:0,bytes:vI(`RIFF`),also:{offset:8,bytes:vI(`WAVE`)},mime:`audio/wav`},{offset:0,bytes:vI(`ID3`),mime:`audio/mpeg`},{offset:0,bytes:vI(`fLaC`),mime:`audio/flac`},{offset:4,bytes:vI(`ftypM4A`),mime:`audio/mp4`},{offset:4,bytes:vI(`ftypisom`),mime:`video/mp4`},{offset:4,bytes:vI(`ftypmp42`),mime:`video/mp4`},{offset:4,bytes:vI(`ftypqt`),mime:`video/quicktime`},{offset:0,bytes:[26,69,223,163],mime:`video/webm`},{offset:0,bytes:vI(`%PDF-`),mime:`application/pdf`},{offset:0,bytes:[0,97,115,109],mime:`application/wasm`},{offset:0,bytes:vI(`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`}],bI=vI(`OggS`);function xI(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 SI(e){let t=[...yI].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(xI(e,n.offset,n.bytes)&&!(n.also&&!xI(e,n.also.offset,n.also.bytes)))return n.mime;if(xI(e,0,bI)){let t=CI(e.subarray(0,64));return/theora|VP8/.test(t)?`video/ogg`:`audio/ogg`}return null}function CI(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return t}var wI=4096;function TI(e){if(e.length===0)return!0;let t=e.subarray(0,Math.min(e.length,wI));if(t.includes(0))return!1;let n=t.length;if(n===wI)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 EI(e,t){if(t&&t.length>0){let e=SI(t);if(e)return{mime:e,text:DI(e),source:`magic`}}let n=i(e);return n===`application/octet-stream`?t&&TI(t)?{mime:`text/plain`,text:!0,source:`content`}:{mime:`application/octet-stream`,text:!1,source:t?`content`:`unknown`}:{mime:n,text:DI(n),source:`extension`}}function DI(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 OI=new Set([`md`,`markdown`,`mdown`,`mkd`,`mkdn`,`mdwn`]);function kI(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 OI.has(i)?`markdown`:i===`html`||i===`htm`?`html`:null}var AI=`payload`;function jI(e,t){let n;try{n=c(e)}catch{return null}if(n.length===0)return null;let r=SI(n);if(r)return MI(n,r,`magic`);let i=t?.split(`;`,1)[0]?.trim().toLowerCase();return i&&i.length>0&&i!==`application/octet-stream`?MI(n,i,`declared`):TI(n)?MI(n,`text/plain`,`content`):null}function MI(e,t,n){let r=o(t);return{bytes:e,mime:t,text:DI(t),source:n,name:r?`${AI}.${r}`:AI}}var NI=`slicc-blob-chip`,PI=`base64-preview-open`,FI=`data-base64-chips`;function II(e){return`${e.childNodes.length}:${e.textContent?.length??0}`}var LI=new Set([`A`,`PRE`,`SCRIPT`,`STYLE`,`TEXTAREA`]),RI=[[`image/`,`image`],[`audio/`,`file-audio`],[`video/`,`file-video`],[`text/`,`file-text`]];function zI(e){for(let[t,n]of RI)if(e.startsWith(t))return w(n)?n:`file`;return`file`}function BI(e){let t=II(e);if(e.getAttribute(FI)!==t){for(let t of HI(e)){let e=[];for(let n of _I(t.text)){let t=jI(n.data,n.declaredMime);t&&e.push({start:n.start,end:n.end,payload:t})}e.length!==0&&WI(t,e)}e.setAttribute(FI,II(e))}}function VI(e,t){for(let n=e;n;n=n.parentElement){if(LI.has(n.tagName))return!0;if(n===t)return!1}return!1}function HI(e){let t=[];for(let n of[e,...e.querySelectorAll(`*`)]){if(VI(n,e))continue;let r=null;for(let e of n.childNodes){let n=UI(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 UI(e){return e.nodeType===Node.TEXT_NODE?e.nodeValue??``:e.nodeType===Node.ELEMENT_NODE&&e.tagName===`BR`?`
|
|
8860
8903
|
`:null}function WI(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(UI(n.node)===`
|
|
8861
|
-
`&&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(GI(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 GI(e,t){let n=t.bytes.byteLength,r=e.createElement(NI);return r.setAttribute(`icon`,zI(t.mime)),r.setAttribute(`label`,`${mp(t.mime)} · ${ee(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(PI,{detail:n,bubbles:!0,composed:!0}))}),r}var KI=24;async function qI(e,t){let n=t.slice(0,Math.max(t.lastIndexOf(`/`),0))||`/`;for(let t=0;t<KI;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 JI(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 YI(e,n,r){let i=await qI(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-C3lNgE6Y.js`),__vite__mapDeps([33,1,34])),o=JI(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 XI(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return t===`.html`||t===`.svg`}async function ZI(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}=EI(t,r);return{mime:i,text:a,bytes:r}}var QI=524288;function $I(e,t,n){if(n.length>QI)return null;switch(kI(e,t)){case`markdown`:return{mount:`inline`,html:VM(n)};case`html`:return{mount:`sandbox`,html:n};default:return null}}async function eL(e,t,n={}){let{mime:r,text:i,bytes:a}=await ZI(e,t);if(!i){Op.open({path:t,content:a.buffer,mimeType:r,text:!1});return}let o=new TextDecoder().decode(a),s=await YI(e,t,o),c=$I(t,r,o);Op.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 tL(e,t){let{mime:n,bytes:r}=await ZI(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 nL(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 rL(e,t){try{return await e.stat(t),!0}catch{return!1}}async function iL(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(b(a,t))return}catch{}await rL(e,i)&&!confirm(`${i} already exists. Overwrite?`)||(await nL(e,t,i),await e.rm(t))}function aL(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 eL(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 tL(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&&XI(n)},{id:`delete`,label:`Delete`,destructive:!0,visible:a}];Ou.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 rL(n,t)&&!confirm(`${t} already exists. Overwrite?`))break;await nL(n,s,t);break}case`delete`:confirm(`Delete ${s}?`)&&await(await r()).rm(s);break;case`rename`:await iL(await r(),s)}}catch(e){o.error(`Overflow action "${n}" failed`,e)}})}var oL=`slicc-agent-message`,sL=`slicc-user-message`,cL=`${oL},${sL}`,lL=[`streaming`,`text`,`timestamp`,`queued`];function uL(e){return e.tagName.toLowerCase()===sL?e.shadowRoot?.querySelector(`.b`)??null:e.querySelector(`.body`)??e}function dL(e){try{return fL(e)}catch(t){return e.log.error(`Base64 preview wiring failed; continuing without it`,t),()=>{}}}function fL(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=uL(e);if(t&&_I(t.textContent??``).length!==0)try{BI(t)}catch(e){n.error(`Base64 elision failed`,e)}},i=e=>{for(let t of e.querySelectorAll(cL))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(cL)?r(e):i(e));let n=e?.closest?.(cL);n&&r(n)}});a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:lL});let o=e=>{let{payload:t}=e.detail;try{pL(t)}catch(e){n.error(`Base64 preview failed`,e)}};return t.addEventListener(PI,o),()=>{a.disconnect(),t.removeEventListener(PI,o)}}function pL(e){if(!e.text){Op.open({path:e.name,content:e.bytes.buffer,mimeType:e.mime,text:!1});return}let t=new TextDecoder().decode(e.bytes),n=$I(e.name,e.mime,t);Op.open({path:e.name,content:t,mimeType:e.mime,text:!0,...n?{rendered:n}:{}})}var mL=`[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})`,hL=`[A-Za-z0-9._-]{1,100}`,gL=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 _L(e,t){return!gL.has(e.toLowerCase())&&t!==`.`&&t!==`..`}function vL(e){return e.replace(/\.git$/i,``)}function yL(e){let t;try{t=new URL(e)}catch{return null}return t.hostname!==`github.com`&&t.hostname!==`www.github.com`?null:t}function bL(e){let t=yL(e);if(!t)return null;let n=RegExp(`^/(${mL})/(${hL})/(issues|pull)/(\\d{1,7})(?:/|$)`).exec(t.pathname);if(!n)return null;let[,r=``,i=``,a,o=`0`]=n;return _L(r,i)?{owner:r,repo:vL(i),number:Number(o),kind:a===`pull`?`pull`:`issue`}:null}function xL(e){return`https://github.com/${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`}function SL(e){return`https://opengraph.githubassets.com/slicc/${e}`}function CL(e){return SL(`${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`)}function wL(e){return e.kind===`pull`?`PR #${e.number}`:e.kind===`issue`?`Issue #${e.number}`:`#${e.number}`}function TL(e){return{kind:e.kind===`pull`?`pull`:`issue`,title:`${e.owner}/${e.repo}#${e.number}`,image:CL(e),badge:wL(e)}}function EL(e){try{return decodeURIComponent(e)}catch{return e}}var DL=RegExp(`^/(orgs|users)/(${mL})/(projects|discussions)/(\\d{1,7})(?:/|$)`),OL=RegExp(`^/(${mL})/(${hL})(?:/(.*))?$`),kL=/^discussions\/(\d{1,7})(?:\/|$)/,AL=/^commit\/([0-9a-fA-F]{7,40})(?:\/|$)/,jL=/^releases\/tag\/([^/?#]{1,128})(?:\/|$)/,ML=/^(?:raw|releases\/download)\//;function NL(e,t,n){if(ML.test(n))return null;let r=`${e}/${t}`,i=kL.exec(n);if(i){let e=Number(i[1]??0);return{kind:`discussion`,title:`${r}#${e}`,image:SL(`${r}/discussions/${e}`),badge:`Discussion #${e}`}}let a=AL.exec(n);if(a){let e=a[1]??``;return{kind:`commit`,title:`${r}@${e.slice(0,7)}`,image:SL(`${r}/commit/${e}`),badge:`Commit`}}let o=jL.exec(n);if(o){let e=o[1]??``;return{kind:`release`,title:`${r}@${EL(e)}`,image:SL(`${r}/releases/tag/${e}`),badge:`Release`}}return{kind:`repo`,title:r,image:SL(r),badge:`Repository`}}function PL(e){let t=bL(e);if(t)return TL(t);let n=yL(e);if(!n)return null;let r=DL.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:SL(`${e}/${t}/${n}/${i}`),badge:`${a?`Project`:`Discussion`} #${i}`}}let i=OL.exec(n.pathname);if(!i)return null;let[,a=``,o=``,s=``]=i;return _L(a,o)?NL(a,vL(o),s):null}var FL=RegExp(`(^|[^\\w/.-])(${mL})/(${hL})#(\\d{1,7})\\b`,`g`),IL=/\b(PRs?|pull requests?|issues?)\s+#?(\d{1,7})\b/gi,LL=/(^|[^\w&/#])#(\d{1,6})\b/g;function RL(e){return/^p/i.test(e)?`pull`:`issue`}function zL(e){let t=[],n=(e,n)=>t.some(t=>e<t.end&&n>t.start);for(let n of e.matchAll(FL)){let[e,r=``,i=``,a=``,o=`0`]=n,s=(n.index??0)+r.length,c=e.slice(r.length);_L(i,a)&&t.push({start:s,end:s+c.length,raw:c,number:Number(o),kind:`unknown`,owner:i,repo:vL(a)})}for(let r of e.matchAll(IL)){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:RL(i)})}for(let r of e.matchAll(LL)){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 BL=RegExp(`github\\.com[/:](${mL})/(${hL}?)(?:\\.git)?(?=$|[/\\s#?"'\`)\\]>,;])`,`g`),VL=RegExp(`(?:^|\\s)(?:-R|--repo)(?:\\s+|=)(${mL})/(${hL})`,`g`),HL=RegExp(`\\bgh\\s+repo\\s+(?:clone|view|fork|sync)\\s+(${mL})/(${hL})`,`g`);function UL(e){let t=[],n=[[BL,1,2],[VL,1,2],[HL,1,2],[FL,2,3]];for(let[r,i,a]of n)for(let n of e.matchAll(r)){let e=n[i]??``,r=vL(n[a]??``);!e||!r||!_L(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 WL(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 GL=12;function KL(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=UL(e)[0];if(t)return t}return null}function qL(e){if(!e.startsWith(`/`))return[];let t=e.split(`/`).filter(Boolean);t.pop();let n=[];for(;t.length>0&&n.length<GL;)n.push(`/${t.join(`/`)}`),t.pop();return n}var JL=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 qL(e)){let e=await this.#n(t);if(e)return e}return null}#n(e){let t=this.#t.get(e);if(t)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 KL(typeof t==`string`?t:new TextDecoder().decode(t))}catch{return null}}},YL=.4,XL=6,ZL=8,QL=2e3,$L=/\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,eR=new Set([`now`,`right now`,`currently`,`then`,`soon`,`later`,`earlier`,`recently`,`once`,`first`,`second`,`today`,`day`,`a day`,`the day`]),tR=/([.!?;:])\s+|\n+|,\s+(?=(?:and|but|then|so|while|or)\b)/gi,nR=/\s+(?:and|but|then|so|or)\s+/gi;function rR(e){return e.length>=3&&$L.test(e)}function iR(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(tR)){let e=t.index??0;r(n,t[1]?e+1:e),n=e+t[0].length}return r(n,e.length),t}function aR(e){let t=[],n=0;for(let r of e.matchAll(nR)){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 oR(e){return e.trim().split(/\s+/).length}function sR(e){let t=e.trim().toLowerCase().replace(/[.,;:!?]+$/,``);return!(t.length<3||eR.has(t)||/^\d+$/.test(t))}async function cR(e,t,n){let r=e.map(()=>[]),i=[];if(e.forEach((e,t)=>{if(rR(e))for(let n of iR(e.slice(0,QL)))rR(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=aR(t.text);r.length>1&&oR(t.text)>XL&&t.confidence>=YL?s.push({base:e,parts:r}):t.confidence>=.8&&sR(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||!sR(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,ZL).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 lR=null;function uR(){return lR??=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 lR=null,e}),lR}function dR(e=new Date){let t=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`;return{reference:e.toISOString(),timeZone:t}}var fR=262144,pR=400,mR=/<meta\b[^>]*>/gi,hR=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g,gR=/<title\b[^>]*>([\s\S]*?)<\/title>/i,_R={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,nbsp:`\xA0`,hellip:`…`,mdash:`—`,ndash:`–`,rsquo:`’`,lsquo:`‘`,rdquo:`”`,ldquo:`“`};function vR(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 _R[t.toLowerCase()]??e})}function yR(e){let t=new Map;for(let n of e.matchAll(hR)){let e=n[1]?.toLowerCase();e&&t.set(e,n[2]??n[3]??n[4]??``)}return t}function bR(e){if(!e)return;let t=vR(e).replace(/\s+/g,` `).trim();if(t)return t.length>pR?`${t.slice(0,399)}…`:t}function xR(e,t){if(e)try{let n=new URL(vR(e).trim(),t);return n.protocol===`https:`||n.protocol===`http:`?n.href:void 0}catch{return}}function SR(e,t){let n=e.search(/<\/head\s*>/i),r=e.slice(0,n>=0?n:fR),i=new Map;for(let e of r.matchAll(mR)){let t=yR(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=bR(a(`og:title`,`twitter:title`)??gR.exec(r)?.[1]),c=bR(a(`og:description`,`twitter:description`,`description`)),l=xR(a(`og:image:secure_url`,`og:image`,`og:image:url`,`twitter:image`,`twitter:image:src`),t),u=bR(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 CR=/\.(png|jpe?g|gif|webp|avif|svg|bmp|ico)$/i,wR=524288,TR=2097152,ER=8e3,DR=200;function OR(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}function kR(e,t){return e[t]??e[t.toLowerCase()]??``}function AR(e,t){return{url:e,state:`ready`,title:t.title,image:t.image,siteName:`GitHub`,badge:t.badge}}function jR(e,t){return AR(e,TL(t))}var MR=class{#e;#t;#n;#r=new Map;constructor(e){this.#e=e.getFetch,this.#t=e.timeoutMs??ER,this.#n=e.maxEntries??DR}peek(e){return this.#r.get(e)}preview(e){let t=this.#r.get(e);if(t)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=OR(e);if(!t)return{url:e,state:`error`};let n=PL(e);if(n)return AR(e,n);if(CR.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=kR(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=SR(new TextDecoder().decode(i.body.subarray(0,wR)),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))}},NR=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(`.`)),PR=/^(?:(?:so|ok(?:ay)?|also|now|then|and|but|alright|great|next|finally|lastly|quick question)\b[,:\s]*)+/i,FR=/[.!?]+(?=\s|$)|\n+/g,IR=/,?\s+or\s+(?!not\b)\S/i;function LR(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 RR(e){let t=e.trim();if(!t.endsWith(`?`))return null;let n=t.replace(PR,``).trim(),r=n.split(/[\s,]+/)[0]?.toLowerCase()??``;return NR.has(r)?IR.test(n)?`text`:`yes-no`:LR(n)}function zR(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(FR)){let e=t.index??0,i=t[0].startsWith(`
|
|
8862
|
-
`);r(n,i?e:e+t[0].length),n=e+t[0].length}return r(n,e.length),t}function BR(e){let t=[];for(let{start:n,text:r}of zR(e)){if(r.length<4)continue;let e=RR(r);e&&t.push({start:n,end:n+r.length,text:r,kind:e})}return t}var VR=`data-preview`,HR=`github-mention`,UR=`time-mention`,WR=`agent-question`,GR=`data-question`,KR=`data-question-kind`,qR=`data-question-id`,JR={owner:`data-gh-owner`,repo:`data-gh-repo`,number:`data-gh-number`,kind:`data-gh-kind`},YR=`data-answered`,XR=`agent-question-answer`,ZR=`data-mention-previews`,QR=new Set([`A`,`PRE`,`SCRIPT`,`STYLE`,`TEXTAREA`,`BUTTON`]),$R=new Set([...QR,`CODE`,`KBD`,`SAMP`]),ez=`p,li,h1,h2,h3,h4,h5,h6,td,th,blockquote,dd,dt,figcaption`,tz=new WeakMap;function nz(e){return tz.get(e)}function rz(e){let t=e.getAttribute(JR.owner),n=e.getAttribute(JR.repo),r=Number(e.getAttribute(JR.number)),i=e.getAttribute(JR.kind);return!t||!n||!Number.isInteger(r)||r<=0?null:{owner:t,repo:n,number:r,kind:i===`pull`||i===`issue`?i:`unknown`}}function iz(e){return`${e.childNodes.length}:${e.textContent?.length??0}`}function az(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 oz(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()&&(az(i,e,t,n)||r.push(i))}return r}function sz(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 cz(e){for(let t of e.querySelectorAll(`a[href]`))t.hasAttribute(`data-preview`)||t.closest(`pre`)||/^https?:\/\//i.test(t.getAttribute(`href`)??``)&&t.setAttribute(VR,`link`)}var lz=0;function uz(e){let t=new Map;for(let n of oz(e,QR,WR)){let r=n.parentElement?.closest(ez)??e,i=e.contains(r)?r:e,a=t.get(i);a?a.push(n):t.set(i,[n])}for(let[e,n]of t){if(e.querySelector(`.agent-question`))continue;let t=``,r=n.map(e=>{let n=t.length;return t+=e.data,{node:e,start:n,end:t.length}}),i=BR(t);if(i.length!==0)for(let{node:t,start:n,end:a}of r){let r=[];for(let t of i){let i=Math.max(t.start,n),o=Math.min(t.end,a);if(i>=o)continue;let s=fz(t.start,e);r.push({start:i-n,end:o-n,id:s,kind:t.kind,text:t.text,first:i===t.start})}r.length!==0&&sz(t,r,(e,n)=>{let i=r[n],a=t.ownerDocument.createElement(`span`);return a.className=WR,a.setAttribute(VR,`question`),i&&(a.setAttribute(qR,i.id),a.setAttribute(GR,i.text),a.setAttribute(KR,i.kind),i.first&&(a.tabIndex=0)),a})}}}var dz=new WeakMap;function fz(e,t){let n=dz.get(t);n||(n=new Map,dz.set(t,n));let r=n.get(e);return r||(lz+=1,r=`q${lz}`,n.set(e,r)),r}async function pz(e,t){let n=oz(e,$R).map(e=>({node:e,data:e.data,mentions:zL(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:WL(e,r)})).filter(e=>e.ref!==null);n.length!==0&&sz(e,n.map(({mention:e})=>e),(t,r)=>{let i=n[r].ref,a=e.ownerDocument.createElement(`a`);return a.className=HR,a.href=xL(i),a.target=`_blank`,a.rel=`noopener noreferrer`,a.setAttribute(VR,`github`),a.setAttribute(JR.owner,i.owner),a.setAttribute(JR.repo,i.repo),a.setAttribute(JR.number,String(i.number)),a.setAttribute(JR.kind,i.kind),a.setAttribute(`aria-label`,`${i.owner}/${i.repo} ${wL(i)}`),a})}}async function mz(e,t){if(!t.getTimeParser||!t.timeContext)return;let n=oz(e,$R,UR).filter(e=>rR(e.data));if(n.length===0)return;let r=n.map(e=>e.data),i=await t.getTimeParser(),a=await cR(r,t.timeContext,i);n.forEach((e,t)=>{let n=a[t]??[];n.length!==0&&(!e.isConnected||e.data!==r[t]||sz(e,n,(t,r)=>{let i=e.ownerDocument.createElement(`span`);i.className=UR,i.setAttribute(VR,`time`);let a=n[r];return a&&tz.set(i,a),i}))})}function hz(e,t,n=()=>{}){let r=gz.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 _z(e,t,n);i.rerun;){let t=i.rerun;i.rerun=null,await _z(e,t.ctx,t.onError)}}finally{gz.delete(e)}})(),gz.set(e,i),i.promise}var gz=new WeakMap;async function _z(e,t,n){let r=iz(e);if(e.getAttribute(ZR)===r)return;let i=async(e,t)=>{try{await t()}catch(t){n(e,t)}};await i(`links`,()=>cz(e)),t.questions&&await i(`questions`,()=>uz(e)),await i(`github`,()=>pz(e,t)),await i(`times`,()=>mz(e,t)),e.setAttribute(ZR,iz(e))}var vz=`slicc-agent-message`,yz=`slicc-user-message`,bz=`slicc-action-row`,xz=`[${VR}]`,Sz=2e4,Cz=280,wz=`data-msg-time`;function Tz(e,t){let n=Number(e.getAttribute(wz));return Number.isFinite(n)&&n>0?new Date(n):t()}var Ez=900,Dz=new WeakMap;function Oz(e,t){Dz.set(e,t)}function kz(e){let t=globalThis.requestIdleCallback;typeof t==`function`?t(e):setTimeout(e,0)}function Az(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 jz(e){if(e.tagName.toLowerCase()===yz)return e.getAttribute(`text`)??``;let t=Array.from(e.querySelectorAll(`a[href]`),e=>e.getAttribute(`href`)??``);return`${(e.textContent??``).slice(0,Sz)} ${t.join(` `)}`}function Mz(e,t){let n=Az(e,t,`${bz},${vz},${yz}`),r=[];for(let e of[...n,t])for(let t of UL(jz(e))){let e=r.findIndex(e=>e.toLowerCase()===t.toLowerCase());e>=0&&r.splice(e,1),r.push(t)}return r}function Nz(e,t){return Az(e,t,`${bz}[${VO}]`).flatMap(e=>YO(e.getAttribute(`data-file-paths`)??``))}function Pz(){return t(async()=>{let{createProxiedFetch:e}=await import(`./proxied-fetch-DiXk_XGs.js`).then(e=>e.i);return{createProxiedFetch:e}},__vite__mapDeps([15,1,2,16,17,18,19])).then(({createProxiedFetch:e})=>{let t=e({maxResponseBytes:TR});return(e,n)=>t(e,n)})}function Fz(e){try{return qz(e)}catch(t){return e.log.error(`Mention preview wiring failed; continuing without it`,t),()=>{}}}function Iz(e){let t=new Set,n=e=>e?.tagName.toLowerCase()===vz;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(vz))t.add(n)}let i=e?.closest?.(vz);i&&t.add(i)}return t}function Lz(e,t){for(let n of e.querySelectorAll(vz))t(n);let n=new MutationObserver(e=>{for(let n of Iz(e))t(n)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`streaming`]}),()=>n.disconnect()}var Rz=class{thread;isReadOnly;#e=new Map;constructor(e,t){this.thread=e,this.isReadOnly=t}#t(e,t){return`${e?.getAttribute(`data-msg-id`)??``}\u0000${t}`}mark(e){for(let t of e.querySelectorAll(`[${GR}]`)){let n=this.#t(e,t.getAttribute(`data-question`)??``);t.toggleAttribute(YR,this.#e.has(n))}}statusOf(e){let t=e.closest(vz),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(vz);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(yz))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(vz),r=e.getAttribute(`data-question`)??``;this.#e.set(this.#t(n,r),t.answer),n&&this.mark(n);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(XR,{detail:a,bubbles:!0,composed:!0})),!0}};function zz(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function Bz(e,t){e.setAttribute(`url`,t.url),e.setAttribute(`state`,t.state),zz(e,`heading`,t.title),zz(e,`description`,t.description),zz(e,`image`,t.image),zz(e,`site`,t.siteName),zz(e,`badge`,t.badge)}function Vz(e,t,n){let r=document.createElement(`slicc-link-preview`),i=e.href;return Bz(r,{url:i,state:`loading`}),n.fetcher.preview(i).then(n=>{t.anchor===e&&(Bz(r,n),t.reposition())}),r}function Hz(e){let t=rz(e);if(!t)return null;let n=jR(xL(t),t),r=document.createElement(`slicc-link-preview`);return Bz(r,{...n,siteName:n.siteName??`GitHub`}),r}function Uz(e,t){let n=nz(e);if(!n)return null;let r=dR(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 Wz(e,t,n){let r=document.createElement(`slicc-question-prompt`),{state:i,note:a,answer:o}=n.questions.statusOf(e);return r.setAttribute(`question`,e.getAttribute(`data-question`)??``),r.setAttribute(`kind`,e.getAttribute(`data-question-kind`)??`text`),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(Ez))}),r}function Gz(e,t,n){switch(e.getAttribute(VR)){case`link`:return e instanceof HTMLAnchorElement?Vz(e,t,n):null;case`github`:return e instanceof HTMLAnchorElement?Hz(e):null;case`time`:return Uz(e,n);case`question`:return Wz(e,t,n);default:return null}}function Kz({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(xz);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 qz(e){let{thread:t,log:n}=e;if(!(t instanceof Node))return()=>{};let r=e.now??(()=>new Date),i=e.getTimeParser??uR,a=new Rz(t,e.isReadOnly),o={fetcher:new MR({getFetch:e.getFetch??Pz}),questions:a,now:r},s=null,c=e=>async()=>{let n=Dz.get(t);if(!n)return null;s?.opener!==n&&(s={opener:n,resolver:n().then(e=>new JL(e))});let r=Nz(t,e);return r.length===0?null:(await s.resolver).repoFor(r)},l=Lz(t,e=>{if(!(e instanceof HTMLElement)||e.hasAttribute(`streaming`))return;let o=e.querySelector(`.body`)??e;kz(()=>{o.isConnected&&hz(o,{repoHints:Mz(t,e),resolveRepoFallback:c(e),getTimeParser:i,timeContext:dR(Tz(e,r)),questions:!0},(e,t)=>n.error(`Mention preview step "${e}" failed`,t)).then(()=>a.mark(e))})}),u=Kz({thread:t,getCard:e.getCard??(()=>Vu.shared(document)),content:(e,t)=>Gz(e,t,o),hoverDelay:e.hoverDelayMs??Cz,log:n});return()=>{u(),l()}}var Jz=e({FREEZER_TINT:()=>Yz,applyComposerAvailability:()=>cB,applyShellContext:()=>sB,buildWcShellFrame:()=>oB,mountWcUiPreview:()=>dB,submittedSteer:()=>uB,submittedText:()=>lB}),Yz=`#3b6cb2`,Xz=`slicc-wcui-style`,Zz=[`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;}`,XD].join(``);function Qz(e){if(e.getElementById(Xz))return;let t=e.createElement(`style`);t.id=Xz,t.textContent=Zz,e.head.appendChild(t)}var $z=null;function eB(){$z?.(),$z=rg()}function $(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function tB(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 nB(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 rB(){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 iB(e,t){e.addEventListener(`slicc-dock-select`,e=>{let n=e.detail?.id;!n||t.has(n)})}function aB(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 oB(e,t){eg(document),Qz(document),eB();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(...vP(t.messages));let{composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h}=nB(t);l.append(u,d);let{dockTree:g,tree:_,termSurface:v,memoryHost:y,monitor:b}=rB(),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 w=new Set;iB(C,w),aB(C,g),a.addEventListener(`freezer-toggle`,e=>{let t=e.detail?.open===!0;o.style.setProperty(`--rail-w`,t?`260px`:`44px`)});let ee=0;u.addEventListener(`scroll`,()=>{ee||=requestAnimationFrame(()=>{ee=0,i.setAttribute(`scroll`,String(Math.round(u.scrollTop)))})},{passive:!0});let{nav:te,switcher:ne,floatbar:re,avatarMenu:ie}=tB(t);o.append(te,c);let ae=aI({switcher:ne,dock:C,freezer:a,composerMeta:p,composer:d,chatPane:l,inputCard:f,thread:u,frame:r,dockTree:g,fileTree:_,memoryHost:y}),{panelHost:oe,trustedLayer:T}=ZD(document);return oe.append(i,a,o),r.append(oe,T),e.replaceChildren(r),dL({thread:u,log:n(`base64-preview`)}),Fz({thread:u,isReadOnly:()=>d.hasAttribute(`hidden`),log:n(`mention-preview`)}),{frame:r,panelHost:oe,trustedLayer:T,shader:i,chatPane:l,thread:u,composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h,switcher:ne,floatbar:re,shell:c,dockTree:g,dock:C,freezer:a,fileTree:_,termSurface:v,memoryHost:y,monitor:b,avatarMenu:ie,shortcuts:ae,overlaySurfaces:w}}function sB(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`,Yz),r.style.setProperty(`--ctx`,Yz),i.setAttribute(`ctx`,``))}function cB(e,t){e.composer.toggleAttribute(`hidden`,t),t&&e.inputCard.setAttribute(`disabled`,``)}function lB(e){return e.detail?.value}function uB(e){return e.detail?.steer===!0}function dB(e){let t=oB(e,{messages:AO(),scoops:[{key:`cone`,type:`cone`,color:`#b07823`,label:`sliccy`,eyes:`open`,state:`working`},{key:bO,type:`scoop`,color:`#06b6d4`,label:bO,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=lB(e)?.trim();if(!n)return;let r={id:`wc-echo-${t.thread.childElementCount}`,role:`user`,content:n,timestamp:Date.now()};t.thread.append(...mP(r))})}export{dn as $,gO as A,zn as B,mP as C,ue as Ct,VO as D,te as Dt,VM as E,de as Et,vd as F,Rn as G,ir as H,Jl as I,kn as J,Pn as K,Gs as L,QD as M,qD as N,YO as O,ne as Ot,of as P,fn as Q,qs as R,_P as S,ce as St,qN as T,ie as Tt,Yn as U,Xn as V,Qn as W,vn as X,jn as Y,yn as Z,bP as _,Le as _t,uB as a,rn as at,EN as b,he as bt,Oz as c,zt as ct,aL as d,It as dt,un as et,qP as f,Ft as ft,UP as g,A as gt,JP as h,ze as ht,oB as i,an as it,pO as j,BO as k,XR as l,xt as lt,KP as m,ge as mt,cB as n,sn as nt,lB as o,on as ot,yP as p,ht as pt,Dn as q,sB as r,Yt as rt,Jz as s,Jt as st,Yz as t,nn as tt,eL as u,Lt as ut,ON as v,Be as vt,rP as w,le as wt,hP as x,ae as xt,DN as y,fe as yt,Bn as z};
|
|
8904
|
+
`&&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(GI(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 GI(e,t){let n=t.bytes.byteLength,r=e.createElement(NI);return r.setAttribute(`icon`,zI(t.mime)),r.setAttribute(`label`,`${mp(t.mime)} · ${ee(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(PI,{detail:n,bubbles:!0,composed:!0}))}),r}var KI=24;async function qI(e,t){let n=t.slice(0,Math.max(t.lastIndexOf(`/`),0))||`/`;for(let t=0;t<KI;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 JI(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 YI(e,n,r){let i=await qI(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-C3lNgE6Y.js`),__vite__mapDeps([33,1,34])),o=JI(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 XI(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return t===`.html`||t===`.svg`}async function ZI(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}=EI(t,r);return{mime:i,text:a,bytes:r}}var QI=524288;function $I(e,t,n){if(n.length>QI)return null;switch(kI(e,t)){case`markdown`:return{mount:`inline`,html:VM(n)};case`html`:return{mount:`sandbox`,html:n};default:return null}}async function eL(e,t,n={}){let{mime:r,text:i,bytes:a}=await ZI(e,t);if(!i){Op.open({path:t,content:a.buffer,mimeType:r,text:!1});return}let o=new TextDecoder().decode(a),s=await YI(e,t,o),c=$I(t,r,o);Op.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 tL(e,t){let{mime:n,bytes:r}=await ZI(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 nL(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 rL(e,t){try{return await e.stat(t),!0}catch{return!1}}async function iL(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(b(a,t))return}catch{}await rL(e,i)&&!confirm(`${i} already exists. Overwrite?`)||(await nL(e,t,i),await e.rm(t))}function aL(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 eL(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 tL(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&&XI(n)},{id:`delete`,label:`Delete`,destructive:!0,visible:a}];Ou.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 rL(n,t)&&!confirm(`${t} already exists. Overwrite?`))break;await nL(n,s,t);break}case`delete`:confirm(`Delete ${s}?`)&&await(await r()).rm(s);break;case`rename`:await iL(await r(),s)}}catch(e){o.error(`Overflow action "${n}" failed`,e)}})}var oL=`slicc-agent-message`,sL=`slicc-user-message`,cL=`${oL},${sL}`,lL=[`streaming`,`text`,`timestamp`,`queued`];function uL(e){return e.tagName.toLowerCase()===sL?e.shadowRoot?.querySelector(`.b`)??null:e.querySelector(`.body`)??e}function dL(e){try{return fL(e)}catch(t){return e.log.error(`Base64 preview wiring failed; continuing without it`,t),()=>{}}}function fL(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=uL(e);if(t&&_I(t.textContent??``).length!==0)try{BI(t)}catch(e){n.error(`Base64 elision failed`,e)}},i=e=>{for(let t of e.querySelectorAll(cL))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(cL)?r(e):i(e));let n=e?.closest?.(cL);n&&r(n)}});a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:lL});let o=e=>{let{payload:t}=e.detail;try{pL(t)}catch(e){n.error(`Base64 preview failed`,e)}};return t.addEventListener(PI,o),()=>{a.disconnect(),t.removeEventListener(PI,o)}}function pL(e){if(!e.text){Op.open({path:e.name,content:e.bytes.buffer,mimeType:e.mime,text:!1});return}let t=new TextDecoder().decode(e.bytes),n=$I(e.name,e.mime,t);Op.open({path:e.name,content:t,mimeType:e.mime,text:!0,...n?{rendered:n}:{}})}var mL;function hL(){if(mL)return mL;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(),mL=void 0,e.terminate()}),mL={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})})}},mL}var gL=`[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})`,_L=`[A-Za-z0-9._-]{1,100}`,vL=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 yL(e,t){return!vL.has(e.toLowerCase())&&t!==`.`&&t!==`..`}function bL(e){return e.replace(/\.git$/i,``)}function xL(e){let t;try{t=new URL(e)}catch{return null}return t.hostname!==`github.com`&&t.hostname!==`www.github.com`?null:t}function SL(e){let t=xL(e);if(!t)return null;let n=RegExp(`^/(${gL})/(${_L})/(issues|pull)/(\\d{1,7})(?:/|$)`).exec(t.pathname);if(!n)return null;let[,r=``,i=``,a,o=`0`]=n;return yL(r,i)?{owner:r,repo:bL(i),number:Number(o),kind:a===`pull`?`pull`:`issue`}:null}function CL(e){return`https://github.com/${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`}function wL(e){return`https://opengraph.githubassets.com/slicc/${e}`}function TL(e){return wL(`${e.owner}/${e.repo}/${e.kind===`pull`?`pull`:`issues`}/${e.number}`)}function EL(e){return e.kind===`pull`?`PR #${e.number}`:e.kind===`issue`?`Issue #${e.number}`:`#${e.number}`}function DL(e){return{kind:e.kind===`pull`?`pull`:`issue`,title:`${e.owner}/${e.repo}#${e.number}`,image:TL(e),badge:EL(e)}}function OL(e){try{return decodeURIComponent(e)}catch{return e}}var kL=RegExp(`^/(orgs|users)/(${gL})/(projects|discussions)/(\\d{1,7})(?:/|$)`),AL=RegExp(`^/(${gL})/(${_L})(?:/(.*))?$`),jL=/^discussions\/(\d{1,7})(?:\/|$)/,ML=/^commit\/([0-9a-fA-F]{7,40})(?:\/|$)/,NL=/^releases\/tag\/([^/?#]{1,128})(?:\/|$)/,PL=/^(?:raw|releases\/download)\//;function FL(e,t,n){if(PL.test(n))return null;let r=`${e}/${t}`,i=jL.exec(n);if(i){let e=Number(i[1]??0);return{kind:`discussion`,title:`${r}#${e}`,image:wL(`${r}/discussions/${e}`),badge:`Discussion #${e}`}}let a=ML.exec(n);if(a){let e=a[1]??``;return{kind:`commit`,title:`${r}@${e.slice(0,7)}`,image:wL(`${r}/commit/${e}`),badge:`Commit`}}let o=NL.exec(n);if(o){let e=o[1]??``;return{kind:`release`,title:`${r}@${OL(e)}`,image:wL(`${r}/releases/tag/${e}`),badge:`Release`}}return{kind:`repo`,title:r,image:wL(r),badge:`Repository`}}function IL(e){let t=SL(e);if(t)return DL(t);let n=xL(e);if(!n)return null;let r=kL.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:wL(`${e}/${t}/${n}/${i}`),badge:`${a?`Project`:`Discussion`} #${i}`}}let i=AL.exec(n.pathname);if(!i)return null;let[,a=``,o=``,s=``]=i;return yL(a,o)?FL(a,bL(o),s):null}var LL=RegExp(`(^|[^\\w/.-])(${gL})/(${_L})#(\\d{1,7})\\b`,`g`),RL=/\b(PRs?|pull requests?|issues?)\s+#?(\d{1,7})\b/gi,zL=/(^|[^\w&/#])#(\d{1,6})\b/g;function BL(e){return/^p/i.test(e)?`pull`:`issue`}function VL(e){let t=[],n=(e,n)=>t.some(t=>e<t.end&&n>t.start);for(let n of e.matchAll(LL)){let[e,r=``,i=``,a=``,o=`0`]=n,s=(n.index??0)+r.length,c=e.slice(r.length);yL(i,a)&&t.push({start:s,end:s+c.length,raw:c,number:Number(o),kind:`unknown`,owner:i,repo:bL(a)})}for(let r of e.matchAll(RL)){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:BL(i)})}for(let r of e.matchAll(zL)){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 HL=RegExp(`github\\.com[/:](${gL})/(${_L}?)(?:\\.git)?(?=$|[/\\s#?"'\`)\\]>,;])`,`g`),UL=RegExp(`(?:^|\\s)(?:-R|--repo)(?:\\s+|=)(${gL})/(${_L})`,`g`),WL=RegExp(`\\bgh\\s+repo\\s+(?:clone|view|fork|sync)\\s+(${gL})/(${_L})`,`g`);function GL(e){let t=[],n=[[HL,1,2],[UL,1,2],[WL,1,2],[LL,2,3]];for(let[r,i,a]of n)for(let n of e.matchAll(r)){let e=n[i]??``,r=bL(n[a]??``);!e||!r||!yL(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 KL(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 qL=12;function JL(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=GL(e)[0];if(t)return t}return null}function YL(e){if(!e.startsWith(`/`))return[];let t=e.split(`/`).filter(Boolean);t.pop();let n=[];for(;t.length>0&&n.length<qL;)n.push(`/${t.join(`/`)}`),t.pop();return n}var XL=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 YL(e)){let e=await this.#n(t);if(e)return e}return null}#n(e){let t=this.#t.get(e);if(t)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 JL(typeof t==`string`?t:new TextDecoder().decode(t))}catch{return null}}},ZL=.4,QL=6,$L=8,eR=2e3,tR=/\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,nR=new Set([`now`,`right now`,`currently`,`then`,`soon`,`later`,`earlier`,`recently`,`once`,`first`,`second`,`today`,`day`,`a day`,`the day`]),rR=/([.!?;:])\s+|\n+|,\s+(?=(?:and|but|then|so|while|or)\b)/gi,iR=/\s+(?:and|but|then|so|or)\s+/gi;function aR(e){return e.length>=3&&tR.test(e)}function oR(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(rR)){let e=t.index??0;r(n,t[1]?e+1:e),n=e+t[0].length}return r(n,e.length),t}function sR(e){let t=[],n=0;for(let r of e.matchAll(iR)){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 cR(e){return e.trim().split(/\s+/).length}function lR(e){let t=e.trim().toLowerCase().replace(/[.,;:!?]+$/,``);return!(t.length<3||nR.has(t)||/^\d+$/.test(t))}async function uR(e,t,n){let r=e.map(()=>[]),i=[];if(e.forEach((e,t)=>{if(aR(e))for(let n of oR(e.slice(0,eR)))aR(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=sR(t.text);r.length>1&&cR(t.text)>QL&&t.confidence>=ZL?s.push({base:e,parts:r}):t.confidence>=.8&&lR(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||!lR(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,$L).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 dR=null;function fR(){return dR??=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 dR=null,e}),dR}function pR(e=new Date){let t=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`;return{reference:e.toISOString(),timeZone:t}}var mR=262144,hR=400,gR=/<meta\b[^>]*>/gi,_R=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g,vR=/<title\b[^>]*>([\s\S]*?)<\/title>/i,yR={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,nbsp:`\xA0`,hellip:`…`,mdash:`—`,ndash:`–`,rsquo:`’`,lsquo:`‘`,rdquo:`”`,ldquo:`“`};function bR(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 yR[t.toLowerCase()]??e})}function xR(e){let t=new Map;for(let n of e.matchAll(_R)){let e=n[1]?.toLowerCase();e&&t.set(e,n[2]??n[3]??n[4]??``)}return t}function SR(e){if(!e)return;let t=bR(e).replace(/\s+/g,` `).trim();if(t)return t.length>hR?`${t.slice(0,399)}…`:t}function CR(e,t){if(e)try{let n=new URL(bR(e).trim(),t);return n.protocol===`https:`||n.protocol===`http:`?n.href:void 0}catch{return}}function wR(e,t){let n=e.search(/<\/head\s*>/i),r=e.slice(0,n>=0?n:mR),i=new Map;for(let e of r.matchAll(gR)){let t=xR(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=SR(a(`og:title`,`twitter:title`)??vR.exec(r)?.[1]),c=SR(a(`og:description`,`twitter:description`,`description`)),l=CR(a(`og:image:secure_url`,`og:image`,`og:image:url`,`twitter:image`,`twitter:image:src`),t),u=SR(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 TR=/\.(png|jpe?g|gif|webp|avif|svg|bmp|ico)$/i,ER=524288,DR=2097152,OR=8e3,kR=200;function AR(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}function jR(e,t){return e[t]??e[t.toLowerCase()]??``}function MR(e,t){return{url:e,state:`ready`,title:t.title,image:t.image,siteName:`GitHub`,badge:t.badge}}function NR(e,t){return MR(e,DL(t))}var PR=class{#e;#t;#n;#r=new Map;constructor(e){this.#e=e.getFetch,this.#t=e.timeoutMs??OR,this.#n=e.maxEntries??kR}peek(e){return this.#r.get(e)}preview(e){let t=this.#r.get(e);if(t)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=AR(e);if(!t)return{url:e,state:`error`};let n=IL(e);if(n)return MR(e,n);if(TR.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=jR(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=wR(new TextDecoder().decode(i.body.subarray(0,ER)),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))}},FR=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(`.`)),IR=/^(?:(?:so|ok(?:ay)?|also|now|then|and|but|alright|great|next|finally|lastly|quick question)\b[,:\s]*)+/i,LR=/[.!?]+(?=\s|$)|\n+/g,RR=/,?\s+or\s+(?!not\b)\S/i;function zR(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 BR(e){let t=e.trim();if(!t.endsWith(`?`))return null;let n=t.replace(IR,``).trim(),r=n.split(/[\s,]+/)[0]?.toLowerCase()??``;return FR.has(r)?RR.test(n)?`text`:`yes-no`:zR(n)}function VR(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(LR)){let e=t.index??0,i=t[0].startsWith(`
|
|
8905
|
+
`);r(n,i?e:e+t[0].length),n=e+t[0].length}return r(n,e.length),t}function HR(e){let t=[];for(let{start:n,text:r}of VR(e)){if(r.length<4)continue;let e=BR(r);e&&t.push({start:n,end:n+r.length,text:r,kind:e})}return t}var UR=`data-preview`,WR=`github-mention`,GR=`time-mention`,KR=`agent-question`,qR=`data-question`,JR=`data-question-kind`,YR=`data-question-id`,XR=`data-question-controls`,ZR=`data-question-options`,QR=`data-question-default`,$R=`data-question-multi`,ez={owner:`data-gh-owner`,repo:`data-gh-repo`,number:`data-gh-number`,kind:`data-gh-kind`},tz=`data-answered`,nz=`agent-question-answer`,rz=`data-mention-previews`,iz=new Set([`A`,`PRE`,`SCRIPT`,`STYLE`,`TEXTAREA`,`BUTTON`,`SLICC-QUESTION-PROMPT`]),az=new Set([...iz,`CODE`,`KBD`,`SAMP`]),oz=`p,li,h1,h2,h3,h4,h5,h6,td,th,blockquote,dd,dt,figcaption`,sz=new WeakMap;function cz(e){return sz.get(e)}function lz(e){let t=e.getAttribute(ez.owner),n=e.getAttribute(ez.repo),r=Number(e.getAttribute(ez.number)),i=e.getAttribute(ez.kind);return!t||!n||!Number.isInteger(r)||r<=0?null:{owner:t,repo:n,number:r,kind:i===`pull`||i===`issue`?i:`unknown`}}function uz(e){return`${e.childNodes.length}:${e.textContent?.length??0}`}function dz(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 fz(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()&&(dz(i,e,t,n)||r.push(i))}return r}function pz(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 mz(e){for(let t of e.querySelectorAll(`a[href]`))t.hasAttribute(`data-preview`)||t.closest(`pre`)||/^https?:\/\//i.test(t.getAttribute(`href`)??``)&&t.setAttribute(UR,`link`)}var hz=0;function gz(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`:BR(e.prompt)??`text`,options:n,defaultIndex:r===-1?null:r,multiSelect:e.multiSelect}}function _z(e){let t=``,n=null,r=[];for(let i of fz(e,iz,KR)){let a=i.parentElement?.closest(`li`)??i.parentElement?.closest(oz)??e;n&&a!==n&&(t+=`
|
|
8906
|
+
`),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 vz(e,t,n){let r=t.filter(({start:e,end:t})=>n.start<t&&n.end>e);if(r.length===0)return;let i=xz(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);pz(e,[{start:o-t,end:s-t}],()=>{let t=e.ownerDocument.createElement(`span`);return t.className=KR,t.setAttribute(UR,`question`),t.setAttribute(YR,i),t.setAttribute(qR,n.text),t.setAttribute(JR,n.kind),r[0]?.node===e&&(t.tabIndex=0),t})}let a=e.ownerDocument.createElement(`slicc-question-prompt`);a.setAttribute(XR,i),a.setAttribute(`inline`,``),a.setAttribute(`question`,n.text),a.setAttribute(`kind`,n.kind),a.setAttribute(ZR,JSON.stringify(n.options)),n.defaultIndex!==null&&a.setAttribute(QR,String(n.defaultIndex)),n.multiSelect&&a.setAttribute($R,``);let o=r[r.length-1]?.block;o===e||o?.tagName===`LI`?o.append(a):o?.after(a)}async function yz(e,t){if(e.querySelector(`.agent-question`))return;let{text:n,spans:r}=_z(e);if(!/[??]/.test(n)&&(!t.getQuestionParser||!/:\s*\n/.test(n)))return;let i;if(t.getQuestionParser)try{i=(await t.getQuestionParser().parse(n)).map(gz)}catch{i=HR(n).map(e=>({...e,options:[],defaultIndex:null,multiSelect:!1}))}else i=HR(n).map(e=>({...e,options:[],defaultIndex:null,multiSelect:!1}));if(e.isConnected)for(let t of i.reverse())vz(e,r,t)}var bz=new WeakMap;function xz(e,t){let n=bz.get(t);n||(n=new Map,bz.set(t,n));let r=n.get(e);return r||(hz+=1,r=`q${hz}`,n.set(e,r)),r}async function Sz(e,t){let n=fz(e,az).map(e=>({node:e,data:e.data,mentions:VL(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:KL(e,r)})).filter(e=>e.ref!==null);n.length!==0&&pz(e,n.map(({mention:e})=>e),(t,r)=>{let i=n[r].ref,a=e.ownerDocument.createElement(`a`);return a.className=WR,a.href=CL(i),a.target=`_blank`,a.rel=`noopener noreferrer`,a.setAttribute(UR,`github`),a.setAttribute(ez.owner,i.owner),a.setAttribute(ez.repo,i.repo),a.setAttribute(ez.number,String(i.number)),a.setAttribute(ez.kind,i.kind),a.setAttribute(`aria-label`,`${i.owner}/${i.repo} ${EL(i)}`),a})}}async function Cz(e,t){if(!t.getTimeParser||!t.timeContext)return;let n=fz(e,az,GR).filter(e=>aR(e.data));if(n.length===0)return;let r=n.map(e=>e.data),i=await t.getTimeParser(),a=await uR(r,t.timeContext,i);n.forEach((e,t)=>{let n=a[t]??[];n.length!==0&&(!e.isConnected||e.data!==r[t]||pz(e,n,(t,r)=>{let i=e.ownerDocument.createElement(`span`);i.className=GR,i.setAttribute(UR,`time`);let a=n[r];return a&&sz.set(i,a),i}))})}function wz(e,t,n=()=>{}){let r=Tz.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 Ez(e,t,n);i.rerun;){let t=i.rerun;i.rerun=null,await Ez(e,t.ctx,t.onError)}}finally{Tz.delete(e)}})(),Tz.set(e,i),i.promise}var Tz=new WeakMap;async function Ez(e,t,n){let r=uz(e);if(e.getAttribute(rz)===r)return;let i=async(e,t)=>{try{await t()}catch(t){n(e,t)}};await i(`links`,()=>mz(e)),t.questions&&await i(`questions`,()=>yz(e,t)),await i(`github`,()=>Sz(e,t)),await i(`times`,()=>Cz(e,t)),e.setAttribute(rz,uz(e))}var Dz=`slicc-agent-message`,Oz=`slicc-user-message`,kz=`slicc-action-row`,Az=`[${UR}]`,jz=2e4,Mz=280,Nz=`data-msg-time`;function Pz(e,t){let n=Number(e.getAttribute(Nz));return Number.isFinite(n)&&n>0?new Date(n):t()}var Fz=900,Iz=new WeakMap;function Lz(e,t){Iz.set(e,t)}function Rz(e){let t=globalThis.requestIdleCallback;typeof t==`function`?t(e):setTimeout(e,0)}function zz(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 Bz(e){if(e.tagName.toLowerCase()===Oz)return e.getAttribute(`text`)??``;let t=Array.from(e.querySelectorAll(`a[href]`),e=>e.getAttribute(`href`)??``);return`${(e.textContent??``).slice(0,jz)} ${t.join(` `)}`}function Vz(e,t){let n=zz(e,t,`${kz},${Dz},${Oz}`),r=[];for(let e of[...n,t])for(let t of GL(Bz(e))){let e=r.findIndex(e=>e.toLowerCase()===t.toLowerCase());e>=0&&r.splice(e,1),r.push(t)}return r}function Hz(e,t){return zz(e,t,`${kz}[${VO}]`).flatMap(e=>YO(e.getAttribute(`data-file-paths`)??``))}function Uz(){return t(async()=>{let{createProxiedFetch:e}=await import(`./proxied-fetch-DiXk_XGs.js`).then(e=>e.i);return{createProxiedFetch:e}},__vite__mapDeps([15,1,2,16,17,18,19])).then(({createProxiedFetch:e})=>{let t=e({maxResponseBytes:DR});return(e,n)=>t(e,n)})}function Wz(e){try{return nB(e)}catch(t){return e.log.error(`Mention preview wiring failed; continuing without it`,t),()=>{}}}function Gz(e){let t=new Set,n=e=>e?.tagName.toLowerCase()===Dz;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(Dz))t.add(n)}let i=e?.closest?.(Dz);i&&t.add(i)}return t}function Kz(e,t,n){for(let n of e.querySelectorAll(Dz))t(n);let r=new MutationObserver(e=>{for(let n of Gz(e))t(n);n()});return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`streaming`]}),()=>r.disconnect()}var qz=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(`[${qR}]`)){let n=this.#t(e,t.getAttribute(`data-question`)??``);t.toggleAttribute(tz,this.#e.has(n))}for(let t of e.querySelectorAll(`[${XR}]`)){let n=t.getAttribute(XR),r=Array.from(e.querySelectorAll(`[${YR}]`)).find(e=>e.getAttribute(YR)===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(Dz))this.mark(e)}statusOf(e){let t=e.closest(Dz),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(Dz);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(Oz))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(Dz),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(nz,{detail:a,bubbles:!0,composed:!0})),!0}};function Jz(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function Yz(e,t){e.setAttribute(`url`,t.url),e.setAttribute(`state`,t.state),Jz(e,`heading`,t.title),Jz(e,`description`,t.description),Jz(e,`image`,t.image),Jz(e,`site`,t.siteName),Jz(e,`badge`,t.badge)}function Xz(e,t,n){let r=document.createElement(`slicc-link-preview`),i=e.href;return Yz(r,{url:i,state:`loading`}),n.fetcher.preview(i).then(n=>{t.anchor===e&&(Yz(r,n),t.reposition())}),r}function Zz(e){let t=lz(e);if(!t)return null;let n=NR(CL(t),t),r=document.createElement(`slicc-link-preview`);return Yz(r,{...n,siteName:n.siteName??`GitHub`}),r}function Qz(e,t){let n=cz(e);if(!n)return null;let r=pR(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 $z(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(YR),c=Array.from(e.closest(Dz)?.querySelectorAll(`[data-question-controls]`)??[]).find(e=>e.getAttribute(XR)===s);for(let e of[ZR,QR,$R]){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(Fz))}),r}function eB(e,t,n){switch(e.getAttribute(UR)){case`link`:return e instanceof HTMLAnchorElement?Xz(e,t,n):null;case`github`:return e instanceof HTMLAnchorElement?Zz(e):null;case`time`:return Qz(e,n);case`question`:return $z(e,t,n);default:return null}}function tB({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(Az);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 nB(e){let{thread:t,log:n}=e;if(!(t instanceof Node))return()=>{};let r=e.now??(()=>new Date),i=e.getTimeParser??fR,a=new qz(t,e.isReadOnly,()=>s()),o=[],s=()=>{let n=e.inputCard;if(!n)return;let r=Array.from(t.querySelectorAll(`[${XR}]`));for(let e of r)e.hidden||=!0;let i=r.map(e=>{let t=e.closest(Dz),n=e.getAttribute(XR),r=Array.from(t?.querySelectorAll(`[data-question-id]`)??[]).find(e=>e.getAttribute(YR)===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`,ZR,QR,$R]){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(Dz),r=t.getAttribute(XR),i=Array.from(n?.querySelectorAll(`[data-question-id]`)??[]).find(e=>e.getAttribute(YR)===r);i&&a.answer(i,e.detail)};t.addEventListener(`question-answer`,c);let l={fetcher:new PR({getFetch:e.getFetch??Uz}),questions:a,now:r},u=null,d=e=>async()=>{let n=Iz.get(t);if(!n)return null;u?.opener!==n&&(u={opener:n,resolver:n().then(e=>new XL(e))});let r=Hz(t,e);return r.length===0?null:(await u.resolver).repoFor(r)},f=Kz(t,o=>{if(!(o instanceof HTMLElement)||o.hasAttribute(`streaming`))return;let c=o.querySelector(`.body`)??o;Rz(()=>{c.isConnected&&wz(c,{repoHints:Vz(t,o),resolveRepoFallback:d(o),getTimeParser:i,timeContext:pR(Pz(o,r)),questions:!0,getQuestionParser:e.getQuestionParser??(typeof Worker==`function`?hL: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=tB({thread:t,getCard:e.getCard??(()=>Vu.shared(document)),content:(e,t)=>eB(e,t,l),hoverDelay:e.hoverDelayMs??Mz,log:n});return()=>{t.removeEventListener(`question-answer`,c),m(),f(),p.disconnect(),e.inputCard?.setQuestionContent(null);for(let e of t.querySelectorAll(`[${XR}]`))e.hidden&&=!1}}var rB=e({FREEZER_TINT:()=>iB,applyComposerAvailability:()=>_B,applyShellContext:()=>gB,buildWcShellFrame:()=>hB,mountWcUiPreview:()=>bB,submittedSteer:()=>yB,submittedText:()=>vB}),iB=`#3b6cb2`,aB=`slicc-wcui-style`,oB=[`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;}`,XD].join(``);function sB(e){if(e.getElementById(aB))return;let t=e.createElement(`style`);t.id=aB,t.textContent=oB,e.head.appendChild(t)}var cB=null;function lB(){cB?.(),cB=rg()}function $(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function uB(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 dB(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 fB(){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 pB(e,t){e.addEventListener(`slicc-dock-select`,e=>{let n=e.detail?.id;!n||t.has(n)})}function mB(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 hB(e,t){eg(document),sB(document),lB();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(...vP(t.messages));let{composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h}=dB(t);l.append(u,d);let{dockTree:g,tree:_,termSurface:v,memoryHost:y,monitor:b}=fB(),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 w=new Set;pB(C,w),mB(C,g),a.addEventListener(`freezer-toggle`,e=>{let t=e.detail?.open===!0;o.style.setProperty(`--rail-w`,t?`260px`:`44px`)});let ee=0;u.addEventListener(`scroll`,()=>{ee||=requestAnimationFrame(()=>{ee=0,i.setAttribute(`scroll`,String(Math.round(u.scrollTop)))})},{passive:!0});let{nav:te,switcher:ne,floatbar:re,avatarMenu:ie}=uB(t);o.append(te,c);let ae=aI({switcher:ne,dock:C,freezer:a,composerMeta:p,composer:d,chatPane:l,inputCard:f,thread:u,frame:r,dockTree:g,fileTree:_,memoryHost:y}),{panelHost:oe,trustedLayer:T}=ZD(document);return oe.append(i,a,o),r.append(oe,T),e.replaceChildren(r),dL({thread:u,log:n(`base64-preview`)}),Wz({thread:u,inputCard:f,isReadOnly:()=>d.hasAttribute(`hidden`),log:n(`mention-preview`)}),{frame:r,panelHost:oe,trustedLayer:T,shader:i,chatPane:l,thread:u,composer:d,inputCard:f,composerMeta:p,queuedStack:m,lickBackpressureNotice:h,switcher:ne,floatbar:re,shell:c,dockTree:g,dock:C,freezer:a,fileTree:_,termSurface:v,memoryHost:y,monitor:b,avatarMenu:ie,shortcuts:ae,overlaySurfaces:w}}function gB(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`,iB),r.style.setProperty(`--ctx`,iB),i.setAttribute(`ctx`,``))}function _B(e,t){e.composer.toggleAttribute(`hidden`,t),t&&e.inputCard.setAttribute(`disabled`,``)}function vB(e){return e.detail?.value}function yB(e){return e.detail?.steer===!0}function bB(e){let t=hB(e,{messages:AO(),scoops:[{key:`cone`,type:`cone`,color:`#b07823`,label:`sliccy`,eyes:`open`,state:`working`},{key:bO,type:`scoop`,color:`#06b6d4`,label:bO,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=vB(e)?.trim();if(!n)return;let r={id:`wc-echo-${t.thread.childElementCount}`,role:`user`,content:n,timestamp:Date.now()};t.thread.append(...mP(r))})}export{dn as $,gO as A,zn as B,mP as C,ue as Ct,VO as D,te as Dt,VM as E,de as Et,vd as F,Rn as G,ir as H,Jl as I,kn as J,Pn as K,Gs as L,QD as M,qD as N,YO as O,ne as Ot,of as P,fn as Q,qs as R,_P as S,ce as St,qN as T,ie as Tt,Yn as U,Xn as V,Qn as W,vn as X,jn as Y,yn as Z,bP as _,Le as _t,yB as a,rn as at,EN as b,he as bt,Lz as c,zt as ct,aL as d,It as dt,un as et,qP as f,Ft as ft,UP as g,A as gt,JP as h,ze as ht,hB as i,an as it,pO as j,BO as k,nz as l,xt as lt,KP as m,ge as mt,_B as n,sn as nt,vB as o,on as ot,yP as p,ht as pt,Dn as q,gB as r,Yt as rt,rB as s,Jt as st,iB as t,nn as tt,eL as u,Lt as ut,ON as v,Be as vt,rP as w,le as wt,hP as x,ae as xt,DN as y,fe as yt,Bn as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./logger-DDBAeTLF.js";import{_ as t,f as n,g as r,h as i,m as a,p as o}from"./wc-shell-
|
|
1
|
+
import{t as e}from"./logger-DDBAeTLF.js";import{_ as t,f as n,g as r,h as i,m as a,p as o}from"./wc-shell-DrXhF-lo.js";var s=`{
|
|
2
2
|
"//": [
|
|
3
3
|
"Keyboard-mode shortcuts. How the mode is entered is controlled by",
|
|
4
4
|
"\\"trigger\\" (also switchable in Theme settings):",
|