glimmervoid 0.52.2-next.697 → 0.52.2-next.699
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/glimmervoid.js +15 -10
- package/dist/chunks/{adapters-BbOhEt3K.js → adapters-BQVgsufG.js} +1 -1
- package/dist/chunks/{adapters-KsgiBN7g.js → adapters-BwrJAzEk.js} +2 -2
- package/dist/chunks/agent-api-cli-CAVmc6oB.js +1 -0
- package/dist/chunks/{agent-api-cli-oEczDo6J.js → agent-api-cli-CtQRT4Db.js} +1 -1
- package/dist/chunks/{agent-api-core-Bx7YtsJX.js → agent-api-core-Ddnr3HgI.js} +45 -1
- package/dist/chunks/{config-DMO8GHVh.js → config-BL8YQ3Ak.js} +1 -1
- package/dist/chunks/config-store-CEM4SJvM.js +1 -0
- package/dist/chunks/{config-store-BZU0pwDi.js → config-store-aB3AE95Q.js} +1 -1
- package/dist/chunks/{main-BJFZUB8b.js → main-D6DExe_h.js} +9 -104
- package/dist/chunks/{pr-flows-external-BRtHbSYM.js → pack-agent-DlW4j1b6.js} +267 -170
- package/dist/chunks/pack-bridge-CQ2Jlear.js +153 -0
- package/dist/chunks/packs-cli-DCKa39sG.js +502 -0
- package/dist/chunks/packs-cli-DV__4MB_.js +1 -0
- package/dist/chunks/{pair-cli-COUf3oqu.js → pair-cli-Dud8jpuO.js} +2 -2
- package/dist/chunks/{pr-flows-cli-CXEWmN7B.js → pr-flows-cli-Clw5RPyH.js} +7 -16
- package/dist/chunks/pr-flows-external-DfN4780W.js +147 -0
- package/dist/chunks/{remote-config-DGikQcIX.js → remote-config-dHj-Qfux.js} +1 -1
- package/dist/chunks/{settings-cli-C1MpfiMd.js → settings-cli-9Z0TOaxK.js} +4 -4
- package/dist/chunks/{settings-readout-core-CmSf-Xx7.js → settings-readout-core-c06UYQ-8.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-CzTz9BiL.js → ssh-sign-cli-CtLGtrUf.js} +1 -1
- package/dist/client/assets/{action-status-DP6ioCmx.js → action-status-Bbo7Fyia.js} +1 -1
- package/dist/client/assets/action-status-Bbo7Fyia.js.br +0 -0
- package/dist/client/assets/{arena-panel-Bq_N5X1d.js → arena-panel-DjLi_oT2.js} +2 -2
- package/dist/client/assets/arena-panel-DjLi_oT2.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-ryHZdeXk.js → benchmark-panel-BGIM23C6.js} +1 -1
- package/dist/client/assets/benchmark-panel-BGIM23C6.js.br +0 -0
- package/dist/client/assets/{boards-view-gTzMZiol.js → boards-view-DVlW49Sr.js} +1 -1
- package/dist/client/assets/boards-view-DVlW49Sr.js.br +0 -0
- package/dist/client/assets/button-CeEmJCQe.js +1 -0
- package/dist/client/assets/button-CeEmJCQe.js.br +0 -0
- package/dist/client/assets/{card-actions-zCz9tHtX.js → card-actions-D5VASOyl.js} +1 -1
- package/dist/client/assets/{card-registry-BDFzrxQP.js → card-registry-CxPu9XGn.js} +1 -1
- package/dist/client/assets/card-registry-CxPu9XGn.js.br +0 -0
- package/dist/client/assets/{community-panel-BO1QiePf.js → community-panel-BTKm5Lhg.js} +1 -1
- package/dist/client/assets/community-panel-BTKm5Lhg.js.br +0 -0
- package/dist/client/assets/{control-ws-UoNejDTB.js → control-ws-DxQoY1aG.js} +1 -1
- package/dist/client/assets/control-ws-DxQoY1aG.js.br +0 -0
- package/dist/client/assets/{dialogs-dHL1tDYy.js → dialogs-B2pJJnBE.js} +1 -1
- package/dist/client/assets/dialogs-B2pJJnBE.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-chyeOfet.js → doc-editor-ui-Bbxos6dN.js} +1 -1
- package/dist/client/assets/doc-editor-ui-Bbxos6dN.js.br +0 -0
- package/dist/client/assets/{feature-hint-DPfwv8Qe.js → feature-hint-DQt3iscN.js} +1 -1
- package/dist/client/assets/feature-hint-DQt3iscN.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-w-110hem.js → first-run-checklist-BTtzaAxJ.js} +1 -1
- package/dist/client/assets/first-run-checklist-BTtzaAxJ.js.br +0 -0
- package/dist/client/assets/{hooks-panel-DuVgf_lN.js → hooks-panel-ezwWnzzh.js} +1 -1
- package/dist/client/assets/hooks-panel-ezwWnzzh.js.br +0 -0
- package/dist/client/assets/index-MrcTP834.js +75 -0
- package/dist/client/assets/index-MrcTP834.js.br +0 -0
- package/dist/client/assets/{issues-panel-qlnHYLBW.js → issues-panel-tctX4Q02.js} +1 -1
- package/dist/client/assets/issues-panel-tctX4Q02.js.br +0 -0
- package/dist/client/assets/{lane-read-token-step-oXeNfMHE.js → lane-read-token-step-DkaiOW-4.js} +1 -1
- package/dist/client/assets/lane-read-token-step-DkaiOW-4.js.br +0 -0
- package/dist/client/assets/{menu-ER74fqs1.js → menu-ByAf-D4t.js} +1 -1
- package/dist/client/assets/menu-ByAf-D4t.js.br +0 -0
- package/dist/client/assets/{modal-T0t68alc.js → modal-Cccq9QKp.js} +1 -1
- package/dist/client/assets/modal-Cccq9QKp.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-DghSKpbk.js → my-prs-panel-DoxJN1p6.js} +1 -1
- package/dist/client/assets/my-prs-panel-DoxJN1p6.js.br +0 -0
- package/dist/client/assets/{nyan-cat-trmJWrVl.js → nyan-cat-DYqFVEIO.js} +1 -1
- package/dist/client/assets/nyan-cat-DYqFVEIO.js.br +0 -0
- package/dist/client/assets/{phone-shell-BdcE4Ih2.js → phone-shell-D2vARBmz.js} +1 -1
- package/dist/client/assets/phone-shell-D2vARBmz.js.br +0 -0
- package/dist/client/assets/{plan-face-Ctp6Q2w0.js → plan-face-3E2usY8A.js} +1 -1
- package/dist/client/assets/plan-face-3E2usY8A.js.br +0 -0
- package/dist/client/assets/{plan-render-DeOz3r6C.js → plan-render-DolHJmvM.js} +1 -1
- package/dist/client/assets/plan-render-DolHJmvM.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns--vCEWzQx.js → pr-queue-columns-DrjGb4RH.js} +1 -1
- package/dist/client/assets/pr-queue-columns-DrjGb4RH.js.br +0 -0
- package/dist/client/assets/{pr-status-icon-Bt7cQdYv.js → pr-status-icon-DxYoCfBP.js} +1 -1
- package/dist/client/assets/pr-status-icon-DxYoCfBP.js.br +0 -0
- package/dist/client/assets/{radar-panel-D0wJY_nu.js → radar-panel-iLONRxIB.js} +1 -1
- package/dist/client/assets/radar-panel-iLONRxIB.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-BtWcg5vC.js → repo-roots-adder-B7o85a0g.js} +1 -1
- package/dist/client/assets/repo-roots-adder-B7o85a0g.js.br +0 -0
- package/dist/client/assets/{resume-dialog-DQDyaeEE.js → resume-dialog-Dee6nJCh.js} +1 -1
- package/dist/client/assets/resume-dialog-Dee6nJCh.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-BcWmyEjv.js → review-queue-panel-smdp-hn3.js} +1 -1
- package/dist/client/assets/review-queue-panel-smdp-hn3.js.br +0 -0
- package/dist/client/assets/{session-actions-O2gdJm4Y.js → session-actions-Bup-o08b.js} +2 -2
- package/dist/client/assets/session-actions-Bup-o08b.js.br +0 -0
- package/dist/client/assets/{session-row-OLB0sL3R.js → session-row-A_MI5_sD.js} +1 -1
- package/dist/client/assets/session-row-A_MI5_sD.js.br +0 -0
- package/dist/client/assets/{session-tick-CICZHafe.js → session-tick-lPppK7OC.js} +1 -1
- package/dist/client/assets/session-tick-lPppK7OC.js.br +0 -0
- package/dist/client/assets/{settings-panel-CVhn_sVH.js → settings-panel-BnyIiop4.js} +2 -2
- package/dist/client/assets/settings-panel-BnyIiop4.js.br +0 -0
- package/dist/client/assets/{setup-step-CaBKPldA.js → setup-step-B0XzLQJc.js} +1 -1
- package/dist/client/assets/setup-step-B0XzLQJc.js.br +0 -0
- package/dist/client/assets/{shown-face-B0wjZKZT.js → shown-face-DZEzOG7B.js} +1 -1
- package/dist/client/assets/shown-face-DZEzOG7B.js.br +0 -0
- package/dist/client/assets/{trace-panel-D2XB5RxU.js → trace-panel-rD_JORVh.js} +1 -1
- package/dist/client/assets/trace-panel-rD_JORVh.js.br +0 -0
- package/dist/client/assets/{usage-panel-B1dQfY6p.js → usage-panel-B6oMuE3s.js} +1 -1
- package/dist/client/assets/usage-panel-B6oMuE3s.js.br +0 -0
- package/dist/client/assets/{your-day-tip-Brj1r-sQ.js → your-day-tip-CnENMCMS.js} +1 -1
- package/dist/client/assets/your-day-tip-CnENMCMS.js.br +0 -0
- package/dist/client/index.html +12 -12
- package/dist/client/index.html.br +0 -0
- package/dist/examples/packs/plan-usage/icon.svg +1 -0
- package/dist/examples/packs/plan-usage/pack.json +11 -0
- package/dist/examples/packs/plan-usage/panel/bridge.js +23 -0
- package/dist/examples/packs/plan-usage/panel/index.html +15 -0
- package/dist/examples/packs/plan-usage/panel/panel.css +15 -0
- package/dist/examples/packs/plan-usage/panel/panel.js +56 -0
- package/dist/schema/pack.v1.json +43 -21
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/agent-api-cli-D93znXwp.js +0 -1
- package/dist/chunks/config-store-DT65GJMG.js +0 -1
- package/dist/chunks/pack-bridge-DifQHfqf.js +0 -152
- package/dist/client/assets/action-status-DP6ioCmx.js.br +0 -0
- package/dist/client/assets/arena-panel-Bq_N5X1d.js.br +0 -0
- package/dist/client/assets/benchmark-panel-ryHZdeXk.js.br +0 -0
- package/dist/client/assets/boards-view-gTzMZiol.js.br +0 -0
- package/dist/client/assets/button-CBoNTVJe.js +0 -1
- package/dist/client/assets/button-CBoNTVJe.js.br +0 -0
- package/dist/client/assets/card-registry-BDFzrxQP.js.br +0 -0
- package/dist/client/assets/community-panel-BO1QiePf.js.br +0 -0
- package/dist/client/assets/control-ws-UoNejDTB.js.br +0 -0
- package/dist/client/assets/dialogs-dHL1tDYy.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-chyeOfet.js.br +0 -0
- package/dist/client/assets/feature-hint-DPfwv8Qe.js.br +0 -0
- package/dist/client/assets/first-run-checklist-w-110hem.js.br +0 -0
- package/dist/client/assets/hooks-panel-DuVgf_lN.js.br +0 -0
- package/dist/client/assets/index-o7oGy8XE.js +0 -75
- package/dist/client/assets/index-o7oGy8XE.js.br +0 -0
- package/dist/client/assets/issues-panel-qlnHYLBW.js.br +0 -0
- package/dist/client/assets/lane-read-token-step-oXeNfMHE.js.br +0 -0
- package/dist/client/assets/menu-ER74fqs1.js.br +0 -0
- package/dist/client/assets/modal-T0t68alc.js.br +0 -0
- package/dist/client/assets/my-prs-panel-DghSKpbk.js.br +0 -0
- package/dist/client/assets/nyan-cat-trmJWrVl.js.br +0 -0
- package/dist/client/assets/phone-shell-BdcE4Ih2.js.br +0 -0
- package/dist/client/assets/plan-face-Ctp6Q2w0.js.br +0 -0
- package/dist/client/assets/plan-render-DeOz3r6C.js.br +0 -0
- package/dist/client/assets/pr-queue-columns--vCEWzQx.js.br +0 -0
- package/dist/client/assets/pr-status-icon-Bt7cQdYv.js.br +0 -0
- package/dist/client/assets/radar-panel-D0wJY_nu.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-BtWcg5vC.js.br +0 -0
- package/dist/client/assets/resume-dialog-DQDyaeEE.js.br +0 -0
- package/dist/client/assets/review-queue-panel-BcWmyEjv.js.br +0 -0
- package/dist/client/assets/session-actions-O2gdJm4Y.js.br +0 -0
- package/dist/client/assets/session-row-OLB0sL3R.js.br +0 -0
- package/dist/client/assets/session-tick-CICZHafe.js.br +0 -0
- package/dist/client/assets/settings-panel-CVhn_sVH.js.br +0 -0
- package/dist/client/assets/setup-step-CaBKPldA.js.br +0 -0
- package/dist/client/assets/shown-face-B0wjZKZT.js.br +0 -0
- package/dist/client/assets/trace-panel-D2XB5RxU.js.br +0 -0
- package/dist/client/assets/usage-panel-B1dQfY6p.js.br +0 -0
- package/dist/client/assets/your-day-tip-Brj1r-sQ.js.br +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e}from"./control-ws-UoNejDTB.js";import{S as t,g as n,m as r,r as i}from"./zod-_N0uRWDY.js";import{A as a,B as o,Bt as s,F as c,Fn as l,G as u,Gt as ee,I as te,In as ne,L as re,Pn as ie,R as ae,Rn as oe,U as se,V as ce,a as le,an as ue,o as de,rn as fe,t as d}from"./button-CBoNTVJe.js";import{A as pe,B as me,C as he,D as ge,E as _e,F as ve,G as ye,H as be,I as xe,L as Se,M as f,N as Ce,O as we,P as Te,R as Ee,T as De,U as Oe,V as ke,W as Ae,b as je,j as Me,k as Ne,s as p,w as m,z as Pe}from"./dom-helpers-Bs-xZEnd.js";import{a as h}from"./modal-T0t68alc.js";import{a as Fe,c as Ie,i as Le,s as Re,t as ze}from"./action-status-DP6ioCmx.js";import{E as Be,F as Ve,H as He,I as Ue,L as We,M as Ge,N as Ke,P as qe,Q as Je,R as Ye,U as Xe,V as Ze,a as Qe,b as $e,bt as et,dt as tt,et as nt,g as rt,gt as it,h as at,j as ot,l as st,o as ct,pt as lt,w as ut,x as dt,y as ft,yt as pt}from"./ui-prefs-Dyka19fU.js";import{A as mt,B as ht,C as gt,D as _t,Da as vt,E as yt,Ea as bt,F as xt,Fr as St,H as Ct,I as wt,Ir as Tt,L as Et,M as Dt,N as Ot,O as kt,Oa as At,P as jt,Pr as Mt,R as g,Rt as Nt,S as Pt,T as Ft,Ta as It,V as Lt,W as Rt,_a as zt,a as Bt,ba as Vt,c as Ht,ca as Ut,ct as Wt,ha as Gt,i as Kt,j as qt,k as Jt,ka as Yt,l as Xt,ma as Zt,n as Qt,o as $t,pa as en,pr as tn,r as nn,s as rn,st as an,t as on,va as sn,w as cn,wa as ln,xa as un,ya as dn,z as _}from"./index-o7oGy8XE.js";import{loadCustomSounds as fn,playAlertSound as pn,resolveSoundId as mn,soundOptions as hn}from"./alert-sound-Da6VQFBS.js";import{agentLoginSummary as gn,openAgentConnectDialog as _n,openRemoteSetupDialog as vn}from"./dialogs-dHL1tDYy.js";import{r as yn,t as bn}from"./flying-animal-preview-CstA5sSm.js";import{t as xn}from"./my-prs-panel-DghSKpbk.js";import{n as Sn,r as Cn,t as wn}from"./team-review-settings-core-BHv0yl1m.js";import{n as Tn,t as En}from"./nyan-cat-trmJWrVl.js";function Dn(){let e=p(`div`),t=p(`p`,`flying-animals-status`);t.id=`flying-animals-gallery-status`,t.setAttribute(`role`,`status`);let n=p(`div`,`flying-animals-gallery`);n.setAttribute(`aria-label`,`Animal gallery`);let r=[],i=()=>{let e=En(),n=tt(ct().flyingAnimalsExcludedSprites);t.textContent=[e,n?``:`No animals are included, so automatic flights are paused.`].filter(Boolean).join(` `);for(let t of r)t.disabled=e!==null},a=ct();for(let e of lt){let o=p(`article`,`flying-animal-tile`),s=bn(e),c=p(`label`,`flying-animal-include`),l=p(`input`,`settings-view-checkbox`);l.type=`checkbox`,l.checked=!a.flyingAnimalsExcludedSprites.includes(e.sprite),l.setAttribute(`aria-label`,`Include ${e.name}`),l.addEventListener(`change`,()=>{let t=new Set(ct().flyingAnimalsExcludedSprites);l.checked&&t.delete(e.sprite),l.checked||t.add(e.sprite),Ge([...t]),Ut(ft()),i()}),c.append(l,document.createTextNode(`Include`));let u=d({variant:`secondary`,label:`Fly now`});u.setAttribute(`aria-describedby`,t.id),u.addEventListener(`click`,()=>Tn(e.sprite)),r.push(u),o.append(s,p(`h2`,`flying-animal-name`,e.name),c,u),n.append(o)}return i(),e.append(t,n),e}var v={scope:`browser`,access:`editable`,takesEffect:`now`},y={scope:`browser`,access:`advanced`,takesEffect:`now`},b={scope:`machine`,access:`editable`,takesEffect:`now`},On={scope:`machine`,access:`editable`,takesEffect:`new-sessions`},x={scope:`machine`,access:`readout`,takesEffect:`now`},S={scope:`machine`,access:`file-only`},kn=1e3,An=60,jn=60,Mn=kn*An,Nn=Mn*jn,Pn={label:`investigations`,storedPerDisplay:1},Fn={label:`sessions`,storedPerDisplay:1},In={label:`recurrences`,storedPerDisplay:1},Ln={label:`actions`,storedPerDisplay:1},C={label:`seconds`,storedPerDisplay:1},Rn={label:`minutes`,storedPerDisplay:1},zn={label:`hours`,storedPerDisplay:1},w={label:`days`,storedPerDisplay:1},Bn={label:`seconds`,storedPerDisplay:kn,storedLabel:`ms`},Vn={label:`minutes`,storedPerDisplay:Mn,storedLabel:`ms`},Hn={label:`minutes`,storedPerDisplay:An,storedLabel:`seconds`},Un={label:`hours`,storedPerDisplay:Nn,storedLabel:`ms`},Wn={label:`hours`,storedPerDisplay:jn,storedLabel:`minutes`},Gn={label:`USD`,storedPerDisplay:1},Kn={label:`users`,storedPerDisplay:1},qn={label:`times`,storedPerDisplay:1},T=`A tuning knob kept out of the Settings view; the default suits almost every install.`,E=`A diagnostic switch kept out of the Settings view; change it in config.json while investigating.`,D=`Changes how the server process or its worktrees behave, so it is set in config.json with a restart or new sessions in mind.`,Jn=`A structured value with no dashboard control; edit it in config.json.`,Yn=`Never editable from the dashboard by rule; edit it in config.json.`;function Xn(e){return e.map(e=>({value:e,label:e[0].toUpperCase()+e.slice(1)}))}var Zn={id:`browser-appearance`,level:`browser`,title:`Appearance`,description:`How this browser draws the dashboard.`,legacyIds:[`browser-flying-animals`,`animals`,`flying-animals`],settings:[{id:`theme`,path:`pref:themeId`,title:`Theme`,description:`Color scheme for the dashboard.`,control:`select`,optionsFrom:`themes`,keywords:[`color`,`palette`],defaultValue:`phyrexian`,...v},{id:`phone-arrow-pad`,path:`pref:phoneArrowPad`,title:`Swipe arrow pad on phone`,description:`Swap the phone arrow keys for one pad you swipe on.`,control:`toggle`,keywords:[`experimental`,`mobile`,`keys`,`arrows`,`swipe`,`gesture`],defaultValue:!1,...v},{id:`flying-animals`,path:`pref:flyingAnimalsEnabled`,title:`Flying animals`,description:`Show animated animals flying across the dashboard.`,control:`toggle`,keywords:[`animation`,`motion`,`animals`],defaultValue:!1,...v},{id:`animals-min-gap`,path:`pref:flyingAnimalsMinGapSeconds`,title:`Time between flights: minimum`,description:`Shortest pause between flights.`,control:`number`,integer:!1,step:.1,range:_e,unit:C,maximumSettingId:`animals-max-gap`,keywords:[`animals`,`frequency`],defaultValue:m.flyingAnimalsMinGapSeconds,...y},{id:`animals-max-gap`,path:`pref:flyingAnimalsMaxGapSeconds`,title:`Time between flights: maximum`,description:`Longest pause between flights.`,control:`number`,integer:!1,step:.1,range:_e,unit:C,keywords:[`animals`,`frequency`],defaultValue:m.flyingAnimalsMaxGapSeconds,...y},{id:`animals-min-duration`,path:`pref:flyingAnimalsMinDurationSeconds`,title:`Flight duration: minimum`,description:`Shortest flight, for faster animals.`,control:`number`,integer:!1,step:.1,range:De,unit:C,maximumSettingId:`animals-max-duration`,keywords:[`animals`,`speed`],defaultValue:m.flyingAnimalsMinDurationSeconds,...y},{id:`animals-max-duration`,path:`pref:flyingAnimalsMaxDurationSeconds`,title:`Flight duration: maximum`,description:`Longest flight, for slower animals.`,control:`number`,integer:!1,step:.1,range:De,unit:C,keywords:[`animals`,`speed`],defaultValue:m.flyingAnimalsMaxDurationSeconds,...y},{id:`animals-scale`,path:`pref:flyingAnimalsScale`,title:`Size multiplier`,description:`Scale applied on top of the viewport size.`,control:`number`,integer:!1,step:.1,range:ge,unit:qn,keywords:[`animals`,`size`],defaultValue:m.flyingAnimalsScale,...y},{id:`animals-on-phone`,path:`pref:flyingAnimalsOnPhone`,title:`Show on phone layout`,description:`Allow flights on the phone layout.`,control:`toggle`,keywords:[`animals`,`mobile`],defaultValue:m.flyingAnimalsOnPhone,...y}]},Qn={id:`browser-notifications`,level:`browser`,title:`Notifications`,description:`How sessions get your attention.`,settings:[{id:`alert-sounds-enabled`,path:`pref:soundEnabled`,title:`Alert sounds`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sounds-enabled`}],description:`Play a sound when a session needs you, like the note button in the header.`,control:`toggle`,keywords:[`audio`,`mute`,`sound`,`notification`],defaultValue:!0,...v},{id:`alert-sound`,path:`pref:soundId`,title:`Alert sound`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sound`}],description:`Sound played when a session needs you, including files you add to ~/.glimmervoid/sounds/.`,control:`select`,optionsFrom:`sounds`,keywords:[`audio`,`notification`,`custom`],defaultValue:`chime`,...v},{id:`desktop-notifications`,path:`pref:notificationsEnabled`,title:`Desktop notifications`,legacyIds:[{sectionId:`browser-appearance`,settingId:`desktop-notifications`}],description:`Notify you when a session needs you and the dashboard is in the background.`,control:`toggle`,keywords:[`browser`,`attention`],defaultValue:!0,...v}]},$n={id:`browser-shortcuts`,level:`browser`,title:`Shortcuts`,description:`Keyboard shortcuts.`,legacyIds:[`shortcuts`],settings:[{id:`next-attention-key`,path:`pref:nextAttentionKeyCode`,title:`Jump to the next session needing you`,description:`Key held with Cmd on a Mac, or Alt elsewhere, to jump to the next session that needs you.`,control:`shortcut-key`,keywords:[`shortcut`,`keyboard`,`hotkey`,`jump`,`next`,`attention`],defaultValue:`KeyJ`,...v}]},er={id:`machine-telegram`,level:`machine`,parent:`browser-notifications`,title:`Telegram`,description:`One bot for session, review and PostHog alerts.`,legacyIds:[`telegram`,`notifications`],settings:[{id:`telegram-bot-token`,path:`telegram.botToken`,title:`Bot token`,description:`Token from @BotFather in Telegram (send /newbot).`,control:`password`,keywords:[`credential`,`api`],defaultValue:``,...b},{id:`telegram-chat-id`,path:`telegram.chatId`,title:`Chat id`,description:`Chat the bot posts to, read as message.chat.id from its getUpdates page after you message it.`,control:`text`,keywords:[`destination`,`channel`],defaultValue:``,...b},{id:`telegram-session-notifications`,path:`telegramNotifications`,title:`Send session notifications`,description:`Alert in Telegram when no dashboard is open, or when an alert sits unacknowledged.`,control:`toggle`,keywords:[`phone`,`off dashboard`,`test`],defaultValue:!1,status:`telegram-delivery`,...b}]},tr={id:`machine-sessions`,level:`machine`,title:`Sessions`,description:`How sessions start, where projects are found, and branch cleanup.`,legacyIds:[`machine-general`,`general`,`machine-repositories`,`repos`,`repositories`],settings:[{id:`auto-resume`,path:`autoResume`,title:`Auto-resume sessions on startup`,description:`Resume sessions that were live when Glimmervoid last stopped or crashed.`,control:`toggle`,keywords:[`startup`,`conversation`],defaultValue:!0,...b},{id:`tab-order`,path:`viewTabOrder`,title:`Tab order`,description:`Order of the dashboard tabs, also set by dragging tabs in the header.`,control:`tab-order`,keywords:[`tabs`,`order`,`rearrange`,`reorder`,`header`,`more`,`menu`],defaultValue:[],...b},{id:`remote-sessions`,path:`remoteSessions`,title:`Remote Coder sessions`,description:`Offer Coder workspaces when adding a session.`,control:`toggle`,keywords:[`experimental`,`coder`,`remote`,`workspace`,`cloud`],defaultValue:!1,...b},{id:`streamer-mode`,path:`streamerMode`,title:`Streamer mode`,description:`Hide sensitive details while screen sharing.`,control:`toggle`,keywords:[`streaming`,`screen share`,`privacy`],defaultValue:!1,...b},{id:`hint-cards`,path:`hintCards`,title:`Hint cards`,description:`Show tip cards: Your day tips and feature suggestions.`,control:`toggle`,keywords:[`experimental`,`hints`,`tips`,`your day`],defaultValue:!1,...b},{id:`repository-roots`,path:`repoRoots`,title:`Repository roots`,description:`Folders scanned for projects when adding a session.`,control:`list`,keywords:[`folders`,`project discovery`],defaultValue:[],listPlaceholder:`Repository root path`,listEmptyText:`No repository roots configured.`,...b},{id:`custom-agents`,path:`status:custom-agents`,title:`Custom agents`,description:`Extra agent CLIs a session can run.`,control:`readonly`,keywords:[`adapters`,`cli`],status:`custom-agents`,...x},{id:`agent-logins`,path:`status:agent-logins`,title:`Agent logins`,description:`How Claude Code and Codex sign in inside a Coder workspace.`,control:`readonly`,keywords:[`claude`,`codex`,`sign in`,`login`,`coder`,`remote`],status:`agent-logins`,...x},{id:`remote-setup`,path:`status:remote-setup`,title:`Remote host setup`,description:`Start a session that helps you run Glimmervoid on another Linux machine over ssh.`,control:`readonly`,keywords:[`remote`,`ssh`,`server`,`devbox`,`tailscale`,`pair`,`host`],status:`remote-setup`,...x},{id:`branch-gc-delete-unmerged`,path:`branchGc.deleteUnmerged`,title:`Delete unmerged branches`,description:`Also delete stale remote branches with no proof they were merged.`,control:`toggle`,keywords:[`git`,`cleanup`,`orphan`],danger:!0,warning:`Enabling this control lets branch cleanup delete stale remote branches without merge proof.`,legacyIds:[{sectionId:`machine-safety`,settingId:`branch-gc-delete-unmerged`}],defaultValue:!1,...b}]},nr={id:`machine-safety`,level:`machine`,title:`Sane YOLO`,description:`What agents may do without asking, and what Sane YOLO blocks.`,legacyIds:[`machine-guardrails`,`lanes-unattended`,`unattended`],settings:[{id:`skip-permissions-by-default`,path:`skipPermissionsByDefault`,title:`Skip permission prompts by default`,description:`Skip agent permission prompts for projects that set no choice.`,control:`toggle`,keywords:[`permissions`,`yolo`,`dangerously`],danger:!0,warning:`Enabling this control lets agents edit files and run shell commands without asking, and restarts running sessions that inherit it.`,defaultValue:!1,...b},{id:`sane-yolo`,path:`saneYolo`,title:`Sane YOLO`,description:`Block catastrophic commands and credential reads in every session that supports it.`,control:`toggle`,keywords:[`permissions`,`yolo`,`safety`],defaultValue:!0,...On},{id:`sane-yolo-unreadable-paths`,path:`saneYoloUnreadablePaths`,title:`Unreadable folders`,description:`Extra files and folders agents may not read, where ~ is your home folder.`,control:`list`,keywords:[`guardrails`,`secrets`,`credentials`,`sane yolo`],defaultValue:[],listPlaceholder:`~/folder`,listEmptyText:`Only the built-in credential list is unreadable.`,...On}]},rr={id:`machine-server`,level:`machine`,title:`Server`,description:`Restart or shut down the Glimmervoid server.`,settings:[{id:`server-power`,path:`status:server-power`,title:`Restart or shut down`,description:`Ends every running session first.`,control:`readonly`,keywords:[`power`,`restart`,`shutdown`,`stop`,`quit`,`reboot`,`server`],status:`server-power`,...x}]},ir={id:`machine-updates`,level:`machine`,title:`Updates`,description:`Which version is running, and updating to the newest.`,legacyIds:[`updates`],settings:[{id:`update-actions`,path:`status:update-actions`,title:`Status and actions`,legacyIds:[`update-summary`,`update-installed`,`update-latest`,`update-last-checked`].map(e=>({sectionId:`machine-updates`,settingId:e})),description:`Running and newest versions, with update and restart.`,control:`readonly`,keywords:[`version`,`available`,`current`,`check`,`restart`,`commit`,`installed`,`release`,`failure`],status:`update-actions`,...x},{id:`update-channel`,path:`updateChannel`,title:`Channel`,description:`Stable releases, or Experimental builds from every change to main.`,control:`select`,options:Xn(ue),keywords:[`release`,`prerelease`,`next`,`beta`,`early`],defaultValue:`release`,...b},{id:`check-updates`,path:`checkForUpdates`,title:`Check for updates automatically`,description:`Check for a newer version at launch and while the dashboard is open.`,control:`toggle`,keywords:[`release`,`github`],defaultValue:!0,...b}]},ar={id:`machine-usage`,level:`machine`,title:`Usage`,description:`Token accounting and estimated-cost budgets.`,legacyIds:[`usage`],settings:[{id:`usage-enabled`,path:`usage.enabled`,title:`Track token usage`,description:`Read local agent transcripts for the Usage tab and session cards.`,control:`toggle`,keywords:[`tokens`,`cost`],defaultValue:!0,status:`usage-last-report`,...b},{id:`usage-your-day`,path:`usage.yourDay`,title:`Your day`,description:`Recap yesterday and suggest a pace for today when usage tracking is on.`,control:`toggle`,keywords:[`burnout`,`breaks`,`pace`,`wellbeing`],defaultValue:!0,...b},{id:`usage-retain-days`,path:`usage.retainDays`,title:`Retain transcript detail`,description:`How long detailed usage is kept.`,control:`number`,range:be,unit:w,keywords:[`history`,`retention`],defaultValue:90,...b},{id:`usage-daily-budget`,path:`usage.budget.dailyUsd`,title:`Daily budget`,description:`Alert at 50%, 75% and 100% of this estimated daily spend, or never at zero.`,control:`number`,range:me,unit:Gn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...b},{id:`usage-monthly-budget`,path:`usage.budget.monthlyUsd`,title:`Monthly budget`,description:`Alert at 50%, 75% and 100% of this estimated monthly spend, or never at zero.`,control:`number`,range:me,unit:Gn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...b}]},or={id:`machine-privacy`,level:`machine`,title:`Privacy`,description:`What Glimmervoid sends about itself.`,legacyIds:[`privacy`,`telemetry`],settings:[{id:`telemetry-enabled`,path:`telemetry.enabled`,title:`Send usage data`,description:`Helps us improve Glimmervoid. Sent under a random install id: version, platform, app starts, daily activity, session starts and ends with agent kind, exit kind and duration, errors as their type, error code and scrubbed stack frames, per session token counts, models and estimated costs from the usage scan, and a salted one-way hash of your Claude and Codex account ids so installs of one account count together. The text of errors the dashboard shows in its header line, with your home folder shown as ~, which can name a session, folder or branch. Otherwise never prompts, project information, other error messages, paths, repository or branch names, objectives, terminal output, emails or names. Delete my data asks for everything sent under this install to be erased and starts a new install id. GLIMMERVOID_TELEMETRY=0, DO_NOT_TRACK=1 or CI=true turn it off regardless.`,control:`toggle`,keywords:[`telemetry`,`analytics`,`tracking`,`opt out`],defaultValue:!0,...b}]},sr={id:`lanes-posthog`,level:`lanes`,title:`PostHog`,description:`Error monitoring, investigations and traffic-spike alerts.`,legacyIds:[`lanes`,`posthog`],settings:[{id:`posthog-enabled`,path:`posthog.enabled`,title:`Enable PostHog monitoring`,description:`Watch PostHog error tracking and investigate issues that move.`,control:`toggle`,keywords:[`errors`,`monitoring`],defaultValue:!1,...b},{id:`posthog-host`,path:`posthog.host`,title:`Host`,description:`PostHog cloud or self-hosted URL.`,control:`text`,keywords:[`url`,`server`],defaultValue:`https://us.posthog.com`,...b},{id:`posthog-api-key`,path:`posthog.apiKey`,title:`Personal API key`,description:`Personal API key with read access to your projects.`,control:`password`,keywords:[`credential`,`token`],defaultValue:``,...b},{id:`posthog-projects`,path:`posthog.projects`,title:`Projects`,description:`Project ids to watch, where empty watches all and none watches none.`,control:`list`,keywords:[`project ids`,`filter`],defaultValue:`all`,valueKind:`posthog-projects`,listPlaceholder:`Project id`,listEmptyText:`Every project the key can read.`,...b},{id:`posthog-interval`,path:`posthog.intervalMinutes`,title:`Poll interval`,description:`Time between PostHog checks.`,control:`number`,integer:!1,step:`any`,range:f,unit:Rn,keywords:[`refresh`,`schedule`],defaultValue:15,...b},{id:`posthog-max-investigations`,path:`posthog.maxConcurrentInvestigations`,title:`Max concurrent investigations`,description:`Most investigations running at once.`,control:`number`,range:f,unit:Pn,keywords:[`parallel`,`workers`],defaultValue:2,...b},{id:`posthog-min-users`,path:`posthog.minUsersToInvestigate`,title:`Min users to investigate`,description:`Fewest affected users before a new issue is investigated.`,control:`number`,range:f,unit:Kn,keywords:[`threshold`,`affected`],defaultValue:1,...b},{id:`posthog-traffic-enabled`,path:`posthog.trafficSpikeEnabled`,title:`Traffic spike alerts`,description:`Alert when unique users jump above normal.`,control:`toggle`,keywords:[`analytics`,`alert`],defaultValue:!0,...b},{id:`posthog-auto-fix`,path:`posthog.autoFix`,title:`Attempt fixes for major issues`,description:`Let an agent fix an issue on a local branch, opening a pull request only after you approve.`,control:`toggle`,keywords:[`automatic`,`pull request`],danger:!0,warning:`Enabling this control lets an agent that read PostHog error data edit code onto a local branch; nothing is pushed until you approve it.`,defaultValue:!1,...b}]},cr={id:`lanes-github-access`,level:`lanes`,title:`Lane GitHub access`,description:`What background lanes may read on GitHub and the web.`,settings:[{id:`github-read-token`,path:`github.readToken`,title:`GitHub read token`,description:`Read-only fine-grained GitHub token lanes use for gh. Team review and community research need it.`,control:`password`,keywords:[`credential`,`token`,`gh`,`pull requests`],defaultValue:``,...b},{id:`lanes-fetch-domains`,path:`lanes.fetchDomains`,title:`Extra fetch domains`,description:`Domains lanes may fetch pages from, beyond GitHub and posthog.com.`,control:`list`,keywords:[`web`,`fetch`,`domains`,`allowlist`],defaultValue:[],listPlaceholder:`docs.example.com`,listEmptyText:`Only the built-in domains.`,...b}]},lr={id:`lanes-team-review`,level:`lanes`,title:`Team review`,description:`Draft reviews of teammates' pull requests for you to post.`,legacyIds:[`team-review`,`reviews`],settings:[{id:`team-review-enabled`,path:`teamReview.enabled`,title:`Enable team review`,description:`Draft a review of each open team pull request, posting nothing until you approve or comment.`,control:`toggle`,keywords:[`pull requests`,`github`],defaultValue:!0,...b},{id:`github-teams`,path:`github.teams`,title:`GitHub teams`,description:`GitHub teams whose review requests are drafted, as org/team-slug.`,control:`list`,keywords:[`github`,`teams`,`review requests`],defaultValue:[],listPlaceholder:`org/team-slug`,listEmptyText:`No GitHub teams configured.`,...b},{id:`team-review-org`,path:`teamReview.org`,title:`GitHub organization`,description:`Organization whose pull requests that request your review directly are drafted. Needed only when no GitHub team is set.`,control:`text`,keywords:[`github`,`organization`,`org`,`review requests`],defaultValue:``,...b},{id:`team-review-re-review-after-hours`,path:`teamReview.reReviewAfterHours`,title:`Re-review after`,description:`Review a pull request again after a new push, once this much time has passed.`,control:`number`,range:f,unit:zn,keywords:[`review`,`delay`],defaultValue:24,integer:!1,step:.5,...b},{id:`team-review-skip-idle-after-days`,path:`teamReview.skipIdleAfterDays`,title:`Skip PRs idle for`,description:`Skip pull requests with no activity for this long.`,control:`number`,range:f,unit:w,keywords:[`idle`,`activity`],defaultValue:14,integer:!1,step:.5,...b},{id:`team-review-skill`,path:`teamReview.skill`,title:`Review skill`,description:`Skill Claude Code follows for each review, or none when empty.`,control:`text`,keywords:[`skill`,`claude code`,`pr review`],defaultValue:``,suggestionsFrom:`review-skills`,...b},{id:`team-review-reviewer-model`,path:`teamReview.reviewer.model`,title:`Review model`,description:`Model for reviews, or the agent's default when empty.`,control:`text`,keywords:[`model`,`reviewer`],defaultValue:``,suggestionsFrom:`review-models`,...b},{id:`team-review-reviewer-effort`,path:`teamReview.reviewer.effort`,title:`Review effort`,description:`Effort for reviews, or the agent's default when empty.`,control:`text`,keywords:[`effort`,`thinking`,`reasoning`,`reviewer`],defaultValue:``,suggestionsFrom:`review-efforts`,...b},{id:`team-review-stamp-reviewer-model`,path:`teamReview.stampReviewer.model`,title:`Docs and tests PR model`,description:`Model for pull requests that only touch docs and tests.`,control:`text`,keywords:[`stamp`,`model`,`small pull requests`,`docs`,`tests`],defaultValue:``,suggestionsFrom:`review-stamp-models`,...b},{id:`team-review-stamp-reviewer-effort`,path:`teamReview.stampReviewer.effort`,title:`Docs and tests PR effort`,description:`Effort for pull requests that only touch docs and tests.`,control:`text`,keywords:[`stamp`,`effort`,`small pull requests`,`docs`,`tests`],defaultValue:``,suggestionsFrom:`review-stamp-efforts`,...b},{id:`team-review-sandbox-load-mcp-servers`,path:`teamReview.sandbox.loadMcpServers`,title:`Load my MCP servers`,description:`Give the review agent your own MCP servers.`,control:`toggle`,keywords:[`mcp`,`servers`,`tools`],danger:!0,warning:`Enabling this control gives the review agent, which reads untrusted pull request text, every tool your MCP servers expose.`,defaultValue:!1,...b},{id:`team-review-auto-rebase-my-prs`,path:`teamReview.autoRebaseMyPrs`,title:`Keep my pull requests rebased`,description:`Rebase your open pull requests when they fall behind their base branch.`,control:`toggle`,keywords:[`rebase`,`update branch`,`behind`,`my prs`],danger:!0,warning:`Enabling this control rewrites your pull request branches on GitHub. Pull before you push from a local checkout of one.`,defaultValue:!1,...b},{id:`team-review-keep-mergeable-enabled`,path:`teamReview.keepMergeableEnabled`,title:`Keep mergeable`,description:`Offer Keep mergeable: an agent fixes conflicts and failing checks on your pull requests.`,control:`toggle`,keywords:[`repair`,`conflicts`,`my prs`],defaultValue:!0,...b},{id:`team-review-keep-mergeable-timeout`,path:`teamReview.keepMergeableTimeoutMinutes`,title:`Keep mergeable deadline`,description:`Longest a Keep mergeable repair may run.`,control:`number`,range:we,unit:Rn,keywords:[`timeout`,`repair`],defaultValue:30,...b},{id:`team-review-merge-queue-enabled`,path:`teamReview.mergeQueueEnabled`,title:`Merge when ready`,description:`Offer Merge when ready: queued pull requests merge once they pass.`,control:`toggle`,keywords:[`merge queue`,`auto merge`,`my prs`],defaultValue:!0,...b}]},ur={id:`lanes-workflows`,level:`lanes`,title:`Workflows`,description:`Rules that act on pull request events.`,legacyIds:[`workflows`],settings:[{id:`workflows-enabled`,path:`workflows.enabled`,title:`Run workflows`,description:`Watch the repositories your rules name and run their actions.`,control:`toggle`,keywords:[`pull requests`,`automation`,`master switch`],defaultValue:!0,...b},{id:`workflows-max-concurrent-sessions`,path:`workflows.maxConcurrentSessions`,title:`Concurrent agent sessions`,description:`Most workflow sessions running at once.`,control:`number`,range:ye,unit:Fn,keywords:[`parallel`,`spawn`],defaultValue:2,...b},{id:`workflows-rules`,path:`status:workflow-rules`,title:`Workflow rules`,description:`Turn each workflow rule on or off.`,control:`readonly`,keywords:[`pull requests`,`automation`,`github`,`rules`],status:`workflows`,...x}]},dr={id:`lanes-benchmarks`,level:`lanes`,title:`Benchmarks`,description:`Compare agent setups on frozen benchmark cases.`,legacyIds:[`benchmarks`],settings:[{id:`benchmarks-enabled`,path:`benchmarks.enabled`,title:`Enable benchmarks`,description:`Show the Bench tab, where nothing runs until you start it.`,control:`toggle`,keywords:[`eval`,`arms`,`recall`,`compare`],defaultValue:!1,...b}]},fr={id:`lanes-coherence`,level:`lanes`,title:`Coherence`,description:`Coherence hook status and decision journal per session.`,settings:[{id:`coherence-enabled`,path:`coherence.enabled`,title:`Show session Coherence`,description:`Show the Coherence hook status and decisions of each session in a repository with a coherence.config.json (needs @posthog/coherence 1.8 or newer).`,control:`toggle`,keywords:[`experimental`,`coherence`,`journal`,`decisions`],defaultValue:!0,...b}]},pr={id:`lanes-issues`,level:`lanes`,title:`Issues`,description:`GitHub issues from your projects and teams.`,settings:[{id:`issues-enabled`,path:`issues.enabled`,title:`Show the Issues tab`,description:`Show an Issues tab listing GitHub issues for your projects and teams.`,control:`toggle`,keywords:[`experimental`,`issues`,`github`,`tab`],defaultValue:!1,...b}]},mr={id:`lanes-community`,level:`lanes`,title:`Community`,description:`Research new posthog.com community questions and draft replies.`,settings:[{id:`community-enabled`,path:`community.enabled`,title:`Show the Community tab`,description:`Research new community questions and draft a reply for each.`,control:`toggle`,keywords:[`experimental`,`community`,`questions`,`forum`,`tab`],defaultValue:!1,...b},{id:`community-skill`,path:`community.skill`,title:`Research skill`,description:`Skill the research agent follows, or none when empty.`,control:`text`,keywords:[`skill`,`answering`,`claude code`],defaultValue:``,...b},{id:`community-project-id`,path:`community.projectId`,title:`PostHog project`,description:`PostHog project holding the community forum and Discord data.`,control:`number`,integer:!0,range:Te,unit:{label:`project id`,storedPerDisplay:1},keywords:[`project id`,`warehouse`],defaultValue:2,...b},{id:`community-interval`,path:`community.intervalMinutes`,title:`Poll interval`,description:`Time between community checks.`,control:`number`,integer:!0,range:he,unit:Rn,keywords:[`refresh`,`schedule`],defaultValue:30,...b},{id:`community-discord-channels`,path:`community.discordChannels`,title:`Discord channels`,description:`Discord channels to watch for questions, without the #, or none to skip Discord.`,control:`list`,keywords:[`discord`,`channels`,`allowlist`],defaultValue:[],...b}]},hr=Object.freeze([`auto`,`calculate`,`display`]);Object.freeze([`codex`,`grok`,`kimi`]),Object.freeze([`dailyUsd`,`monthlyUsd`]);var gr=Object.freeze([{id:`file-debug-mode`,path:`debugMode`,title:`Debug mode`,group:`machine-sessions`,description:`Show session-card diagnostics for state, transitions and detection signals.`,control:`toggle`,keywords:[`diagnostics`,`state`],defaultValue:!1,takesEffect:`now`,fileOnlyReason:E,...S},{id:`file-replay-buffer`,path:`replayBufferKB`,title:`Replay buffer`,group:`machine-terminal`,description:`PTY output retained for clients that reconnect or join late.`,control:`number`,range:Ee,unit:{label:`KB`,storedPerDisplay:1},keywords:[`history`,`backfill`],defaultValue:512,takesEffect:`new-sessions`,fileOnlyReason:T,...S},{id:`file-session-memory-reserve`,path:`sessionMemoryReserveMB`,title:`Session memory reserve`,group:`machine-sessions`,description:`Free memory an automatic session start waits for; 0 starts sessions without checking.`,control:`number`,range:Ne,unit:{label:`MB`,storedPerDisplay:1},keywords:[`memory`,`headroom`],defaultValue:600,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-cursor-blink`,path:`cursorBlink`,title:`Cursor blink`,group:`machine-terminal`,description:`Blink the cursor in every terminal.`,control:`toggle`,keywords:[`caret`,`terminal`],defaultValue:!1,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-detect-background-agents`,path:`detectBackgroundAgents`,title:`Detect background agents`,group:`machine-detection-sessions`,description:`Hold completion while tracked background work is active.`,control:`toggle`,keywords:[`subagents`,`completion`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:E,...S},{id:`file-record-signals`,path:`recordSignals`,title:`Record structural signals`,group:`machine-detection-sessions`,description:`Keep forensic status and hook recordings for each session. Full capture (capture.enabled) records these signals even when this is off.`,control:`toggle`,keywords:[`recordings`,`diagnostics`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:E,...S},{id:`file-trace-enabled`,path:`trace.enabled`,title:`Capture session traces`,group:`machine-detection-sessions`,description:`Keep normalized Claude transcript traces for session debugging.`,control:`toggle`,keywords:[`transcripts`,`diagnostics`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:E,...S},{id:`file-detect-scheduled-wakeups`,path:`detectScheduledWakeups`,title:`Detect scheduled wakeups`,group:`machine-detection-sessions`,description:`Surface advisory wakeup timing for scheduled sessions.`,control:`toggle`,keywords:[`schedule`,`sleep`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:E,...S},{id:`file-worktree-auto-rebase`,path:`worktreeAutoRebase`,title:`Worktree auto-rebase`,group:`machine-detection-sessions`,description:`Rebase eligible session worktrees when the integration branch moves.`,control:`toggle`,keywords:[`git`,`branch`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-sync-on-start`,path:`worktreeSyncOnStart`,title:`Worktree sync on start`,group:`machine-detection-sessions`,description:`Fetch origin and fast-forward the local integration branch before a session starts its worktree.`,control:`toggle`,keywords:[`git`,`fetch`,`fast-forward`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-clone-dependencies`,path:`worktreeCloneDependencies`,title:`Worktree dependencies`,group:`machine-detection-sessions`,description:`Give a session worktree its node_modules before the agent starts: on macOS, clone the main checkout's when it matches the worktree's lockfile, then, except on Windows, install each folder still without one from its package-lock.json or pnpm-lock.yaml, with no package scripts.`,control:`toggle`,keywords:[`node_modules`,`npm`,`pnpm`,`install`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-rerere`,path:`worktreeRerere`,title:`Worktree rerere`,group:`machine-detection-sessions`,description:`Reuse recorded Git conflict resolutions.`,control:`toggle`,keywords:[`git`,`conflicts`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:D,...S},{id:`file-share-commit-provenance`,path:`shareCommitProvenance`,title:`Share commit provenance`,group:`machine-detection-sessions`,description:`After Merge pushes the base branch, also push the git notes that let glimmervoid why name the agent and session of a commit on any clone. The notes hold a hashed session id and the agent name, never a task or prompt. Off keeps them on this machine.`,control:`toggle`,keywords:[`git`,`notes`,`why`,`privacy`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-integration-branch`,path:`integrationBranch`,title:`Integration branch`,group:`machine-detection-sessions`,description:`Base branch for session worktrees. Empty = each repo's default branch. Existing sessions are never retargeted.`,control:`text`,nullable:!0,keywords:[`git`,`merge`],defaultValue:null,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-root`,path:`worktreeRoot`,title:`Worktree root`,group:`machine-detection-sessions`,description:`Directory that contains session worktrees. Existing worktrees are never relocated.`,control:`text`,keywords:[`git`,`directory`],defaultValue:``,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-share`,path:`worktreeShare`,title:`Shared worktree paths`,group:`machine-detection-sessions`,description:`Local paths copied or linked during worktree preparation. A * matches names at the project root, never one containing production; name such a file in full to share it.`,control:`list`,keywords:[`files`,`context`,`env`],defaultValue:[`.env*`,`.claude`],takesEffect:`new-sessions`,fileOnlyReason:Yn,...S},{id:`file-port`,path:`port`,title:`Local port`,group:`machine-detection-sessions`,description:`Port used by the local dashboard listener.`,control:`number`,range:Me,unit:{label:`port`,storedPerDisplay:1},keywords:[`server`,`listener`],defaultValue:3e3,takesEffect:`restart`,fileOnlyReason:Yn,...S},{id:`file-notify-debounce-ms`,path:`notifyDebounceMs`,title:`Notification grouping window`,group:`machine-detection-sessions`,description:`Alerts from any session within this long of the first one fold into one sound, one desktop notification and one Telegram message.`,control:`number`,integer:!1,step:`any`,range:f,unit:Bn,keywords:[`timer`,`alerts`],defaultValue:3e3,takesEffect:`new-sessions`,fileOnlyReason:T,...S},{id:`file-phone-escalation-ms`,path:`phoneEscalationMs`,title:`Phone escalation delay`,group:`machine-detection-sessions`,description:`Delay before off-dashboard escalation.`,control:`number`,integer:!1,step:`any`,range:f,unit:Vn,keywords:[`timer`,`telegram`],defaultValue:3e5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-branch-gc-enabled`,path:`branchGc.enabled`,title:`Branch cleanup`,group:`machine-detection-sessions`,description:`Enable cleanup of eligible session branches.`,control:`toggle`,keywords:[`git`,`cleanup`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-worktrees`,path:`branchGc.worktrees`,title:`Local worktree cleanup`,group:`machine-detection-sessions`,description:`Enable cleanup of eligible local worktrees.`,control:`toggle`,keywords:[`git`,`worktree`,`cleanup`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-prefixes`,path:`branchGc.prefixes`,title:`Branch cleanup prefixes`,group:`machine-detection-sessions`,description:`Branch prefixes that filter both remote branch cleanup and local worktree cleanup.`,control:`list`,keywords:[`git`,`branch`],defaultValue:[`glimmervoid/session/`,`worktree-agent-`],takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-dry-run`,path:`branchGc.dryRun`,title:`Branch cleanup dry run`,group:`machine-detection-sessions`,description:`Report planned cleanup without deleting remote branches.`,control:`toggle`,keywords:[`git`,`safety`],defaultValue:!1,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-stale-days`,path:`branchGc.staleDays`,title:`Branch stale days`,group:`machine-detection-sessions`,description:`Age threshold for orphan branch cleanup when unmerged deletion is on.`,control:`number`,integer:!1,step:`any`,range:f,unit:w,keywords:[`git`,`retention`],defaultValue:14,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-branch-gc-interval-ms`,path:`branchGc.intervalMs`,title:`Branch cleanup interval`,group:`machine-detection-sessions`,description:`Delay between branch cleanup passes.`,control:`number`,integer:!1,step:`any`,range:f,unit:Un,keywords:[`git`,`schedule`],defaultValue:216e5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-custom-agents`,path:`customAgents`,title:`Custom agents`,group:`machine-detection-sessions`,description:`Extra agent CLIs a session can be spawned with. The Sessions section lists the declared agents and whether each command resolves.`,control:`json`,keywords:[`adapters`,`cli`],defaultValue:[],takesEffect:`new-sessions`,fileOnlyReason:Yn,...S},{id:`file-task-title-refiner-enabled`,path:`taskTitle.refiner.enabled`,title:`Refine task titles`,group:`machine-detection-sessions`,description:`Keep session card titles useful when prompts change topic by asking a model for a short title.`,control:`toggle`,keywords:[`title`,`refiner`,`card`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-task-title-refiner-model`,path:`taskTitle.refiner.model`,title:`Task title model`,group:`machine-detection-sessions`,description:`Claude model alias the title refiner asks.`,control:`text`,keywords:[`title`,`refiner`,`model`],defaultValue:s.taskTitleRefiner,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-task-title-refiner-min-interval`,path:`taskTitle.refiner.minIntervalSeconds`,title:`Task title refresh interval`,group:`machine-detection-sessions`,description:`Shortest pause between two title refinements of one session.`,control:`number`,integer:!1,step:`any`,range:pe,unit:C,keywords:[`title`,`refiner`,`interval`],defaultValue:60,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-task-title-refiner-timeout`,path:`taskTitle.refiner.timeoutSeconds`,title:`Task title timeout`,group:`machine-detection-sessions`,description:`Maximum time allowed for one title refinement.`,control:`number`,integer:!1,step:`any`,range:Pe,unit:C,keywords:[`title`,`refiner`,`deadline`],defaultValue:60,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-codex`,path:`usage.vendors.codex`,title:`Track Codex usage`,group:`machine-usage`,description:`Include local Codex CLI transcripts in usage reports.`,control:`toggle`,keywords:[`openai`,`vendor`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-grok`,path:`usage.vendors.grok`,title:`Track Grok usage`,group:`machine-usage`,description:`Include local Grok CLI transcripts in usage reports.`,control:`toggle`,keywords:[`xai`,`vendor`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-kimi`,path:`usage.vendors.kimi`,title:`Track Kimi Code usage`,group:`machine-usage`,description:`Include local Kimi Code transcripts in usage reports.`,control:`toggle`,keywords:[`moonshot`,`vendor`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-fetch-pricing`,path:`usage.fetchPricing`,title:`Fetch current model prices`,group:`machine-usage`,description:`Load public model prices when usage tracking starts, using a cached table for up to one day. Falls back to cached or bundled prices if the fetch fails; no daily refresh runs while tracking continues.`,control:`toggle`,keywords:[`rates`,`models`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:T,...S},{id:`file-usage-plan-limits`,path:`usage.planLimits`,title:`Show plan limits`,group:`machine-usage`,description:`Read the Claude plan limit the CLI reports and show it beside usage.`,control:`toggle`,keywords:[`plan`,`limits`,`quota`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-scan-interval`,path:`usage.scanIntervalMinutes`,title:`Scan interval`,group:`machine-usage`,description:`Periodic transcript polling interval. Session activity can also trigger scans between timer ticks.`,control:`number`,range:Oe,unit:Rn,keywords:[`poll`,`refresh`],defaultValue:5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-warehouse-retain-days`,path:`usage.warehouseRetainDays`,title:`Retain usage history`,group:`machine-usage`,description:`How long the daily usage warehouse keeps rolled-up totals after transcript detail expires.`,control:`number`,range:ke.warehouseRetainDays,unit:w,keywords:[`history`,`warehouse`,`retention`],defaultValue:365,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-session-block-hours`,path:`usage.sessionBlockHours`,title:`Session block length`,group:`machine-usage`,description:`Length of the rolling block the Usage view groups activity into.`,control:`number`,range:ke.sessionBlockHours,unit:zn,keywords:[`block`,`window`,`hours`],defaultValue:5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-cost-mode`,path:`usage.costMode`,title:`Cost mode`,group:`machine-usage`,description:`Choose whether recorded costs, calculated costs or both can appear.`,control:`select`,options:Xn(hr),keywords:[`pricing`,`estimate`],defaultValue:`auto`,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-extra-projects-dirs`,path:`usage.extraProjectsDirs`,title:`Extra transcript folders`,group:`machine-usage`,description:`Absolute paths of additional Claude projects folders the usage scan reads.`,control:`list`,keywords:[`transcripts`,`folders`,`scan`],defaultValue:[],takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-investigation-timeout`,path:`posthog.investigationTimeoutSeconds`,title:`Investigation timeout`,group:`lanes-posthog`,description:`Maximum time allowed for one investigation.`,control:`number`,integer:!1,step:`any`,range:f,unit:Hn,keywords:[`deadline`,`session`],defaultValue:900,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-escalation`,path:`posthog.userEscalationThreshold`,title:`Escalation threshold`,group:`lanes-posthog`,description:`Affected-user count that escalates an issue.`,control:`number`,range:f,unit:Kn,keywords:[`threshold`,`severity`],defaultValue:25,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-fix-timeout`,path:`posthog.fixTimeoutSeconds`,title:`Fix timeout`,group:`lanes-posthog`,description:`Maximum time allowed for one fix session.`,control:`number`,integer:!1,step:`any`,range:Ce,unit:Hn,keywords:[`deadline`,`repair`],defaultValue:1800,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-multiplier`,path:`posthog.trafficSpikeMultiplier`,title:`Spike multiplier`,group:`lanes-posthog`,description:`Baseline multiplier required to classify a traffic spike.`,control:`number`,integer:!1,step:`any`,range:Se,unit:qn,keywords:[`baseline`,`ratio`],defaultValue:3,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-min-users`,path:`posthog.trafficSpikeMinUsers`,title:`Min users to alert`,group:`lanes-posthog`,description:`Minimum recent unique users for an initial traffic-spike alert. Escalation and recovery alerts bypass this minimum.`,control:`number`,range:xe,unit:Kn,keywords:[`threshold`,`analytics`],defaultValue:10,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-cooldown`,path:`posthog.trafficSpikeCooldownMinutes`,title:`Spike cooldown`,group:`lanes-posthog`,description:`Cooldown for new traffic spikes. Escalation and recovery alerts bypass it. Zero removes the time delay; repeated active-spike alerts are still suppressed.`,control:`number`,integer:!1,step:`any`,range:pe,unit:Wn,keywords:[`silence`,`delay`],defaultValue:360,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-baseline`,path:`posthog.trafficSpikeBaselineDays`,title:`Baseline window`,group:`lanes-posthog`,description:`Historical window used to calculate normal hourly traffic.`,control:`number`,range:ve,unit:w,keywords:[`history`,`analytics`],defaultValue:7,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-recurrence-dedupe`,path:`posthog.recurrenceDedupe`,title:`Deduplicate recurring issues`,group:`lanes-posthog`,description:`Treat an issue seen again inside the recurrence window as the same investigation instead of opening a new one.`,control:`toggle`,keywords:[`recurrence`,`dedupe`,`issues`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-recurrence-window-days`,path:`posthog.recurrenceWindowDays`,title:`Recurrence window`,group:`lanes-posthog`,description:`How far back an issue counts as a recurrence of an investigated one.`,control:`number`,integer:!1,step:`any`,range:f,unit:w,keywords:[`recurrence`,`window`],defaultValue:7,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-transient-recurrence-limit`,path:`posthog.transientRecurrenceLimit`,title:`Transient recurrence limit`,group:`lanes-posthog`,description:`How many times a transient issue may recur before it is investigated again.`,control:`number`,integer:!1,step:`any`,range:f,unit:In,keywords:[`recurrence`,`transient`,`limit`],defaultValue:3,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-repo-path`,path:`posthog.repoPath`,title:`Repository path`,group:`lanes-posthog`,description:`Absolute path of the local checkout investigations read and fixes branch from, for every project the project map does not name.`,control:`text`,keywords:[`repository`,`checkout`,`path`],defaultValue:``,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-project-map`,path:`posthog.projectMap`,title:`Project map`,group:`lanes-posthog`,description:`PostHog project id to a label: the name shown for that project, and, when it is an absolute path to a checkout, the repository its issues are investigated in.`,control:`json`,keywords:[`projects`,`repositories`,`map`],defaultValue:{},takesEffect:`now`,fileOnlyReason:Jn,...S},{id:`file-team-review-team`,path:`teamReview.team`,title:`GitHub team (legacy)`,group:`lanes-team-review`,description:`Team slug whose members and review requests are polled. Read only when github.teams is empty.`,control:`text`,keywords:[`github`,`slug`,`legacy`],defaultValue:``,takesEffect:`now`,fileOnlyReason:`A legacy key: github.teams names teams as org/slug entries and wins whenever it is set.`,...S},{id:`file-workflows-max-actions-per-poll`,path:`workflows.maxActionsPerPoll`,title:`Actions per poll`,group:`lanes-workflows`,description:`Most actions run in one poll. The rest are dropped and logged.`,control:`number`,range:Ae,unit:Ln,keywords:[`cap`,`rate limit`],defaultValue:20,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-workflows-rules`,path:`workflows.rules`,title:`Workflow rule definitions`,group:`lanes-workflows`,description:`The rules the Workflows section switches on and off: each names its repositories, one pull request event, its filters and its actions.`,control:`json`,keywords:[`pull requests`,`automation`,`rules`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Rule definitions are written in config.json; the Workflows section only switches each rule on or off.`,...S},{id:`file-pr-flows-sources`,path:`prFlows.sources`,title:`PR flows sources`,group:`lanes-team-review`,description:`Commands that report review findings for your own pull requests, run without a shell on each new head once you approve the exact command in My PRs. Each entry has id, label, command (an argv array; {prUrl}, {repo}, {number} and {head} expand inside one argument, and GLIMMERVOID_PR_URL, GLIMMERVOID_PR_REPO, GLIMMERVOID_PR_NUMBER and GLIMMERVOID_PR_HEAD are set) and timeoutSeconds, and prints {"findings": [{"path", "lineStart", "lineEnd", "priority", "body", "url"}], "status": [{"label", "state"}]} JSON. Each id is unique within the list. Check entries with glimmervoid pr-flows check.`,jsonSchema:t(i(ie),{io:`input`}),example:[{id:`scanner`,label:`Scanner`,command:[`my-review-scanner`,`--pr`,`{prUrl}`,`--json`],timeoutSeconds:120}],control:`json`,keywords:[`pull requests`,`review items`,`bots`,`commands`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Commands run on this machine, so they are written in config.json and each one waits for your approval in My PRs.`,...S},{id:`file-pr-flows-actions`,path:`prFlows.actions`,title:`PR flows actions`,group:`lanes-team-review`,description:`Commands that act on a review item of your own pull request, shown as a button with their label and named by rules as run:<id>. Each entry has id, label, command and timeoutSeconds like a source, also expands {itemPath} and {itemLine}, gets the item as GLIMMERVOID_ITEM_JSON, waits for your approval in My PRs, and has an id unique within the list. Exit 0 is done and non-zero failed, unless stdout prints {"outcome": "done" | "started" | "refused" | "failed", "message"} JSON.`,jsonSchema:t(i(ie),{io:`input`}),example:[{id:`ask-bot`,label:`Ask bot`,command:[`gh`,`pr`,`comment`,`{prUrl}`,`--body`,`@review-bot fix {itemPath}:{itemLine}`]}],control:`json`,keywords:[`pull requests`,`review items`,`commands`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Commands run on this machine, so they are written in config.json and each one waits for your approval in My PRs.`,...S},{id:`file-pr-flows-pr-actions`,path:`prFlows.prActions`,title:`PR flows PR actions`,group:`lanes-team-review`,description:`Commands that act on a whole pull request of yours, shown as a button next to Keep mergeable and Merge when ready and run once per click, never by a rule. Each entry has id, label, command and timeoutSeconds like an action, plus optional repos (owner/name; every repository when absent), expands {headRef} and {baseRef} instead of the item placeholders, gets GLIMMERVOID_PR_HEAD_REF, GLIMMERVOID_PR_BASE_REF and the pull request as GLIMMERVOID_PR_JSON, and waits for your approval in My PRs. Exit 0 is done and non-zero failed, unless stdout prints {"outcome": "done" | "started" | "refused" | "failed", "message"} JSON.`,jsonSchema:t(i(l),{io:`input`}),example:[{id:`agent-merge`,label:`Merge via agent`,repos:[`acme/app`],command:[`my-merge-trigger`,`{prUrl}`,`{headRef}`],timeoutSeconds:60}],control:`json`,keywords:[`pull requests`,`buttons`,`commands`,`merge`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Commands run on this machine, so they are written in config.json and each one waits for your approval in My PRs.`,...S},{id:`file-packs`,path:`packs`,title:`Packs`,group:`lanes-team-review`,description:`More pack directories to load besides every directory under ~/.glimmervoid/packs/. A pack is a pack.json (name, version, description, requires, and sections such as prFlows with prActions, sources, actions and rules) plus the files it uses, shared by copying the directory; its commands can use {packDir}, its ids show as <pack>/<id>, and it waits for one approval in Settings, Packs that any edit to a file in it asks again.`,control:`list`,keywords:[`packs`,`share`,`plugins`,`pull requests`,`commands`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`A pack can run commands on this machine, so its directory is written in config.json and the pack waits for your approval.`,...S},{id:`file-pr-flows-rules`,path:`prFlows.rules`,title:`PR flows rules`,group:`lanes-team-review`,description:`Ordered rules for review items on your own pull requests; the first match acts with no click and lands in the Handled list, where Undo reopens it. Each matches on source, priority, paths, text and scope, and acts with ask, fix-local, dismiss or run:<action id>.`,jsonSchema:oe(i(ne)),example:[{name:`Generated files`,paths:[`dist/`],action:`dismiss`,reason:`Generated output; the source change is reviewed instead.`},{name:`Bot nits`,source:`review-bot[bot]`,priority:[`low`],action:`run:ask-bot`}],control:`json`,keywords:[`pull requests`,`review items`,`dismiss`,`automation`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Rules are written in config.json; Save as rule in My PRs is the one dashboard writer, and it only appends.`,...S},{id:`file-pr-flows-repo-rules`,path:`prFlows.repoRules`,title:`PR flows repository rules`,group:`lanes-team-review`,description:`Rules per repository (owner/name to a list of rules), checked before prFlows.rules for that repository.`,jsonSchema:oe(r(n(),i(ne))),example:{"acme/app":[{name:`Docs typos`,paths:[`docs/`],text:`typo`,action:`fix-local`}]},control:`json`,keywords:[`pull requests`,`review items`,`repositories`],defaultValue:{},takesEffect:`now`,fileOnlyReason:Jn,...S}]),_r=Object.freeze({"machine-terminal":{title:`Terminal`,description:`Terminal behavior shared by dashboard clients.`},"machine-detection-sessions":{title:`Detection and sessions`,description:`Config-file-only detection, timing, worktree and process settings.`}}),vr=Object.freeze([Zn,Qn,er,tr,nr,ir,rr,ar,sr,cr,lr,ur,dr,fr,pr,mr,or,$n]),yr=Object.freeze({sections:vr,fileOnly:gr}),br=`experimental`;function xr(e){return e.keywords.includes(br)}function Sr(e){let t=e.settings[0];return t!==void 0&&xr(t)}function Cr(e,t){return t?e:e.flatMap(e=>{let t=e.settings.filter(e=>!xr(e));return t.length===0&&e.settings.length>0?[]:[{...e,settings:t}]})}var wr=Object.freeze(Object.fromEntries(vr.flatMap(e=>(e.legacyIds??[]).map(t=>[t,e.id])))),Tr=Object.freeze(vr.reduce((e,t)=>{for(let n of t.settings)for(let r of n.legacyIds??[])e[r.sectionId]={...e[r.sectionId],[r.settingId]:t.id};return e},{}));function O(e){let t=[],n=e=>{if(!e||typeof e!=`object`)return e;let n=Array.isArray(e)?[]:{};return t.push([e,n]),n},r=n(e);for(let e=t.pop();e;e=t.pop()){let[t,r]=e;for(let[e,i]of Object.entries(t))Object.defineProperty(r,e,{value:n(i),writable:!0,enumerable:!0,configurable:!0})}return r}function Er(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Dr(e,t){let n=t.split(`.`),r=e;for(let e of n.slice(0,-1)){if(!r||typeof r!=`object`)return;r=r[e]}r&&typeof r==`object`&&delete r[n.at(-1)]}function Or(e,t,n){let r=t.split(`.`),i=e;for(let e of r.slice(0,-1))(!i[e]||typeof i[e]!=`object`||Array.isArray(i[e]))&&(i[e]={}),i=i[e];i[r.at(-1)]=O(n)}function k(e){return e.flatMap(e=>e.settings)}function kr(e){return e.access===`file-only`||e.control===`readonly`}function Ar(e){let t=String(e??``).trim().toLowerCase();if(!t||t===`all`)return`all`;if(t===`none`)return[];let n=t.split(`,`).map(e=>e.trim());return n.every(e=>/^\d+$/.test(e)&&Number.isSafeInteger(Number(e))&&Number(e)>0)?n.map(Number):null}var jr=6;function A(e,t){return e.control===`number`&&typeof t==`number`?t/(e.unit?.storedPerDisplay??1):e.valueKind===`posthog-projects`?Array.isArray(t)?t.length===0?[`none`]:t.map(String):[]:O(t)}function Mr(e){return e.control===`number`&&(e.unit?.storedPerDisplay??1)!==1}function Nr(e){return String(Number(e.toFixed(jr)))}function Pr(e,t){let n=A(e,t);return e.valueKind===`posthog-projects`&&Array.isArray(n)?n.join(`, `)||`all`:typeof n==`number`&&e.unit?`${Nr(n)} ${e.unit.label}`:JSON.stringify(n??null)}function j(e,t){if(e.control===`number`){if(e.nullable&&(t==null||String(t).trim()===``))return null;let n=Number(t);if(e.zeroIsNull&&n<=0)return null;let r=n*(e.unit?.storedPerDisplay??1);return e.integer===!1?r:Math.round(r)}if(e.valueKind===`posthog-projects`)return Ar(Array.isArray(t)?t.join(`,`):t);if(e.control===`text`||e.control===`password`){let n=String(t??``).trim();return e.nullable&&!n?null:n}return O(t)}function M(e){return String(e||``).toLowerCase().match(/[a-z0-9]+/g)||[]}var Fr=3,Ir=2,Lr=1,Rr=3,zr=30,Br=16;function Vr(e,t){return e===t?Fr:e.startsWith(t)?Ir:t.length>=Rr&&e.includes(t)?Lr:0}function N(e,t,n){let r=0;for(let n of t){let t=Math.max(0,...e.map(e=>Vr(e,n)));if(t===0)return 0;r+=t}return r*n}function Hr(e){return e.options?.map(e=>e.label).join(`, `)??``}function Ur(e){return Zr(e.group??``)?.title??``}function Wr(e,t,n){let r=N(M(e.title),n,1e3),i=N(M(e.keywords.join(` `)),n,100),a=N(t,n,10),o=N(M(e.path),n,10),s=N(M(Hr(e)),n,10),c=N(M(e.description),n,1);return r+i+a+o+s+c}function Gr(e){return e.section?.title??``}function Kr(e,t){return Number(e.section===null)-Number(t.section===null)}function qr(e,t,n){return[[`title`,e.title],[`keywords`,e.keywords.join(` `)],[`section`,t?.title??Ur(e)],[`description`,e.description],[`path`,e.path],[`options`,Hr(e)]].flatMap(([e,t])=>{let r=[];for(let e of t.matchAll(/[a-z0-9]+/gi)){let t=e[0].toLowerCase();for(let i of n){if(Vr(t,i)===0)continue;let n=e.index+t.indexOf(i);r.push({start:n,end:n+i.length})}}let i=[];for(let e of r.sort((e,t)=>e.start-t.start||e.end-t.end)){let t=i.at(-1);t&&e.start<=t.end?t.end=Math.max(t.end,e.end):i.push({...e})}return i.length?[{field:e,text:t,spans:i}]:[]})}function Jr(e,t,n=[]){let r=M(t).slice(0,Br);if(r.length===0)return[];let i=[];for(let t of e){let e=M(t.title);for(let n of t.settings){let a=Wr(n,e,r);a!==0&&i.push({section:t,setting:n,score:a,matches:qr(n,t,r)})}}for(let e of n){let t=Wr(e,M(Ur(e)),r);t!==0&&i.push({section:null,setting:e,score:t,matches:qr(e,null,r)})}return i.sort((e,t)=>t.score-e.score||Kr(e,t)||Gr(e).localeCompare(Gr(t))||e.setting.title.localeCompare(t.setting.title)).slice(0,zr)}function Yr(e,t,n={},r={}){let i=/^#settings\/([^/]+)(?:\/([^/]+))?$/.exec(String(e||``));if(!i)return null;let a,o;try{a=decodeURIComponent(i[1]),o=i[2]?decodeURIComponent(i[2]):null}catch{return null}let s=n[a]||a,c=(o?r[s]?.[o]:void 0)||s,l=t.find(e=>e.id===c);if(!l)return null;let u=o?l.settings.find(e=>e.id===o||e.legacyIds?.some(e=>e.settingId===o&&e.sectionId===s)):null;return o&&!u?null:{sectionId:c,settingId:u?.id||null,hash:`#settings/${c}${u?`/${u.id}`:``}`}}function Xr(e){let t=new Map,n=new Map;for(let r of[...k(e.sections),...e.fileOnly])t.set(r.id,r),n.set(r.path,r);return{byId:t,byPath:n}}Xr(yr);function Zr(e,t=yr){let n=t.sections.find(t=>t.id===e);return n?{title:n.title,description:n.description}:_r[e]??null}var Qr=new WeakMap,$r=`Configured`,ei=`•`.repeat(12),ti=`Each line must be a positive whole-number PostHog project id, or the one word none.`,ni=3,ri=new Set([`customAgents`]),ii=1e-9,ai=`Lanes`,oi=Object.freeze({now:`Applies now`,"new-sessions":`New sessions`,restart:`After restart`}),si=Object.freeze({browser:`This browser`,machine:`This machine`});function ci(e){let t=new Map;for(let n of e)t.set(n.scope,(t.get(n.scope)??0)+1);let n=null,r=0;for(let[e,i]of t)i<=r||(n=e,r=i);return n}function li(e,t){let n=[];return e.scope!==t&&n.push({kind:`scope`,text:si[e.scope]}),e.takesEffect!==`now`&&n.push({kind:`effect`,text:oi[e.takesEffect]}),n}function ui(e,t){let n=t.secretSources;if(!n||typeof n!=`object`)return null;let r=n[e.path];return typeof r==`string`?r:null}function di(e){return e.control===`password`}function fi(e){return`${e.path}${$r}`}function pi(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>pi(e,t[n]));if(!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.hasOwn(t,n)&&pi(e[n],t[n]))}function mi(e){return Qr.get(e)||null}function hi(e){return Array.isArray(e)?e.map(e=>String(e)):[]}function gi(e){return e.split(`
|
|
1
|
+
import{d as e}from"./control-ws-DxQoY1aG.js";import{S as t,g as n,m as r,r as i}from"./zod-_N0uRWDY.js";import{A as a,B as o,Bt as s,F as c,Fn as l,G as u,Gt as ee,I as te,In as ne,L as re,Pn as ie,R as ae,Rn as oe,U as se,V as ce,a as le,an as ue,o as de,rn as fe,t as d}from"./button-CeEmJCQe.js";import{A as pe,B as me,C as he,D as ge,E as _e,F as ve,G as ye,H as be,I as xe,L as Se,M as f,N as Ce,O as we,P as Te,R as Ee,T as De,U as Oe,V as ke,W as Ae,b as je,j as Me,k as Ne,s as p,w as m,z as Pe}from"./dom-helpers-Bs-xZEnd.js";import{a as h}from"./modal-Cccq9QKp.js";import{a as Fe,c as Ie,i as Le,s as Re,t as ze}from"./action-status-Bbo7Fyia.js";import{E as Be,F as Ve,H as He,I as Ue,L as We,M as Ge,N as Ke,P as qe,Q as Je,R as Ye,U as Xe,V as Ze,a as Qe,b as $e,bt as et,dt as tt,et as nt,g as rt,gt as it,h as at,j as ot,l as st,o as ct,pt as lt,w as ut,x as dt,y as ft,yt as pt}from"./ui-prefs-Dyka19fU.js";import{A as mt,B as ht,C as gt,D as _t,Da as vt,E as yt,Ea as bt,F as xt,Fr as St,H as Ct,I as wt,Ir as Tt,L as Et,M as Dt,N as Ot,O as kt,Oa as At,P as jt,Pr as Mt,R as g,Rt as Nt,S as Pt,T as Ft,Ta as It,V as Lt,W as Rt,_a as zt,a as Bt,ba as Vt,c as Ht,ca as Ut,ct as Wt,ha as Gt,i as Kt,j as qt,k as Jt,ka as Yt,l as Xt,ma as Zt,n as Qt,o as $t,pa as en,pr as tn,r as nn,s as rn,st as an,t as on,va as sn,w as cn,wa as ln,xa as un,ya as dn,z as _}from"./index-MrcTP834.js";import{loadCustomSounds as fn,playAlertSound as pn,resolveSoundId as mn,soundOptions as hn}from"./alert-sound-Da6VQFBS.js";import{agentLoginSummary as gn,openAgentConnectDialog as _n,openRemoteSetupDialog as vn}from"./dialogs-B2pJJnBE.js";import{r as yn,t as bn}from"./flying-animal-preview-CstA5sSm.js";import{t as xn}from"./my-prs-panel-DoxJN1p6.js";import{n as Sn,r as Cn,t as wn}from"./team-review-settings-core-BHv0yl1m.js";import{n as Tn,t as En}from"./nyan-cat-DYqFVEIO.js";function Dn(){let e=p(`div`),t=p(`p`,`flying-animals-status`);t.id=`flying-animals-gallery-status`,t.setAttribute(`role`,`status`);let n=p(`div`,`flying-animals-gallery`);n.setAttribute(`aria-label`,`Animal gallery`);let r=[],i=()=>{let e=En(),n=tt(ct().flyingAnimalsExcludedSprites);t.textContent=[e,n?``:`No animals are included, so automatic flights are paused.`].filter(Boolean).join(` `);for(let t of r)t.disabled=e!==null},a=ct();for(let e of lt){let o=p(`article`,`flying-animal-tile`),s=bn(e),c=p(`label`,`flying-animal-include`),l=p(`input`,`settings-view-checkbox`);l.type=`checkbox`,l.checked=!a.flyingAnimalsExcludedSprites.includes(e.sprite),l.setAttribute(`aria-label`,`Include ${e.name}`),l.addEventListener(`change`,()=>{let t=new Set(ct().flyingAnimalsExcludedSprites);l.checked&&t.delete(e.sprite),l.checked||t.add(e.sprite),Ge([...t]),Ut(ft()),i()}),c.append(l,document.createTextNode(`Include`));let u=d({variant:`secondary`,label:`Fly now`});u.setAttribute(`aria-describedby`,t.id),u.addEventListener(`click`,()=>Tn(e.sprite)),r.push(u),o.append(s,p(`h2`,`flying-animal-name`,e.name),c,u),n.append(o)}return i(),e.append(t,n),e}var v={scope:`browser`,access:`editable`,takesEffect:`now`},y={scope:`browser`,access:`advanced`,takesEffect:`now`},b={scope:`machine`,access:`editable`,takesEffect:`now`},On={scope:`machine`,access:`editable`,takesEffect:`new-sessions`},x={scope:`machine`,access:`readout`,takesEffect:`now`},S={scope:`machine`,access:`file-only`},kn=1e3,An=60,jn=60,Mn=kn*An,Nn=Mn*jn,Pn={label:`investigations`,storedPerDisplay:1},Fn={label:`sessions`,storedPerDisplay:1},In={label:`recurrences`,storedPerDisplay:1},Ln={label:`actions`,storedPerDisplay:1},C={label:`seconds`,storedPerDisplay:1},Rn={label:`minutes`,storedPerDisplay:1},zn={label:`hours`,storedPerDisplay:1},w={label:`days`,storedPerDisplay:1},Bn={label:`seconds`,storedPerDisplay:kn,storedLabel:`ms`},Vn={label:`minutes`,storedPerDisplay:Mn,storedLabel:`ms`},Hn={label:`minutes`,storedPerDisplay:An,storedLabel:`seconds`},Un={label:`hours`,storedPerDisplay:Nn,storedLabel:`ms`},Wn={label:`hours`,storedPerDisplay:jn,storedLabel:`minutes`},Gn={label:`USD`,storedPerDisplay:1},Kn={label:`users`,storedPerDisplay:1},qn={label:`times`,storedPerDisplay:1},T=`A tuning knob kept out of the Settings view; the default suits almost every install.`,E=`A diagnostic switch kept out of the Settings view; change it in config.json while investigating.`,D=`Changes how the server process or its worktrees behave, so it is set in config.json with a restart or new sessions in mind.`,Jn=`A structured value with no dashboard control; edit it in config.json.`,Yn=`Never editable from the dashboard by rule; edit it in config.json.`;function Xn(e){return e.map(e=>({value:e,label:e[0].toUpperCase()+e.slice(1)}))}var Zn={id:`browser-appearance`,level:`browser`,title:`Appearance`,description:`How this browser draws the dashboard.`,legacyIds:[`browser-flying-animals`,`animals`,`flying-animals`],settings:[{id:`theme`,path:`pref:themeId`,title:`Theme`,description:`Color scheme for the dashboard.`,control:`select`,optionsFrom:`themes`,keywords:[`color`,`palette`],defaultValue:`phyrexian`,...v},{id:`phone-arrow-pad`,path:`pref:phoneArrowPad`,title:`Swipe arrow pad on phone`,description:`Swap the phone arrow keys for one pad you swipe on.`,control:`toggle`,keywords:[`experimental`,`mobile`,`keys`,`arrows`,`swipe`,`gesture`],defaultValue:!1,...v},{id:`flying-animals`,path:`pref:flyingAnimalsEnabled`,title:`Flying animals`,description:`Show animated animals flying across the dashboard.`,control:`toggle`,keywords:[`animation`,`motion`,`animals`],defaultValue:!1,...v},{id:`animals-min-gap`,path:`pref:flyingAnimalsMinGapSeconds`,title:`Time between flights: minimum`,description:`Shortest pause between flights.`,control:`number`,integer:!1,step:.1,range:_e,unit:C,maximumSettingId:`animals-max-gap`,keywords:[`animals`,`frequency`],defaultValue:m.flyingAnimalsMinGapSeconds,...y},{id:`animals-max-gap`,path:`pref:flyingAnimalsMaxGapSeconds`,title:`Time between flights: maximum`,description:`Longest pause between flights.`,control:`number`,integer:!1,step:.1,range:_e,unit:C,keywords:[`animals`,`frequency`],defaultValue:m.flyingAnimalsMaxGapSeconds,...y},{id:`animals-min-duration`,path:`pref:flyingAnimalsMinDurationSeconds`,title:`Flight duration: minimum`,description:`Shortest flight, for faster animals.`,control:`number`,integer:!1,step:.1,range:De,unit:C,maximumSettingId:`animals-max-duration`,keywords:[`animals`,`speed`],defaultValue:m.flyingAnimalsMinDurationSeconds,...y},{id:`animals-max-duration`,path:`pref:flyingAnimalsMaxDurationSeconds`,title:`Flight duration: maximum`,description:`Longest flight, for slower animals.`,control:`number`,integer:!1,step:.1,range:De,unit:C,keywords:[`animals`,`speed`],defaultValue:m.flyingAnimalsMaxDurationSeconds,...y},{id:`animals-scale`,path:`pref:flyingAnimalsScale`,title:`Size multiplier`,description:`Scale applied on top of the viewport size.`,control:`number`,integer:!1,step:.1,range:ge,unit:qn,keywords:[`animals`,`size`],defaultValue:m.flyingAnimalsScale,...y},{id:`animals-on-phone`,path:`pref:flyingAnimalsOnPhone`,title:`Show on phone layout`,description:`Allow flights on the phone layout.`,control:`toggle`,keywords:[`animals`,`mobile`],defaultValue:m.flyingAnimalsOnPhone,...y}]},Qn={id:`browser-notifications`,level:`browser`,title:`Notifications`,description:`How sessions get your attention.`,settings:[{id:`alert-sounds-enabled`,path:`pref:soundEnabled`,title:`Alert sounds`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sounds-enabled`}],description:`Play a sound when a session needs you, like the note button in the header.`,control:`toggle`,keywords:[`audio`,`mute`,`sound`,`notification`],defaultValue:!0,...v},{id:`alert-sound`,path:`pref:soundId`,title:`Alert sound`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sound`}],description:`Sound played when a session needs you, including files you add to ~/.glimmervoid/sounds/.`,control:`select`,optionsFrom:`sounds`,keywords:[`audio`,`notification`,`custom`],defaultValue:`chime`,...v},{id:`desktop-notifications`,path:`pref:notificationsEnabled`,title:`Desktop notifications`,legacyIds:[{sectionId:`browser-appearance`,settingId:`desktop-notifications`}],description:`Notify you when a session needs you and the dashboard is in the background.`,control:`toggle`,keywords:[`browser`,`attention`],defaultValue:!0,...v}]},$n={id:`browser-shortcuts`,level:`browser`,title:`Shortcuts`,description:`Keyboard shortcuts.`,legacyIds:[`shortcuts`],settings:[{id:`next-attention-key`,path:`pref:nextAttentionKeyCode`,title:`Jump to the next session needing you`,description:`Key held with Cmd on a Mac, or Alt elsewhere, to jump to the next session that needs you.`,control:`shortcut-key`,keywords:[`shortcut`,`keyboard`,`hotkey`,`jump`,`next`,`attention`],defaultValue:`KeyJ`,...v}]},er={id:`machine-telegram`,level:`machine`,parent:`browser-notifications`,title:`Telegram`,description:`One bot for session, review and PostHog alerts.`,legacyIds:[`telegram`,`notifications`],settings:[{id:`telegram-bot-token`,path:`telegram.botToken`,title:`Bot token`,description:`Token from @BotFather in Telegram (send /newbot).`,control:`password`,keywords:[`credential`,`api`],defaultValue:``,...b},{id:`telegram-chat-id`,path:`telegram.chatId`,title:`Chat id`,description:`Chat the bot posts to, read as message.chat.id from its getUpdates page after you message it.`,control:`text`,keywords:[`destination`,`channel`],defaultValue:``,...b},{id:`telegram-session-notifications`,path:`telegramNotifications`,title:`Send session notifications`,description:`Alert in Telegram when no dashboard is open, or when an alert sits unacknowledged.`,control:`toggle`,keywords:[`phone`,`off dashboard`,`test`],defaultValue:!1,status:`telegram-delivery`,...b}]},tr={id:`machine-sessions`,level:`machine`,title:`Sessions`,description:`How sessions start, where projects are found, and branch cleanup.`,legacyIds:[`machine-general`,`general`,`machine-repositories`,`repos`,`repositories`],settings:[{id:`auto-resume`,path:`autoResume`,title:`Auto-resume sessions on startup`,description:`Resume sessions that were live when Glimmervoid last stopped or crashed.`,control:`toggle`,keywords:[`startup`,`conversation`],defaultValue:!0,...b},{id:`tab-order`,path:`viewTabOrder`,title:`Tab order`,description:`Order of the dashboard tabs, also set by dragging tabs in the header.`,control:`tab-order`,keywords:[`tabs`,`order`,`rearrange`,`reorder`,`header`,`more`,`menu`],defaultValue:[],...b},{id:`remote-sessions`,path:`remoteSessions`,title:`Remote Coder sessions`,description:`Offer Coder workspaces when adding a session.`,control:`toggle`,keywords:[`experimental`,`coder`,`remote`,`workspace`,`cloud`],defaultValue:!1,...b},{id:`streamer-mode`,path:`streamerMode`,title:`Streamer mode`,description:`Hide sensitive details while screen sharing.`,control:`toggle`,keywords:[`streaming`,`screen share`,`privacy`],defaultValue:!1,...b},{id:`hint-cards`,path:`hintCards`,title:`Hint cards`,description:`Show tip cards: Your day tips and feature suggestions.`,control:`toggle`,keywords:[`experimental`,`hints`,`tips`,`your day`],defaultValue:!1,...b},{id:`repository-roots`,path:`repoRoots`,title:`Repository roots`,description:`Folders scanned for projects when adding a session.`,control:`list`,keywords:[`folders`,`project discovery`],defaultValue:[],listPlaceholder:`Repository root path`,listEmptyText:`No repository roots configured.`,...b},{id:`custom-agents`,path:`status:custom-agents`,title:`Custom agents`,description:`Extra agent CLIs a session can run.`,control:`readonly`,keywords:[`adapters`,`cli`],status:`custom-agents`,...x},{id:`agent-logins`,path:`status:agent-logins`,title:`Agent logins`,description:`How Claude Code and Codex sign in inside a Coder workspace.`,control:`readonly`,keywords:[`claude`,`codex`,`sign in`,`login`,`coder`,`remote`],status:`agent-logins`,...x},{id:`remote-setup`,path:`status:remote-setup`,title:`Remote host setup`,description:`Start a session that helps you run Glimmervoid on another Linux machine over ssh.`,control:`readonly`,keywords:[`remote`,`ssh`,`server`,`devbox`,`tailscale`,`pair`,`host`],status:`remote-setup`,...x},{id:`branch-gc-delete-unmerged`,path:`branchGc.deleteUnmerged`,title:`Delete unmerged branches`,description:`Also delete stale remote branches with no proof they were merged.`,control:`toggle`,keywords:[`git`,`cleanup`,`orphan`],danger:!0,warning:`Enabling this control lets branch cleanup delete stale remote branches without merge proof.`,legacyIds:[{sectionId:`machine-safety`,settingId:`branch-gc-delete-unmerged`}],defaultValue:!1,...b}]},nr={id:`machine-safety`,level:`machine`,title:`Sane YOLO`,description:`What agents may do without asking, and what Sane YOLO blocks.`,legacyIds:[`machine-guardrails`,`lanes-unattended`,`unattended`],settings:[{id:`skip-permissions-by-default`,path:`skipPermissionsByDefault`,title:`Skip permission prompts by default`,description:`Skip agent permission prompts for projects that set no choice.`,control:`toggle`,keywords:[`permissions`,`yolo`,`dangerously`],danger:!0,warning:`Enabling this control lets agents edit files and run shell commands without asking, and restarts running sessions that inherit it.`,defaultValue:!1,...b},{id:`sane-yolo`,path:`saneYolo`,title:`Sane YOLO`,description:`Block catastrophic commands and credential reads in every session that supports it.`,control:`toggle`,keywords:[`permissions`,`yolo`,`safety`],defaultValue:!0,...On},{id:`sane-yolo-unreadable-paths`,path:`saneYoloUnreadablePaths`,title:`Unreadable folders`,description:`Extra files and folders agents may not read, where ~ is your home folder.`,control:`list`,keywords:[`guardrails`,`secrets`,`credentials`,`sane yolo`],defaultValue:[],listPlaceholder:`~/folder`,listEmptyText:`Only the built-in credential list is unreadable.`,...On}]},rr={id:`machine-server`,level:`machine`,title:`Server`,description:`Restart or shut down the Glimmervoid server.`,settings:[{id:`server-power`,path:`status:server-power`,title:`Restart or shut down`,description:`Ends every running session first.`,control:`readonly`,keywords:[`power`,`restart`,`shutdown`,`stop`,`quit`,`reboot`,`server`],status:`server-power`,...x}]},ir={id:`machine-updates`,level:`machine`,title:`Updates`,description:`Which version is running, and updating to the newest.`,legacyIds:[`updates`],settings:[{id:`update-actions`,path:`status:update-actions`,title:`Status and actions`,legacyIds:[`update-summary`,`update-installed`,`update-latest`,`update-last-checked`].map(e=>({sectionId:`machine-updates`,settingId:e})),description:`Running and newest versions, with update and restart.`,control:`readonly`,keywords:[`version`,`available`,`current`,`check`,`restart`,`commit`,`installed`,`release`,`failure`],status:`update-actions`,...x},{id:`update-channel`,path:`updateChannel`,title:`Channel`,description:`Stable releases, or Experimental builds from every change to main.`,control:`select`,options:Xn(ue),keywords:[`release`,`prerelease`,`next`,`beta`,`early`],defaultValue:`release`,...b},{id:`check-updates`,path:`checkForUpdates`,title:`Check for updates automatically`,description:`Check for a newer version at launch and while the dashboard is open.`,control:`toggle`,keywords:[`release`,`github`],defaultValue:!0,...b}]},ar={id:`machine-usage`,level:`machine`,title:`Usage`,description:`Token accounting and estimated-cost budgets.`,legacyIds:[`usage`],settings:[{id:`usage-enabled`,path:`usage.enabled`,title:`Track token usage`,description:`Read local agent transcripts for the Usage tab and session cards.`,control:`toggle`,keywords:[`tokens`,`cost`],defaultValue:!0,status:`usage-last-report`,...b},{id:`usage-your-day`,path:`usage.yourDay`,title:`Your day`,description:`Recap yesterday and suggest a pace for today when usage tracking is on.`,control:`toggle`,keywords:[`burnout`,`breaks`,`pace`,`wellbeing`],defaultValue:!0,...b},{id:`usage-retain-days`,path:`usage.retainDays`,title:`Retain transcript detail`,description:`How long detailed usage is kept.`,control:`number`,range:be,unit:w,keywords:[`history`,`retention`],defaultValue:90,...b},{id:`usage-daily-budget`,path:`usage.budget.dailyUsd`,title:`Daily budget`,description:`Alert at 50%, 75% and 100% of this estimated daily spend, or never at zero.`,control:`number`,range:me,unit:Gn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...b},{id:`usage-monthly-budget`,path:`usage.budget.monthlyUsd`,title:`Monthly budget`,description:`Alert at 50%, 75% and 100% of this estimated monthly spend, or never at zero.`,control:`number`,range:me,unit:Gn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...b}]},or={id:`machine-privacy`,level:`machine`,title:`Privacy`,description:`What Glimmervoid sends about itself.`,legacyIds:[`privacy`,`telemetry`],settings:[{id:`telemetry-enabled`,path:`telemetry.enabled`,title:`Send usage data`,description:`Helps us improve Glimmervoid. Sent under a random install id: version, platform, app starts, daily activity, session starts and ends with agent kind, exit kind and duration, errors as their type, error code and scrubbed stack frames, per session token counts, models and estimated costs from the usage scan, and a salted one-way hash of your Claude and Codex account ids so installs of one account count together. The text of errors the dashboard shows in its header line, with your home folder shown as ~, which can name a session, folder or branch. Otherwise never prompts, project information, other error messages, paths, repository or branch names, objectives, terminal output, emails or names. Delete my data asks for everything sent under this install to be erased and starts a new install id. GLIMMERVOID_TELEMETRY=0, DO_NOT_TRACK=1 or CI=true turn it off regardless.`,control:`toggle`,keywords:[`telemetry`,`analytics`,`tracking`,`opt out`],defaultValue:!0,...b}]},sr={id:`lanes-posthog`,level:`lanes`,title:`PostHog`,description:`Error monitoring, investigations and traffic-spike alerts.`,legacyIds:[`lanes`,`posthog`],settings:[{id:`posthog-enabled`,path:`posthog.enabled`,title:`Enable PostHog monitoring`,description:`Watch PostHog error tracking and investigate issues that move.`,control:`toggle`,keywords:[`errors`,`monitoring`],defaultValue:!1,...b},{id:`posthog-host`,path:`posthog.host`,title:`Host`,description:`PostHog cloud or self-hosted URL.`,control:`text`,keywords:[`url`,`server`],defaultValue:`https://us.posthog.com`,...b},{id:`posthog-api-key`,path:`posthog.apiKey`,title:`Personal API key`,description:`Personal API key with read access to your projects.`,control:`password`,keywords:[`credential`,`token`],defaultValue:``,...b},{id:`posthog-projects`,path:`posthog.projects`,title:`Projects`,description:`Project ids to watch, where empty watches all and none watches none.`,control:`list`,keywords:[`project ids`,`filter`],defaultValue:`all`,valueKind:`posthog-projects`,listPlaceholder:`Project id`,listEmptyText:`Every project the key can read.`,...b},{id:`posthog-interval`,path:`posthog.intervalMinutes`,title:`Poll interval`,description:`Time between PostHog checks.`,control:`number`,integer:!1,step:`any`,range:f,unit:Rn,keywords:[`refresh`,`schedule`],defaultValue:15,...b},{id:`posthog-max-investigations`,path:`posthog.maxConcurrentInvestigations`,title:`Max concurrent investigations`,description:`Most investigations running at once.`,control:`number`,range:f,unit:Pn,keywords:[`parallel`,`workers`],defaultValue:2,...b},{id:`posthog-min-users`,path:`posthog.minUsersToInvestigate`,title:`Min users to investigate`,description:`Fewest affected users before a new issue is investigated.`,control:`number`,range:f,unit:Kn,keywords:[`threshold`,`affected`],defaultValue:1,...b},{id:`posthog-traffic-enabled`,path:`posthog.trafficSpikeEnabled`,title:`Traffic spike alerts`,description:`Alert when unique users jump above normal.`,control:`toggle`,keywords:[`analytics`,`alert`],defaultValue:!0,...b},{id:`posthog-auto-fix`,path:`posthog.autoFix`,title:`Attempt fixes for major issues`,description:`Let an agent fix an issue on a local branch, opening a pull request only after you approve.`,control:`toggle`,keywords:[`automatic`,`pull request`],danger:!0,warning:`Enabling this control lets an agent that read PostHog error data edit code onto a local branch; nothing is pushed until you approve it.`,defaultValue:!1,...b}]},cr={id:`lanes-github-access`,level:`lanes`,title:`Lane GitHub access`,description:`What background lanes may read on GitHub and the web.`,settings:[{id:`github-read-token`,path:`github.readToken`,title:`GitHub read token`,description:`Read-only fine-grained GitHub token lanes use for gh. Team review and community research need it.`,control:`password`,keywords:[`credential`,`token`,`gh`,`pull requests`],defaultValue:``,...b},{id:`lanes-fetch-domains`,path:`lanes.fetchDomains`,title:`Extra fetch domains`,description:`Domains lanes may fetch pages from, beyond GitHub and posthog.com.`,control:`list`,keywords:[`web`,`fetch`,`domains`,`allowlist`],defaultValue:[],listPlaceholder:`docs.example.com`,listEmptyText:`Only the built-in domains.`,...b}]},lr={id:`lanes-team-review`,level:`lanes`,title:`Team review`,description:`Draft reviews of teammates' pull requests for you to post.`,legacyIds:[`team-review`,`reviews`],settings:[{id:`team-review-enabled`,path:`teamReview.enabled`,title:`Enable team review`,description:`Draft a review of each open team pull request, posting nothing until you approve or comment.`,control:`toggle`,keywords:[`pull requests`,`github`],defaultValue:!0,...b},{id:`github-teams`,path:`github.teams`,title:`GitHub teams`,description:`GitHub teams whose review requests are drafted, as org/team-slug.`,control:`list`,keywords:[`github`,`teams`,`review requests`],defaultValue:[],listPlaceholder:`org/team-slug`,listEmptyText:`No GitHub teams configured.`,...b},{id:`team-review-org`,path:`teamReview.org`,title:`GitHub organization`,description:`Organization whose pull requests that request your review directly are drafted. Needed only when no GitHub team is set.`,control:`text`,keywords:[`github`,`organization`,`org`,`review requests`],defaultValue:``,...b},{id:`team-review-re-review-after-hours`,path:`teamReview.reReviewAfterHours`,title:`Re-review after`,description:`Review a pull request again after a new push, once this much time has passed.`,control:`number`,range:f,unit:zn,keywords:[`review`,`delay`],defaultValue:24,integer:!1,step:.5,...b},{id:`team-review-skip-idle-after-days`,path:`teamReview.skipIdleAfterDays`,title:`Skip PRs idle for`,description:`Skip pull requests with no activity for this long.`,control:`number`,range:f,unit:w,keywords:[`idle`,`activity`],defaultValue:14,integer:!1,step:.5,...b},{id:`team-review-skill`,path:`teamReview.skill`,title:`Review skill`,description:`Skill Claude Code follows for each review, or none when empty.`,control:`text`,keywords:[`skill`,`claude code`,`pr review`],defaultValue:``,suggestionsFrom:`review-skills`,...b},{id:`team-review-reviewer-model`,path:`teamReview.reviewer.model`,title:`Review model`,description:`Model for reviews, or the agent's default when empty.`,control:`text`,keywords:[`model`,`reviewer`],defaultValue:``,suggestionsFrom:`review-models`,...b},{id:`team-review-reviewer-effort`,path:`teamReview.reviewer.effort`,title:`Review effort`,description:`Effort for reviews, or the agent's default when empty.`,control:`text`,keywords:[`effort`,`thinking`,`reasoning`,`reviewer`],defaultValue:``,suggestionsFrom:`review-efforts`,...b},{id:`team-review-stamp-reviewer-model`,path:`teamReview.stampReviewer.model`,title:`Docs and tests PR model`,description:`Model for pull requests that only touch docs and tests.`,control:`text`,keywords:[`stamp`,`model`,`small pull requests`,`docs`,`tests`],defaultValue:``,suggestionsFrom:`review-stamp-models`,...b},{id:`team-review-stamp-reviewer-effort`,path:`teamReview.stampReviewer.effort`,title:`Docs and tests PR effort`,description:`Effort for pull requests that only touch docs and tests.`,control:`text`,keywords:[`stamp`,`effort`,`small pull requests`,`docs`,`tests`],defaultValue:``,suggestionsFrom:`review-stamp-efforts`,...b},{id:`team-review-sandbox-load-mcp-servers`,path:`teamReview.sandbox.loadMcpServers`,title:`Load my MCP servers`,description:`Give the review agent your own MCP servers.`,control:`toggle`,keywords:[`mcp`,`servers`,`tools`],danger:!0,warning:`Enabling this control gives the review agent, which reads untrusted pull request text, every tool your MCP servers expose.`,defaultValue:!1,...b},{id:`team-review-auto-rebase-my-prs`,path:`teamReview.autoRebaseMyPrs`,title:`Keep my pull requests rebased`,description:`Rebase your open pull requests when they fall behind their base branch.`,control:`toggle`,keywords:[`rebase`,`update branch`,`behind`,`my prs`],danger:!0,warning:`Enabling this control rewrites your pull request branches on GitHub. Pull before you push from a local checkout of one.`,defaultValue:!1,...b},{id:`team-review-keep-mergeable-enabled`,path:`teamReview.keepMergeableEnabled`,title:`Keep mergeable`,description:`Offer Keep mergeable: an agent fixes conflicts and failing checks on your pull requests.`,control:`toggle`,keywords:[`repair`,`conflicts`,`my prs`],defaultValue:!0,...b},{id:`team-review-keep-mergeable-timeout`,path:`teamReview.keepMergeableTimeoutMinutes`,title:`Keep mergeable deadline`,description:`Longest a Keep mergeable repair may run.`,control:`number`,range:we,unit:Rn,keywords:[`timeout`,`repair`],defaultValue:30,...b},{id:`team-review-merge-queue-enabled`,path:`teamReview.mergeQueueEnabled`,title:`Merge when ready`,description:`Offer Merge when ready: queued pull requests merge once they pass.`,control:`toggle`,keywords:[`merge queue`,`auto merge`,`my prs`],defaultValue:!0,...b}]},ur={id:`lanes-workflows`,level:`lanes`,title:`Workflows`,description:`Rules that act on pull request events.`,legacyIds:[`workflows`],settings:[{id:`workflows-enabled`,path:`workflows.enabled`,title:`Run workflows`,description:`Watch the repositories your rules name and run their actions.`,control:`toggle`,keywords:[`pull requests`,`automation`,`master switch`],defaultValue:!0,...b},{id:`workflows-max-concurrent-sessions`,path:`workflows.maxConcurrentSessions`,title:`Concurrent agent sessions`,description:`Most workflow sessions running at once.`,control:`number`,range:ye,unit:Fn,keywords:[`parallel`,`spawn`],defaultValue:2,...b},{id:`workflows-rules`,path:`status:workflow-rules`,title:`Workflow rules`,description:`Turn each workflow rule on or off.`,control:`readonly`,keywords:[`pull requests`,`automation`,`github`,`rules`],status:`workflows`,...x}]},dr={id:`lanes-benchmarks`,level:`lanes`,title:`Benchmarks`,description:`Compare agent setups on frozen benchmark cases.`,legacyIds:[`benchmarks`],settings:[{id:`benchmarks-enabled`,path:`benchmarks.enabled`,title:`Enable benchmarks`,description:`Show the Bench tab, where nothing runs until you start it.`,control:`toggle`,keywords:[`eval`,`arms`,`recall`,`compare`],defaultValue:!1,...b}]},fr={id:`lanes-coherence`,level:`lanes`,title:`Coherence`,description:`Coherence hook status and decision journal per session.`,settings:[{id:`coherence-enabled`,path:`coherence.enabled`,title:`Show session Coherence`,description:`Show the Coherence hook status and decisions of each session in a repository with a coherence.config.json (needs @posthog/coherence 1.8 or newer).`,control:`toggle`,keywords:[`experimental`,`coherence`,`journal`,`decisions`],defaultValue:!0,...b}]},pr={id:`lanes-issues`,level:`lanes`,title:`Issues`,description:`GitHub issues from your projects and teams.`,settings:[{id:`issues-enabled`,path:`issues.enabled`,title:`Show the Issues tab`,description:`Show an Issues tab listing GitHub issues for your projects and teams.`,control:`toggle`,keywords:[`experimental`,`issues`,`github`,`tab`],defaultValue:!1,...b}]},mr={id:`lanes-community`,level:`lanes`,title:`Community`,description:`Research new posthog.com community questions and draft replies.`,settings:[{id:`community-enabled`,path:`community.enabled`,title:`Show the Community tab`,description:`Research new community questions and draft a reply for each.`,control:`toggle`,keywords:[`experimental`,`community`,`questions`,`forum`,`tab`],defaultValue:!1,...b},{id:`community-skill`,path:`community.skill`,title:`Research skill`,description:`Skill the research agent follows, or none when empty.`,control:`text`,keywords:[`skill`,`answering`,`claude code`],defaultValue:``,...b},{id:`community-project-id`,path:`community.projectId`,title:`PostHog project`,description:`PostHog project holding the community forum and Discord data.`,control:`number`,integer:!0,range:Te,unit:{label:`project id`,storedPerDisplay:1},keywords:[`project id`,`warehouse`],defaultValue:2,...b},{id:`community-interval`,path:`community.intervalMinutes`,title:`Poll interval`,description:`Time between community checks.`,control:`number`,integer:!0,range:he,unit:Rn,keywords:[`refresh`,`schedule`],defaultValue:30,...b},{id:`community-discord-channels`,path:`community.discordChannels`,title:`Discord channels`,description:`Discord channels to watch for questions, without the #, or none to skip Discord.`,control:`list`,keywords:[`discord`,`channels`,`allowlist`],defaultValue:[],...b}]},hr=Object.freeze([`auto`,`calculate`,`display`]);Object.freeze([`codex`,`grok`,`kimi`]),Object.freeze([`dailyUsd`,`monthlyUsd`]);var gr=Object.freeze([{id:`file-debug-mode`,path:`debugMode`,title:`Debug mode`,group:`machine-sessions`,description:`Show session-card diagnostics for state, transitions and detection signals.`,control:`toggle`,keywords:[`diagnostics`,`state`],defaultValue:!1,takesEffect:`now`,fileOnlyReason:E,...S},{id:`file-replay-buffer`,path:`replayBufferKB`,title:`Replay buffer`,group:`machine-terminal`,description:`PTY output retained for clients that reconnect or join late.`,control:`number`,range:Ee,unit:{label:`KB`,storedPerDisplay:1},keywords:[`history`,`backfill`],defaultValue:512,takesEffect:`new-sessions`,fileOnlyReason:T,...S},{id:`file-session-memory-reserve`,path:`sessionMemoryReserveMB`,title:`Session memory reserve`,group:`machine-sessions`,description:`Free memory an automatic session start waits for; 0 starts sessions without checking.`,control:`number`,range:Ne,unit:{label:`MB`,storedPerDisplay:1},keywords:[`memory`,`headroom`],defaultValue:600,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-cursor-blink`,path:`cursorBlink`,title:`Cursor blink`,group:`machine-terminal`,description:`Blink the cursor in every terminal.`,control:`toggle`,keywords:[`caret`,`terminal`],defaultValue:!1,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-detect-background-agents`,path:`detectBackgroundAgents`,title:`Detect background agents`,group:`machine-detection-sessions`,description:`Hold completion while tracked background work is active.`,control:`toggle`,keywords:[`subagents`,`completion`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:E,...S},{id:`file-record-signals`,path:`recordSignals`,title:`Record structural signals`,group:`machine-detection-sessions`,description:`Keep forensic status and hook recordings for each session. Full capture (capture.enabled) records these signals even when this is off.`,control:`toggle`,keywords:[`recordings`,`diagnostics`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:E,...S},{id:`file-trace-enabled`,path:`trace.enabled`,title:`Capture session traces`,group:`machine-detection-sessions`,description:`Keep normalized Claude transcript traces for session debugging.`,control:`toggle`,keywords:[`transcripts`,`diagnostics`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:E,...S},{id:`file-detect-scheduled-wakeups`,path:`detectScheduledWakeups`,title:`Detect scheduled wakeups`,group:`machine-detection-sessions`,description:`Surface advisory wakeup timing for scheduled sessions.`,control:`toggle`,keywords:[`schedule`,`sleep`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:E,...S},{id:`file-worktree-auto-rebase`,path:`worktreeAutoRebase`,title:`Worktree auto-rebase`,group:`machine-detection-sessions`,description:`Rebase eligible session worktrees when the integration branch moves.`,control:`toggle`,keywords:[`git`,`branch`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-sync-on-start`,path:`worktreeSyncOnStart`,title:`Worktree sync on start`,group:`machine-detection-sessions`,description:`Fetch origin and fast-forward the local integration branch before a session starts its worktree.`,control:`toggle`,keywords:[`git`,`fetch`,`fast-forward`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-clone-dependencies`,path:`worktreeCloneDependencies`,title:`Worktree dependencies`,group:`machine-detection-sessions`,description:`Give a session worktree its node_modules before the agent starts: on macOS, clone the main checkout's when it matches the worktree's lockfile, then, except on Windows, install each folder still without one from its package-lock.json or pnpm-lock.yaml, with no package scripts.`,control:`toggle`,keywords:[`node_modules`,`npm`,`pnpm`,`install`],defaultValue:!0,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-rerere`,path:`worktreeRerere`,title:`Worktree rerere`,group:`machine-detection-sessions`,description:`Reuse recorded Git conflict resolutions.`,control:`toggle`,keywords:[`git`,`conflicts`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:D,...S},{id:`file-share-commit-provenance`,path:`shareCommitProvenance`,title:`Share commit provenance`,group:`machine-detection-sessions`,description:`After Merge pushes the base branch, also push the git notes that let glimmervoid why name the agent and session of a commit on any clone. The notes hold a hashed session id and the agent name, never a task or prompt. Off keeps them on this machine.`,control:`toggle`,keywords:[`git`,`notes`,`why`,`privacy`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-integration-branch`,path:`integrationBranch`,title:`Integration branch`,group:`machine-detection-sessions`,description:`Base branch for session worktrees. Empty = each repo's default branch. Existing sessions are never retargeted.`,control:`text`,nullable:!0,keywords:[`git`,`merge`],defaultValue:null,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-root`,path:`worktreeRoot`,title:`Worktree root`,group:`machine-detection-sessions`,description:`Directory that contains session worktrees. Existing worktrees are never relocated.`,control:`text`,keywords:[`git`,`directory`],defaultValue:``,takesEffect:`new-sessions`,fileOnlyReason:D,...S},{id:`file-worktree-share`,path:`worktreeShare`,title:`Shared worktree paths`,group:`machine-detection-sessions`,description:`Local paths copied or linked during worktree preparation. A * matches names at the project root, never one containing production; name such a file in full to share it.`,control:`list`,keywords:[`files`,`context`,`env`],defaultValue:[`.env*`,`.claude`],takesEffect:`new-sessions`,fileOnlyReason:Yn,...S},{id:`file-port`,path:`port`,title:`Local port`,group:`machine-detection-sessions`,description:`Port used by the local dashboard listener.`,control:`number`,range:Me,unit:{label:`port`,storedPerDisplay:1},keywords:[`server`,`listener`],defaultValue:3e3,takesEffect:`restart`,fileOnlyReason:Yn,...S},{id:`file-notify-debounce-ms`,path:`notifyDebounceMs`,title:`Notification grouping window`,group:`machine-detection-sessions`,description:`Alerts from any session within this long of the first one fold into one sound, one desktop notification and one Telegram message.`,control:`number`,integer:!1,step:`any`,range:f,unit:Bn,keywords:[`timer`,`alerts`],defaultValue:3e3,takesEffect:`new-sessions`,fileOnlyReason:T,...S},{id:`file-phone-escalation-ms`,path:`phoneEscalationMs`,title:`Phone escalation delay`,group:`machine-detection-sessions`,description:`Delay before off-dashboard escalation.`,control:`number`,integer:!1,step:`any`,range:f,unit:Vn,keywords:[`timer`,`telegram`],defaultValue:3e5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-branch-gc-enabled`,path:`branchGc.enabled`,title:`Branch cleanup`,group:`machine-detection-sessions`,description:`Enable cleanup of eligible session branches.`,control:`toggle`,keywords:[`git`,`cleanup`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-worktrees`,path:`branchGc.worktrees`,title:`Local worktree cleanup`,group:`machine-detection-sessions`,description:`Enable cleanup of eligible local worktrees.`,control:`toggle`,keywords:[`git`,`worktree`,`cleanup`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-prefixes`,path:`branchGc.prefixes`,title:`Branch cleanup prefixes`,group:`machine-detection-sessions`,description:`Branch prefixes that filter both remote branch cleanup and local worktree cleanup.`,control:`list`,keywords:[`git`,`branch`],defaultValue:[`glimmervoid/session/`,`worktree-agent-`],takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-dry-run`,path:`branchGc.dryRun`,title:`Branch cleanup dry run`,group:`machine-detection-sessions`,description:`Report planned cleanup without deleting remote branches.`,control:`toggle`,keywords:[`git`,`safety`],defaultValue:!1,takesEffect:`now`,fileOnlyReason:D,...S},{id:`file-branch-gc-stale-days`,path:`branchGc.staleDays`,title:`Branch stale days`,group:`machine-detection-sessions`,description:`Age threshold for orphan branch cleanup when unmerged deletion is on.`,control:`number`,integer:!1,step:`any`,range:f,unit:w,keywords:[`git`,`retention`],defaultValue:14,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-branch-gc-interval-ms`,path:`branchGc.intervalMs`,title:`Branch cleanup interval`,group:`machine-detection-sessions`,description:`Delay between branch cleanup passes.`,control:`number`,integer:!1,step:`any`,range:f,unit:Un,keywords:[`git`,`schedule`],defaultValue:216e5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-custom-agents`,path:`customAgents`,title:`Custom agents`,group:`machine-detection-sessions`,description:`Extra agent CLIs a session can be spawned with. The Sessions section lists the declared agents and whether each command resolves.`,control:`json`,keywords:[`adapters`,`cli`],defaultValue:[],takesEffect:`new-sessions`,fileOnlyReason:Yn,...S},{id:`file-task-title-refiner-enabled`,path:`taskTitle.refiner.enabled`,title:`Refine task titles`,group:`machine-detection-sessions`,description:`Keep session card titles useful when prompts change topic by asking a model for a short title.`,control:`toggle`,keywords:[`title`,`refiner`,`card`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-task-title-refiner-model`,path:`taskTitle.refiner.model`,title:`Task title model`,group:`machine-detection-sessions`,description:`Claude model alias the title refiner asks.`,control:`text`,keywords:[`title`,`refiner`,`model`],defaultValue:s.taskTitleRefiner,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-task-title-refiner-min-interval`,path:`taskTitle.refiner.minIntervalSeconds`,title:`Task title refresh interval`,group:`machine-detection-sessions`,description:`Shortest pause between two title refinements of one session.`,control:`number`,integer:!1,step:`any`,range:pe,unit:C,keywords:[`title`,`refiner`,`interval`],defaultValue:60,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-task-title-refiner-timeout`,path:`taskTitle.refiner.timeoutSeconds`,title:`Task title timeout`,group:`machine-detection-sessions`,description:`Maximum time allowed for one title refinement.`,control:`number`,integer:!1,step:`any`,range:Pe,unit:C,keywords:[`title`,`refiner`,`deadline`],defaultValue:60,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-codex`,path:`usage.vendors.codex`,title:`Track Codex usage`,group:`machine-usage`,description:`Include local Codex CLI transcripts in usage reports.`,control:`toggle`,keywords:[`openai`,`vendor`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-grok`,path:`usage.vendors.grok`,title:`Track Grok usage`,group:`machine-usage`,description:`Include local Grok CLI transcripts in usage reports.`,control:`toggle`,keywords:[`xai`,`vendor`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-kimi`,path:`usage.vendors.kimi`,title:`Track Kimi Code usage`,group:`machine-usage`,description:`Include local Kimi Code transcripts in usage reports.`,control:`toggle`,keywords:[`moonshot`,`vendor`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-fetch-pricing`,path:`usage.fetchPricing`,title:`Fetch current model prices`,group:`machine-usage`,description:`Load public model prices when usage tracking starts, using a cached table for up to one day. Falls back to cached or bundled prices if the fetch fails; no daily refresh runs while tracking continues.`,control:`toggle`,keywords:[`rates`,`models`],defaultValue:!0,takesEffect:`restart`,fileOnlyReason:T,...S},{id:`file-usage-plan-limits`,path:`usage.planLimits`,title:`Show plan limits`,group:`machine-usage`,description:`Read the Claude plan limit the CLI reports and show it beside usage.`,control:`toggle`,keywords:[`plan`,`limits`,`quota`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-scan-interval`,path:`usage.scanIntervalMinutes`,title:`Scan interval`,group:`machine-usage`,description:`Periodic transcript polling interval. Session activity can also trigger scans between timer ticks.`,control:`number`,range:Oe,unit:Rn,keywords:[`poll`,`refresh`],defaultValue:5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-warehouse-retain-days`,path:`usage.warehouseRetainDays`,title:`Retain usage history`,group:`machine-usage`,description:`How long the daily usage warehouse keeps rolled-up totals after transcript detail expires.`,control:`number`,range:ke.warehouseRetainDays,unit:w,keywords:[`history`,`warehouse`,`retention`],defaultValue:365,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-session-block-hours`,path:`usage.sessionBlockHours`,title:`Session block length`,group:`machine-usage`,description:`Length of the rolling block the Usage view groups activity into.`,control:`number`,range:ke.sessionBlockHours,unit:zn,keywords:[`block`,`window`,`hours`],defaultValue:5,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-cost-mode`,path:`usage.costMode`,title:`Cost mode`,group:`machine-usage`,description:`Choose whether recorded costs, calculated costs or both can appear.`,control:`select`,options:Xn(hr),keywords:[`pricing`,`estimate`],defaultValue:`auto`,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-usage-extra-projects-dirs`,path:`usage.extraProjectsDirs`,title:`Extra transcript folders`,group:`machine-usage`,description:`Absolute paths of additional Claude projects folders the usage scan reads.`,control:`list`,keywords:[`transcripts`,`folders`,`scan`],defaultValue:[],takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-investigation-timeout`,path:`posthog.investigationTimeoutSeconds`,title:`Investigation timeout`,group:`lanes-posthog`,description:`Maximum time allowed for one investigation.`,control:`number`,integer:!1,step:`any`,range:f,unit:Hn,keywords:[`deadline`,`session`],defaultValue:900,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-escalation`,path:`posthog.userEscalationThreshold`,title:`Escalation threshold`,group:`lanes-posthog`,description:`Affected-user count that escalates an issue.`,control:`number`,range:f,unit:Kn,keywords:[`threshold`,`severity`],defaultValue:25,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-fix-timeout`,path:`posthog.fixTimeoutSeconds`,title:`Fix timeout`,group:`lanes-posthog`,description:`Maximum time allowed for one fix session.`,control:`number`,integer:!1,step:`any`,range:Ce,unit:Hn,keywords:[`deadline`,`repair`],defaultValue:1800,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-multiplier`,path:`posthog.trafficSpikeMultiplier`,title:`Spike multiplier`,group:`lanes-posthog`,description:`Baseline multiplier required to classify a traffic spike.`,control:`number`,integer:!1,step:`any`,range:Se,unit:qn,keywords:[`baseline`,`ratio`],defaultValue:3,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-min-users`,path:`posthog.trafficSpikeMinUsers`,title:`Min users to alert`,group:`lanes-posthog`,description:`Minimum recent unique users for an initial traffic-spike alert. Escalation and recovery alerts bypass this minimum.`,control:`number`,range:xe,unit:Kn,keywords:[`threshold`,`analytics`],defaultValue:10,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-cooldown`,path:`posthog.trafficSpikeCooldownMinutes`,title:`Spike cooldown`,group:`lanes-posthog`,description:`Cooldown for new traffic spikes. Escalation and recovery alerts bypass it. Zero removes the time delay; repeated active-spike alerts are still suppressed.`,control:`number`,integer:!1,step:`any`,range:pe,unit:Wn,keywords:[`silence`,`delay`],defaultValue:360,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-traffic-baseline`,path:`posthog.trafficSpikeBaselineDays`,title:`Baseline window`,group:`lanes-posthog`,description:`Historical window used to calculate normal hourly traffic.`,control:`number`,range:ve,unit:w,keywords:[`history`,`analytics`],defaultValue:7,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-recurrence-dedupe`,path:`posthog.recurrenceDedupe`,title:`Deduplicate recurring issues`,group:`lanes-posthog`,description:`Treat an issue seen again inside the recurrence window as the same investigation instead of opening a new one.`,control:`toggle`,keywords:[`recurrence`,`dedupe`,`issues`],defaultValue:!0,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-recurrence-window-days`,path:`posthog.recurrenceWindowDays`,title:`Recurrence window`,group:`lanes-posthog`,description:`How far back an issue counts as a recurrence of an investigated one.`,control:`number`,integer:!1,step:`any`,range:f,unit:w,keywords:[`recurrence`,`window`],defaultValue:7,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-transient-recurrence-limit`,path:`posthog.transientRecurrenceLimit`,title:`Transient recurrence limit`,group:`lanes-posthog`,description:`How many times a transient issue may recur before it is investigated again.`,control:`number`,integer:!1,step:`any`,range:f,unit:In,keywords:[`recurrence`,`transient`,`limit`],defaultValue:3,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-repo-path`,path:`posthog.repoPath`,title:`Repository path`,group:`lanes-posthog`,description:`Absolute path of the local checkout investigations read and fixes branch from, for every project the project map does not name.`,control:`text`,keywords:[`repository`,`checkout`,`path`],defaultValue:``,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-posthog-project-map`,path:`posthog.projectMap`,title:`Project map`,group:`lanes-posthog`,description:`PostHog project id to a label: the name shown for that project, and, when it is an absolute path to a checkout, the repository its issues are investigated in.`,control:`json`,keywords:[`projects`,`repositories`,`map`],defaultValue:{},takesEffect:`now`,fileOnlyReason:Jn,...S},{id:`file-team-review-team`,path:`teamReview.team`,title:`GitHub team (legacy)`,group:`lanes-team-review`,description:`Team slug whose members and review requests are polled. Read only when github.teams is empty.`,control:`text`,keywords:[`github`,`slug`,`legacy`],defaultValue:``,takesEffect:`now`,fileOnlyReason:`A legacy key: github.teams names teams as org/slug entries and wins whenever it is set.`,...S},{id:`file-workflows-max-actions-per-poll`,path:`workflows.maxActionsPerPoll`,title:`Actions per poll`,group:`lanes-workflows`,description:`Most actions run in one poll. The rest are dropped and logged.`,control:`number`,range:Ae,unit:Ln,keywords:[`cap`,`rate limit`],defaultValue:20,takesEffect:`now`,fileOnlyReason:T,...S},{id:`file-workflows-rules`,path:`workflows.rules`,title:`Workflow rule definitions`,group:`lanes-workflows`,description:`The rules the Workflows section switches on and off: each names its repositories, one pull request event, its filters and its actions.`,control:`json`,keywords:[`pull requests`,`automation`,`rules`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Rule definitions are written in config.json; the Workflows section only switches each rule on or off.`,...S},{id:`file-pr-flows-sources`,path:`prFlows.sources`,title:`PR flows sources`,group:`lanes-team-review`,description:`Commands that report review findings for your own pull requests, run without a shell on each new head once you approve the exact command in My PRs. Each entry has id, label, command (an argv array; {prUrl}, {repo}, {number} and {head} expand inside one argument, and GLIMMERVOID_PR_URL, GLIMMERVOID_PR_REPO, GLIMMERVOID_PR_NUMBER and GLIMMERVOID_PR_HEAD are set) and timeoutSeconds, and prints {"findings": [{"path", "lineStart", "lineEnd", "priority", "body", "url"}], "status": [{"label", "state"}]} JSON. Each id is unique within the list. Check entries with glimmervoid pr-flows check.`,jsonSchema:t(i(ie),{io:`input`}),example:[{id:`scanner`,label:`Scanner`,command:[`my-review-scanner`,`--pr`,`{prUrl}`,`--json`],timeoutSeconds:120}],control:`json`,keywords:[`pull requests`,`review items`,`bots`,`commands`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Commands run on this machine, so they are written in config.json and each one waits for your approval in My PRs.`,...S},{id:`file-pr-flows-actions`,path:`prFlows.actions`,title:`PR flows actions`,group:`lanes-team-review`,description:`Commands that act on a review item of your own pull request, shown as a button with their label and named by rules as run:<id>. Each entry has id, label, command and timeoutSeconds like a source, also expands {itemPath} and {itemLine}, gets the item as GLIMMERVOID_ITEM_JSON, waits for your approval in My PRs, and has an id unique within the list. Exit 0 is done and non-zero failed, unless stdout prints {"outcome": "done" | "started" | "refused" | "failed", "message"} JSON.`,jsonSchema:t(i(ie),{io:`input`}),example:[{id:`ask-bot`,label:`Ask bot`,command:[`gh`,`pr`,`comment`,`{prUrl}`,`--body`,`@review-bot fix {itemPath}:{itemLine}`]}],control:`json`,keywords:[`pull requests`,`review items`,`commands`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Commands run on this machine, so they are written in config.json and each one waits for your approval in My PRs.`,...S},{id:`file-pr-flows-pr-actions`,path:`prFlows.prActions`,title:`PR flows PR actions`,group:`lanes-team-review`,description:`Commands that act on a whole pull request of yours, shown as a button next to Keep mergeable and Merge when ready and run once per click, never by a rule. Each entry has id, label, command and timeoutSeconds like an action, plus optional repos (owner/name; every repository when absent), expands {headRef} and {baseRef} instead of the item placeholders, gets GLIMMERVOID_PR_HEAD_REF, GLIMMERVOID_PR_BASE_REF and the pull request as GLIMMERVOID_PR_JSON, and waits for your approval in My PRs. Exit 0 is done and non-zero failed, unless stdout prints {"outcome": "done" | "started" | "refused" | "failed", "message"} JSON.`,jsonSchema:t(i(l),{io:`input`}),example:[{id:`agent-merge`,label:`Merge via agent`,repos:[`acme/app`],command:[`my-merge-trigger`,`{prUrl}`,`{headRef}`],timeoutSeconds:60}],control:`json`,keywords:[`pull requests`,`buttons`,`commands`,`merge`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Commands run on this machine, so they are written in config.json and each one waits for your approval in My PRs.`,...S},{id:`file-packs`,path:`packs`,title:`Packs`,group:`lanes-team-review`,description:`More pack directories to load besides every directory under ~/.glimmervoid/packs/. A pack is a pack.json (name, version, description, requires, and sections such as prFlows with prActions, sources, actions and rules) plus the files it uses, shared by copying the directory; its commands can use {packDir}, its ids show as <pack>/<id>, and it waits for one approval in Settings, Packs that any edit to a file in it asks again.`,control:`list`,keywords:[`packs`,`share`,`plugins`,`pull requests`,`commands`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`A pack can run commands on this machine, so its directory is written in config.json and the pack waits for your approval.`,...S},{id:`file-pr-flows-rules`,path:`prFlows.rules`,title:`PR flows rules`,group:`lanes-team-review`,description:`Ordered rules for review items on your own pull requests; the first match acts with no click and lands in the Handled list, where Undo reopens it. Each matches on source, priority, paths, text and scope, and acts with ask, fix-local, dismiss or run:<action id>.`,jsonSchema:oe(i(ne)),example:[{name:`Generated files`,paths:[`dist/`],action:`dismiss`,reason:`Generated output; the source change is reviewed instead.`},{name:`Bot nits`,source:`review-bot[bot]`,priority:[`low`],action:`run:ask-bot`}],control:`json`,keywords:[`pull requests`,`review items`,`dismiss`,`automation`],defaultValue:[],takesEffect:`now`,fileOnlyReason:`Rules are written in config.json; Save as rule in My PRs is the one dashboard writer, and it only appends.`,...S},{id:`file-pr-flows-repo-rules`,path:`prFlows.repoRules`,title:`PR flows repository rules`,group:`lanes-team-review`,description:`Rules per repository (owner/name to a list of rules), checked before prFlows.rules for that repository.`,jsonSchema:oe(r(n(),i(ne))),example:{"acme/app":[{name:`Docs typos`,paths:[`docs/`],text:`typo`,action:`fix-local`}]},control:`json`,keywords:[`pull requests`,`review items`,`repositories`],defaultValue:{},takesEffect:`now`,fileOnlyReason:Jn,...S}]),_r=Object.freeze({"machine-terminal":{title:`Terminal`,description:`Terminal behavior shared by dashboard clients.`},"machine-detection-sessions":{title:`Detection and sessions`,description:`Config-file-only detection, timing, worktree and process settings.`}}),vr=Object.freeze([Zn,Qn,er,tr,nr,ir,rr,ar,sr,cr,lr,ur,dr,fr,pr,mr,or,$n]),yr=Object.freeze({sections:vr,fileOnly:gr}),br=`experimental`;function xr(e){return e.keywords.includes(br)}function Sr(e){let t=e.settings[0];return t!==void 0&&xr(t)}function Cr(e,t){return t?e:e.flatMap(e=>{let t=e.settings.filter(e=>!xr(e));return t.length===0&&e.settings.length>0?[]:[{...e,settings:t}]})}var wr=Object.freeze(Object.fromEntries(vr.flatMap(e=>(e.legacyIds??[]).map(t=>[t,e.id])))),Tr=Object.freeze(vr.reduce((e,t)=>{for(let n of t.settings)for(let r of n.legacyIds??[])e[r.sectionId]={...e[r.sectionId],[r.settingId]:t.id};return e},{}));function O(e){let t=[],n=e=>{if(!e||typeof e!=`object`)return e;let n=Array.isArray(e)?[]:{};return t.push([e,n]),n},r=n(e);for(let e=t.pop();e;e=t.pop()){let[t,r]=e;for(let[e,i]of Object.entries(t))Object.defineProperty(r,e,{value:n(i),writable:!0,enumerable:!0,configurable:!0})}return r}function Er(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Dr(e,t){let n=t.split(`.`),r=e;for(let e of n.slice(0,-1)){if(!r||typeof r!=`object`)return;r=r[e]}r&&typeof r==`object`&&delete r[n.at(-1)]}function Or(e,t,n){let r=t.split(`.`),i=e;for(let e of r.slice(0,-1))(!i[e]||typeof i[e]!=`object`||Array.isArray(i[e]))&&(i[e]={}),i=i[e];i[r.at(-1)]=O(n)}function k(e){return e.flatMap(e=>e.settings)}function kr(e){return e.access===`file-only`||e.control===`readonly`}function Ar(e){let t=String(e??``).trim().toLowerCase();if(!t||t===`all`)return`all`;if(t===`none`)return[];let n=t.split(`,`).map(e=>e.trim());return n.every(e=>/^\d+$/.test(e)&&Number.isSafeInteger(Number(e))&&Number(e)>0)?n.map(Number):null}var jr=6;function A(e,t){return e.control===`number`&&typeof t==`number`?t/(e.unit?.storedPerDisplay??1):e.valueKind===`posthog-projects`?Array.isArray(t)?t.length===0?[`none`]:t.map(String):[]:O(t)}function Mr(e){return e.control===`number`&&(e.unit?.storedPerDisplay??1)!==1}function Nr(e){return String(Number(e.toFixed(jr)))}function Pr(e,t){let n=A(e,t);return e.valueKind===`posthog-projects`&&Array.isArray(n)?n.join(`, `)||`all`:typeof n==`number`&&e.unit?`${Nr(n)} ${e.unit.label}`:JSON.stringify(n??null)}function j(e,t){if(e.control===`number`){if(e.nullable&&(t==null||String(t).trim()===``))return null;let n=Number(t);if(e.zeroIsNull&&n<=0)return null;let r=n*(e.unit?.storedPerDisplay??1);return e.integer===!1?r:Math.round(r)}if(e.valueKind===`posthog-projects`)return Ar(Array.isArray(t)?t.join(`,`):t);if(e.control===`text`||e.control===`password`){let n=String(t??``).trim();return e.nullable&&!n?null:n}return O(t)}function M(e){return String(e||``).toLowerCase().match(/[a-z0-9]+/g)||[]}var Fr=3,Ir=2,Lr=1,Rr=3,zr=30,Br=16;function Vr(e,t){return e===t?Fr:e.startsWith(t)?Ir:t.length>=Rr&&e.includes(t)?Lr:0}function N(e,t,n){let r=0;for(let n of t){let t=Math.max(0,...e.map(e=>Vr(e,n)));if(t===0)return 0;r+=t}return r*n}function Hr(e){return e.options?.map(e=>e.label).join(`, `)??``}function Ur(e){return Zr(e.group??``)?.title??``}function Wr(e,t,n){let r=N(M(e.title),n,1e3),i=N(M(e.keywords.join(` `)),n,100),a=N(t,n,10),o=N(M(e.path),n,10),s=N(M(Hr(e)),n,10),c=N(M(e.description),n,1);return r+i+a+o+s+c}function Gr(e){return e.section?.title??``}function Kr(e,t){return Number(e.section===null)-Number(t.section===null)}function qr(e,t,n){return[[`title`,e.title],[`keywords`,e.keywords.join(` `)],[`section`,t?.title??Ur(e)],[`description`,e.description],[`path`,e.path],[`options`,Hr(e)]].flatMap(([e,t])=>{let r=[];for(let e of t.matchAll(/[a-z0-9]+/gi)){let t=e[0].toLowerCase();for(let i of n){if(Vr(t,i)===0)continue;let n=e.index+t.indexOf(i);r.push({start:n,end:n+i.length})}}let i=[];for(let e of r.sort((e,t)=>e.start-t.start||e.end-t.end)){let t=i.at(-1);t&&e.start<=t.end?t.end=Math.max(t.end,e.end):i.push({...e})}return i.length?[{field:e,text:t,spans:i}]:[]})}function Jr(e,t,n=[]){let r=M(t).slice(0,Br);if(r.length===0)return[];let i=[];for(let t of e){let e=M(t.title);for(let n of t.settings){let a=Wr(n,e,r);a!==0&&i.push({section:t,setting:n,score:a,matches:qr(n,t,r)})}}for(let e of n){let t=Wr(e,M(Ur(e)),r);t!==0&&i.push({section:null,setting:e,score:t,matches:qr(e,null,r)})}return i.sort((e,t)=>t.score-e.score||Kr(e,t)||Gr(e).localeCompare(Gr(t))||e.setting.title.localeCompare(t.setting.title)).slice(0,zr)}function Yr(e,t,n={},r={}){let i=/^#settings\/([^/]+)(?:\/([^/]+))?$/.exec(String(e||``));if(!i)return null;let a,o;try{a=decodeURIComponent(i[1]),o=i[2]?decodeURIComponent(i[2]):null}catch{return null}let s=n[a]||a,c=(o?r[s]?.[o]:void 0)||s,l=t.find(e=>e.id===c);if(!l)return null;let u=o?l.settings.find(e=>e.id===o||e.legacyIds?.some(e=>e.settingId===o&&e.sectionId===s)):null;return o&&!u?null:{sectionId:c,settingId:u?.id||null,hash:`#settings/${c}${u?`/${u.id}`:``}`}}function Xr(e){let t=new Map,n=new Map;for(let r of[...k(e.sections),...e.fileOnly])t.set(r.id,r),n.set(r.path,r);return{byId:t,byPath:n}}Xr(yr);function Zr(e,t=yr){let n=t.sections.find(t=>t.id===e);return n?{title:n.title,description:n.description}:_r[e]??null}var Qr=new WeakMap,$r=`Configured`,ei=`•`.repeat(12),ti=`Each line must be a positive whole-number PostHog project id, or the one word none.`,ni=3,ri=new Set([`customAgents`]),ii=1e-9,ai=`Lanes`,oi=Object.freeze({now:`Applies now`,"new-sessions":`New sessions`,restart:`After restart`}),si=Object.freeze({browser:`This browser`,machine:`This machine`});function ci(e){let t=new Map;for(let n of e)t.set(n.scope,(t.get(n.scope)??0)+1);let n=null,r=0;for(let[e,i]of t)i<=r||(n=e,r=i);return n}function li(e,t){let n=[];return e.scope!==t&&n.push({kind:`scope`,text:si[e.scope]}),e.takesEffect!==`now`&&n.push({kind:`effect`,text:oi[e.takesEffect]}),n}function ui(e,t){let n=t.secretSources;if(!n||typeof n!=`object`)return null;let r=n[e.path];return typeof r==`string`?r:null}function di(e){return e.control===`password`}function fi(e){return`${e.path}${$r}`}function pi(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>pi(e,t[n]));if(!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.hasOwn(t,n)&&pi(e[n],t[n]))}function mi(e){return Qr.get(e)||null}function hi(e){return Array.isArray(e)?e.map(e=>String(e)):[]}function gi(e){return e.split(`
|
|
2
2
|
`).map(e=>e.trim()).filter(e=>e!==``)}function _i(e){let t=e.range;if(!t)return null;let n={min:Number(A(e,t.min))};return t.max!=null&&(n.max=Number(A(e,t.max))),t.exclusiveMin&&(n.exclusiveMin=!0),n}function vi(e){let t=`Default ${Pr(e,e.defaultValue)}`;return Mr(e)?`${t}, stored as ${JSON.stringify(e.defaultValue)} ${e.unit?.storedLabel??``}`.trimEnd():t}function yi(e,t){let n=vi(e),r=ri.has(e.path)?void 0:Er(t,e.path);if(r===void 0)return{currentText:null,defaultText:n,jsonFragment:null};let i={};return Or(i,e.path,r),{currentText:`Current ${Pr(e,r)}`,defaultText:n,jsonFragment:JSON.stringify(i,null,2)}}function bi(e,t,n){let r=t??e.find(e=>e.id===n.group);if(!r)return Zr(n.group??``)?.title??`config.json`;let i=e.find(e=>e.id===r.parent);return i?`${i.title} / ${r.title}`:r.level===`lanes`?`${ai} / ${r.title}`:r.title}function xi(e,t){return e.filter(e=>e.parent===t)}function Si(e,t){let n=e.find(e=>e.id===t);return n?n.parent?e.find(e=>e.id===n.parent)??n:n:null}function Ci(e){return e.filter(e=>!e.parent)}function wi(e){let t=e.filter(e=>e.level===`lanes`);return[{heading:null,sections:e.filter(e=>e.level!==`lanes`)},{heading:ai,sections:t}].filter(e=>e.sections.length>0)}function Ti(e,t,n,r){return r?`hidden`:n.trim()?`search`:t&&Si(e,t)?`section`:`list`}function Ei(e,t={}){let n={};for(let r of k(e)){if(kr(r))continue;if(r.path.startsWith(`pref:`)){let e=r.path.slice(5),i=t.prefs?.[e]??t[r.path];n[r.path]=A(r,i??r.defaultValue);continue}if(di(r)){let e=Er(t,fi(r))===!0;n[r.path]=e?ei:``;continue}let e=Er(t,r.path);n[r.path]=A(r,e??r.defaultValue)}return Qr.set(n,O(t)),n}function Di(e,t,n){let r=k(e).filter(e=>kr(e)||e.path.startsWith(`pref:`)||ui(e,mi(t)||{})||di(e)&&n[e.path]===ei?!1:!pi(t[e.path],n[e.path]));if(r.length===0)return{};let i=mi(t)||{},a={},o=new Set;for(let e of r){let[t]=e.path.split(`.`);if(!e.path.includes(`.`))a[t]=j(e,n[e.path]);else{if(!o.has(t)){let e=i[t];a[t]=e&&typeof e==`object`&&!Array.isArray(e)?O(e):{},o.add(t)}Or(a,e.path,j(e,n[e.path]))}}for(let t of k(e))di(t)&&Dr(a,fi(t));return delete a.secretSources,a}function Oi(e,t,n,r){return ra(Di(e,t,{...t,[n.path]:r}))}function ki(e){let t=e.unit?.label;return t?` of ${t}`:``}function P(e){let t=_i(e);if(!t)return`Allowed range is unavailable.`;let n=`${e.integer!==!1&&!Mr(e)?`whole number`:`number`}${ki(e)}`;return t.exclusiveMin&&t.min===0?`Must be a positive ${n}.`:t.max==null?`Must be a ${n} ${t.exclusiveMin?`above`:`of at least`} ${Nr(t.min)}.`:`Must be a ${n} between ${Nr(t.min)} and ${Nr(t.max)}.`}function Ai(e){return`Must be a multiple of ${Pr(e,1)}.`}function ji(e){return Math.abs(e-Math.round(e))<ii&&Number.isSafeInteger(Math.round(e))}function Mi(e,t){return Number(j({...e,integer:!1,nullable:!1,zeroIsNull:!1},t))}function Ni(e,t){if(e.nullable&&(t==null||String(t).trim()===``))return null;let n=e.range;if(!n)return`Allowed range is unavailable.`;if(t==null||String(t).trim()===``)return P(e);let r=Number(t);if(!Number.isFinite(r))return P(e);if(e.zeroIsNull&&r<=0)return null;let i=Mi(e,r);if(e.integer!==!1&&!ji(i))return Mr(e)?Ai(e):P(e);let a=Number(j(e,r));return n.exclusiveMin&&a<=n.min||!n.exclusiveMin&&a<n.min||n.max!=null&&a>n.max?P(e):null}function Pi(e,t,n=!1){return n?P(e):Ni(e,t.trim())}function Fi(e,t){let n=t.trim();if(e.nullable&&n===``)return null;let r=Number(n);return e.zeroIsNull&&r<=0?null:r}function Ii(e){if(e==null||e===``)return``;let t=Number(e);return Number.isFinite(t)?Nr(t):String(e)}function Li(e,t){return Array.isArray(t)?e.valueKind===`posthog-projects`&&j(e,t)===null?ti:null:`Must be a list.`}function Ri(e,t){let n={};for(let r of k(e)){if(kr(r))continue;let e=null;r.control===`number`&&(e=Ni(r,t[r.path])),r.control===`list`&&(e=Li(r,t[r.path])),r.control===`select`&&r.options&&!r.options.some(e=>e.value===t[r.path])&&(e=`Choose one of the available options.`),e&&(n[r.id]=e)}return zi(k(e),t,n),n}function zi(e,t,n){for(let r of e){let i=e.find(e=>e.id===r.maximumSettingId);if(!i||n[r.id]||n[i.id])continue;let a=t[r.path],o=t[i.path];Number(j(r,a))>Number(j(i,o))&&(n[r.id]=`Minimum must not exceed the maximum (${Ii(o)}).`,n[i.id]=`Maximum must not be below the minimum (${Ii(a)}).`)}}function Bi(e,t){return k(e).find(e=>e.id===t.maximumSettingId||e.maximumSettingId===t.id)}function Vi(e,t,n){let r=Bi(e,t);return Ri([{id:`scoped`,level:`machine`,title:``,description:``,settings:r?[t,r]:[t]}],n)[t.id]??null}function Hi(e,t){return e.control===`number`?Fi(e,t):e.control===`list`?gi(t):t}function Ui(e,t){return j(e,e.control===`list`?hi(t):t)}function Wi(e){return e?.isDirty===!0}function Gi(e,t,n,r,i,a=!1){if(!Wi(n))return{kind:`unchanged`};let o=t.control===`number`?Pi(t,r,a):null;if(o)return{kind:`invalid`,error:o};let s=Hi(t,r);if(pi(j(t,s),Ui(t,n.base)))return{kind:`unchanged`};let c=Vi(e,t,{...i,[t.path]:s});return c?{kind:`invalid`,error:c}:{kind:`changed`,value:s}}function Ki(e){return di(e)?``:A(e,e.defaultValue)}function qi(e,t){return pi(t,Ki(e))}function Ji(e){return e.presentation?e.presentation:(e.options?.length??0)<=ni?`segmented`:`select`}function Yi(e){return Array.isArray(e)?e.length>0:typeof e==`string`?e.trim()!==``:e===!0}function Xi(e,t){return e.danger===!0&&!!e.warning&&Yi(t)}function Zi(e,t){return Xi(e,t)}function Qi(e){return e.title.charAt(0).toLowerCase()+e.title.slice(1)}function $i(e){return di(e)?`Reset removes the stored ${Qi(e)}. Anything that relies on it stops until a new one is saved.`:Zi(e,Ki(e))?e.warning??``:null}function ea(e){return[e.repos.join(`, `),e.trigger,e.actions.map(e=>e.type).join(`, `)].join(` `)}function ta(e){if(e==null)return[`No rules. Add workflows.rules to config.json.`];let t=ee.safeParse(e);return t.success?t.data.rules.length===0?[`No rules. Add workflows.rules to config.json.`]:t.data.rules.map(e=>[e.name,e.enabled?`enabled`:`disabled`,ea(e)].join(` `)):[`The workflows block is invalid, so no rule runs: ${t.error.issues[0]?.message??`unknown problem`}`]}function na(e){let t=ee.safeParse(e??{});return t.success?t.data.rules.map(e=>({id:e.id,name:e.name,isEnabled:e.enabled,summary:ea(e)})):[]}function ra(e){let t=e.workflows;return typeof t!=`object`||!t||Array.isArray(t)?e:{...e,workflows:Object.fromEntries(Object.entries(t).filter(([e])=>e!==`rules`))}}var ia=`https://glimmervoid.dev`,aa=Object.freeze({id:`lanes-features`,level:`lanes`,title:`Features`,description:`Optional tabs, each hidden until its own toggle is on.`,settings:[]}),oa=Object.freeze({id:`machine-packs`,level:`machine`,title:`Packs`,description:`Packs other people share, each waiting for your approval before anything in it runs.`,settings:[]}),sa=`browser-shortcuts`,ca=Object.freeze({id:`browser-status-key`,level:`browser`,title:`Status key`,description:`What each session status and pull request icon means.`,settings:[]}),la=Object.freeze({id:`browser-about`,level:`browser`,title:`About`,description:`The running build and where the project lives.`,settings:[]}),ua=Object.freeze({sounds:()=>hn(),themes:Yt});function da(e){if(!e.optionsFrom)return e;let t=ua[e.optionsFrom]?.()??[];return{...e,options:t.map(e=>({value:e.id,label:e.label}))}}function fa(e){return e.isExperimentalBuild===!0}function pa(){return Cr(yr.sections,fa(g()))}function ma(){let e=pa().map(e=>({...e,settings:e.settings.map(da)})),t=e.findIndex(e=>e.id===sa)+1,n=[...e.slice(0,t),ca,...e.slice(t)],r=n.findIndex(e=>e.level===`lanes`);return Object.freeze([...n.slice(0,r),oa,aa,...n.slice(r),la])}var ha=new Map,F=new Map,I=new WeakMap,ga=new Map;function _a(){return{themeId:rt(),flyingAnimalsEnabled:ft(),...Qe(),soundEnabled:ut(),soundId:mn(at()),notificationsEnabled:$e(),phoneArrowPad:dt(),nextAttentionKeyCode:st()}}function va(e){H=Ei(R,{...e,prefs:_a()})}function L(e){return F.has(e.id)?F.get(e.id):H[e.path]}function ya(e){return[e,...xi(R,e.id)]}function ba(e){return ya(e).flatMap(e=>e.settings)}function xa(e){return R.find(t=>t.settings.some(t=>t.id===e.id))??B}function Sa(e,t=null){history.replaceState(history.state,``,yt(e,t))}function Ca(e){let t=new URL(e,ia),{telemetryInstallId:n}=V;return typeof n==`string`&&n&&t.searchParams.set(`gv`,n),t.href}function wa(e){return R.flatMap(e=>e.settings).find(t=>t.id===e)??null}function Ta(){R=ma(),Da=fa(g()),B=Si(R,B.id)??R[0]}function Ea(){return fa(V)!==Da&&(Ta(),!0)}var R=ma(),Da=fa(g()),z=null,B=R[0],V=g(),H={},Oa=!1;function ka(e){z=e}function Aa(e){B=e}function ja(e){V=e}function Ma(e){Oa=e}var Na={refreshRow:()=>{},refreshRowFoot:()=>{},refreshSettingsStatus:()=>{},refreshShortcutGroups:()=>{}};function Pa(e){Na=e}function U(){return Na}function Fa(e){let t=p(`span`,`settings-update-action-status`,e??``);return t.setAttribute(`role`,`status`),t}function Ia(){let{isCheckInFlight:e,checkSendFailure:t}=_();return e?`Checking for updates.`:t}function La(){let{status:e,lastAutoCheckAt:t}=_();e?(Ma(!1),o({status:e,checkForUpdates:V.checkForUpdates,now:Date.now(),lastAutoCheckAt:t})&&Ot()):Ma(!0)}function Ra(e){return d(e===`update`?{variant:`primary`,label:`Update`,action:`apply-update`,onClick:Dt}:e===`restart`?{variant:`primary`,label:`Restart`,action:`restart-server`,onClick:jt}:{variant:`secondary`,label:`Check for updates`,action:`check-for-updates`,disabled:_().isCheckInFlight,onClick:Ot})}function za(){let{status:e,journal:t,request:n}=_(),r=se({status:e,journal:t,request:n}),i=p(`div`,`settings-update-actions`);if(r.actions.length>0){let e=p(`div`,`settings-update-buttons`);e.append(...r.actions.map(Ra)),i.appendChild(e)}let a=Ia();return a&&i.appendChild(Fa(a)),r.note&&i.appendChild(Fa(r.note)),r.command&&i.appendChild(p(`code`,`settings-update-command`,r.command)),i}function Ba(e,...t){let n=p(`div`,`settings-update-fact`);return n.append(p(`span`,`settings-update-fact-label`,e),...t),n}function Va(){let e=ae(_().journal);if(!e)return null;let t=p(`div`,`settings-update-progress`);t.dataset.state=e.state,t.setAttribute(`role`,`status`);let n=e.state===`failed`;e.terminalLine&&t.appendChild(p(`div`,n?`dialog-error`:`settings-update-terminal`,e.terminalLine));let r=n?Ha(t,e.failureDetail):t,i=p(`ol`,`settings-update-steps`);for(let t of e.steps){let e=p(`li`,`settings-update-step`);e.dataset.status=t.status,e.append(p(`span`,`settings-update-step-state`,t.status),p(`span`,`settings-update-step-label`,t.label)),i.appendChild(e)}if(r.appendChild(i),e.outputTail.length===0)return t;let a=p(`pre`,`settings-update-output`,e.outputTail.join(`
|
|
3
3
|
`));if(e.outputStepId&&(a.dataset.step=e.outputStepId),!e.outputStepLabel)return r.appendChild(a),t;let o=`Output from ${e.outputStepLabel}`;return a.setAttribute(`aria-label`,o),r.append(p(`div`,`settings-update-output-label`,o),a),t}function Ha(e,t){let n=p(`details`,`settings-update-details`);return n.appendChild(p(`summary`,`settings-update-details-summary`,`Show details`)),t&&n.appendChild(p(`div`,`settings-update-failure-detail`,t)),e.appendChild(n),n}function Ua(){let e=re(_().status),t=[e.label];if(e.releaseUrl){let n=p(`a`,`settings-link`,`View release`);n.href=e.releaseUrl,n.target=`_blank`,n.rel=`noopener noreferrer`,t.push(n)}return Ba(`Latest`,...t)}function Wa(){let e=p(`div`,`settings-view-status-block settings-update-status`),{status:t,journal:n}=_(),r=u(t,n),i=p(`div`,`settings-update-summary`,r.headline);i.dataset.tone=r.tone,e.appendChild(i),e.appendChild(Ba(`Running`,c(t))),ce(t)&&e.appendChild(Ua());let a=typeof t?.lastCheckAt==`number`?t.lastCheckAt:null,o=Ba(`Last checked`,te({status:t,checkForUpdates:V.checkForUpdates,relativeTime:a?`${tn(a)}, ${new Date(a).toLocaleString()}`:tn(a)}));e.appendChild(o),e.appendChild(za());let s=Va();return s&&e.appendChild(s),e}var Ga=2200,Ka=1600,qa=15e3,Ja=new Set,W=new Map;function Ya(e,t){let n=p(`a`,`settings-about-link`,e);return n.href=t,n.target=`_blank`,n.rel=`noopener`,n}function Xa(e){return e?`On`:`Off`}function Za(e){return e===null?`not probed yet`:e?`resolved`:`not found on PATH`}function Qa(){let e=Array.isArray(V.customAgents)?V.customAgents:[];return e.length===0?[`None declared. Add customAgents to config.json.`]:e.map(e=>{let t=e.args.length>0?`${e.command} ${e.args.join(` `)}`:e.command;return`${e.id} ${e.label} ${t} ${Za(e.resolvable)}`})}function $a(){let e=p(`div`,`settings-view-status-block`);e.appendChild(p(`div`,`settings-section-title`,`Declared agents`));for(let t of Qa())e.appendChild(p(`div`,`settings-readonly`,t));return e}function eo(e){W.set(e,{tone:`ok`,text:`Saved`}),window.setTimeout(()=>{W.get(e)?.tone===`ok`&&(W.delete(e),U().refreshSettingsStatus())},Ga)}async function to(t,n){Ja.add(t.id),W.delete(t.id),U().refreshSettingsStatus();try{let r=await e(`update-settings`,{settings:{workflows:{rules:[{id:t.id,enabled:n}]}}},{timeoutMs:ze});if(Ja.delete(t.id),r.type===`settings-error`&&W.set(t.id,{tone:`error`,text:String(r.message)}),r.type===`settings-updated`){eo(t.id),kt(r.settings);return}}catch(e){W.set(t.id,{tone:`error`,text:Re(e,ze)})}Ja.delete(t.id),U().refreshSettingsStatus()}function no(e){let t=Le(`settings-workflow-rule-status`);if(Ja.has(e.id))return t.show(`busy`,`Saving`),t.element;let n=W.get(e.id);return n&&t.show(n.tone,n.text),t.element}function ro(e){let t=p(`div`,`settings-view-toggle-wrap`),n=p(`label`,`settings-view-toggle`),r=p(`input`,`settings-view-checkbox`);return r.type=`checkbox`,r.checked=e.isEnabled,r.disabled=Ja.has(e.id),r.setAttribute(`aria-label`,`Run rule ${e.name}`),r.addEventListener(`change`,()=>{to(e,r.checked)}),n.append(r,p(`span`,`settings-view-toggle-state`,Xa(e.isEnabled)),p(`span`,`settings-readonly`,`${e.name} ${e.summary}`)),t.append(n,no(e)),t}function io(){let e=p(`div`,`settings-view-status-block`);e.appendChild(p(`div`,`settings-section-title`,`Rules`));let t=na(V.workflows);if(t.length>0){for(let n of t)e.appendChild(ro(n));return e}for(let t of ta(V.workflows))e.appendChild(p(`div`,`settings-readonly`,t));return e}function ao(){let e=p(`div`,`settings-view-status-block`);e.appendChild(p(`div`,`settings-section-title`,`Last report`));for(let t of Nt())e.appendChild(p(`div`,`settings-readonly`,t));return e}function oo(){let e=p(`div`,`settings-view-status-block`);if((F.get(`remote-sessions`)??H.remoteSessions)!==!0)return e.appendChild(p(`div`,`settings-readonly`,`Turn on Remote Coder sessions to connect agent logins for them.`)),e;for(let t of[`claude-code`,`codex`]){let n=p(`div`,`settings-telegram-test`),r=d({variant:`secondary`,label:`Connect`,action:`connect-agent-login`,onClick:()=>_n(t)});n.append(p(`div`,`settings-readonly`,gn(Ct(t),t)),r),e.appendChild(n)}return e}function so(){let e=p(`div`,`settings-view-status-block`);return e.appendChild(d({variant:`secondary`,label:`Set up remote host`,action:`set-up-remote-host`,onClick:vn})),e}function co(){let e=p(`div`,`settings-view-status-block settings-server-power`),t=d({variant:`danger`,label:`Shut down`,action:`shutdown-server`,onClick:Kt});return Bt(t),e.append(d({variant:`secondary`,label:`Restart server`,action:`restart-server`,onClick:nn}),t),e}function lo(e){return e.status===`server-power`?co():e.status===`agent-logins`?oo():e.status===`remote-setup`?so():e.status===`update-actions`?Wa():e.status===`custom-agents`?$a():e.status===`workflows`?io():p(`div`,`settings-readonly`,`Not available`)}function uo(e){let t=ui(e,V);return t?`Supplied by ${t}. Change the server environment and restart to replace this credential.`:``}function fo(e){if(e.control===`readonly`)return null;if(e.status===`usage-last-report`){let e=ao();return e.classList.add(`settings-view-status-slot`),e}if(e.id===`desktop-notifications`)return bo(e);if(e.id===`telemetry-enabled`)return yo();if(e.status===`telegram-delivery`)return ho();let t=uo(e);return t?p(`div`,`settings-view-warning settings-view-status-slot`,t):null}function po(){let e=fe.safeParse(V.telegramDelivery);if(!e.success)return[];let{setupWarning:t,lastFailure:n}=e.data,r=t?[t]:[];return n&&r.push(`The last Telegram send failed at ${new Date(n.failedAt).toLocaleString()}: ${n.message}`),r}function mo(e){e.replaceChildren(...po().map(e=>p(`p`,`settings-view-warning`,e)))}function ho(){let e=p(`div`,`settings-view-status-slot settings-telegram-delivery`),t=p(`div`,`settings-telegram-delivery-lines`);mo(t);let n=d({variant:`secondary`,label:`Send test message`,action:`send-telegram-test`}),r=Le(`settings-telegram-test-status`);n.addEventListener(`click`,async()=>{n.disabled=!0;let e=await Ie(`telegram-test`,{},r,{busyText:`Sending a test message to Telegram.`});n.disabled=!1,e?.type===`telegram-test-result`&&(ja(Jt({telegramDelivery:e.telegramDelivery})),mo(t),e.ok?r.show(`ok`,`Sent. Check the Telegram chat for the test message.`):r.show(`error`,`Not sent: ${e.error??`Telegram refused the message.`}`))});let i=p(`div`,`settings-telegram-test`);return i.append(n,r.element),e.append(t,i),e}async function go(){_o.disabled=!0;let e=await Ie(`request-telemetry-deletion`,{},vo,{busyText:`Sending the deletion request.`,timeoutMs:qa});_o.disabled=!1,e?.type===`telemetry-deletion-result`&&(e.ok?vo.show(`ok`,`Deletion requested. New usage starts under a new id.`):vo.show(`error`,`Not sent: PostHog did not take the request. Try again later.`))}var _o=d({variant:`danger`,label:`Delete my data`,action:`delete-telemetry-data`,onClick:()=>h({title:`Delete your usage data?`,message:`We delete everything collected under this install. New usage starts under a new id.`,confirmLabel:`Delete my data`,danger:!0,onConfirm:()=>{go()}})}),vo=Le(`settings-telemetry-deletion-status`);function yo(){let e=p(`div`,`settings-view-status-slot settings-telemetry-data`);return e.append(Ya(`Privacy details`,Ca(`/privacy`)),_o,vo.element),e}function bo(e){let t=Mt(()=>U().refreshRow(e,{force:!0}));return t.element.hidden?null:(t.element.classList.add(`settings-view-status-slot`),t.element)}function xo(){return p(`span`,`settings-view-experimental-tag`,`Experimental`)}function So(e,t){let n=p(`span`,`settings-view-chip`,t);return n.dataset.chip=e,n}function Co(e,t){let n=je(e);return n?n.then(()=>t,()=>`Copy failed`):Promise.resolve(`Copy failed`)}function wo(e,t,{copiedText:n,textToCopy:r}){let i=p(`span`,`settings-view-copy-status`);i.setAttribute(`role`,`status`),t.addEventListener(`click`,async()=>{i.textContent=await Co(r(),n),setTimeout(()=>{i.textContent=``},Ka)}),e.append(t,i)}var To=`Approving a pack lets its commands run on this machine and its panels show what they read. Panels cannot reach the network, but they are trusted not to leak what they read. Any change to a file in a pack asks again.`,Eo={pending:`Pending`,approved:`Approved`,invalid:`Not loaded`},Do=new Map,Oo=null;async function ko(t){Do.set(t,{tone:`busy`,text:`Approving`}),Fo();try{let n=await e(`pack-approve`,{fingerprint:t},{timeoutMs:ze});if(n.type!==`pack-approve-result`)throw Error(`Unexpected pack approval reply.`);if(!n.ok){Do.set(t,{tone:`error`,text:n.error??`Could not approve this pack.`});return}Do.delete(t)}catch(e){Do.set(t,{tone:`error`,text:Re(e,ze)})}finally{Fo()}}function Ao(e){let t=p(`div`,`settings-view-setting-heading`);return t.append(p(`h2`,`settings-view-setting-title`,e.version===null?e.name:`${e.name} v${e.version}`),` `,So(`pack-state`,Eo[e.state])),t}function jo(e){return[...[...e.description?[e.description]:[],`Folder: ${e.dir}`,...e.panels.map(e=>`Panel: ${e.label}${e.reads.length===0?`, reads nothing from the dashboard`:`, reads ${e.reads.join(`, `)}`}`),...e.themes.length===0?[]:[`Themes: ${e.themes.map(e=>`${e.label} (${e.mode})`).join(`, `)}`],...e.files.length===0?[]:[`Files: ${e.files.join(`, `)}`],...e.needs.length===0?[]:[`Needs: ${e.needs.join(`, `)}`],...e.missingRequires.length===0?[]:[`Missing here: ${e.missingRequires.join(`, `)}; the pack stays off until this machine has them`]].map(e=>p(`p`,`settings-view-setting-description`,e)),...e.errors.map(e=>p(`p`,`settings-view-warning`,e)),...e.prFlows?xn(e.prFlows):[]]}function Mo(e){let t=p(`div`,`settings-view-setting-control`),n=e.fingerprint;if(n===null)return t;let r=Do.get(n),i=d({variant:`secondary`,label:`Approve`,action:`pack-approve`,disabled:e.state!==`pending`||r?.tone===`busy`,onClick:()=>{ko(n)}}),a=p(`span`,`settings-view-pack-status`);return a.setAttribute(`role`,`status`),Fe(a,r?.tone??null,r?.text??``),t.append(i,a),t}function No(e){let t=p(`article`,`settings-view-setting settings-view-pack`);t.dataset.packState=e.state;let n=p(`div`,`settings-view-setting-text`);return n.append(Ao(e),...jo(e)),t.append(n,Mo(e)),t}function Po(){let e=Ht(),t=p(`p`,`settings-view-section-description`,To);if(!e)return[t,p(`p`,`settings-view-setting-description`,`Waiting for the server to list packs.`)];let n=e.warnings.map(e=>p(`p`,`settings-view-warning`,e));return e.packs.length===0?[t,...n,p(`p`,`settings-view-setting-description`,`No packs yet. Copy a pack folder into ~/.glimmervoid/packs/ or list its path in packs in config.json.`)]:[t,...n,...e.packs.map(No)]}function Fo(){Oo?.isConnected&&Oo.replaceChildren(...Po())}Xt(Fo);function Io(e){Oo=p(`div`,`settings-view-stack`),e.appendChild(Oo),Fo()}var Lo=`team-review-enabled`,Ro=new Map,zo=Promise.resolve(),Bo={"pref:flyingAnimalsMinGapSeconds":e=>Ue(Number(e)),"pref:flyingAnimalsMaxGapSeconds":e=>qe(Number(e)),"pref:flyingAnimalsMinDurationSeconds":e=>Ve(Number(e)),"pref:flyingAnimalsMaxDurationSeconds":e=>Ke(Number(e)),"pref:flyingAnimalsScale":e=>Ye(Number(e)),"pref:flyingAnimalsOnPhone":e=>We(e===!0)};function Vo(e,t){if(e.path===`pref:phoneArrowPad`){Xe(t===!0),vt(t===!0);return}if(e.path===`pref:nextAttentionKeyCode`){Ze(String(t)),Gt(st()),U().refreshShortcutGroups();return}if(e.path===`pref:themeId`){nt(String(t)),At(String(t)),bt();return}if(e.path===`pref:flyingAnimalsEnabled`){ot(t===!0),Ut(t===!0);return}let n=Bo[e.path];n?(n(t),Ut(ft())):e.path===`pref:soundEnabled`?on(t===!0):e.path===`pref:soundId`?(Je(String(t)),pn(String(t))):e.path===`pref:notificationsEnabled`&&(He(t===!0),t===!0&&St().then(()=>U().refreshRow(e,{force:!0})))}function G(e,t){let n=Ro.get(e.id);n!==void 0&&clearTimeout(n),Ro.delete(e.id),t&&ha.set(e.id,t),t||ha.delete(e.id),U().refreshRowFoot(e)}function Ho(e){G(e,{tone:`saved`,text:`Saved`}),Ro.set(e.id,window.setTimeout(()=>G(e,null),Ga))}function Uo(e,t){return e.id===Lo&&t===!0&&L(e)!==!0&&wn(V.teamReview)}function K(e,t){ga.delete(e.id),Uo(e,t)?(U().refreshRow(e,{force:!0}),Ko(e)):e.path.startsWith(`pref:`)?(H[e.path]=t,Vo(e,t),U().refreshRow(e),Ho(e)):F.has(e.id)&&JSON.stringify(F.get(e.id))===JSON.stringify(t)||(F.set(e.id,t),G(e,{tone:`saving`,text:`Saving`}),zo=zo.then(()=>Wo(e,t)))}async function Wo(t,n){let r=Oi(R,H,t,n);if(Object.keys(r).length===0)F.delete(t.id),G(t,null),U().refreshRow(t);else{G(t,{tone:`saving`,text:`Saving`});try{let i=await e(`update-settings`,{settings:r});if(F.get(t.id)===n&&F.delete(t.id),i.type===`settings-error`){G(t,{tone:`error`,text:String(i.message)}),U().refreshRow(t,{force:!0});return}if(i.type!==`settings-updated`){G(t,{tone:`error`,text:`The server did not confirm the save.`}),U().refreshRow(t,{force:!0});return}kt(i.settings),Ho(t)}catch(e){F.get(t.id)===n&&F.delete(t.id),G(t,{tone:`error`,text:e?.message||`Failed to save the setting.`}),U().refreshRow(t,{force:!0})}}}function Go(e,t){t&&ga.set(e.id,t),t||ga.delete(e.id),U().refreshRowFoot(e)}function Ko(e){h({title:e.title,message:`No review skill is chosen yet. Pick one in Review skill below and turn team review on again, or turn it on now to review with no skill, where the agent uses whatever skills it has.`,confirmLabel:`Turn on with no skill`,onConfirm:()=>{qo(e)}})}async function qo(t){let n=V.teamReview,r={...n&&typeof n==`object`?n:{},enabled:!0,skill:``};G(t,{tone:`saving`,text:`Saving`});try{let n=await e(`update-settings`,{settings:{teamReview:r}});if(n.type!==`settings-updated`){G(t,{tone:`error`,text:n.type===`settings-error`?String(n.message):`The server did not confirm the save.`});return}kt(n.settings),Ho(t)}catch(e){G(t,{tone:`error`,text:e?.message||`Failed to save the setting.`})}}var Jo=`M4 10L8 6L12 10`,Yo=`M4 6L8 10L12 6`,Xo=`M6 4h0.01M10 4h0.01M6 8h0.01M10 8h0.01M6 12h0.01M10 12h0.01`,Zo=Object.freeze({ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1});function Qo(e,t){if(!t.exclusiveMin)return t.min;if(e.integer!==!1)return t.min+1}function $o(e){let t=p(`div`,`settings-view-toggle-wrap`),n=p(`input`,`settings-view-switch`);return n.type=`checkbox`,n.setAttribute(`role`,`switch`),n.checked=L(e)===!0,e.id===`desktop-notifications`&&!Tt()&&(n.checked=!1,n.disabled=!0),n.setAttribute(`aria-labelledby`,e.id),n.addEventListener(`change`,()=>{let t=n.checked;Zi(e,t)?(n.checked=!1,h({title:e.title,message:e.warning??``,confirmLabel:`Turn on`,danger:!0,onConfirm:()=>K(e,!0)})):K(e,t)}),t.appendChild(n),t}function es(e,t){if(!e.suggestionsFrom)return;let n=Sn(V.teamReviewEnvironment);n?.agents.length===0&&qt();let r=Cn(e.suggestionsFrom,n,H),i=`${e.id}-suggestions`;document.getElementById(i)?.remove();let a=p(`datalist`);a.id=i;for(let e of r){let t=p(`option`);t.value=e.value,t.label=e.label,a.appendChild(t)}document.body.appendChild(a),t.setAttribute(`list`,i),t.placeholder=`Agent default`,e.suggestionsFrom===`review-skills`&&(t.placeholder=`No skill`)}function ts(e){let t=p(`div`,`settings-view-shortcut-key`),n=zt(pt(`next-attention`,en,String(L(e)))),r=d({variant:`secondary`,label:`Record`,action:`record-shortcut-key`}),i=p(`span`,`settings-view-shortcut-key-prompt`);return i.setAttribute(`role`,`status`),r.addEventListener(`click`,()=>ns(e,t,r,i)),t.append(n,r,i),t}function ns(e,t,n,r){let i=()=>{window.removeEventListener(`keydown`,o,!0),window.removeEventListener(`pointerdown`,a,!0),window.removeEventListener(`focusin`,a,!0),n.disabled=!1,r.textContent=``},a=e=>{e.target instanceof Node&&t.contains(e.target)||i()},o=t=>{if(!n.isConnected||!n.checkVisibility()){i();return}t.preventDefault(),t.stopImmediatePropagation();let r=it(t,en);r.kind!==`ignored`&&(r.kind===`refused`?Go(e,r.reason):(i(),Go(e,null),n.focus(),r.kind===`recorded`&&K(e,r.keyCode)))};Go(e,null),n.disabled=!0,r.textContent=`Press the new shortcut, or Esc to cancel.`,window.addEventListener(`keydown`,o,!0),window.addEventListener(`pointerdown`,a,!0),window.addEventListener(`focusin`,a,!0)}function rs(e,t,n){e.addEventListener(`blur`,t),e.addEventListener(`keydown`,e=>{e.key===`Enter`?(e.preventDefault(),t()):e.key===`Escape`&&(e.preventDefault(),n())})}function is(e){return e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&[`text`,`number`,`password`].includes(e.type)}function as(e,t){I.set(t,{base:L(e),isDirty:!1}),t.addEventListener(`input`,()=>{let e=I.get(t);e&&(e.isDirty=!0)})}function q(e,t,n){t.value!==n&&(t.value=n),I.set(t,{base:L(e),isDirty:!1}),Go(e,null)}function os(e,t,n,r=!1){let i=I.get(t);if(!i)return;let a=Gi(R,e,i,t.value,H,r);a.kind===`invalid`?Go(e,a.error):a.kind===`unchanged`?q(e,t,n):Zi(e,a.value)?(q(e,t,n),h({title:e.title,message:e.warning??``,confirmLabel:`Save`,danger:!0,onConfirm:()=>K(e,a.value)})):(I.set(t,{base:a.value,isDirty:!1}),K(e,a.value))}function ss(e){let t=p(`input`,`settings-view-input`);t.type=e.control===`password`?`password`:`text`;let n=()=>String(L(e)??``);t.value=n(),e.control===`password`&&(t.value=``,t.placeholder=n()?`Configured`:`Not configured`);let r=ui(e,V);return r&&(t.disabled=!0,t.setAttribute(`aria-description`,`Supplied by ${r}`)),t.autocomplete=`off`,t.spellcheck=!1,t.setAttribute(`aria-labelledby`,e.id),es(e,t),as(e,t),rs(t,()=>{if(e.control===`password`){let n=t.value;if(n===``)return;q(e,t,``),K(e,n)}else os(e,t,n())},()=>q(e,t,e.control===`password`?``:n())),t}function cs(e){let t=p(`input`,`settings-view-input`),n=_i(e);t.type=`number`;let r=()=>Ii(L(e));t.value=r(),t.step=e.integer===!1?String(e.step??`any`):`1`;let i=n?Qo(e,n):void 0;i!=null&&(t.min=String(i)),n?.max!=null&&(t.max=String(n.max)),t.autocomplete=`off`,t.setAttribute(`aria-labelledby`,e.id),as(e,t),rs(t,()=>os(e,t,r(),t.validity.badInput),()=>q(e,t,r()));let a=e.unit?.label;if(!a)return t;let o=p(`div`,`settings-view-number`),s=p(`span`,`settings-view-unit`,a);return s.setAttribute(`aria-hidden`,`true`),t.setAttribute(`aria-description`,a),o.append(t,s),o}function ls(e,t){let n=[...e.querySelectorAll(`[role="radio"]`)],r=n.some(e=>e.dataset.value===t);for(let[e,i]of n.entries()){let n=i.dataset.value===t;i.setAttribute(`aria-checked`,String(n)),i.tabIndex=n||!r&&e===0?0:-1}}function us(e,t,n){n!==String(L(e))&&(ls(t,n),K(e,n),ls(t,String(L(e))))}function ds(e){let t=p(`div`,`settings-view-segmented`);t.setAttribute(`role`,`radiogroup`),t.setAttribute(`aria-labelledby`,e.id);let n=e.options??[];for(let r of n){let n=le(`settings-view-segment`,r.label);n.dataset.value=r.value,n.setAttribute(`role`,`radio`),n.addEventListener(`click`,()=>us(e,t,r.value)),t.appendChild(n)}return t.addEventListener(`keydown`,r=>{let i=Zo[r.key];if(!i||n.length===0)return;r.preventDefault();let a=Math.max(0,n.findIndex(t=>t.value===String(L(e)))),o=n[(a+i+n.length)%n.length];us(e,t,o.value),t.querySelector(`[data-value="${CSS.escape(o.value)}"]`)?.focus()}),ls(t,String(L(e))),t}function fs(e){let t=p(`select`,`settings-view-input`);t.setAttribute(`aria-labelledby`,e.id);for(let n of e.options??[]){let e=p(`option`,null,n.label);e.value=n.value,t.appendChild(e)}return t.value=String(L(e)),t.addEventListener(`change`,()=>K(e,t.value)),t}function ps(e,t){let n=e.valueKind===`posthog-projects`?`One project id per line, or none. Shift+Enter for a new line.`:`One per line. Shift+Enter for a new line.`;return t.length>0||!e.listEmptyText?n:`${e.listEmptyText} ${n}`}function ms(e){let t=p(`textarea`,`settings-view-input settings-view-list-input`),n=()=>hi(L(e)),r=()=>n().join(`
|
|
4
|
-
`);t.rows=3,t.value=r(),t.autocomplete=`off`,t.spellcheck=!1,t.placeholder=e.listPlaceholder??``,t.setAttribute(`aria-labelledby`,e.id),as(e,t),t.addEventListener(`blur`,()=>os(e,t,r())),t.addEventListener(`keydown`,n=>{n.key===`Escape`?(n.preventDefault(),q(e,t,r())):n.key!==`Enter`||n.shiftKey||(n.preventDefault(),os(e,t,r()))});let i=p(`div`,`settings-view-list`);return i.append(t,p(`span`,`settings-view-list-hint`,ps(e,n()))),i}var hs=null,J=null;function gs(e){let t=Et(),n=new Map(t.map(e=>[e.view,e.label])),r=rn(t.map(e=>e.view),hi(L(e))),i=p(`ol`,`settings-view-tab-order`);i.setAttribute(`aria-labelledby`,e.id);for(let[t,o]of r.entries()){let s=n.get(o)??o,c=p(`li`,`settings-view-tab-order-item`),l=p(`span`,`settings-view-tab-order-grip`);l.setAttribute(`aria-hidden`,`true`),l.appendChild(a(Xo,`2.4`)),c.append(l,p(`span`,`settings-view-tab-order-label`,s),vs(e,r,o,t-1,`up`,`Move ${s} up`),vs(e,r,o,t+1,`down`,`Move ${s} down`)),_s(e,c,r,o,t),i.append(c)}return i}function _s(e,t,n,r,i){t.draggable=!0,t.addEventListener(`dragstart`,e=>{J=r,e.dataTransfer?.setData(`text/plain`,r),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`)}),t.addEventListener(`dragend`,()=>{J=null}),t.addEventListener(`dragover`,e=>{J&&J!==r&&(e.preventDefault(),t.dataset.dropTarget=n.indexOf(J)<i?`after`:`before`)}),t.addEventListener(`dragleave`,()=>delete t.dataset.dropTarget),t.addEventListener(`drop`,a=>{a.preventDefault(),delete t.dataset.dropTarget;let o=J;J=null,o&&o!==r&&K(e,$t(n,o,i))})}function vs(e,t,n,r,i,o){let s=`${n}:${i}`,c=d({variant:`icon`,size:`small`,label:o,icon:a(i===`up`?Jo:Yo),action:`move-tab-${i}`,disabled:r<0||r>=t.length,onClick:()=>{hs=s,K(e,$t(t,n,r))}});return s===hs&&(c.dataset.restoresFocus=`true`),c}function ys(e){return e.control===`readonly`?lo(e):e.control===`toggle`?$o(e):e.control===`number`?cs(e):e.control===`select`?Ji(e)===`segmented`?ds(e):fs(e):e.control===`list`?ms(e):e.control===`shortcut-key`?ts(e):e.control===`tab-order`?gs(e):ss(e)}function bs(e){let t=p(`div`,`settings-view-setting-heading`),n=xa(e),r=p(`h2`,`settings-view-setting-title`,e.title);r.id=e.id,xr(e)&&!Sr(Si(R,n.id)??n)&&r.append(` `,xo()),r.addEventListener(`click`,()=>Sa(n.id,e.id));let i=d({variant:`quiet`,size:`small`,label:`#`,action:`copy-setting-link`});return i.setAttribute(`aria-label`,`Copy link`),t.appendChild(r),wo(t,i,{copiedText:`Link copied`,textToCopy:()=>new URL(yt(n.id,e.id),location.href).href}),t}function xs(e){let t=Si(R,xa(e).id);return t?ci(ba(t)):null}function Ss(e,t){let n=p(`div`,`settings-view-chips`);for(let r of li(e,t))n.appendChild(So(r.kind,r.text));return n}function Cs(e){return e.control===`readonly`||ui(e,V)?!1:!qi(e,L(e))}function ws(e){let t=p(`div`,`settings-view-control-foot`),n=p(`span`,`settings-view-save-status`);n.setAttribute(`role`,`status`);let r=d({variant:`quiet`,size:`small`,label:`Reset`,action:`reset-setting`});return r.addEventListener(`click`,()=>{let t=Ki(e),n=$i(e);n===null?K(e,t):h({title:e.title,message:n,confirmLabel:`Reset`,danger:!0,onConfirm:()=>K(e,t)})}),t.append(n,r),t}function Ts(e,t){let n=e.querySelector(`.settings-view-save-status`),r=ha.get(t.id);n&&(n.textContent=r?.text??``,r&&(n.dataset.tone=r.tone),r||delete n.dataset.tone);let i=e.querySelector(`[data-action="reset-setting"]`);i&&(i.hidden=!Cs(t));let a=e.querySelector(`.settings-view-control-foot`);a&&(a.hidden=!r&&!Cs(t));let o=e.querySelector(`.settings-view-field-error`),s=ga.get(t.id);o&&!s&&o.remove(),o&&s&&(o.textContent=s),!o&&s&&e.querySelector(`.settings-view-setting-control`)?.appendChild(p(`div`,`settings-view-field-error`,s))}function Es(e){let t=p(`article`,`settings-view-setting`);t.dataset.settingId=e.id,e.control===`readonly`&&(t.dataset.readout=`true`);let n=p(`div`,`settings-view-setting-text`);n.append(bs(e),p(`p`,`settings-view-setting-description`,e.description));let r=Ss(e,xs(e));r.childElementCount>0&&n.appendChild(r);let i=p(`div`,`settings-view-setting-control`);i.appendChild(ys(e)),e.control!==`readonly`&&i.appendChild(ws(e)),t.append(n,i),Xi(e,L(e))&&t.appendChild(p(`div`,`settings-view-warning settings-warning`,e.warning));let a=fo(e);return a&&t.appendChild(a),Ts(t,e),t}function Ds(e){return z?.querySelector(`[data-setting-id="${e.id}"]`)??null}function Os(e){let t=e.querySelector(`.settings-view-setting-control`);t&&(t.querySelector(`[data-restores-focus="true"]:not([disabled])`)??t.querySelector(`[role="radio"][aria-checked="true"]`)??t.querySelector(`input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled])`))?.focus()}function ks(e,t){if(!is(e)||!is(t))return;e.disabled=t.disabled,e.placeholder=t.placeholder;let n=I.get(t);n&&!Wi(I.get(e))&&(I.set(e,{base:n.base,isDirty:!1}),e.value!==t.value&&(e.value=t.value))}function As(e,t,n){if(e===n){ks(e,t);return}let r=[...e.children],i=[...t.children];for(let[t,a]of i.entries()){let i=r[t];i?i.contains(n)?As(i,a,n):i.replaceWith(a):e.appendChild(a)}for(let e of r.slice(i.length))e.remove()}function js(e,{force:t=!1}={}){let n=Ds(e);if(!n)return;let r=document.activeElement,i=n.contains(r),a=i&&!t&&is(r)?r:null;(!a||!Wi(I.get(a)))&&ga.delete(e.id);let o=Es(e);a?As(n,o,a):(n.replaceWith(o),i&&Os(o))}function Ms(e){let t=Ds(e);t&&Ts(t,e)}function Ns(e){Ds(e)?.querySelector(`.settings-view-setting-control`)?.replaceChildren(lo(e))}function Ps(){for(let e of ba(B))e.control===`readonly`?Ns(e):js(e)}function Fs(e,t){let n=t.querySelector(`.settings-view-status-slot`),r=fo(e);n&&r&&n.replaceWith(r),n&&!r&&n.remove(),!n&&r&&t.appendChild(r)}function Is(){for(let e of ba(B)){if(!e.status)continue;let t=Ds(e);t&&(e.control===`readonly`?Ns(e):Fs(e,t))}}var Ls=`browser-appearance`,Rs=`flying-animals`,Y=!1,zs=!1,Bs=null,Vs=null,X=null,Z=null,Q=null,Hs=null,Us=null,$=``;function Ws(e){requestAnimationFrame(()=>{let t=document.getElementById(e),n=t?.closest(`.settings-view-advanced-panel`);n&&(Y=!0,n.hidden=!1,z?.querySelector(`.settings-view-advanced-toggle`)?.setAttribute(`aria-expanded`,`true`));let r=t?.closest(`.settings-view-setting`);r&&(r.scrollIntoView({block:`center`}),r.classList.remove(`settings-view-setting-flash`),requestAnimationFrame(()=>r.classList.add(`settings-view-setting-flash`)))})}function Gs(e){e.replaceChildren();for(let t of et(en,sn())){let n=p(`div`,`shortcut-group`);n.appendChild(p(`h2`,`settings-view-subsection-title`,t.title));let r=p(`dl`,`shortcut-rows`);for(let e of t.items){let t=p(`dd`,`shortcut-keys`);e.combos.forEach((e,n)=>{n>0&&t.appendChild(p(`span`,`shortcut-sep`,`/`)),Zt(t,e)}),r.append(p(`dt`,`shortcut-label`,e.label),t)}n.appendChild(r),e.appendChild(n)}}function Ks(e){return Et().find(t=>t.gate!==void 0&&`fromSettings`in t.gate&&t.gate.fromSettings===e)?.label}function qs(e){let t=p(`ul`,`settings-view-stack settings-features`);for(let e of gt){let n=R.find(t=>t.id===e.sectionId),r=wa(e.settingId),i=Ks(Pt[e.rule]);if(!n||!r||!i)continue;let a=L(r)===!0,o=p(`li`,`settings-feature`),s=p(`div`,`settings-feature-head`);s.append(p(`span`,`settings-feature-name`,i),So(`feature`,a?`On`:`Off`)),o.append(s,p(`p`,`settings-view-section-description`,n.description),cn(e.sectionId,e.settingId,r.title)),t.appendChild(o)}e.appendChild(t)}function Js(e){let t=p(`div`,`settings-about`),n=p(`span`,`settings-about-version`,`GLIMMERVOID `);n.appendChild(p(`span`,`settings-about-v`,`v0.52.2-next.697`));let r=p(`span`,`settings-about-links`);r.append(Ya(`GitHub`,`https://github.com/${yn}`),Ya(`Changelog`,`https://github.com/${yn}/blob/main/CHANGELOG.md`),Ya(`Website`,Ca(`/`))),t.append(n,r),e.appendChild(t)}function Ys(e){if(H[`pref:soundEnabled`]===e)return;H[`pref:soundEnabled`]=e;let t=wa(`alert-sounds-enabled`);t&&js(t)}function Xs(){return d({variant:`secondary`,label:`Reset all to defaults`,action:`reset-flying-animals`,onClick:()=>{Be(),va(V),Ut(ft()),nc()}})}function Zs(e){let t=p(`div`,`settings-view-advanced`),n=le(`dialog-advanced-toggle settings-view-advanced-toggle`,`Advanced`);n.setAttribute(`aria-expanded`,String(Y)),n.setAttribute(`aria-controls`,`settings-view-advanced-panel`);let r=p(`div`,`dialog-advanced-panel settings-view-advanced-panel`);r.id=`settings-view-advanced-panel`,r.hidden=!Y,n.addEventListener(`click`,()=>{Y=!Y,r.hidden=!Y,n.setAttribute(`aria-expanded`,String(Y))});for(let t of e)r.append(Es(t));return B.id===Ls&&r.append(Xs()),t.append(n,r),t}function Qs(e){let t=p(`div`,`settings-view-streamer-placeholder`),n=d({variant:`primary`,label:`Turn off streamer mode`,action:`turn-off-streamer-mode`}),r=p(`span`,`settings-view-copy-status`,``);r.setAttribute(`role`,`status`),n.addEventListener(`click`,async()=>{n.disabled=!0,r.textContent=``;let e=await un(!1);n.disabled=!1,r.textContent=e}),t.append(p(`p`,`settings-view-section-description`,`Settings are hidden in streamer mode.`),n,r),e.appendChild(t)}Vt(()=>nc());function $s(){let e=p(`div`,`settings-view-advanced`),t=le(`dialog-advanced-toggle`,`Animal gallery`);t.setAttribute(`aria-controls`,`settings-view-animal-gallery-panel`);let n=p(`div`,`dialog-advanced-panel settings-view-advanced-panel`);n.id=`settings-view-animal-gallery-panel`;let r=()=>{t.setAttribute(`aria-expanded`,String(zs)),n.hidden=!zs,zs&&n.childElementCount===0&&n.append(Dn())};return t.addEventListener(`click`,()=>{zs=!zs,r()}),r(),e.append(t,n),e}function ec(e){let t=p(`header`,`settings-view-subsection`),n=p(`h2`,`settings-view-subsection-title`,e.title);return n.addEventListener(`click`,()=>Sa(e.id)),t.append(n,p(`p`,`settings-view-section-description`,e.description)),t}function tc(e,t){for(let n of t.settings.filter(e=>e.access!==`advanced`))e.appendChild(Es(n)),n.id===Rs&&e.appendChild($s());let n=t.settings.filter(e=>e.access===`advanced`);n.length>0&&e.append(Zs(n))}function nc(){if(fc(),$){uc();return}if(!z)return;if(z.textContent=``,dn()){Qs(z);return}let e=p(`header`,`settings-view-section-header`),t=p(`h1`,`settings-view-section-title`,B.title);t.tabIndex=-1,t.addEventListener(`click`,()=>Sa(B.id));let n=p(`div`,`settings-view-section-title-row`);n.appendChild(t);let r=Sr(B);r&&t.append(` `,xo());let i=ci(ba(B));if(i&&n.appendChild(So(`scope`,si[i])),e.append(n,p(`p`,`settings-view-section-description`,B.description)),r&&e.appendChild(p(`p`,`settings-view-warning settings-view-experimental-caution`,`Experimental: this may change or break between releases.`)),z.appendChild(e),B.id===`browser-shortcuts`){let e=p(`div`,`settings-view-stack`);tc(e,B),z.appendChild(e);let t=p(`div`,`shortcut-groups settings-view-shortcuts`);Gs(t),z.appendChild(t);return}if(B.id===`browser-about`){Js(z);return}if(B.id===`browser-status-key`){z.appendChild(Wt()),z.appendChild(an());return}if(B.id===`lanes-features`){qs(z);return}if(B.id===`machine-packs`){Io(z);return}let a=p(`div`,`settings-view-stack`);for(let e of ya(B))e.id!==B.id&&a.appendChild(ec(e)),tc(a,e);z.appendChild(a)}function rc(e,{focusContent:t=!1,settingId:n=null,updateHash:r=!0,openPhoneSection:i=!0}={}){r&&$&&($=``,Q&&(Q.value=``));let a=Si(R,e)??B;B.id!==a.id&&(Y=!1),Aa(a);let o=R.find(t=>t.id===e)??a;ic(Z),i&&ln()&&(Hs=o.id),nc(),yc(B)&&vc(),B.id===`machine-updates`&&La(),r&&Sa(o.id,n),n&&Ws(n),t&&z?.querySelector(`h1`)?.focus()}function ic(e){for(let t of e?.querySelectorAll(`[data-settings-section]`)||[]){let e=t.dataset.settingsSection===B.id;t.setAttribute(`aria-current`,e?`page`:`false`)}}function ac(e){return e.section!==null}function oc(e){Q&&(Q.value=``,$=``,mc(),rc(e.section.id,{settingId:e.setting.id}))}function sc(e){return Jr(pa(),e,yr.fileOnly)}function cc(e,t,n,r,i){let a=p(e,t),o=r.matches.find(e=>e.field===i),s=o?n.indexOf(o.text):-1;if(!o||s<0)return a.textContent=n,a;let c=0;for(let e of o.spans)a.append(n.slice(c,s+e.start),p(`mark`,`settings-view-search-highlight`,n.slice(s+e.start,s+e.end))),c=s+e.end;return a.append(n.slice(c)),a}function lc(e,t){let{currentText:n,defaultText:r,jsonFragment:i}=yi(t.setting,V);if(n!==null&&e.appendChild(p(`span`,`settings-view-search-current`,n)),e.append(p(`span`,`settings-view-search-default`,r),Ss(t.setting,null),p(`p`,`settings-view-list-hint`,`Edit in config.json or with glimmervoid settings set.`)),i===null)return;let a=p(`div`,`settings-view-control-foot`);wo(a,d({variant:`quiet`,size:`small`,label:`Copy as JSON`,action:`copy-json`}),{copiedText:`JSON copied`,textToCopy:()=>i}),e.appendChild(a)}function uc(){if(!z)return;if(z.textContent=``,dn()){Qs(z);return}let e=sc($),t=p(`div`,`settings-view-section-header`);if(t.append(p(`h1`,`settings-view-section-title`,`Settings search`),p(`p`,`settings-view-section-description`,`${e.length} ${e.length===1?`result`:`results`} for "${$}"`)),z.appendChild(t),e.length===0){z.appendChild(p(`p`,`settings-empty settings-view-search-empty`,`No settings found.`));return}let n=p(`ol`,`settings-view-search-results`);n.setAttribute(`aria-label`,`Settings search results`);for(let t of e){let e=p(`li`,`settings-view-search-result`);e.tabIndex=-1;let r=bi(R,t.section,t.setting);e.appendChild(cc(`p`,`settings-view-search-breadcrumb`,r,t,`section`));let i=cc(`span`,`settings-view-setting-title`,t.setting.title,t,`title`);if(ac(t)){let n=le(`settings-view-search-open`);n.appendChild(i),n.addEventListener(`click`,()=>oc(t)),e.appendChild(n)}ac(t)||(e.classList.add(`settings-view-search-file-only`),e.appendChild(i)),e.append(cc(`p`,`settings-view-setting-description`,t.setting.description,t,`description`),cc(`code`,`settings-view-key-path`,t.setting.path,t,`path`));let a=new Set([`title`,`description`,`path`,`section`]);if(!t.matches.some(e=>a.has(e.field))){let n=t.matches.find(e=>e.field===`options`)??t.matches.find(e=>e.field===`keywords`);n&&e.appendChild(cc(`p`,`settings-view-list-hint`,n.text,t,n.field))}ac(t)||lc(e,t),n.appendChild(e)}z.appendChild(n)}function dc(){return Ti(R,Hs,$,dn())}function fc(){if(!X)return;let e=dc(),t=X.dataset.settingsScreen!==e;X.dataset.settingsScreen=e,Us&&(Us.hidden=e!==`section`),t&&mt()}function pc(){let e=B.id;hc(``),Z?.querySelector(`[data-settings-section="${e}"]`)?.focus()}function mc(){if(Z&&X){Z.textContent=``;for(let e of wi(Ci(R))){let t=p(`div`,`settings-view-nav-group`);e.heading&&t.appendChild(p(`div`,`settings-view-nav-heading`,e.heading));for(let n of e.sections){let e=le(`settings-view-nav-item`,n.title);Sr(n)&&e.append(` `,xo()),e.dataset.settingsSection=n.id,e.addEventListener(`click`,()=>rc(n.id,{focusContent:ln()})),t.appendChild(e)}Z.appendChild(t)}$?(fc(),uc()):rc(B.id,{updateHash:!1,openPhoneSection:!1})}}function hc(e,{updateHash:t=!0}={}){$=e.trim(),Q&&(Q.value=e),Hs=null,t&&history.replaceState(history.state,``,_t($)),mc()}function gc(e){if($&&e.key===`Enter`&&e.target===Q){let t=sc($).find(ac);if(!t)return;e.preventDefault(),oc(t);return}if(e.key===`Escape`&&$){if(!Q)return;e.preventDefault(),hc(``),Q.focus();return}if(e.key!==`ArrowUp`&&e.key!==`ArrowDown`||!Z)return;let t=[...Z.querySelectorAll(`[data-settings-section]`)].filter(e=>e instanceof HTMLElement),n=document.activeElement;if(!(n instanceof HTMLElement))return;let r=t.indexOf(n);r<0||(e.preventDefault(),t[(r+(e.key===`ArrowDown`?1:-1)+t.length)%t.length].focus())}function _c(e){Qt(Ys),Bs=e,Bs.textContent=``,X=p(`div`,`settings-view-shell`);let t=p(`div`,`settings-view-sidebar`);Q=p(`input`,`settings-view-search`),Q.type=`search`,Q.placeholder=`Search settings`,Q.setAttribute(`aria-label`,`Search settings`),Z=p(`nav`,`settings-view-nav`),Z.setAttribute(`role`,`navigation`),Z.setAttribute(`aria-label`,`Settings sections`),Us=d({variant:`secondary`,label:`Settings`,icon:a(de),action:`back-to-settings-list`,hidden:!0,onClick:xt}),Us.setAttribute(`aria-label`,`Back to settings sections`);let n=p(`div`,`settings-view-content`);n.setAttribute(`aria-live`,`polite`),ka(n),Q.addEventListener(`input`,()=>{let e=Q;e&&hc(e.value)}),Q.addEventListener(`keydown`,gc),Z.addEventListener(`keydown`,gc),t.append(Q,Us,Z),X.append(t,n),Bs.appendChild(X),ja(g()),Ea(),va(V),wt(dc),ht(Ec),mc(),vc(),Vs?.disconnect(),Vs=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&vc()}),Vs.observe(Bs),Cc()}function vc(){fn().then(bc)}function yc(e){return ba(e).some(e=>e.path===`pref:soundId`)}function bc(){if(Ta(),H[`pref:soundId`]=mn(at()),$){uc();return}let e=wa(`alert-sound`);e&&yc(B)&&js(e)}function xc(e,t,n){let r=Ft(e??n);r?hc(r.query):(hc(``,{updateHash:!1}),ln()&&!e?history.replaceState(history.state,``,_t(``)):rc(e||B.id,{settingId:t}))}function Sc(e){let t=Yr(e,R,wr,Tr);xc(t?.sectionId??null,t?.settingId??null,e)}function Cc(){let e=Lt();e&&(e.isLink?Sc(e.hashAtRequest):xc(e.sectionId,e.settingId,e.hashAtRequest))}function wc(){ja(g());let e=Ea();va(V),$?uc():e?(mc(),nc()):Ps()}function Tc(){if(B.id!==`machine-updates`)return;let e=wa(`update-actions`);e&&Ns(e)}function Ec(e){switch(e.kind){case`broadcast`:wc();return;case`status`:Is();return;case`update`:Tc(),e.frame===`status`&&Oa&&B.id===`machine-updates`&&La();return;case`activate`:Cc();return;case`return-to-list`:pc()}}function Dc(){B.id===Ls&&nc()}window.matchMedia(`(prefers-reduced-motion: reduce)`).addEventListener(`change`,Dc),It(()=>{Hs=null,fc(),Dc()}),Rt(Is);function Oc(){let e=z?.querySelector(`.settings-view-shortcuts`);e&&Gs(e)}Pa({refreshRow:js,refreshRowFoot:Ms,refreshSettingsStatus:Is,refreshShortcutGroups:Oc});var kc={mount:_c};export{kc as view};
|
|
4
|
+
`);t.rows=3,t.value=r(),t.autocomplete=`off`,t.spellcheck=!1,t.placeholder=e.listPlaceholder??``,t.setAttribute(`aria-labelledby`,e.id),as(e,t),t.addEventListener(`blur`,()=>os(e,t,r())),t.addEventListener(`keydown`,n=>{n.key===`Escape`?(n.preventDefault(),q(e,t,r())):n.key!==`Enter`||n.shiftKey||(n.preventDefault(),os(e,t,r()))});let i=p(`div`,`settings-view-list`);return i.append(t,p(`span`,`settings-view-list-hint`,ps(e,n()))),i}var hs=null,J=null;function gs(e){let t=Et(),n=new Map(t.map(e=>[e.view,e.label])),r=rn(t.map(e=>e.view),hi(L(e))),i=p(`ol`,`settings-view-tab-order`);i.setAttribute(`aria-labelledby`,e.id);for(let[t,o]of r.entries()){let s=n.get(o)??o,c=p(`li`,`settings-view-tab-order-item`),l=p(`span`,`settings-view-tab-order-grip`);l.setAttribute(`aria-hidden`,`true`),l.appendChild(a(Xo,`2.4`)),c.append(l,p(`span`,`settings-view-tab-order-label`,s),vs(e,r,o,t-1,`up`,`Move ${s} up`),vs(e,r,o,t+1,`down`,`Move ${s} down`)),_s(e,c,r,o,t),i.append(c)}return i}function _s(e,t,n,r,i){t.draggable=!0,t.addEventListener(`dragstart`,e=>{J=r,e.dataTransfer?.setData(`text/plain`,r),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`)}),t.addEventListener(`dragend`,()=>{J=null}),t.addEventListener(`dragover`,e=>{J&&J!==r&&(e.preventDefault(),t.dataset.dropTarget=n.indexOf(J)<i?`after`:`before`)}),t.addEventListener(`dragleave`,()=>delete t.dataset.dropTarget),t.addEventListener(`drop`,a=>{a.preventDefault(),delete t.dataset.dropTarget;let o=J;J=null,o&&o!==r&&K(e,$t(n,o,i))})}function vs(e,t,n,r,i,o){let s=`${n}:${i}`,c=d({variant:`icon`,size:`small`,label:o,icon:a(i===`up`?Jo:Yo),action:`move-tab-${i}`,disabled:r<0||r>=t.length,onClick:()=>{hs=s,K(e,$t(t,n,r))}});return s===hs&&(c.dataset.restoresFocus=`true`),c}function ys(e){return e.control===`readonly`?lo(e):e.control===`toggle`?$o(e):e.control===`number`?cs(e):e.control===`select`?Ji(e)===`segmented`?ds(e):fs(e):e.control===`list`?ms(e):e.control===`shortcut-key`?ts(e):e.control===`tab-order`?gs(e):ss(e)}function bs(e){let t=p(`div`,`settings-view-setting-heading`),n=xa(e),r=p(`h2`,`settings-view-setting-title`,e.title);r.id=e.id,xr(e)&&!Sr(Si(R,n.id)??n)&&r.append(` `,xo()),r.addEventListener(`click`,()=>Sa(n.id,e.id));let i=d({variant:`quiet`,size:`small`,label:`#`,action:`copy-setting-link`});return i.setAttribute(`aria-label`,`Copy link`),t.appendChild(r),wo(t,i,{copiedText:`Link copied`,textToCopy:()=>new URL(yt(n.id,e.id),location.href).href}),t}function xs(e){let t=Si(R,xa(e).id);return t?ci(ba(t)):null}function Ss(e,t){let n=p(`div`,`settings-view-chips`);for(let r of li(e,t))n.appendChild(So(r.kind,r.text));return n}function Cs(e){return e.control===`readonly`||ui(e,V)?!1:!qi(e,L(e))}function ws(e){let t=p(`div`,`settings-view-control-foot`),n=p(`span`,`settings-view-save-status`);n.setAttribute(`role`,`status`);let r=d({variant:`quiet`,size:`small`,label:`Reset`,action:`reset-setting`});return r.addEventListener(`click`,()=>{let t=Ki(e),n=$i(e);n===null?K(e,t):h({title:e.title,message:n,confirmLabel:`Reset`,danger:!0,onConfirm:()=>K(e,t)})}),t.append(n,r),t}function Ts(e,t){let n=e.querySelector(`.settings-view-save-status`),r=ha.get(t.id);n&&(n.textContent=r?.text??``,r&&(n.dataset.tone=r.tone),r||delete n.dataset.tone);let i=e.querySelector(`[data-action="reset-setting"]`);i&&(i.hidden=!Cs(t));let a=e.querySelector(`.settings-view-control-foot`);a&&(a.hidden=!r&&!Cs(t));let o=e.querySelector(`.settings-view-field-error`),s=ga.get(t.id);o&&!s&&o.remove(),o&&s&&(o.textContent=s),!o&&s&&e.querySelector(`.settings-view-setting-control`)?.appendChild(p(`div`,`settings-view-field-error`,s))}function Es(e){let t=p(`article`,`settings-view-setting`);t.dataset.settingId=e.id,e.control===`readonly`&&(t.dataset.readout=`true`);let n=p(`div`,`settings-view-setting-text`);n.append(bs(e),p(`p`,`settings-view-setting-description`,e.description));let r=Ss(e,xs(e));r.childElementCount>0&&n.appendChild(r);let i=p(`div`,`settings-view-setting-control`);i.appendChild(ys(e)),e.control!==`readonly`&&i.appendChild(ws(e)),t.append(n,i),Xi(e,L(e))&&t.appendChild(p(`div`,`settings-view-warning settings-warning`,e.warning));let a=fo(e);return a&&t.appendChild(a),Ts(t,e),t}function Ds(e){return z?.querySelector(`[data-setting-id="${e.id}"]`)??null}function Os(e){let t=e.querySelector(`.settings-view-setting-control`);t&&(t.querySelector(`[data-restores-focus="true"]:not([disabled])`)??t.querySelector(`[role="radio"][aria-checked="true"]`)??t.querySelector(`input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled])`))?.focus()}function ks(e,t){if(!is(e)||!is(t))return;e.disabled=t.disabled,e.placeholder=t.placeholder;let n=I.get(t);n&&!Wi(I.get(e))&&(I.set(e,{base:n.base,isDirty:!1}),e.value!==t.value&&(e.value=t.value))}function As(e,t,n){if(e===n){ks(e,t);return}let r=[...e.children],i=[...t.children];for(let[t,a]of i.entries()){let i=r[t];i?i.contains(n)?As(i,a,n):i.replaceWith(a):e.appendChild(a)}for(let e of r.slice(i.length))e.remove()}function js(e,{force:t=!1}={}){let n=Ds(e);if(!n)return;let r=document.activeElement,i=n.contains(r),a=i&&!t&&is(r)?r:null;(!a||!Wi(I.get(a)))&&ga.delete(e.id);let o=Es(e);a?As(n,o,a):(n.replaceWith(o),i&&Os(o))}function Ms(e){let t=Ds(e);t&&Ts(t,e)}function Ns(e){Ds(e)?.querySelector(`.settings-view-setting-control`)?.replaceChildren(lo(e))}function Ps(){for(let e of ba(B))e.control===`readonly`?Ns(e):js(e)}function Fs(e,t){let n=t.querySelector(`.settings-view-status-slot`),r=fo(e);n&&r&&n.replaceWith(r),n&&!r&&n.remove(),!n&&r&&t.appendChild(r)}function Is(){for(let e of ba(B)){if(!e.status)continue;let t=Ds(e);t&&(e.control===`readonly`?Ns(e):Fs(e,t))}}var Ls=`browser-appearance`,Rs=`flying-animals`,Y=!1,zs=!1,Bs=null,Vs=null,X=null,Z=null,Q=null,Hs=null,Us=null,$=``;function Ws(e){requestAnimationFrame(()=>{let t=document.getElementById(e),n=t?.closest(`.settings-view-advanced-panel`);n&&(Y=!0,n.hidden=!1,z?.querySelector(`.settings-view-advanced-toggle`)?.setAttribute(`aria-expanded`,`true`));let r=t?.closest(`.settings-view-setting`);r&&(r.scrollIntoView({block:`center`}),r.classList.remove(`settings-view-setting-flash`),requestAnimationFrame(()=>r.classList.add(`settings-view-setting-flash`)))})}function Gs(e){e.replaceChildren();for(let t of et(en,sn())){let n=p(`div`,`shortcut-group`);n.appendChild(p(`h2`,`settings-view-subsection-title`,t.title));let r=p(`dl`,`shortcut-rows`);for(let e of t.items){let t=p(`dd`,`shortcut-keys`);e.combos.forEach((e,n)=>{n>0&&t.appendChild(p(`span`,`shortcut-sep`,`/`)),Zt(t,e)}),r.append(p(`dt`,`shortcut-label`,e.label),t)}n.appendChild(r),e.appendChild(n)}}function Ks(e){return Et().find(t=>t.gate!==void 0&&`fromSettings`in t.gate&&t.gate.fromSettings===e)?.label}function qs(e){let t=p(`ul`,`settings-view-stack settings-features`);for(let e of gt){let n=R.find(t=>t.id===e.sectionId),r=wa(e.settingId),i=Ks(Pt[e.rule]);if(!n||!r||!i)continue;let a=L(r)===!0,o=p(`li`,`settings-feature`),s=p(`div`,`settings-feature-head`);s.append(p(`span`,`settings-feature-name`,i),So(`feature`,a?`On`:`Off`)),o.append(s,p(`p`,`settings-view-section-description`,n.description),cn(e.sectionId,e.settingId,r.title)),t.appendChild(o)}e.appendChild(t)}function Js(e){let t=p(`div`,`settings-about`),n=p(`span`,`settings-about-version`,`GLIMMERVOID `);n.appendChild(p(`span`,`settings-about-v`,`v0.52.2-next.699`));let r=p(`span`,`settings-about-links`);r.append(Ya(`GitHub`,`https://github.com/${yn}`),Ya(`Changelog`,`https://github.com/${yn}/blob/main/CHANGELOG.md`),Ya(`Website`,Ca(`/`))),t.append(n,r),e.appendChild(t)}function Ys(e){if(H[`pref:soundEnabled`]===e)return;H[`pref:soundEnabled`]=e;let t=wa(`alert-sounds-enabled`);t&&js(t)}function Xs(){return d({variant:`secondary`,label:`Reset all to defaults`,action:`reset-flying-animals`,onClick:()=>{Be(),va(V),Ut(ft()),nc()}})}function Zs(e){let t=p(`div`,`settings-view-advanced`),n=le(`dialog-advanced-toggle settings-view-advanced-toggle`,`Advanced`);n.setAttribute(`aria-expanded`,String(Y)),n.setAttribute(`aria-controls`,`settings-view-advanced-panel`);let r=p(`div`,`dialog-advanced-panel settings-view-advanced-panel`);r.id=`settings-view-advanced-panel`,r.hidden=!Y,n.addEventListener(`click`,()=>{Y=!Y,r.hidden=!Y,n.setAttribute(`aria-expanded`,String(Y))});for(let t of e)r.append(Es(t));return B.id===Ls&&r.append(Xs()),t.append(n,r),t}function Qs(e){let t=p(`div`,`settings-view-streamer-placeholder`),n=d({variant:`primary`,label:`Turn off streamer mode`,action:`turn-off-streamer-mode`}),r=p(`span`,`settings-view-copy-status`,``);r.setAttribute(`role`,`status`),n.addEventListener(`click`,async()=>{n.disabled=!0,r.textContent=``;let e=await un(!1);n.disabled=!1,r.textContent=e}),t.append(p(`p`,`settings-view-section-description`,`Settings are hidden in streamer mode.`),n,r),e.appendChild(t)}Vt(()=>nc());function $s(){let e=p(`div`,`settings-view-advanced`),t=le(`dialog-advanced-toggle`,`Animal gallery`);t.setAttribute(`aria-controls`,`settings-view-animal-gallery-panel`);let n=p(`div`,`dialog-advanced-panel settings-view-advanced-panel`);n.id=`settings-view-animal-gallery-panel`;let r=()=>{t.setAttribute(`aria-expanded`,String(zs)),n.hidden=!zs,zs&&n.childElementCount===0&&n.append(Dn())};return t.addEventListener(`click`,()=>{zs=!zs,r()}),r(),e.append(t,n),e}function ec(e){let t=p(`header`,`settings-view-subsection`),n=p(`h2`,`settings-view-subsection-title`,e.title);return n.addEventListener(`click`,()=>Sa(e.id)),t.append(n,p(`p`,`settings-view-section-description`,e.description)),t}function tc(e,t){for(let n of t.settings.filter(e=>e.access!==`advanced`))e.appendChild(Es(n)),n.id===Rs&&e.appendChild($s());let n=t.settings.filter(e=>e.access===`advanced`);n.length>0&&e.append(Zs(n))}function nc(){if(fc(),$){uc();return}if(!z)return;if(z.textContent=``,dn()){Qs(z);return}let e=p(`header`,`settings-view-section-header`),t=p(`h1`,`settings-view-section-title`,B.title);t.tabIndex=-1,t.addEventListener(`click`,()=>Sa(B.id));let n=p(`div`,`settings-view-section-title-row`);n.appendChild(t);let r=Sr(B);r&&t.append(` `,xo());let i=ci(ba(B));if(i&&n.appendChild(So(`scope`,si[i])),e.append(n,p(`p`,`settings-view-section-description`,B.description)),r&&e.appendChild(p(`p`,`settings-view-warning settings-view-experimental-caution`,`Experimental: this may change or break between releases.`)),z.appendChild(e),B.id===`browser-shortcuts`){let e=p(`div`,`settings-view-stack`);tc(e,B),z.appendChild(e);let t=p(`div`,`shortcut-groups settings-view-shortcuts`);Gs(t),z.appendChild(t);return}if(B.id===`browser-about`){Js(z);return}if(B.id===`browser-status-key`){z.appendChild(Wt()),z.appendChild(an());return}if(B.id===`lanes-features`){qs(z);return}if(B.id===`machine-packs`){Io(z);return}let a=p(`div`,`settings-view-stack`);for(let e of ya(B))e.id!==B.id&&a.appendChild(ec(e)),tc(a,e);z.appendChild(a)}function rc(e,{focusContent:t=!1,settingId:n=null,updateHash:r=!0,openPhoneSection:i=!0}={}){r&&$&&($=``,Q&&(Q.value=``));let a=Si(R,e)??B;B.id!==a.id&&(Y=!1),Aa(a);let o=R.find(t=>t.id===e)??a;ic(Z),i&&ln()&&(Hs=o.id),nc(),yc(B)&&vc(),B.id===`machine-updates`&&La(),r&&Sa(o.id,n),n&&Ws(n),t&&z?.querySelector(`h1`)?.focus()}function ic(e){for(let t of e?.querySelectorAll(`[data-settings-section]`)||[]){let e=t.dataset.settingsSection===B.id;t.setAttribute(`aria-current`,e?`page`:`false`)}}function ac(e){return e.section!==null}function oc(e){Q&&(Q.value=``,$=``,mc(),rc(e.section.id,{settingId:e.setting.id}))}function sc(e){return Jr(pa(),e,yr.fileOnly)}function cc(e,t,n,r,i){let a=p(e,t),o=r.matches.find(e=>e.field===i),s=o?n.indexOf(o.text):-1;if(!o||s<0)return a.textContent=n,a;let c=0;for(let e of o.spans)a.append(n.slice(c,s+e.start),p(`mark`,`settings-view-search-highlight`,n.slice(s+e.start,s+e.end))),c=s+e.end;return a.append(n.slice(c)),a}function lc(e,t){let{currentText:n,defaultText:r,jsonFragment:i}=yi(t.setting,V);if(n!==null&&e.appendChild(p(`span`,`settings-view-search-current`,n)),e.append(p(`span`,`settings-view-search-default`,r),Ss(t.setting,null),p(`p`,`settings-view-list-hint`,`Edit in config.json or with glimmervoid settings set.`)),i===null)return;let a=p(`div`,`settings-view-control-foot`);wo(a,d({variant:`quiet`,size:`small`,label:`Copy as JSON`,action:`copy-json`}),{copiedText:`JSON copied`,textToCopy:()=>i}),e.appendChild(a)}function uc(){if(!z)return;if(z.textContent=``,dn()){Qs(z);return}let e=sc($),t=p(`div`,`settings-view-section-header`);if(t.append(p(`h1`,`settings-view-section-title`,`Settings search`),p(`p`,`settings-view-section-description`,`${e.length} ${e.length===1?`result`:`results`} for "${$}"`)),z.appendChild(t),e.length===0){z.appendChild(p(`p`,`settings-empty settings-view-search-empty`,`No settings found.`));return}let n=p(`ol`,`settings-view-search-results`);n.setAttribute(`aria-label`,`Settings search results`);for(let t of e){let e=p(`li`,`settings-view-search-result`);e.tabIndex=-1;let r=bi(R,t.section,t.setting);e.appendChild(cc(`p`,`settings-view-search-breadcrumb`,r,t,`section`));let i=cc(`span`,`settings-view-setting-title`,t.setting.title,t,`title`);if(ac(t)){let n=le(`settings-view-search-open`);n.appendChild(i),n.addEventListener(`click`,()=>oc(t)),e.appendChild(n)}ac(t)||(e.classList.add(`settings-view-search-file-only`),e.appendChild(i)),e.append(cc(`p`,`settings-view-setting-description`,t.setting.description,t,`description`),cc(`code`,`settings-view-key-path`,t.setting.path,t,`path`));let a=new Set([`title`,`description`,`path`,`section`]);if(!t.matches.some(e=>a.has(e.field))){let n=t.matches.find(e=>e.field===`options`)??t.matches.find(e=>e.field===`keywords`);n&&e.appendChild(cc(`p`,`settings-view-list-hint`,n.text,t,n.field))}ac(t)||lc(e,t),n.appendChild(e)}z.appendChild(n)}function dc(){return Ti(R,Hs,$,dn())}function fc(){if(!X)return;let e=dc(),t=X.dataset.settingsScreen!==e;X.dataset.settingsScreen=e,Us&&(Us.hidden=e!==`section`),t&&mt()}function pc(){let e=B.id;hc(``),Z?.querySelector(`[data-settings-section="${e}"]`)?.focus()}function mc(){if(Z&&X){Z.textContent=``;for(let e of wi(Ci(R))){let t=p(`div`,`settings-view-nav-group`);e.heading&&t.appendChild(p(`div`,`settings-view-nav-heading`,e.heading));for(let n of e.sections){let e=le(`settings-view-nav-item`,n.title);Sr(n)&&e.append(` `,xo()),e.dataset.settingsSection=n.id,e.addEventListener(`click`,()=>rc(n.id,{focusContent:ln()})),t.appendChild(e)}Z.appendChild(t)}$?(fc(),uc()):rc(B.id,{updateHash:!1,openPhoneSection:!1})}}function hc(e,{updateHash:t=!0}={}){$=e.trim(),Q&&(Q.value=e),Hs=null,t&&history.replaceState(history.state,``,_t($)),mc()}function gc(e){if($&&e.key===`Enter`&&e.target===Q){let t=sc($).find(ac);if(!t)return;e.preventDefault(),oc(t);return}if(e.key===`Escape`&&$){if(!Q)return;e.preventDefault(),hc(``),Q.focus();return}if(e.key!==`ArrowUp`&&e.key!==`ArrowDown`||!Z)return;let t=[...Z.querySelectorAll(`[data-settings-section]`)].filter(e=>e instanceof HTMLElement),n=document.activeElement;if(!(n instanceof HTMLElement))return;let r=t.indexOf(n);r<0||(e.preventDefault(),t[(r+(e.key===`ArrowDown`?1:-1)+t.length)%t.length].focus())}function _c(e){Qt(Ys),Bs=e,Bs.textContent=``,X=p(`div`,`settings-view-shell`);let t=p(`div`,`settings-view-sidebar`);Q=p(`input`,`settings-view-search`),Q.type=`search`,Q.placeholder=`Search settings`,Q.setAttribute(`aria-label`,`Search settings`),Z=p(`nav`,`settings-view-nav`),Z.setAttribute(`role`,`navigation`),Z.setAttribute(`aria-label`,`Settings sections`),Us=d({variant:`secondary`,label:`Settings`,icon:a(de),action:`back-to-settings-list`,hidden:!0,onClick:xt}),Us.setAttribute(`aria-label`,`Back to settings sections`);let n=p(`div`,`settings-view-content`);n.setAttribute(`aria-live`,`polite`),ka(n),Q.addEventListener(`input`,()=>{let e=Q;e&&hc(e.value)}),Q.addEventListener(`keydown`,gc),Z.addEventListener(`keydown`,gc),t.append(Q,Us,Z),X.append(t,n),Bs.appendChild(X),ja(g()),Ea(),va(V),wt(dc),ht(Ec),mc(),vc(),Vs?.disconnect(),Vs=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&vc()}),Vs.observe(Bs),Cc()}function vc(){fn().then(bc)}function yc(e){return ba(e).some(e=>e.path===`pref:soundId`)}function bc(){if(Ta(),H[`pref:soundId`]=mn(at()),$){uc();return}let e=wa(`alert-sound`);e&&yc(B)&&js(e)}function xc(e,t,n){let r=Ft(e??n);r?hc(r.query):(hc(``,{updateHash:!1}),ln()&&!e?history.replaceState(history.state,``,_t(``)):rc(e||B.id,{settingId:t}))}function Sc(e){let t=Yr(e,R,wr,Tr);xc(t?.sectionId??null,t?.settingId??null,e)}function Cc(){let e=Lt();e&&(e.isLink?Sc(e.hashAtRequest):xc(e.sectionId,e.settingId,e.hashAtRequest))}function wc(){ja(g());let e=Ea();va(V),$?uc():e?(mc(),nc()):Ps()}function Tc(){if(B.id!==`machine-updates`)return;let e=wa(`update-actions`);e&&Ns(e)}function Ec(e){switch(e.kind){case`broadcast`:wc();return;case`status`:Is();return;case`update`:Tc(),e.frame===`status`&&Oa&&B.id===`machine-updates`&&La();return;case`activate`:Cc();return;case`return-to-list`:pc()}}function Dc(){B.id===Ls&&nc()}window.matchMedia(`(prefers-reduced-motion: reduce)`).addEventListener(`change`,Dc),It(()=>{Hs=null,fc(),Dc()}),Rt(Is);function Oc(){let e=z?.querySelector(`.settings-view-shortcuts`);e&&Gs(e)}Pa({refreshRow:js,refreshRowFoot:Ms,refreshSettingsStatus:Is,refreshShortcutGroups:Oc});var kc={mount:_c};export{kc as view};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./button-
|
|
1
|
+
import{t as e}from"./button-CeEmJCQe.js";import{b as t,s as n}from"./dom-helpers-Bs-xZEnd.js";var r={done:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="Done"><circle cx="12" cy="12" r="10"></circle><path d="M7.5 12.5l3 3 6-6.5"></path></svg>`,current:`<svg width="18" height="18" viewBox="0 0 24 24" role="img" aria-label="Needed"><path d="M12 3l9 9-9 9-9-9z" fill="currentColor"></path></svg>`,upcoming:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" role="img" aria-label="Not started"><circle cx="12" cy="12" r="10"></circle></svg>`};function i({title:e,state:t,summary:i,badge:a,body:o}){let s=n(`li`,`first-run-step`);s.dataset.state=t,t===`current`&&s.setAttribute(`aria-current`,`step`);let c=n(`div`,`first-run-step-head`),l=n(`span`,`first-run-step-icon`);if(l.innerHTML=r[t],c.append(l,n(`span`,`first-run-step-title`,e)),t===`done`&&i&&c.append(n(`span`,`first-run-step-summary`,i)),t===`current`&&a&&c.append(n(`span`,`first-run-step-badge`,a)),s.append(c),t!==`current`)return s;let u=n(`div`,`first-run-step-body`);return u.append(...o()),s.append(u),s}function a(r){let i=n(`div`,`first-run-command-row`);if(i.append(n(`code`,`first-run-command`,r)),!navigator.clipboard?.writeText)return i;let a=e({variant:`secondary`,label:`Copy`}),o=n(`span`,`first-run-copy-status`);return o.setAttribute(`role`,`status`),a.addEventListener(`click`,async()=>{let e=t(r);o.textContent=e?await e.then(()=>`Copied`,()=>`Copy failed`):`Copy failed`}),i.append(a,o),i}export{i as n,a as t};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,S as t,a as n,m as r,o as i,t as a,y as o}from"./button-CBoNTVJe.js";import{s}from"./dom-helpers-Bs-xZEnd.js";import{Br as c,pr as ee,u as te,zr as l}from"./index-o7oGy8XE.js";var u={scale:1,offsetX:0,offsetY:0},d=1,ne=1.5,f=2,p=.01,m=25;function h(e){return Math.min(8,Math.max(d,e))}function g(e,t,n){let r=Math.max(0,(t-n)/2);return Math.min(r,Math.max(-r,e))}function _(e,t){let n=h(e.scale);return{scale:n,offsetX:g(e.offsetX,t.media.width*n,t.stage.width),offsetY:g(e.offsetY,t.media.height*n,t.stage.height)}}function v(e,t,n,r){let i=h(t),a=(n.x-e.offsetX)/e.scale,o=(n.y-e.offsetY)/e.scale;return _({scale:i,offsetX:n.x-a*i,offsetY:n.y-o*i},r)}function y(e,t,n,r){return _({scale:e.scale,offsetX:e.offsetX+t,offsetY:e.offsetY+n},r)}function re({startView:e,startMidpoint:t,startDistance:n,midpoint:r,distance:i,bounds:a}){return n<=0||i<=0?e:y(v(e,e.scale*(i/n),t,a),r.x-t.x,r.y-t.y,a)}function ie(e,t){return h(e*Math.exp(-Math.min(m,Math.max(-25,t))*p))}function ae(e,t,n){return e.scale>d?u:v(e,f,t,n)}function b(e){return e>d}function oe(e){return`${Math.round(e*100)}%`}var se=3,ce=6,le=300,ue=30,de=16,x={image:`Image`,video:`Video`,page:`Page`};function S(e,t){return`/shown/${encodeURIComponent(e)}/${encodeURIComponent(t.id)}`}function C(e){return e.pageTitle??e.name}function fe(e,t){let n=S(e,t);if(t.kind===`image`){let e=s(`img`,`shown-stage-media`);return e.src=n,e.alt=t.caption??t.name,e.decoding=`async`,e.draggable=!1,e}if(t.kind===`video`){let e=s(`video`,`shown-stage-media`);return e.src=n,e.preload=`metadata`,e.controls=!0,e.playsInline=!0,e}return te({source:{kind:`url`,url:n},className:`shown-stage-frame`,title:C(t),allowsScripts:!0})}function pe(e,t){let n=c(e,t);if(n){let e=s(`img`,`shown-thumb-media`);return e.src=n,e.alt=``,e.loading=`lazy`,e.decoding=`async`,e}let r=s(`span`,`shown-thumb-label`);return r.append(s(`span`,`shown-page-kind`,x[t.kind]),s(`span`,`shown-page-title`,C(t))),r}function me(e){let t=new Image;t.src=e,t.decode().catch(()=>{})}var w=`glimmervoidShownZoom`;function T(e){return e instanceof HTMLImageElement||e instanceof HTMLVideoElement}function he(e,t){e.contentWindow?.postMessage({[w]:t},`*`)}function ge(e){if(typeof e!=`object`||!e||!(w in e))return null;let t=Reflect.get(e,w);return typeof t!=`number`||!Number.isFinite(t)?null:t}function _e(e){return!(`scale`in e)||typeof e.scale!=`number`?null:e.scale}function ve(e){return!(`clientX`in e)||!(`clientY`in e)||typeof e.clientX!=`number`||typeof e.clientY!=`number`?null:{x:e.clientX,y:e.clientY}}function ye(e){return{x:e.reduce((e,t)=>e+t.x,0)/e.length,y:e.reduce((e,t)=>e+t.y,0)/e.length}}function be(e){let[t,n]=e;return!t||!n?0:Math.hypot(t.x-n.x,t.y-n.y)}function xe(e,t){let n=s(`div`,`shown-step ${t}`);return n.append(e),n}function E({sessionId:c,onClose:te}){let d=s(`section`,`shown-face`);d.hidden=!0,d.tabIndex=-1,d.setAttribute(`aria-label`,`Shown files`);let f=s(`div`,`shown-stage`),p=a({variant:`icon`,label:`Previous file`,icon:e(i),action:`previous-file`}),m=a({variant:`icon`,label:`Next file`,icon:e(r),action:`next-file`}),h=s(`div`,`shown-stage-frame-wrap`);h.append(f,xe(p,`shown-step-previous`),xe(m,`shown-step-next`));let g=s(`p`,`shown-caption`),_=s(`p`,`shown-meta`),x=s(`span`,`shown-position`),w=a({variant:`secondary`,size:`small`,label:`Open full size`,action:`open-full-size`}),E=a({variant:`icon`,size:`small`,label:`Zoom out`,icon:e(o),action:`zoom-out`}),D=a({variant:`secondary`,size:`small`,label:`Fit`,action:`zoom-to-fit`});D.setAttribute(`aria-label`,`Fit to stage`);let O=a({variant:`icon`,size:`small`,label:`Zoom in`,icon:e(t),action:`zoom-in`}),k=s(`span`,`shown-zoom-percent`);k.setAttribute(`aria-live`,`polite`);let A=s(`div`,`shown-zoom-controls`);A.append(E,D,O,k);let j=s(`div`,`shown-details`),M=s(`div`,`shown-detail-text`);M.append(g,_);let Se=a({variant:`secondary`,size:`small`,label:`Close`,action:`close-shown`,onClick:te});j.append(M,A,x,w,Se);let N=s(`div`,`shown-strip`);N.setAttribute(`aria-label`,`Shown files`),d.append(h,j,N);let P=new Map,F=new Map,I=null,L=null,R=u,z=null,B=null,Ce=`mouse`,V=null,H=new Map,we=new WeakSet;function U(){let e=l(c);return e.find(e=>e.id===I)??e.at(-1)??null}function Te(e){let t=n(`shown-thumb`);return t.setAttribute(`aria-label`,C(e)),t.append(pe(c,e)),t.addEventListener(`click`,()=>$(e.id)),t}function Ee(e){let t=new Set(e.map(e=>e.id));for(let[e,n]of P)t.has(e)||(n.remove(),P.delete(e));for(let t of e){if(P.has(t.id))continue;let e=Te(t);P.set(t.id,e),N.append(e)}N.hidden=e.length<2}function De(e){if(!e)return;let t=e.offsetLeft-N.offsetLeft,n=t+e.offsetWidth;t<N.scrollLeft?N.scrollLeft=t:n>N.scrollLeft+N.clientWidth&&(N.scrollLeft=n-N.clientWidth)}function Oe(e){let t=new Set(e.map(e=>e.id));for(let[e,n]of F)t.has(e)||(n.remove(),F.delete(e));let n=[...F.keys()].filter(e=>F.get(e)instanceof HTMLIFrameElement);for(let e of n.slice(0,Math.max(0,n.length-se)))F.get(e)?.remove(),F.delete(e);for(let[e,t]of F)t instanceof HTMLIFrameElement||e===I||(t.remove(),F.delete(e))}function ke(e){let t=F.get(e.id),n=t??fe(c,e);F.delete(e.id),F.set(e.id,n),!t&&n instanceof HTMLIFrameElement&&n.addEventListener(`load`,()=>he(n,`report`)),t||f.append(n);for(let[t,n]of F)n.hidden=t!==e.id;for(let e of f.querySelectorAll(`video`))e!==n&&e.pause()}function W(){return I?F.get(I)??null:null}function G(e){return{media:{width:e.offsetWidth,height:e.offsetHeight},stage:{width:f.clientWidth,height:f.clientHeight}}}function K(e){let t=f.getBoundingClientRect();return{x:e.x-t.left-t.width/2,y:e.y-t.top-t.height/2}}function Ae(){let e=W();A.hidden=!e||e instanceof HTMLIFrameElement&&!we.has(e),k.textContent=oe(R.scale),E.disabled=!b(R.scale),D.disabled=!b(R.scale),O.disabled=R.scale>=8}function q(e){R=e;let t=W();T(t)&&(t.style.transform=b(R.scale)?`translate(${R.offsetX}px, ${R.offsetY}px) scale(${R.scale})`:``),f.classList.toggle(`is-zoomed`,b(R.scale)),Ae()}function J(e){let t=W();return t instanceof HTMLIFrameElement&&(he(t,e),!0)}function je(e){let t=W();if(!(t instanceof HTMLIFrameElement)||e.source!==t.contentWindow)return;let n=ge(e.data);n!==null&&(we.add(t),q({scale:n,offsetX:0,offsetY:0}))}function Y(e,t){let n=W();T(n)&&q(v(R,e,t,G(n)))}function Me(e){let t=W();t instanceof HTMLImageElement&&q(ae(R,K(e),G(t)))}function Ne(e){if(L!==e){L=e;for(let e of F.values())T(e)&&(e.style.transform=``);z=null,H.clear(),J(`fit`),J(`report`),q(u)}}function Pe(){let e=[...H.values()];if(e.length>=2){z={kind:`pinch`,startView:R,startMidpoint:K(ye(e)),startDistance:be(e)};return}let[t,n]=[...H.entries()][0]??[];t!==void 0&&n&&(z={kind:`pan`,pointerId:t,origin:n,last:n,isPanning:!1})}function Fe(e){if(T(W())&&!(e.target instanceof Element&&e.target.closest(`.shown-step`))&&(e.pointerType!==`mouse`||e.button===0)){if(Ce=e.pointerType,H.set(e.pointerId,{x:e.clientX,y:e.clientY}),H.size>=2)for(let e of H.keys())f.setPointerCapture(e);Pe()}}function Ie(e){if(!H.has(e.pointerId))return;let t={x:e.clientX,y:e.clientY};H.set(e.pointerId,t);let n=W();if(!T(n)||!z)return;if(z.kind===`pinch`){let e=[...H.values()];q(re({...z,midpoint:K(ye(e)),distance:be(e),bounds:G(n)}));return}if(z.pointerId!==e.pointerId||!b(R.scale))return;let r=Math.hypot(t.x-z.origin.x,t.y-z.origin.y)>=ce;(z.isPanning||r)&&(z.isPanning||f.setPointerCapture(e.pointerId),z.isPanning=!0,q(y(R,t.x-z.last.x,t.y-z.last.y,G(n))),z.last=t)}function Le(){f.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation()},{capture:!0,once:!0})}function Re(e){let t={x:e.clientX,y:e.clientY},n=B;if(B={at:e.timeStamp,point:t},!n)return;let r=e.timeStamp-n.at<=le,i=Math.hypot(t.x-n.point.x,t.y-n.point.y)<=ue;r&&i&&(B=null,Me(t))}function X(e){if(!H.delete(e.pointerId))return;let t=z;z=null,t?.kind===`pinch`?(B=null,H.size>0&&Pe()):t?.kind===`pan`&&t.isPanning?(B=null,e.pointerType!==`touch`&&Le()):e.type===`pointerup`&&e.pointerType===`touch`&&Re(e)}function ze(e){let t=W();if(!T(t))return;let n=e.deltaMode===WheelEvent.DOM_DELTA_LINE?de:1;e.ctrlKey||e.metaKey?(e.preventDefault(),Y(ie(R.scale,e.deltaY*n),K({x:e.clientX,y:e.clientY}))):b(R.scale)&&(e.preventDefault(),q(y(R,-e.deltaX*n,-e.deltaY*n,G(t))))}function Be(e){T(W())&&(e.preventDefault(),V=R)}function Ve(e){if(!T(W()))return;e.preventDefault();let t=_e(e);if(H.size>0||!V||t===null)return;let n=ve(e),r=n?K(n):{x:0,y:0};R=V,Y(V.scale*t,r)}function He(e,t){for(let n of[e[t-1],e[t+1]])n?.kind===`image`&&me(S(c,n))}function Z(){let e=l(c);Ee(e);let t=U();if(!t)return;I=t.id;let n=e.indexOf(t);ke(t),Oe(e),Ne(t.id),g.textContent=t.caption??C(t),_.textContent=`${t.name}, shown ${ee(t.shownAt)}`,x.textContent=`${n+1} of ${e.length}`,p.disabled=n<=0,m.disabled=n>=e.length-1;for(let[e,n]of P)n.setAttribute(`aria-current`,String(e===t.id));De(P.get(t.id)),He(e,n)}function Q(e){let t=l(c),n=U();if(!n)return;let r=t[t.indexOf(n)+e];r&&$(r.id)}function $(e){I=e,Z()}return E.addEventListener(`click`,()=>{J(`out`)||Y(R.scale/ne,{x:0,y:0})}),O.addEventListener(`click`,()=>{J(`in`)||Y(R.scale*ne,{x:0,y:0})}),D.addEventListener(`click`,()=>{J(`fit`)||q(u)}),f.addEventListener(`pointerdown`,Fe),f.addEventListener(`pointermove`,Ie),f.addEventListener(`pointerup`,X),f.addEventListener(`pointercancel`,X),f.addEventListener(`wheel`,ze,{passive:!1}),f.addEventListener(`dblclick`,e=>{Ce!==`touch`&&Me({x:e.clientX,y:e.clientY})}),f.addEventListener(`gesturestart`,Be),f.addEventListener(`gesturechange`,Ve),p.addEventListener(`click`,()=>Q(-1)),m.addEventListener(`click`,()=>Q(1)),w.addEventListener(`click`,()=>{let e=U();e&&window.open(S(c,e),`_blank`,`noopener`)}),d.addEventListener(`keydown`,e=>{if(e.altKey||e.metaKey||e.ctrlKey||e.shiftKey||e.key===`Escape`&&D.disabled)return;if(e.key===`Escape`){e.preventDefault(),D.click();return}let t={ArrowLeft:-1,ArrowRight:1}[e.key];t!==void 0&&(e.preventDefault(),Q(t))}),{el:d,show(e){I=e,d.hidden=!1,window.addEventListener(`message`,je),Z(),d.contains(document.activeElement)||d.focus({preventScroll:!0})},hide(){d.hidden=!0,L=null,window.removeEventListener(`message`,je);for(let e of f.querySelectorAll(`video`))e.pause()},applyArrivals(){d.hidden?Ee(l(c)):Z()},select:$}}export{E as createShownFace};
|
|
1
|
+
import{A as e,S as t,a as n,m as r,o as i,t as a,y as o}from"./button-CeEmJCQe.js";import{s}from"./dom-helpers-Bs-xZEnd.js";import{Br as c,pr as ee,u as te,zr as l}from"./index-MrcTP834.js";var u={scale:1,offsetX:0,offsetY:0},d=1,ne=1.5,f=2,p=.01,m=25;function h(e){return Math.min(8,Math.max(d,e))}function g(e,t,n){let r=Math.max(0,(t-n)/2);return Math.min(r,Math.max(-r,e))}function _(e,t){let n=h(e.scale);return{scale:n,offsetX:g(e.offsetX,t.media.width*n,t.stage.width),offsetY:g(e.offsetY,t.media.height*n,t.stage.height)}}function v(e,t,n,r){let i=h(t),a=(n.x-e.offsetX)/e.scale,o=(n.y-e.offsetY)/e.scale;return _({scale:i,offsetX:n.x-a*i,offsetY:n.y-o*i},r)}function y(e,t,n,r){return _({scale:e.scale,offsetX:e.offsetX+t,offsetY:e.offsetY+n},r)}function re({startView:e,startMidpoint:t,startDistance:n,midpoint:r,distance:i,bounds:a}){return n<=0||i<=0?e:y(v(e,e.scale*(i/n),t,a),r.x-t.x,r.y-t.y,a)}function ie(e,t){return h(e*Math.exp(-Math.min(m,Math.max(-25,t))*p))}function ae(e,t,n){return e.scale>d?u:v(e,f,t,n)}function b(e){return e>d}function oe(e){return`${Math.round(e*100)}%`}var se=3,ce=6,le=300,ue=30,de=16,x={image:`Image`,video:`Video`,page:`Page`};function S(e,t){return`/shown/${encodeURIComponent(e)}/${encodeURIComponent(t.id)}`}function C(e){return e.pageTitle??e.name}function fe(e,t){let n=S(e,t);if(t.kind===`image`){let e=s(`img`,`shown-stage-media`);return e.src=n,e.alt=t.caption??t.name,e.decoding=`async`,e.draggable=!1,e}if(t.kind===`video`){let e=s(`video`,`shown-stage-media`);return e.src=n,e.preload=`metadata`,e.controls=!0,e.playsInline=!0,e}return te({source:{kind:`url`,url:n},className:`shown-stage-frame`,title:C(t),allowsScripts:!0})}function pe(e,t){let n=c(e,t);if(n){let e=s(`img`,`shown-thumb-media`);return e.src=n,e.alt=``,e.loading=`lazy`,e.decoding=`async`,e}let r=s(`span`,`shown-thumb-label`);return r.append(s(`span`,`shown-page-kind`,x[t.kind]),s(`span`,`shown-page-title`,C(t))),r}function me(e){let t=new Image;t.src=e,t.decode().catch(()=>{})}var w=`glimmervoidShownZoom`;function T(e){return e instanceof HTMLImageElement||e instanceof HTMLVideoElement}function he(e,t){e.contentWindow?.postMessage({[w]:t},`*`)}function ge(e){if(typeof e!=`object`||!e||!(w in e))return null;let t=Reflect.get(e,w);return typeof t!=`number`||!Number.isFinite(t)?null:t}function _e(e){return!(`scale`in e)||typeof e.scale!=`number`?null:e.scale}function ve(e){return!(`clientX`in e)||!(`clientY`in e)||typeof e.clientX!=`number`||typeof e.clientY!=`number`?null:{x:e.clientX,y:e.clientY}}function ye(e){return{x:e.reduce((e,t)=>e+t.x,0)/e.length,y:e.reduce((e,t)=>e+t.y,0)/e.length}}function be(e){let[t,n]=e;return!t||!n?0:Math.hypot(t.x-n.x,t.y-n.y)}function xe(e,t){let n=s(`div`,`shown-step ${t}`);return n.append(e),n}function E({sessionId:c,onClose:te}){let d=s(`section`,`shown-face`);d.hidden=!0,d.tabIndex=-1,d.setAttribute(`aria-label`,`Shown files`);let f=s(`div`,`shown-stage`),p=a({variant:`icon`,label:`Previous file`,icon:e(i),action:`previous-file`}),m=a({variant:`icon`,label:`Next file`,icon:e(r),action:`next-file`}),h=s(`div`,`shown-stage-frame-wrap`);h.append(f,xe(p,`shown-step-previous`),xe(m,`shown-step-next`));let g=s(`p`,`shown-caption`),_=s(`p`,`shown-meta`),x=s(`span`,`shown-position`),w=a({variant:`secondary`,size:`small`,label:`Open full size`,action:`open-full-size`}),E=a({variant:`icon`,size:`small`,label:`Zoom out`,icon:e(o),action:`zoom-out`}),D=a({variant:`secondary`,size:`small`,label:`Fit`,action:`zoom-to-fit`});D.setAttribute(`aria-label`,`Fit to stage`);let O=a({variant:`icon`,size:`small`,label:`Zoom in`,icon:e(t),action:`zoom-in`}),k=s(`span`,`shown-zoom-percent`);k.setAttribute(`aria-live`,`polite`);let A=s(`div`,`shown-zoom-controls`);A.append(E,D,O,k);let j=s(`div`,`shown-details`),M=s(`div`,`shown-detail-text`);M.append(g,_);let Se=a({variant:`secondary`,size:`small`,label:`Close`,action:`close-shown`,onClick:te});j.append(M,A,x,w,Se);let N=s(`div`,`shown-strip`);N.setAttribute(`aria-label`,`Shown files`),d.append(h,j,N);let P=new Map,F=new Map,I=null,L=null,R=u,z=null,B=null,Ce=`mouse`,V=null,H=new Map,we=new WeakSet;function U(){let e=l(c);return e.find(e=>e.id===I)??e.at(-1)??null}function Te(e){let t=n(`shown-thumb`);return t.setAttribute(`aria-label`,C(e)),t.append(pe(c,e)),t.addEventListener(`click`,()=>$(e.id)),t}function Ee(e){let t=new Set(e.map(e=>e.id));for(let[e,n]of P)t.has(e)||(n.remove(),P.delete(e));for(let t of e){if(P.has(t.id))continue;let e=Te(t);P.set(t.id,e),N.append(e)}N.hidden=e.length<2}function De(e){if(!e)return;let t=e.offsetLeft-N.offsetLeft,n=t+e.offsetWidth;t<N.scrollLeft?N.scrollLeft=t:n>N.scrollLeft+N.clientWidth&&(N.scrollLeft=n-N.clientWidth)}function Oe(e){let t=new Set(e.map(e=>e.id));for(let[e,n]of F)t.has(e)||(n.remove(),F.delete(e));let n=[...F.keys()].filter(e=>F.get(e)instanceof HTMLIFrameElement);for(let e of n.slice(0,Math.max(0,n.length-se)))F.get(e)?.remove(),F.delete(e);for(let[e,t]of F)t instanceof HTMLIFrameElement||e===I||(t.remove(),F.delete(e))}function ke(e){let t=F.get(e.id),n=t??fe(c,e);F.delete(e.id),F.set(e.id,n),!t&&n instanceof HTMLIFrameElement&&n.addEventListener(`load`,()=>he(n,`report`)),t||f.append(n);for(let[t,n]of F)n.hidden=t!==e.id;for(let e of f.querySelectorAll(`video`))e!==n&&e.pause()}function W(){return I?F.get(I)??null:null}function G(e){return{media:{width:e.offsetWidth,height:e.offsetHeight},stage:{width:f.clientWidth,height:f.clientHeight}}}function K(e){let t=f.getBoundingClientRect();return{x:e.x-t.left-t.width/2,y:e.y-t.top-t.height/2}}function Ae(){let e=W();A.hidden=!e||e instanceof HTMLIFrameElement&&!we.has(e),k.textContent=oe(R.scale),E.disabled=!b(R.scale),D.disabled=!b(R.scale),O.disabled=R.scale>=8}function q(e){R=e;let t=W();T(t)&&(t.style.transform=b(R.scale)?`translate(${R.offsetX}px, ${R.offsetY}px) scale(${R.scale})`:``),f.classList.toggle(`is-zoomed`,b(R.scale)),Ae()}function J(e){let t=W();return t instanceof HTMLIFrameElement&&(he(t,e),!0)}function je(e){let t=W();if(!(t instanceof HTMLIFrameElement)||e.source!==t.contentWindow)return;let n=ge(e.data);n!==null&&(we.add(t),q({scale:n,offsetX:0,offsetY:0}))}function Y(e,t){let n=W();T(n)&&q(v(R,e,t,G(n)))}function Me(e){let t=W();t instanceof HTMLImageElement&&q(ae(R,K(e),G(t)))}function Ne(e){if(L!==e){L=e;for(let e of F.values())T(e)&&(e.style.transform=``);z=null,H.clear(),J(`fit`),J(`report`),q(u)}}function Pe(){let e=[...H.values()];if(e.length>=2){z={kind:`pinch`,startView:R,startMidpoint:K(ye(e)),startDistance:be(e)};return}let[t,n]=[...H.entries()][0]??[];t!==void 0&&n&&(z={kind:`pan`,pointerId:t,origin:n,last:n,isPanning:!1})}function Fe(e){if(T(W())&&!(e.target instanceof Element&&e.target.closest(`.shown-step`))&&(e.pointerType!==`mouse`||e.button===0)){if(Ce=e.pointerType,H.set(e.pointerId,{x:e.clientX,y:e.clientY}),H.size>=2)for(let e of H.keys())f.setPointerCapture(e);Pe()}}function Ie(e){if(!H.has(e.pointerId))return;let t={x:e.clientX,y:e.clientY};H.set(e.pointerId,t);let n=W();if(!T(n)||!z)return;if(z.kind===`pinch`){let e=[...H.values()];q(re({...z,midpoint:K(ye(e)),distance:be(e),bounds:G(n)}));return}if(z.pointerId!==e.pointerId||!b(R.scale))return;let r=Math.hypot(t.x-z.origin.x,t.y-z.origin.y)>=ce;(z.isPanning||r)&&(z.isPanning||f.setPointerCapture(e.pointerId),z.isPanning=!0,q(y(R,t.x-z.last.x,t.y-z.last.y,G(n))),z.last=t)}function Le(){f.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation()},{capture:!0,once:!0})}function Re(e){let t={x:e.clientX,y:e.clientY},n=B;if(B={at:e.timeStamp,point:t},!n)return;let r=e.timeStamp-n.at<=le,i=Math.hypot(t.x-n.point.x,t.y-n.point.y)<=ue;r&&i&&(B=null,Me(t))}function X(e){if(!H.delete(e.pointerId))return;let t=z;z=null,t?.kind===`pinch`?(B=null,H.size>0&&Pe()):t?.kind===`pan`&&t.isPanning?(B=null,e.pointerType!==`touch`&&Le()):e.type===`pointerup`&&e.pointerType===`touch`&&Re(e)}function ze(e){let t=W();if(!T(t))return;let n=e.deltaMode===WheelEvent.DOM_DELTA_LINE?de:1;e.ctrlKey||e.metaKey?(e.preventDefault(),Y(ie(R.scale,e.deltaY*n),K({x:e.clientX,y:e.clientY}))):b(R.scale)&&(e.preventDefault(),q(y(R,-e.deltaX*n,-e.deltaY*n,G(t))))}function Be(e){T(W())&&(e.preventDefault(),V=R)}function Ve(e){if(!T(W()))return;e.preventDefault();let t=_e(e);if(H.size>0||!V||t===null)return;let n=ve(e),r=n?K(n):{x:0,y:0};R=V,Y(V.scale*t,r)}function He(e,t){for(let n of[e[t-1],e[t+1]])n?.kind===`image`&&me(S(c,n))}function Z(){let e=l(c);Ee(e);let t=U();if(!t)return;I=t.id;let n=e.indexOf(t);ke(t),Oe(e),Ne(t.id),g.textContent=t.caption??C(t),_.textContent=`${t.name}, shown ${ee(t.shownAt)}`,x.textContent=`${n+1} of ${e.length}`,p.disabled=n<=0,m.disabled=n>=e.length-1;for(let[e,n]of P)n.setAttribute(`aria-current`,String(e===t.id));De(P.get(t.id)),He(e,n)}function Q(e){let t=l(c),n=U();if(!n)return;let r=t[t.indexOf(n)+e];r&&$(r.id)}function $(e){I=e,Z()}return E.addEventListener(`click`,()=>{J(`out`)||Y(R.scale/ne,{x:0,y:0})}),O.addEventListener(`click`,()=>{J(`in`)||Y(R.scale*ne,{x:0,y:0})}),D.addEventListener(`click`,()=>{J(`fit`)||q(u)}),f.addEventListener(`pointerdown`,Fe),f.addEventListener(`pointermove`,Ie),f.addEventListener(`pointerup`,X),f.addEventListener(`pointercancel`,X),f.addEventListener(`wheel`,ze,{passive:!1}),f.addEventListener(`dblclick`,e=>{Ce!==`touch`&&Me({x:e.clientX,y:e.clientY})}),f.addEventListener(`gesturestart`,Be),f.addEventListener(`gesturechange`,Ve),p.addEventListener(`click`,()=>Q(-1)),m.addEventListener(`click`,()=>Q(1)),w.addEventListener(`click`,()=>{let e=U();e&&window.open(S(c,e),`_blank`,`noopener`)}),d.addEventListener(`keydown`,e=>{if(e.altKey||e.metaKey||e.ctrlKey||e.shiftKey||e.key===`Escape`&&D.disabled)return;if(e.key===`Escape`){e.preventDefault(),D.click();return}let t={ArrowLeft:-1,ArrowRight:1}[e.key];t!==void 0&&(e.preventDefault(),Q(t))}),{el:d,show(e){I=e,d.hidden=!1,window.addEventListener(`message`,je),Z(),d.contains(document.activeElement)||d.focus({preventScroll:!0})},hide(){d.hidden=!0,L=null,window.removeEventListener(`message`,je);for(let e of f.querySelectorAll(`video`))e.pause()},applyArrivals(){d.hidden?Ee(l(c)):Z()},select:$}}export{E as createShownFace};
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,et as t,t as n,tt as r,xt as i}from"./button-
|
|
1
|
+
import{a as e,et as t,t as n,tt as r,xt as i}from"./button-CeEmJCQe.js";import{b as a,d as o,h as s,n as c,s as l}from"./dom-helpers-Bs-xZEnd.js";import{i as u}from"./action-status-Bbo7Fyia.js";import{_ as d,tt as f}from"./ui-prefs-Dyka19fU.js";import{Cr as p,Sr as m,_r as ee,br as te,vr as h,wr as g,xr as ne,yr as _}from"./index-MrcTP834.js";function v(e){return e.kind===`prompt`||e.kind===`expansion`||e.kind===`thinking`||e.kind===`assistant`||e.kind===`notice`?e.text:e.kind===`tool_result`?e.content:e.kind===`raw`?e.line:e.kind===`tool_call`?JSON.stringify(e.input,null,2)??String(e.input??``):[`${e.vendor} ${e.vendorSessionId}`,e.transcriptPath,e.reason??``].filter(Boolean).join(`
|
|
2
2
|
`)}var y=[{kind:`thinking`,label:`Thinking`},{kind:`tool_result`,label:`Tool result`},{kind:`raw`,label:`Raw`}];function b(e){if(e.startedAt===null)return 0;let t=e.head?.record.ts??e.startedAt;for(let n of e.rows)t=Math.max(t,n.record.ts);return Math.max(0,t-e.startedAt)}function x(e){let{rowCount:n,toolCallCount:r,errorCount:a,resultBytes:o}=e.metrics;return`${`${n} ${n===1?`row`:`rows`}`}, ${`${r} ${r===1?`tool`:`tools`}`}, ${`${a} ${a===1?`error`:`errors`}`}, ${i(o,`KB`)}, ${t(b(e))}`}function re(e){return e.hasSelectionChanged||e.isRenderedTraceStale||!e.hasRenderedOnce}function ie(e,t,n){return e!==0||t?null:n?.startedAt??null}function S(e,t){return C(e,t)?e.filter(e=>e!==t):[...e,t]}function C(e,t){return e.includes(t)}function w(e){return e?`No trace has been recorded for ${e.label}.`:`No sessions are available.`}var T=null,E=null,D=null,O=null,k=[],A=!1,j=d(),M=!1,N=null;function P(){return!!T&&!o(T)}function F(){let{sessionOptions:e,selectedSessionId:t}=p();return e.find(e=>e.id===t)??null}function I(){let e=l(`label`,`trace-session-field`),t=l(`span`,`trace-session-label`,`Session`),n=l(`select`,`trace-session-select`),{sessionOptions:r,selectedSessionId:i}=p();n.disabled=r.length===0;for(let e of r){let t=l(`option`,null,e.label);t.value=e.id,t.selected=e.id===i,n.append(t)}return n.addEventListener(`change`,()=>_(n.value)),e.append(t,n),e}function L(e){e.toggleAttribute(`data-hidden`,C(j,e.dataset.kind??``))}function R(){if(D)for(let e of D.querySelectorAll(`.trace-row`))L(e)}function z(e){if(D)for(let t of D.querySelectorAll(`details`))t.open=e}function B(){let t=l(`div`,`trace-filters`);for(let n of y){let r=e(`trace-filter`,n.label),i=()=>{r.setAttribute(`aria-pressed`,String(!C(j,n.kind)))};i(),r.addEventListener(`click`,()=>{j=S(j,n.kind),f(j),i(),R()}),t.append(r)}return t.append(n({variant:`quiet`,label:`Expand all`,action:`expand-all-trace-rows`,onClick:()=>z(!0)}),n({variant:`quiet`,label:`Collapse all`,action:`collapse-all-trace-rows`,onClick:()=>z(!1)})),t}function V(){let e=c(`trace`,`Session trace`,`Bodies load from the local trace file only when requested.`),t=l(`div`,`trace-controls`),{selectedTrace:n,traceFailureText:r}=p();t.append(I());let i=n?.filePath??``,a=l(`code`,`trace-path`,i);t.append(a);let o=n?ie(n.firstOffset,n.hasDroppedEarliestRows,n.grouping.turns[0]):null;if(o!==null&&t.append(l(`span`,`trace-session-start`,`Started ${new Date(o).toLocaleString()}`)),e.append(t,B()),!r)return e;let s=u(`trace-status`);return s.show(`error`,r),e.append(s.element),e}function H(e){let t=l(`div`,`trace-copy-wrap`),r=l(`span`,`trace-copy-status`);r.setAttribute(`role`,`status`);let i=n({variant:`secondary`,size:`small`,label:`Copy`,action:`copy-trace-body`});return i.addEventListener(`click`,()=>{let t=a(e);t?(t.then(()=>{r.textContent=`Copied`}).catch(()=>{r.textContent=`Copy failed`}),setTimeout(()=>{r.textContent=``},1600)):r.textContent=`Copy failed`}),t.append(i,r),t}function U(){let e=l(`div`,`trace-earlier-wrap`);return e.append(n({variant:`secondary`,label:`Load earlier`,action:`load-earlier-trace`,onClick:()=>h()})),e}function W(e,t,n=``){let i=l(`details`,`trace-row${n?` ${n}`:``}`);i.dataset.kind=e.kind,i.dataset.tone=e.tone,L(i);let a=l(`summary`,`trace-row-summary`);a.append(l(`span`,`trace-offset`,r(t,e.record.ts)),l(`span`,`trace-kind`,e.tag),l(`span`,`trace-row-label`,e.text));for(let t of e.badges){let e=l(`span`,`trace-badge`,t);e.dataset.badge=t,a.append(e)}let o=l(`div`,`trace-row-body`);i.append(a,o);let s=!1;return i.addEventListener(`toggle`,()=>{if(!i.open||s)return;s=!0;let t=v(e.record);o.append(H(t),l(`pre`,`trace-row-pre`,t))}),i}function G(e){return l(`span`,`trace-turn-metrics`,x(e))}function K(e,t){e&&t&&(t.textContent=x(e))}function q(e,t){let n=e.children,i=Math.min(t.rows.length,n.length);for(let e=0;e<i;e+=1){let i=n[e]?.querySelector(`.trace-offset`);i&&(i.textContent=r(t.startedAt,t.rows[e].record.ts))}}function J(e,t,n){let r=W(t,e.startedAt,`trace-turn-head`);return s(r,`.trace-row-summary`).append(n),r}function Y(e){let t=l(`section`,`trace-turn`),n=G(e);if(e.head&&t.append(J(e,e.head,n)),!e.head){let e=l(`h2`,`trace-leading-title`);e.append(l(`span`,`trace-leading-label`,`Before first prompt`),n),t.append(e)}let r=l(`div`,`trace-rows`);for(let t of e.rows)r.append(W(t,e.startedAt));return e.hasTrimmedRows&&t.append(l(`p`,`trace-trimmed`,`Earlier rows trimmed`)),t.append(r),{section:t,rowsElement:r,metricsElement:n}}function ae(e){if(!e)return w(null);let{pendingSessionId:t,selectedTrace:n}=p();return t===e.id&&!n?.hasLoadedOnce?`Loading trace.`:w(e)}function X(){if(!T)return;let e=l(`div`,`trace-content`);E=V(),e.append(E),D=null,O=null,k=[];let t=F(),n=p().selectedTrace?.grouping.turns??[];if(!t||n.length===0){e.append(l(`p`,`trace-empty`,ae(t))),T.replaceChildren(e),A=!1;return}g(m())&&(O=U(),e.append(O));let r=l(`div`,`trace-turns`);for(let e of n){let t=Y(e);k.push(t),r.append(t.section)}D=r,R(),e.append(r),T.replaceChildren(e),A=!1}function Z(){T&&(P()?X():A=!0)}function Q(){if(!E||!P())return;let e=V();E.replaceWith(e),E=e}function oe(e){if(!D)return;let t=p().selectedTrace?.grouping.turns[e.turnIndex];if(!t)return;if(e.isNewTurn){let e=Y(t);k.push(e),D.append(e.section);return}let n=k[e.turnIndex];if(n){for(let r of e.rows)n.rowsElement.append(W(r,t.startedAt));K(t,n.metricsElement)}}function se(e){let t=e.parentElement;t&&!t.querySelector(`.trace-trimmed`)&&t.insertBefore(l(`p`,`trace-trimmed`,`Earlier rows trimmed`),e)}function $(){g(m())?!O&&D?.parentElement&&(O=U(),D.parentElement.insertBefore(O,D)):(O?.remove(),O=null)}function ce(e){if(!(e.droppedTurnCount>0||e.droppedRowCount>0)){$();return}if(k=k.slice(e.droppedTurnCount),D)for(let t=0;t<e.droppedTurnCount;t+=1)D.firstElementChild?.remove();let t=k[0];if(t&&e.droppedRowCount>0){for(let n=0;n<e.droppedRowCount;n+=1)t.rowsElement.firstElementChild?.remove();se(t.rowsElement),K(p().selectedTrace?.grouping.turns[0],t.metricsElement)}e.hasJustDroppedEarliestRows&&Q(),$()}function le(e){if(P()&&!A&&D)for(let t of e)oe(t);else D=null,M=!0}function ue(e){if(!D)return;let t=k[0]??null,n=t?.rowsElement.parentElement??null,r=p().selectedTrace?.grouping.turns[e.newTurns.length]??null;if((e.mergedHead||e.mergedRows.length>0)&&t&&n&&r){let i=t.rowsElement;if(e.mergedHead){n.querySelector(`.trace-leading-title`)?.remove();let a=G(r),o=J(r,e.mergedHead,a);n.insertBefore(o,i),t.metricsElement=a}e.mergedHead||K(r,t.metricsElement);let a=document.createDocumentFragment();for(let t of e.mergedRows)a.append(W(t,r.startedAt));i.prepend(a),q(i,r)}let i=document.createDocumentFragment(),a=[];for(let t of e.newTurns){let e=Y(t);a.push(e),i.append(e.section)}D.prepend(i),k.unshift(...a)}function de(e){let t=P()&&!A&&!!D&&!e.needsRerender,n=T?.parentElement??null;N={canPrependInPlace:t,scrollElement:n,previousScrollHeight:n?.scrollHeight??0,previousScrollTop:n?.scrollTop??0},t&&ue(e)}function fe(e){ce(e),M&&(M=!1,Z());let t=N;N=null,t&&(t.canPrependInPlace||Z(),t.canPrependInPlace&&Q(),t.scrollElement&&(t.scrollElement.scrollTop=t.previousScrollTop+t.scrollElement.scrollHeight-t.previousScrollHeight))}function pe(e){switch(e.kind){case`selection-reset`:A=!0;return;case`rebuild`:Z();return;case`header`:Q();return;case`sessions`:(e.hasSelectionChanged||!E)&&Z(),!e.hasSelectionChanged&&E&&Q();return;case`records-appended`:le(e.appends);return;case`records-prepended`:de(e.prepend);return;case`trimmed`:fe(e.trim);return}}function me(e){T||(T=l(`div`,`trace-panel`),e.append(T),te(P),ne(pe),X())}function he(){T&&re({hasSelectionChanged:ee(),isRenderedTraceStale:A,hasRenderedOnce:!!E})&&X()}var ge={mount:me,refresh:he};export{ge as view};
|
|
Binary file
|