glimmervoid 0.48.1-next.310 → 0.48.1-next.312
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 +1 -1
- package/dist/chunks/{adapters-TE3rN6nc.js → adapters-BVkoLL6w.js} +1 -1
- package/dist/chunks/{adapters-BEvV83qQ.js → adapters-DPJuJmHE.js} +1 -1
- package/dist/chunks/{main-DaTZd6uF.js → main-6jAMotJg.js} +48 -25
- package/dist/client/assets/{benchmark-panel-cExsawtB.js → benchmark-panel-BfpRQo-3.js} +1 -1
- package/dist/client/assets/benchmark-panel-BfpRQo-3.js.br +0 -0
- package/dist/client/assets/{boards-view-CGI9E2Ni.js → boards-view-CF9rV5Vl.js} +1 -1
- package/dist/client/assets/boards-view-CF9rV5Vl.js.br +0 -0
- package/dist/client/assets/{community-panel-CH8WfidE.js → community-panel-B86FunpC.js} +1 -1
- package/dist/client/assets/community-panel-B86FunpC.js.br +0 -0
- package/dist/client/assets/{dialogs-CeKtn3P3.js → dialogs-DAfZR2Oi.js} +1 -1
- package/dist/client/assets/dialogs-DAfZR2Oi.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-CbnXTf9E.js → doc-editor-ui-Bq2snIac.js} +1 -1
- package/dist/client/assets/doc-editor-ui-Bq2snIac.js.br +0 -0
- package/dist/client/assets/{feature-hint-CgGPsctF.js → feature-hint-PNmfFYtI.js} +1 -1
- package/dist/client/assets/feature-hint-PNmfFYtI.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-8H6V3bgd.js → first-run-checklist-CCIrrKvI.js} +1 -1
- package/dist/client/assets/first-run-checklist-CCIrrKvI.js.br +0 -0
- package/dist/client/assets/{hooks-panel-tfaZxRe1.js → hooks-panel-Cjl-k4f6.js} +1 -1
- package/dist/client/assets/hooks-panel-Cjl-k4f6.js.br +0 -0
- package/dist/client/assets/{index-s_PPw0W9.js → index-Dugg1D6h.js} +5 -5
- package/dist/client/assets/index-Dugg1D6h.js.br +0 -0
- package/dist/client/assets/{issues-panel-DweZWohZ.js → issues-panel-CAcyfUZj.js} +1 -1
- package/dist/client/assets/issues-panel-CAcyfUZj.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-DUf3eQra.js → my-prs-panel-BagTz7ui.js} +1 -1
- package/dist/client/assets/my-prs-panel-BagTz7ui.js.br +0 -0
- package/dist/client/assets/{nyan-cat-DuA-Ans6.js → nyan-cat-BDagps-Z.js} +1 -1
- package/dist/client/assets/nyan-cat-BDagps-Z.js.br +0 -0
- package/dist/client/assets/{phone-shell-CX8GjXm1.js → phone-shell-tzF8wJFr.js} +1 -1
- package/dist/client/assets/phone-shell-tzF8wJFr.js.br +0 -0
- package/dist/client/assets/{plan-face-CMuvlpML.js → plan-face-B4RTeU3_.js} +1 -1
- package/dist/client/assets/plan-face-B4RTeU3_.js.br +0 -0
- package/dist/client/assets/{plan-render-CJiDFkN9.js → plan-render-Bny6BHET.js} +1 -1
- package/dist/client/assets/plan-render-Bny6BHET.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-Bw30ahhZ.js → pr-queue-columns-C22_VGII.js} +1 -1
- package/dist/client/assets/pr-queue-columns-C22_VGII.js.br +0 -0
- package/dist/client/assets/{radar-panel-DkqaNs4T.js → radar-panel-lj7RKRNG.js} +1 -1
- package/dist/client/assets/radar-panel-lj7RKRNG.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-DvU5LR3T.js → repo-roots-adder-BFGiiW7U.js} +1 -1
- package/dist/client/assets/repo-roots-adder-BFGiiW7U.js.br +0 -0
- package/dist/client/assets/{resume-dialog-BVWQKAnp.js → resume-dialog-BNizuPl7.js} +1 -1
- package/dist/client/assets/resume-dialog-BNizuPl7.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-DobxfvdC.js → review-queue-panel-BrUA2LFQ.js} +1 -1
- package/dist/client/assets/review-queue-panel-BrUA2LFQ.js.br +0 -0
- package/dist/client/assets/{settings-panel-CT_oMe11.js → settings-panel-BZ82ZuW8.js} +2 -2
- package/dist/client/assets/settings-panel-BZ82ZuW8.js.br +0 -0
- package/dist/client/assets/{shown-lightbox-BYoX4MzK.js → shown-lightbox-B6wyVLc1.js} +1 -1
- package/dist/client/assets/shown-lightbox-B6wyVLc1.js.br +0 -0
- package/dist/client/assets/{team-review-panel-DnS5KABK.js → team-review-panel-DI8KVoHn.js} +1 -1
- package/dist/client/assets/team-review-panel-DI8KVoHn.js.br +0 -0
- package/dist/client/assets/{trace-panel-MptDYU9Y.js → trace-panel-bA2PPHYw.js} +1 -1
- package/dist/client/assets/trace-panel-bA2PPHYw.js.br +0 -0
- package/dist/client/assets/{usage-panel-BImfQ9pQ.js → usage-panel-BUmyCT52.js} +1 -1
- package/dist/client/assets/usage-panel-BUmyCT52.js.br +0 -0
- package/dist/client/assets/{your-day-tip-CbXijRS-.js → your-day-tip-fZ8Uho8P.js} +1 -1
- package/dist/client/assets/your-day-tip-fZ8Uho8P.js.br +0 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/benchmark-panel-cExsawtB.js.br +0 -0
- package/dist/client/assets/boards-view-CGI9E2Ni.js.br +0 -0
- package/dist/client/assets/community-panel-CH8WfidE.js.br +0 -0
- package/dist/client/assets/dialogs-CeKtn3P3.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-CbnXTf9E.js.br +0 -0
- package/dist/client/assets/feature-hint-CgGPsctF.js.br +0 -0
- package/dist/client/assets/first-run-checklist-8H6V3bgd.js.br +0 -0
- package/dist/client/assets/hooks-panel-tfaZxRe1.js.br +0 -0
- package/dist/client/assets/index-s_PPw0W9.js.br +0 -0
- package/dist/client/assets/issues-panel-DweZWohZ.js.br +0 -0
- package/dist/client/assets/my-prs-panel-DUf3eQra.js.br +0 -0
- package/dist/client/assets/nyan-cat-DuA-Ans6.js.br +0 -0
- package/dist/client/assets/phone-shell-CX8GjXm1.js.br +0 -0
- package/dist/client/assets/plan-face-CMuvlpML.js.br +0 -0
- package/dist/client/assets/plan-render-CJiDFkN9.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-Bw30ahhZ.js.br +0 -0
- package/dist/client/assets/radar-panel-DkqaNs4T.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-DvU5LR3T.js.br +0 -0
- package/dist/client/assets/resume-dialog-BVWQKAnp.js.br +0 -0
- package/dist/client/assets/review-queue-panel-DobxfvdC.js.br +0 -0
- package/dist/client/assets/settings-panel-CT_oMe11.js.br +0 -0
- package/dist/client/assets/shown-lightbox-BYoX4MzK.js.br +0 -0
- package/dist/client/assets/team-review-panel-DnS5KABK.js.br +0 -0
- package/dist/client/assets/trace-panel-MptDYU9Y.js.br +0 -0
- package/dist/client/assets/usage-panel-BImfQ9pQ.js.br +0 -0
- package/dist/client/assets/your-day-tip-CbXijRS-.js.br +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{At as e,a as t,c as n,d as r,dt as i,i as a,l as o,o as s,p as c,r as l,st as u}from"./updates-view-core-D9wi2i2r.js";import{A as ee,B as te,F as ne,G as re,H as ie,I as ae,J as oe,K as se,L as d,M as ce,N as le,O as ue,P as de,R as fe,U as pe,V as me,W as he,X as ge,Y as _e,b as ve,j as ye,k as f,q as be,s as p,z as xe}from"./dom-helpers-DBbFg1c_.js";import{d as Se}from"./control-ws-ZZY6O0nz.js";import{$ as Ce,B as we,E as Te,F as Ee,G as De,I as Oe,L as ke,N as Ae,O as je,P as Me,R as Ne,S as Pe,T as Fe,U as Ie,W as Le,_ as Re,a as ze,b as Be,bt as Ve,ft as He,g as Ue,it as We,l as Ge,lt as Ke,nt as qe,o as Je,pt as Ye,vt as Xe,x as Ze,z as Qe}from"./ui-prefs-DfBm2IRm.js";import{b as $e,c as et,d as tt,i as nt,s as rt,t as it}from"./action-status-DN4P3ZYj.js";import{a as at}from"./modal-USMHOKBI.js";import{A as ot,An as st,C as ct,D as lt,Dn as ut,E as dt,En as ft,Fr as pt,Ir as mt,M as m,Mn as ht,N as gt,Nn as _t,O as vt,On as yt,P as bt,S as xt,T as St,Tn as Ct,_ as wt,_i as Tt,ar as Et,b as Dt,f as Ot,g as kt,gi as At,gr as jt,hr as Mt,i as Nt,j as h,jn as Pt,k as Ft,kn as It,m as Lt,mi as Rt,n as zt,nr as Bt,nt as Vt,or as Ht,r as Ut,rr as Wt,t as Gt,tr as Kt,tt as qt,v as Jt,w as Yt,wn as Xt,x as Zt,y as Qt}from"./index-s_PPw0W9.js";import{loadCustomSounds as $t,playAlertSound as en,resolveSoundId as tn,soundOptions as nn}from"./alert-sound-Da6VQFBS.js";import{agentLoginSummary as rn,openAgentConnectDialog as an,openRemoteSetupDialog as on}from"./dialogs-CeKtn3P3.js";import{n as sn,r as cn,t as ln}from"./team-review-settings-core-DMHO8TWI.js";import{n as un,t as dn}from"./nyan-cat-DuA-Ans6.js";function fn(){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=dn(),n=Xe(Je().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=Je();for(let e of Ve){let o=p(`article`,`flying-animal-tile`),s=Tt(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(Je().flyingAnimalsExcludedSprites);l.checked&&t.delete(e.sprite),l.checked||t.add(e.sprite),Me([...t]),kt(Be()),i()}),c.append(l,document.createTextNode(`Include`));let u=p(`button`,`btn-dialog btn-dialog-cancel`,`Fly now`);u.type=`button`,u.setAttribute(`aria-describedby`,t.id),u.addEventListener(`click`,()=>un(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 pn=`johncwaters/glimmervoid`,mn=Object.freeze([`auto`,`calculate`,`display`]);Object.freeze([`codex`,`grok`,`kimi`]),Object.freeze([`dailyUsd`,`monthlyUsd`]);var g={scope:`browser`,access:`editable`,takesEffect:`now`},_={scope:`browser`,access:`advanced`,takesEffect:`now`},v={scope:`machine`,access:`editable`,takesEffect:`now`},hn={scope:`machine`,access:`editable`,takesEffect:`new-sessions`},y={scope:`machine`,access:`readout`,takesEffect:`now`},b={scope:`machine`,access:`file-only`},gn=1e3,_n=60,vn=60,yn=gn*_n,bn=yn*vn,xn={label:`investigations`,storedPerDisplay:1},Sn={label:`sessions`,storedPerDisplay:1},Cn={label:`recurrences`,storedPerDisplay:1},wn={label:`actions`,storedPerDisplay:1},x={label:`seconds`,storedPerDisplay:1},Tn={label:`minutes`,storedPerDisplay:1},En={label:`hours`,storedPerDisplay:1},S={label:`days`,storedPerDisplay:1},Dn={label:`seconds`,storedPerDisplay:gn,storedLabel:`ms`},On={label:`minutes`,storedPerDisplay:yn,storedLabel:`ms`},kn={label:`minutes`,storedPerDisplay:_n,storedLabel:`seconds`},An={label:`hours`,storedPerDisplay:bn,storedLabel:`ms`},jn={label:`hours`,storedPerDisplay:vn,storedLabel:`minutes`},Mn={label:`USD`,storedPerDisplay:1},Nn={label:`users`,storedPerDisplay:1},Pn={label:`times`,storedPerDisplay:1},C=`A tuning knob kept out of the Settings view; the default suits almost every install.`,Fn=`A diagnostic switch kept out of the Settings view; change it in config.json while investigating.`,w=`Changes how the server process or its worktrees behave, so it is set in config.json with a restart or new sessions in mind.`,In=`A structured value with no dashboard control; edit it in config.json.`,Ln=`Never editable from the dashboard by rule; edit it in config.json.`;function Rn(e){return e.map(e=>({value:e,label:e[0].toUpperCase()+e.slice(1)}))}var zn=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.`}}),Bn=Object.freeze([{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`,...g},{id:`session-usage-chips`,path:`pref:sessionUsageChips`,title:`Show usage on session cards`,description:`Shows each card's transcript token count and CLI-reported cost when available, otherwise a calculated API list-price estimate.`,control:`toggle`,keywords:[`usage`,`cost`,`tokens`,`card`,`price`],defaultValue:!1,...g},{id:`phone-arrow-pad`,path:`pref:phoneArrowPad`,title:`Swipe arrow pad on phone (experimental)`,description:`Replace the four arrow keys above the phone keyboard with one pad: swipe on it to send arrow keys, one per short drag.`,control:`toggle`,keywords:[`experimental`,`mobile`,`keys`,`arrows`,`swipe`,`gesture`],defaultValue:!1,...g},{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,...g},{id:`animals-min-gap`,path:`pref:flyingAnimalsMinGapSeconds`,title:`Time between flights: minimum`,description:`Shortest pause between flights.`,control:`number`,integer:!1,step:.1,range:ye,unit:x,maximumSettingId:`animals-max-gap`,keywords:[`animals`,`frequency`],defaultValue:f.flyingAnimalsMinGapSeconds,..._},{id:`animals-max-gap`,path:`pref:flyingAnimalsMaxGapSeconds`,title:`Time between flights: maximum`,description:`Longest pause between flights.`,control:`number`,integer:!1,step:.1,range:ye,unit:x,keywords:[`animals`,`frequency`],defaultValue:f.flyingAnimalsMaxGapSeconds,..._},{id:`animals-min-duration`,path:`pref:flyingAnimalsMinDurationSeconds`,title:`Flight duration: minimum`,description:`Shortest flight, for faster animals.`,control:`number`,integer:!1,step:.1,range:ee,unit:x,maximumSettingId:`animals-max-duration`,keywords:[`animals`,`speed`],defaultValue:f.flyingAnimalsMinDurationSeconds,..._},{id:`animals-max-duration`,path:`pref:flyingAnimalsMaxDurationSeconds`,title:`Flight duration: maximum`,description:`Longest flight, for slower animals.`,control:`number`,integer:!1,step:.1,range:ee,unit:x,keywords:[`animals`,`speed`],defaultValue:f.flyingAnimalsMaxDurationSeconds,..._},{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:ce,unit:Pn,keywords:[`animals`,`size`],defaultValue:f.flyingAnimalsScale,..._},{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:f.flyingAnimalsOnPhone,..._}]},{id:`browser-notifications`,level:`browser`,title:`Notifications`,description:`How this browser, and the Telegram bot shared by every lane, get your attention.`,settings:[{id:`alert-sounds-enabled`,path:`pref:soundEnabled`,title:`Alert sounds`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sounds-enabled`}],description:`Play sounds when a session needs attention and when a merge celebration plays. The same switch as the note button in the desktop header.`,control:`toggle`,keywords:[`audio`,`mute`,`sound`,`notification`],defaultValue:!0,...g},{id:`alert-sound`,path:`pref:soundId`,title:`Alert sound`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sound`}],description:`Sound played when a session needs attention. Your own .ogg, .mp3, .wav, .m4a or .webm files dropped into the sounds folder of the Glimmervoid home (~/.glimmervoid/sounds/, or $GLIMMERVOID_HOME/sounds/) are listed after the built-in sounds. Glimmervoid never creates that folder, so make it yourself; new files show up the next time Settings opens.`,control:`select`,optionsFrom:`sounds`,keywords:[`audio`,`notification`,`custom`],defaultValue:`chime`,...g},{id:`desktop-notifications`,path:`pref:notificationsEnabled`,title:`Desktop notifications`,legacyIds:[{sectionId:`browser-appearance`,settingId:`desktop-notifications`}],description:`Raise a browser notification when a session needs attention while this dashboard is in the background.`,control:`toggle`,keywords:[`browser`,`attention`],defaultValue:!0,...g}]},{id:`machine-telegram`,level:`machine`,parent:`browser-notifications`,title:`Telegram`,description:`One bot shared by session, PR review and PostHog notifications.`,legacyIds:[`telegram`,`notifications`],settings:[{id:`telegram-bot-token`,path:`telegram.botToken`,title:`Bot token`,description:`Credential used by the shared Telegram bot. Create a bot by messaging @BotFather in Telegram and sending /newbot; it replies with this token. When GLIMMERVOID_TELEGRAM_BOT_TOKEN supplies it, this field is read-only.`,control:`password`,keywords:[`credential`,`api`],defaultValue:``,...v},{id:`telegram-chat-id`,path:`telegram.chatId`,title:`Chat id`,description:`Destination chat for enabled Telegram lanes. Send your bot any message, then open https://api.telegram.org/bot<token>/getUpdates in a browser and copy the number under message.chat.id.`,control:`text`,keywords:[`destination`,`channel`],defaultValue:``,...v},{id:`telegram-session-notifications`,path:`telegramNotifications`,title:`Send session notifications`,description:`Send session completion, input and failure alerts when no dashboard is open. Unacknowledged alerts also escalate after the phone escalation delay while a dashboard remains open.`,control:`toggle`,keywords:[`phone`,`off dashboard`,`test`],defaultValue:!1,status:`telegram-delivery`,...v}]},{id:`machine-sessions`,level:`machine`,title:`Sessions`,description:`How sessions start, where projects are found, and what the dashboard shows for them.`,legacyIds:[`machine-general`,`general`,`machine-repositories`,`repos`,`repositories`],settings:[{id:`auto-resume`,path:`autoResume`,title:`Auto-resume sessions on startup`,description:`Resume conversations that were live when Glimmervoid last shut down or crashed, and tell sessions that were mid-turn, or had a background agent, monitor or scheduled wakeup in flight, to continue.`,control:`toggle`,keywords:[`startup`,`conversation`],defaultValue:!0,...v},{id:`tab-order`,path:`viewTabOrder`,title:`Tab order`,description:`The order of the dashboard tabs in every browser: the header on desktop and the More menu on a phone. You can also drag a tab in the desktop header.`,control:`tab-order`,keywords:[`tabs`,`order`,`rearrange`,`reorder`,`header`,`more`,`menu`],defaultValue:[],...v},{id:`remote-sessions`,path:`remoteSessions`,title:`Remote Coder sessions (experimental)`,description:`Offer the Coder environments in config.json when adding a session, so the session runs in its own Coder workspace instead of on this machine. Off refuses new remote sessions; ones already running keep working until closed.`,control:`toggle`,keywords:[`experimental`,`coder`,`remote`,`workspace`,`cloud`],defaultValue:!1,...v},{id:`streamer-mode`,path:`streamerMode`,title:`Streamer mode`,description:`Hide sensitive details in the dashboard while screen sharing or streaming.`,control:`toggle`,keywords:[`streaming`,`screen share`,`privacy`],defaultValue:!1,...v},{id:`repository-roots`,path:`repoRoots`,title:`Repository roots`,description:`Directories scanned for projects when adding sessions.`,control:`list`,keywords:[`folders`,`project discovery`],defaultValue:[],listPlaceholder:`Repository root path`,listEmptyText:`No repository roots configured.`,...v},{id:`custom-agents`,path:`status:custom-agents`,title:`Custom agents`,description:`Extra agent CLIs a session can be spawned with, declared under customAgents in config.json.`,control:`readonly`,keywords:[`adapters`,`cli`],status:`custom-agents`,...y},{id:`agent-logins`,path:`status:agent-logins`,title:`Agent logins`,description:`How Claude Code and Codex sign in inside a Coder workspace. Each uses the login already on this machine; Connect signs one in for Glimmervoid alone when there is none.`,control:`readonly`,keywords:[`claude`,`codex`,`sign in`,`login`,`coder`,`remote`],status:`agent-logins`,...y},{id:`remote-setup`,path:`status:remote-setup`,title:`Remote host setup`,description:`Start a session that walks you through running Glimmervoid on another Linux machine you reach by ssh, as a service you open from your laptop and phone.`,control:`readonly`,keywords:[`remote`,`ssh`,`server`,`devbox`,`tailscale`,`pair`,`host`],status:`remote-setup`,...y}]},{id:`machine-safety`,level:`machine`,title:`Sane YOLO and unattended`,description:`Which risky commands and credential reads Sane YOLO blocks, and which unattended actions automated work may take.`,legacyIds:[`machine-guardrails`,`lanes-unattended`,`unattended`],settings:[{id:`skip-permissions-by-default`,path:`skipPermissionsByDefault`,title:`Skip permission prompts by default`,description:`Start sessions whose project sets no permission choice with the agent CLI permission bypass flag.`,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,...v},{id:`sane-yolo`,path:`saneYolo`,title:`Sane YOLO`,description:`Block catastrophic commands and reads of credentials in every session whose agent supports it, when the cc-safety-net executable is available and trusted hooks are installed. Missing or untrusted hooks leave a session unprotected.`,control:`toggle`,keywords:[`permissions`,`yolo`,`safety`],defaultValue:!0,...hn},{id:`sane-yolo-unreadable-paths`,path:`saneYoloUnreadablePaths`,title:`Unreadable folders`,description:`Extra folders and files Sane YOLO refuses to let an agent read, on top of the built-in credential list. A leading ~ means the home folder.`,control:`list`,keywords:[`guardrails`,`secrets`,`credentials`,`sane yolo`],defaultValue:[],listPlaceholder:`~/folder`,listEmptyText:`Only the built-in credential list is unreadable.`,...hn},{id:`branch-gc-delete-unmerged`,path:`branchGc.deleteUnmerged`,title:`Delete unmerged branches`,description:`Also delete stale remote branches with no merge proof. Off keeps every unmerged branch.`,control:`toggle`,keywords:[`git`,`cleanup`,`orphan`],danger:!0,warning:`Enabling this control lets branch cleanup delete stale remote branches without merge proof.`,defaultValue:!1,...v}]},{id:`machine-updates`,level:`machine`,title:`Updates`,description:`See which Glimmervoid version is running, which one is newest, and update in one step.`,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:`Whether this install is up to date, the running and newest versions, the last check, and the update and restart actions.`,control:`readonly`,keywords:[`version`,`available`,`current`,`check`,`restart`,`commit`,`installed`,`release`,`failure`],status:`update-actions`,...y},{id:`update-channel`,path:`updateChannel`,title:`Channel`,description:`Track stable releases, or Experimental builds published from every change to main before it reaches a release.`,control:`select`,options:Rn(i),keywords:[`release`,`prerelease`,`next`,`beta`,`early`],defaultValue:`release`,...v},{id:`check-updates`,path:`checkForUpdates`,title:`Check for updates automatically`,description:`Check for a newer Glimmervoid at launch, while a dashboard is connected, and when this page opens.`,control:`toggle`,keywords:[`release`,`github`],defaultValue:!0,...v}]},{id:`machine-usage`,level:`machine`,title:`Usage`,description:`Local transcript accounting and estimated-cost budgets.`,legacyIds:[`usage`],settings:[{id:`usage-enabled`,path:`usage.enabled`,title:`Track token usage`,description:`Read local CLI transcripts and roll them into the Usage view and session chips.`,control:`toggle`,keywords:[`tokens`,`cost`],defaultValue:!0,status:`usage-last-report`,...v},{id:`usage-your-day`,path:`usage.yourDay`,title:`Your day`,description:`Recap yesterday and suggest a pace for today from when you prompted sessions. Needs token usage tracking.`,control:`toggle`,keywords:[`burnout`,`breaks`,`pace`,`wellbeing`],defaultValue:!0,...v},{id:`usage-retain-days`,path:`usage.retainDays`,title:`Retain transcript detail`,description:`How long live transcript detail stays available. A monthly budget keeps detail from the start of the current month when that is longer.`,control:`number`,range:be,unit:S,keywords:[`history`,`retention`],defaultValue:90,...v},{id:`usage-daily-budget`,path:`usage.budget.dailyUsd`,title:`Daily budget`,description:`Estimated daily spend alert threshold. Alerts at 50%, 75% and 100% do not stop spending. Zero or below disables the threshold.`,control:`number`,range:re,unit:Mn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...v},{id:`usage-monthly-budget`,path:`usage.budget.monthlyUsd`,title:`Monthly budget`,description:`Estimated monthly spend alert threshold. Alerts at 50%, 75% and 100% do not stop spending. Zero or below disables the threshold.`,control:`number`,range:re,unit:Mn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...v}]},{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:`Poll PostHog error tracking and investigate issues that move.`,control:`toggle`,keywords:[`errors`,`monitoring`],defaultValue:!1,...v},{id:`posthog-host`,path:`posthog.host`,title:`Host`,description:`PostHog cloud or self-hosted HTTP URL.`,control:`text`,keywords:[`url`,`server`],defaultValue:`https://us.posthog.com`,...v},{id:`posthog-api-key`,path:`posthog.apiKey`,title:`Personal API key`,description:`Credential with read access to PostHog projects. When GLIMMERVOID_POSTHOG_API_KEY supplies it, this field is read-only.`,control:`password`,keywords:[`credential`,`token`],defaultValue:``,...v},{id:`posthog-projects`,path:`posthog.projects`,title:`Projects`,description:`PostHog project ids to monitor. config.json holds "all" or an array of ids, and an empty array monitors no project. In Settings that empty array shows as none, and an empty list saves "all".`,control:`list`,keywords:[`project ids`,`filter`],defaultValue:`all`,valueKind:`posthog-projects`,listPlaceholder:`Project id`,listEmptyText:`Every project the key can read.`,...v},{id:`posthog-interval`,path:`posthog.intervalMinutes`,title:`Poll interval`,description:`Delay between PostHog polling passes.`,control:`number`,integer:!1,step:`any`,range:d,unit:Tn,keywords:[`refresh`,`schedule`],defaultValue:15,...v},{id:`posthog-max-investigations`,path:`posthog.maxConcurrentInvestigations`,title:`Max concurrent investigations`,description:`Maximum investigation sessions running together.`,control:`number`,range:d,unit:xn,keywords:[`parallel`,`workers`],defaultValue:2,...v},{id:`posthog-min-users`,path:`posthog.minUsersToInvestigate`,title:`Min users to investigate`,description:`Minimum affected users for a new issue investigation. Regressions, worsening issues and eligible error spikes bypass this minimum.`,control:`number`,range:d,unit:Nn,keywords:[`threshold`,`affected`],defaultValue:1,...v},{id:`posthog-traffic-enabled`,path:`posthog.trafficSpikeEnabled`,title:`Traffic spike alerts`,description:`Ping when recent unique users exceed a project baseline.`,control:`toggle`,keywords:[`analytics`,`alert`],defaultValue:!0,...v},{id:`posthog-auto-fix`,path:`posthog.autoFix`,title:`Attempt fixes for major issues`,description:`Allow an agent to fix an issue onto a local branch; a pull request opens only after you approve it in the Radar tab.`,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,...v}]},{id:`lanes-team-review`,level:`lanes`,title:`Team review`,description:`Draft reviews of teammates' pull requests for you to post from the Reviews tab.`,legacyIds:[`team-review`,`reviews`],settings:[{id:`team-review-enabled`,path:`teamReview.enabled`,title:`Enable team review`,description:`Poll open pull requests from the team and draft a review of each one. Nothing is posted until you choose Approve or Comment.`,control:`toggle`,keywords:[`pull requests`,`github`],defaultValue:!0,...v},{id:`github-teams`,path:`github.teams`,title:`GitHub teams`,description:`Teams to search for review requests and members, one org/slug per entry. Leave empty to fall back to the legacy teamReview.org and teamReview.team keys in config.json.`,control:`list`,keywords:[`github`,`teams`,`review requests`],defaultValue:[],listPlaceholder:`org/team-slug`,listEmptyText:`No GitHub teams configured.`,...v},{id:`team-review-re-review-after-hours`,path:`teamReview.reReviewAfterHours`,title:`Re-review after`,description:`When a reviewed PR has a new head, review it again after this long since its last review. Re-run review runs it at any time.`,control:`number`,range:d,unit:En,keywords:[`review`,`delay`],defaultValue:24,integer:!1,step:.5,...v},{id:`team-review-skip-idle-after-days`,path:`teamReview.skipIdleAfterDays`,title:`Skip PRs idle for`,description:`Leave pull requests without GitHub activity for this long out of automatic review.`,control:`number`,range:d,unit:S,keywords:[`idle`,`activity`],defaultValue:14,integer:!1,step:.5,...v},{id:`team-review-skill`,path:`teamReview.skill`,title:`Review skill`,description:`Skill Claude Code follows for each review, picked from the skills it loads or typed by name. Leave empty for no skill: it reviews with whatever skills it has.`,control:`text`,keywords:[`skill`,`claude code`,`pr review`],defaultValue:``,suggestionsFrom:`review-skills`,...v},{id:`team-review-reviewer-model`,path:`teamReview.reviewer.model`,title:`Review model`,description:`Model the review agent runs. Leave empty to use the agent's own default model.`,control:`text`,keywords:[`model`,`opus`,`sonnet`,`reviewer`],defaultValue:``,suggestionsFrom:`review-models`,...v},{id:`team-review-reviewer-effort`,path:`teamReview.reviewer.effort`,title:`Review effort`,description:`Effort level the review agent runs at. Leave empty to use the agent's own default effort.`,control:`text`,keywords:[`effort`,`thinking`,`reasoning`,`reviewer`],defaultValue:``,suggestionsFrom:`review-efforts`,...v},{id:`team-review-stamp-reviewer-model`,path:`teamReview.stampReviewer.model`,title:`Small PR model`,description:`Model for small pull requests. With both small PR fields empty, small pull requests use the review model and effort above.`,control:`text`,keywords:[`stamp`,`model`,`small pull requests`],defaultValue:``,suggestionsFrom:`review-stamp-models`,...v},{id:`team-review-stamp-reviewer-effort`,path:`teamReview.stampReviewer.effort`,title:`Small PR effort`,description:`Effort for small pull requests. Leave empty to use the model's own default effort.`,control:`text`,keywords:[`stamp`,`effort`,`small pull requests`],defaultValue:``,suggestionsFrom:`review-stamp-efforts`,...v},{id:`team-review-sandbox-load-mcp-servers`,path:`teamReview.sandbox.loadMcpServers`,title:`Load my MCP servers`,description:`Give the Claude Code review agent your own MCP servers instead of none.`,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,...v},{id:`team-review-auto-rebase-my-prs`,path:`teamReview.autoRebaseMyPrs`,title:`Keep my pull requests rebased`,description:`On each poll, rebase your open, non-draft pull requests that are behind their base branch. A pull request with conflicts or checks still running is left alone, and a failed rebase is not retried until you push again.`,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,...v},{id:`team-review-keep-mergeable-enabled`,path:`teamReview.keepMergeableEnabled`,title:`Keep mergeable`,description:`Offer Keep mergeable on your pull requests: a guarded agent repairs conflicts and failing checks and pushes the repair. Off hides the control and starts no repair; the pull requests you chose stay chosen for when you turn it back on.`,control:`toggle`,keywords:[`repair`,`conflicts`,`my prs`],defaultValue:!0,...v},{id:`team-review-keep-mergeable-timeout`,path:`teamReview.keepMergeableTimeoutMinutes`,title:`Keep mergeable deadline`,description:`Longest a Keep mergeable repair session may run before it is stopped and nothing is pushed.`,control:`number`,range:le,unit:Tn,keywords:[`timeout`,`repair`],defaultValue:30,...v},{id:`team-review-merge-queue-enabled`,path:`teamReview.mergeQueueEnabled`,title:`Merge when ready`,description:`Offer Merge when ready on your pull requests: queued pull requests are rebased when behind and merged once ready, one per repository per poll. Off hides the control and merges nothing; the queue is kept for when you turn it back on.`,control:`toggle`,keywords:[`merge queue`,`auto merge`,`my prs`],defaultValue:!0,...v}]},{id:`lanes-workflows`,level:`lanes`,title:`Workflows`,description:`Rules that act on pull request events in the repositories you choose.`,legacyIds:[`workflows`],settings:[{id:`workflows-enabled`,path:`workflows.enabled`,title:`Run workflows`,description:`Poll the repositories your enabled rules watch and run their actions. Off stops polling and every action, whatever each rule says.`,control:`toggle`,keywords:[`pull requests`,`automation`,`master switch`],defaultValue:!0,...v},{id:`workflows-max-concurrent-sessions`,path:`workflows.maxConcurrentSessions`,title:`Concurrent agent sessions`,description:`Most workflow agent sessions running at once. Up to twenty later spawns wait for a free slot; additional spawns are dropped and logged.`,control:`number`,range:ge,unit:Sn,keywords:[`parallel`,`spawn`],defaultValue:2,...v},{id:`workflows-rules`,path:`status:workflow-rules`,title:`Workflow rules`,description:`Each rule watches repositories for one pull request event (opened, checks-failed, review-requested, approved, commented or merged), narrows it by author, labels, base branch, your own pull requests or a review request to your team, and then notifies you, labels or comments on the pull request, or starts a guarded agent session that pushes nothing. Rules start disabled. Turn each rule on or off here; everything else about a rule is set in config.json under workflows.rules.`,control:`readonly`,keywords:[`pull requests`,`automation`,`github`,`rules`],status:`workflows`,...y}]},{id:`lanes-benchmarks`,level:`lanes`,title:`Benchmarks`,description:`Compare agent setups on frozen cases from the suites in the benchmarks folder of the Glimmervoid home.`,legacyIds:[`benchmarks`],settings:[{id:`benchmarks-enabled`,path:`benchmarks.enabled`,title:`Enable benchmarks`,description:`Show the Bench tab. Nothing runs until you choose Mine or Run there.`,control:`toggle`,keywords:[`eval`,`arms`,`recall`,`compare`],defaultValue:!1,...v}]},{id:`lanes-coherence`,level:`lanes`,title:`Coherence (experimental)`,description:`Per-session Coherence hook status and decision journal for agent sessions.`,settings:[{id:`coherence-enabled`,path:`coherence.enabled`,title:`Show session Coherence`,description:`Shows each session's Coherence hook status and decision journal when the repository installed @posthog/coherence 1.8 or newer. Off by default.`,control:`toggle`,keywords:[`experimental`,`coherence`,`journal`,`decisions`],defaultValue:!1,...v}]},{id:`lanes-issues`,level:`lanes`,title:`Issues (experimental)`,description:`GitHub issues from your projects and teams in their own dashboard tab.`,settings:[{id:`issues-enabled`,path:`issues.enabled`,title:`Show the Issues tab`,description:`Poll GitHub issues for your projects and teams and list them in an Issues tab. Off stops the polling and hides the tab.`,control:`toggle`,keywords:[`experimental`,`issues`,`github`,`tab`],defaultValue:!1,...v}]},{id:`lanes-community`,level:`lanes`,title:`Community (experimental)`,description:`New posthog.com community questions researched by your own skill, with a draft reply you post yourself.`,settings:[{id:`community-enabled`,path:`community.enabled`,title:`Show the Community tab`,description:`Poll new community questions through the PostHog key above and research each one in a sandboxed lane. Only questions asked after you turn this on run. Off stops the polling and hides the tab.`,control:`toggle`,keywords:[`experimental`,`community`,`questions`,`forum`,`tab`],defaultValue:!1,...v},{id:`community-skill`,path:`community.skill`,title:`Research skill`,description:`Skill the research agent follows for each question, typed by name. Leave empty for no skill: the agent researches with whatever skills it has.`,control:`text`,keywords:[`skill`,`answering`,`claude code`],defaultValue:``,...v},{id:`community-project-id`,path:`community.projectId`,title:`PostHog project`,description:`PostHog project id that holds the synced community forum table and the Discord bot events.`,control:`number`,integer:!0,range:xe,unit:{label:`project id`,storedPerDisplay:1},keywords:[`project id`,`warehouse`],defaultValue:2,...v},{id:`community-interval`,path:`community.intervalMinutes`,title:`Poll interval`,description:`Delay between community polling passes.`,control:`number`,integer:!0,range:ue,unit:Tn,keywords:[`refresh`,`schedule`],defaultValue:5,...v},{id:`community-discord-channels`,path:`community.discordChannels`,title:`Discord channels`,description:`Discord channels whose new messages and threads are checked, by name without the #. A cheap model picks out the questions; only those are researched. Empty leaves Discord out.`,control:`list`,keywords:[`discord`,`channels`,`allowlist`],defaultValue:[],...v}]},{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,...v}]},{id:`browser-shortcuts`,level:`browser`,title:`Shortcuts`,description:`Keyboard shortcuts and their reference.`,legacyIds:[`shortcuts`],settings:[{id:`next-attention-key`,path:`pref:nextAttentionKeyCode`,title:`Jump to the next session needing you`,description:`The key held with Cmd on a Mac, or Alt elsewhere, that jumps to the next session needing you. Record a new one by pressing the whole shortcut.`,control:`shortcut-key`,keywords:[`shortcut`,`keyboard`,`hotkey`,`jump`,`next`,`attention`],defaultValue:`KeyJ`,...g}]}]),Vn=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:Fn,...b},{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:pe,unit:{label:`KB`,storedPerDisplay:1},keywords:[`history`,`backfill`],defaultValue:512,takesEffect:`new-sessions`,fileOnlyReason:C,...b},{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:de,unit:{label:`MB`,storedPerDisplay:1},keywords:[`memory`,`headroom`],defaultValue:600,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:Fn,...b},{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:Fn,...b},{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:Fn,...b},{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:Fn,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:w,...b},{id:`file-worktree-share`,path:`worktreeShare`,title:`Shared worktree paths`,group:`machine-detection-sessions`,description:`Local paths copied or linked during worktree preparation.`,control:`list`,keywords:[`files`,`context`],defaultValue:[`.env`,`.env.local`,`.claude`],takesEffect:`new-sessions`,fileOnlyReason:Ln,...b},{id:`file-port`,path:`port`,title:`Local port`,group:`machine-detection-sessions`,description:`Port used by the local dashboard listener.`,control:`number`,range:ae,unit:{label:`port`,storedPerDisplay:1},keywords:[`server`,`listener`],defaultValue:3e3,takesEffect:`restart`,fileOnlyReason:Ln,...b},{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:d,unit:Dn,keywords:[`timer`,`alerts`],defaultValue:3e3,takesEffect:`new-sessions`,fileOnlyReason:C,...b},{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:d,unit:On,keywords:[`timer`,`telegram`],defaultValue:3e5,takesEffect:`now`,fileOnlyReason:C,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:d,unit:S,keywords:[`git`,`retention`],defaultValue:14,takesEffect:`now`,fileOnlyReason:C,...b},{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:d,unit:An,keywords:[`git`,`schedule`],defaultValue:216e5,takesEffect:`now`,fileOnlyReason:C,...b},{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:Ln,...b},{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:C,...b},{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:`haiku`,takesEffect:`now`,fileOnlyReason:C,...b},{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:ne,unit:x,keywords:[`title`,`refiner`,`interval`],defaultValue:60,takesEffect:`now`,fileOnlyReason:C,...b},{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:he,unit:x,keywords:[`title`,`refiner`,`deadline`],defaultValue:60,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:C,...b},{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:C,...b},{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:C,...b},{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:C,...b},{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:Tn,keywords:[`poll`,`refresh`],defaultValue:5,takesEffect:`now`,fileOnlyReason:C,...b},{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:se.warehouseRetainDays,unit:S,keywords:[`history`,`warehouse`,`retention`],defaultValue:365,takesEffect:`now`,fileOnlyReason:C,...b},{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:se.sessionBlockHours,unit:En,keywords:[`block`,`window`,`hours`],defaultValue:5,takesEffect:`now`,fileOnlyReason:C,...b},{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:Rn(mn),keywords:[`pricing`,`estimate`],defaultValue:`auto`,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:d,unit:kn,keywords:[`deadline`,`session`],defaultValue:900,takesEffect:`now`,fileOnlyReason:C,...b},{id:`file-posthog-escalation`,path:`posthog.userEscalationThreshold`,title:`Escalation threshold`,group:`lanes-posthog`,description:`Affected-user count that escalates an issue.`,control:`number`,range:d,unit:Nn,keywords:[`threshold`,`severity`],defaultValue:25,takesEffect:`now`,fileOnlyReason:C,...b},{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:fe,unit:kn,keywords:[`deadline`,`repair`],defaultValue:1800,takesEffect:`now`,fileOnlyReason:C,...b},{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:ie,unit:Pn,keywords:[`baseline`,`ratio`],defaultValue:3,takesEffect:`now`,fileOnlyReason:C,...b},{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:me,unit:Nn,keywords:[`threshold`,`analytics`],defaultValue:10,takesEffect:`now`,fileOnlyReason:C,...b},{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:ne,unit:jn,keywords:[`silence`,`delay`],defaultValue:360,takesEffect:`now`,fileOnlyReason:C,...b},{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:te,unit:S,keywords:[`history`,`analytics`],defaultValue:7,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:d,unit:S,keywords:[`recurrence`,`window`],defaultValue:7,takesEffect:`now`,fileOnlyReason:C,...b},{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:d,unit:Cn,keywords:[`recurrence`,`transient`,`limit`],defaultValue:3,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:In,...b},{id:`file-team-review-org`,path:`teamReview.org`,title:`GitHub organization (legacy)`,group:`lanes-team-review`,description:`Organization login that owns the team, for example PostHog. Read only when github.teams is empty.`,control:`text`,keywords:[`github`,`owner`,`legacy`],defaultValue:``,takesEffect:`now`,fileOnlyReason:`A legacy key: github.teams names teams as org/slug entries and wins whenever it is set.`,...b},{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.`,...b},{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:_e,unit:wn,keywords:[`cap`,`rate limit`],defaultValue:20,takesEffect:`now`,fileOnlyReason:C,...b},{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.`,...b}]),Hn=Object.freeze({sections:Bn,fileOnly:Vn}),Un=`experimental`;function Wn(e){return e.keywords.includes(Un)}function Gn(e,t){return t?e:e.flatMap(e=>{let t=e.settings.filter(e=>!Wn(e));return t.length===0&&e.settings.length>0?[]:[{...e,settings:t}]})}var Kn=Object.freeze(Object.fromEntries(Bn.flatMap(e=>(e.legacyIds??[]).map(t=>[t,e.id])))),qn=Object.freeze(Bn.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 Jn(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 Yn(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Xn(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 Zn(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)]=Jn(n)}function T(e){return e.flatMap(e=>e.settings)}function Qn(e){return e.access===`file-only`||e.control===`readonly`}function $n(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 er=6;function E(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):[]:Jn(t)}function tr(e){return e.control===`number`&&(e.unit?.storedPerDisplay??1)!==1}function nr(e){return String(Number(e.toFixed(er)))}function rr(e,t){let n=E(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 D(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 $n(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 Jn(t)}function O(e){return String(e||``).toLowerCase().match(/[a-z0-9]+/g)||[]}var ir=3,ar=2,or=1,sr=3,cr=30,lr=16;function ur(e,t){return e===t?ir:e.startsWith(t)?ar:t.length>=sr&&e.includes(t)?or:0}function k(e,t,n){let r=0;for(let n of t){let t=Math.max(0,...e.map(e=>ur(e,n)));if(t===0)return 0;r+=t}return r*n}function dr(e){return e.options?.map(e=>e.label).join(`, `)??``}function fr(e){return br(e.group??``)?.title??``}function pr(e,t,n){let r=k(O(e.title),n,1e3),i=k(O(e.keywords.join(` `)),n,100),a=k(t,n,10),o=k(O(e.path),n,10),s=k(O(dr(e)),n,10),c=k(O(e.description),n,1);return r+i+a+o+s+c}function mr(e){return e.section?.title??``}function hr(e,t){return Number(e.section===null)-Number(t.section===null)}function gr(e,t,n){return[[`title`,e.title],[`keywords`,e.keywords.join(` `)],[`section`,t?.title??fr(e)],[`description`,e.description],[`path`,e.path],[`options`,dr(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(ur(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 _r(e,t,n=[]){let r=O(t).slice(0,lr);if(r.length===0)return[];let i=[];for(let t of e){let e=O(t.title);for(let n of t.settings){let a=pr(n,e,r);a!==0&&i.push({section:t,setting:n,score:a,matches:gr(n,t,r)})}}for(let e of n){let t=pr(e,O(fr(e)),r);t!==0&&i.push({section:null,setting:e,score:t,matches:gr(e,null,r)})}return i.sort((e,t)=>t.score-e.score||hr(e,t)||mr(e).localeCompare(mr(t))||e.setting.title.localeCompare(t.setting.title)).slice(0,cr)}function vr(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 yr(e){let t=new Map,n=new Map;for(let r of[...T(e.sections),...e.fileOnly])t.set(r.id,r),n.set(r.path,r);return{byId:t,byPath:n}}yr(Hn);function br(e,t=Hn){let n=t.sections.find(t=>t.id===e);return n?{title:n.title,description:n.description}:zn[e]??null}var xr=new WeakMap,Sr=`Configured`,Cr=`•`.repeat(12),wr=`Each line must be a positive whole-number PostHog project id, or the one word none.`,Tr=3,Er=new Set([`customAgents`]),Dr=1e-9,Or=`Lanes`,kr=Object.freeze({now:`Applies now`,"new-sessions":`New sessions`,restart:`After restart`}),Ar=Object.freeze({browser:`This browser`,machine:`This machine`});function jr(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 A(e){return e.control===`password`}function Mr(e){return`${e.path}${Sr}`}function j(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)=>j(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)&&j(e[n],t[n]))}function Nr(e){return xr.get(e)||null}function Pr(e){return Array.isArray(e)?e.map(e=>String(e)):[]}function Fr(e){return e.split(`
|
|
2
|
-
`).map(e=>e.trim()).filter(e=>e!==``)}function Ir(e){let t=e.range;if(!t)return null;let n={min:Number(E(e,t.min))};return t.max!=null&&(n.max=Number(E(e,t.max))),t.exclusiveMin&&(n.exclusiveMin=!0),n}function Lr(e){let t=`Default ${rr(e,e.defaultValue)}`;return tr(e)?`${t}, stored as ${JSON.stringify(e.defaultValue)} ${e.unit?.storedLabel??``}`.trimEnd():t}function Rr(e,t){let n=Lr(e),r=Er.has(e.path)?void 0:Yn(t,e.path);if(r===void 0)return{currentText:null,defaultText:n,jsonFragment:null};let i={};return Zn(i,e.path,r),{currentText:`Current ${rr(e,r)}`,defaultText:n,jsonFragment:JSON.stringify(i,null,2)}}function zr(e,t,n){let r=t??e.find(e=>e.id===n.group);if(!r)return br(n.group??``)?.title??`config.json`;let i=e.find(e=>e.id===r.parent);return i?`${i.title} / ${r.title}`:r.level===`lanes`?`${Or} / ${r.title}`:r.title}function Br(e,t){return e.filter(e=>e.parent===t)}function Vr(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 Hr(e){return e.filter(e=>!e.parent)}function Ur(e){let t=e.filter(e=>e.level===`lanes`);return[{heading:null,sections:e.filter(e=>e.level!==`lanes`)},{heading:Or,sections:t}].filter(e=>e.sections.length>0)}function Wr(e,t,n,r){return r?`hidden`:n.trim()?`search`:t&&Vr(e,t)?`section`:`list`}function Gr(e,t={}){let n={};for(let r of T(e)){if(Qn(r))continue;if(r.path.startsWith(`pref:`)){let e=r.path.slice(5),i=t.prefs?.[e]??t[r.path];n[r.path]=E(r,i??r.defaultValue);continue}if(A(r)){let e=Yn(t,Mr(r))===!0;n[r.path]=e?Cr:``;continue}let e=Yn(t,r.path);n[r.path]=E(r,e??r.defaultValue)}return xr.set(n,Jn(t)),n}function Kr(e,t,n){let r=T(e).filter(e=>Qn(e)||e.path.startsWith(`pref:`)||jr(e,Nr(t)||{})||A(e)&&n[e.path]===Cr?!1:!j(t[e.path],n[e.path]));if(r.length===0)return{};let i=Nr(t)||{},a={},o=new Set;for(let e of r){let[t]=e.path.split(`.`);if(!e.path.includes(`.`))a[t]=D(e,n[e.path]);else{if(!o.has(t)){let e=i[t];a[t]=e&&typeof e==`object`&&!Array.isArray(e)?Jn(e):{},o.add(t)}Zn(a,e.path,D(e,n[e.path]))}}for(let t of T(e))A(t)&&Xn(a,Mr(t));return delete a.secretSources,a}function qr(e,t,n,r){return Si(Kr(e,t,{...t,[n.path]:r}))}function Jr(e){let t=e.unit?.label;return t?` of ${t}`:``}function M(e){let t=Ir(e);if(!t)return`Allowed range is unavailable.`;let n=`${e.integer!==!1&&!tr(e)?`whole number`:`number`}${Jr(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 Yr(e){return`Must be a multiple of ${rr(e,1)}.`}function Xr(e){return Math.abs(e-Math.round(e))<Dr&&Number.isSafeInteger(Math.round(e))}function Zr(e,t){return Number(D({...e,integer:!1,nullable:!1,zeroIsNull:!1},t))}function Qr(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 M(e);let r=Number(t);if(!Number.isFinite(r))return M(e);if(e.zeroIsNull&&r<=0)return null;let i=Zr(e,r);if(e.integer!==!1&&!Xr(i))return tr(e)?Yr(e):M(e);let a=Number(D(e,r));return n.exclusiveMin&&a<=n.min||!n.exclusiveMin&&a<n.min||n.max!=null&&a>n.max?M(e):null}function $r(e,t,n=!1){return n?M(e):Qr(e,t.trim())}function ei(e,t){let n=t.trim();if(e.nullable&&n===``)return null;let r=Number(n);return e.zeroIsNull&&r<=0?null:r}function ti(e){if(e==null||e===``)return``;let t=Number(e);return Number.isFinite(t)?nr(t):String(e)}function ni(e,t){return Array.isArray(t)?e.valueKind===`posthog-projects`&&D(e,t)===null?wr:null:`Must be a list.`}function ri(e,t){let n={};for(let r of T(e)){if(Qn(r))continue;let e=null;r.control===`number`&&(e=Qr(r,t[r.path])),r.control===`list`&&(e=ni(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 ii(T(e),t,n),n}function ii(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(D(r,a))>Number(D(i,o))&&(n[r.id]=`Minimum must not exceed the maximum (${ti(o)}).`,n[i.id]=`Maximum must not be below the minimum (${ti(a)}).`)}}function ai(e,t){return T(e).find(e=>e.id===t.maximumSettingId||e.maximumSettingId===t.id)}function oi(e,t,n){let r=ai(e,t);return ri([{id:`scoped`,level:`machine`,title:``,description:``,settings:r?[t,r]:[t]}],n)[t.id]??null}function si(e,t){return e.control===`number`?ei(e,t):e.control===`list`?Fr(t):t}function ci(e,t){return D(e,e.control===`list`?Pr(t):t)}function li(e){return e?.isDirty===!0}function ui(e,t,n,r,i,a=!1){if(!li(n))return{kind:`unchanged`};let o=t.control===`number`?$r(t,r,a):null;if(o)return{kind:`invalid`,error:o};let s=si(t,r);if(j(D(t,s),ci(t,n.base)))return{kind:`unchanged`};let c=oi(e,t,{...i,[t.path]:s});return c?{kind:`invalid`,error:c}:{kind:`changed`,value:s}}function di(e){return A(e)?``:E(e,e.defaultValue)}function fi(e,t){return j(t,di(e))}function pi(e){return e.presentation?e.presentation:(e.options?.length??0)<=Tr?`segmented`:`select`}function mi(e){return Array.isArray(e)?e.length>0:typeof e==`string`?e.trim()!==``:e===!0}function hi(e,t){return e.danger===!0&&!!e.warning&&mi(t)}function gi(e,t){return hi(e,t)}function _i(e){return e.title.charAt(0).toLowerCase()+e.title.slice(1)}function vi(e){return A(e)?`Reset removes the stored ${_i(e)}. Anything that relies on it stops until a new one is saved.`:gi(e,di(e))?e.warning??``:null}function yi(e){return[e.repos.join(`, `),e.trigger,e.actions.map(e=>e.type).join(`, `)].join(` `)}function bi(t){if(t==null)return[`No rules. Add workflows.rules to config.json.`];let n=e.safeParse(t);return n.success?n.data.rules.length===0?[`No rules. Add workflows.rules to config.json.`]:n.data.rules.map(e=>[e.name,e.enabled?`enabled`:`disabled`,yi(e)].join(` `)):[`The workflows block is invalid, so no rule runs: ${n.error.issues[0]?.message??`unknown problem`}`]}function xi(t){let n=e.safeParse(t??{});return n.success?n.data.rules.map(e=>({id:e.id,name:e.name,isEnabled:e.enabled,summary:yi(e)})):[]}function Si(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 Ci=2200,wi=1600,Ti=15e3,Ei=`https://glimmervoid.dev`,Di=`browser-appearance`,Oi=`flying-animals`,ki=Object.freeze({ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}),Ai=`lanes-features`,ji=Object.freeze({id:Ai,level:`lanes`,title:`Features`,description:`Optional tabs, each hidden until its own toggle is on.`,settings:[]}),Mi=`browser-shortcuts`,Ni=`browser-status-key`,Pi=Object.freeze({id:Ni,level:`browser`,title:`Status key`,description:`What each session status and pull request icon means.`,settings:[]}),Fi=`browser-about`,Ii=Object.freeze({id:Fi,level:`browser`,title:`About`,description:`The running build and where the project lives.`,settings:[]}),Li=`team-review-enabled`,Ri=Object.freeze({sounds:()=>nn(),themes:st});function zi(e){if(!e.optionsFrom)return e;let t=Ri[e.optionsFrom]?.()??[];return{...e,options:t.map(e=>({value:e.id,label:e.label}))}}function Bi(e){return e.isExperimentalBuild===!0}function Vi(){return Gn(Hn.sections,Bi(h()))}function Hi(){let e=Vi().map(e=>({...e,settings:e.settings.map(zi)})),t=e.findIndex(e=>e.id===Mi)+1,n=[...e.slice(0,t),Pi,...e.slice(t)],r=n.findIndex(e=>e.level===`lanes`);return Object.freeze([...n.slice(0,r),ji,...n.slice(r),Ii])}var N=Hi(),Ui=Bi(h()),P=!1,Wi=null,Gi=null,F=null,I=null,L=null,Ki=null,R=null,z=null,B=N[0],V=h(),H={},qi=new Map,Ji=new Map,U=new Map,W=new WeakMap,Yi=Promise.resolve(),Xi=new Map,G=``,Zi=!1,Qi=new Set,K=new Map;function $i(){return{themeId:Re(),flyingAnimalsEnabled:Be(),...ze(),soundEnabled:Te(),soundId:tn(Ue()),notificationsEnabled:Ze(),sessionUsageChips:Fe(),phoneArrowPad:Pe(),nextAttentionKeyCode:Ge()}}function ea(e){H=Gr(N,{...e,prefs:$i()})}function q(e){return U.has(e.id)?U.get(e.id):H[e.path]}function ta(e){return[e,...Br(N,e.id)]}function na(e){return ta(e).flatMap(e=>e.settings)}function ra(e){return N.find(t=>t.settings.some(t=>t.id===e.id))??B}function ia(e,t=null){history.replaceState(history.state,``,Qt(e,t))}function aa(e){requestAnimationFrame(()=>{let t=document.getElementById(e),n=t?.closest(`.settings-view-advanced-panel`);n&&(P=!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 oa(e){e.replaceChildren();for(let t of Ye(Kt,Ht())){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`,`/`)),Bt(t,e)}),r.append(p(`dt`,`shortcut-label`,e.label),t)}n.appendChild(r),e.appendChild(n)}}function sa(e){return ot().find(t=>t.gate!==void 0&&`fromSettings`in t.gate&&t.gate.fromSettings===e)?.label}function ca(e){let t=p(`ul`,`settings-view-stack settings-features`);for(let e of Nt){let n=N.find(t=>t.id===e.sectionId),r=fa(e.settingId),i=sa(Ut[e.rule]);if(!n||!r||!i)continue;let a=q(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),wt(e.sectionId,e.settingId,r.title)),t.appendChild(o)}e.appendChild(t)}function la(e){let t=new URL(e,Ei),{telemetryInstallId:n}=V;return typeof n==`string`&&n&&t.searchParams.set(`gv`,n),t.href}function ua(e,t){let n=p(`a`,`settings-about-link`,e);return n.href=t,n.target=`_blank`,n.rel=`noopener`,n}function da(e){let t=p(`div`,`settings-about`),n=p(`span`,`settings-about-version`,`GLIMMERVOID `);n.appendChild(p(`span`,`settings-about-v`,`v0.48.1-next.310`));let r=p(`span`,`settings-about-links`);r.append(ua(`GitHub`,`https://github.com/${pn}`),ua(`Changelog`,`https://github.com/${pn}/blob/main/CHANGELOG.md`),ua(`Website`,la(`/`))),t.append(n,r),e.appendChild(t)}function fa(e){return N.flatMap(e=>e.settings).find(t=>t.id===e)??null}function pa(e){if(H[`pref:soundEnabled`]===e)return;H[`pref:soundEnabled`]=e;let t=fa(`alert-sounds-enabled`);t&&Q(t)}var ma={"pref:flyingAnimalsMinGapSeconds":e=>Ne(Number(e)),"pref:flyingAnimalsMaxGapSeconds":e=>Oe(Number(e)),"pref:flyingAnimalsMinDurationSeconds":e=>ke(Number(e)),"pref:flyingAnimalsMaxDurationSeconds":e=>Ee(Number(e)),"pref:flyingAnimalsScale":e=>we(Number(e)),"pref:flyingAnimalsOnPhone":e=>Qe(e===!0)};function ha(e,t){if(e.path===`pref:sessionUsageChips`){Ce(t===!0),yt(t===!0);return}if(e.path===`pref:phoneArrowPad`){De(t===!0),ut(t===!0);return}if(e.path===`pref:nextAttentionKeyCode`){Ie(String(t)),Wt(Ge());let e=z?.querySelector(`.settings-view-shortcuts`);e&&oa(e);return}if(e.path===`pref:themeId`){We(String(t)),It(String(t));return}if(e.path===`pref:flyingAnimalsEnabled`){Ae(t===!0),kt(t===!0);return}let n=ma[e.path];n?(n(t),kt(Be())):e.path===`pref:soundEnabled`?qt(t===!0):e.path===`pref:soundId`?(qe(String(t)),en(String(t))):e.path===`pref:notificationsEnabled`&&(Le(t===!0),t===!0&&ht().then(()=>Q(e,{force:!0})))}function J(e,t){let n=Ji.get(e.id);n!==void 0&&clearTimeout(n),Ji.delete(e.id),t&&qi.set(e.id,t),t||qi.delete(e.id),Fo(e)}function ga(e){J(e,{tone:`saved`,text:`Saved`}),Ji.set(e.id,window.setTimeout(()=>J(e,null),Ci))}function _a(e,t){return e.id===Li&&t===!0&&q(e)!==!0&&ln(V.teamReview)}function Y(e,t){Xi.delete(e.id),_a(e,t)?(Q(e,{force:!0}),Ca(e)):e.path.startsWith(`pref:`)?(H[e.path]=t,ha(e,t),Q(e),ga(e)):U.has(e.id)&&JSON.stringify(U.get(e.id))===JSON.stringify(t)||(U.set(e.id,t),J(e,{tone:`saving`,text:`Saving`}),Yi=Yi.then(()=>va(e,t)))}async function va(e,t){let n=qr(N,H,e,t);if(Object.keys(n).length===0)U.delete(e.id),J(e,null),Q(e);else{J(e,{tone:`saving`,text:`Saving`});try{let r=await Se(`update-settings`,{settings:n});if(U.get(e.id)===t&&U.delete(e.id),r.type===`settings-error`){J(e,{tone:`error`,text:String(r.message)}),Q(e,{force:!0});return}if(r.type!==`settings-updated`){J(e,{tone:`error`,text:`The server did not confirm the save.`}),Q(e,{force:!0});return}Zt(r.settings),ga(e)}catch(n){U.get(e.id)===t&&U.delete(e.id),J(e,{tone:`error`,text:n?.message||`Failed to save the setting.`}),Q(e,{force:!0})}}}function ya(e,t){t&&Xi.set(e.id,t),t||Xi.delete(e.id),Fo(e)}function ba(e,t){if(!t.exclusiveMin)return t.min;if(e.integer!==!1)return t.min+1}function xa(e){return e?`On`:`Off`}function Sa(e){let t=p(`div`,`settings-view-toggle-wrap`),n=p(`label`,`settings-view-toggle`),r=p(`input`,`settings-view-checkbox`);r.type=`checkbox`,r.checked=q(e)===!0,e.id===`desktop-notifications`&&!_t()&&(r.checked=!1,r.disabled=!0),r.setAttribute(`aria-labelledby`,e.id);let i=p(`span`,`settings-view-toggle-state`,xa(r.checked));return r.addEventListener(`change`,()=>{let t=r.checked;gi(e,t)?(r.checked=!1,i.textContent=xa(!1),at({title:e.title,message:e.warning??``,confirmLabel:`Turn on`,danger:!0,onConfirm:()=>Y(e,!0)})):(i.textContent=xa(t),Y(e,t))}),n.append(r,i),t.appendChild(n),t}function Ca(e){at({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:()=>{wa(e)}})}async function wa(e){let t=V.teamReview,n={...t&&typeof t==`object`?t:{},enabled:!0,skill:``};J(e,{tone:`saving`,text:`Saving`});try{let t=await Se(`update-settings`,{settings:{teamReview:n}});if(t.type!==`settings-updated`){J(e,{tone:`error`,text:t.type===`settings-error`?String(t.message):`The server did not confirm the save.`});return}Zt(t.settings),ga(e)}catch(t){J(e,{tone:`error`,text:t?.message||`Failed to save the setting.`})}}function Ta(e,t){if(!e.suggestionsFrom)return;let n=sn(V.teamReviewEnvironment);n?.agents.length===0&&Yt();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 Ea(e){let t=p(`div`,`settings-view-shortcut-key`),n=Et(He(`next-attention`,Kt,String(q(e)))),r=p(`button`,`btn-dialog btn-dialog-cancel`,`Record`);r.type=`button`;let i=p(`span`,`settings-view-shortcut-key-prompt`);return i.setAttribute(`role`,`status`),r.addEventListener(`click`,()=>Da(e,t,r,i)),t.append(n,r,i),t}function Da(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=Ke(t,Kt);r.kind!==`ignored`&&(r.kind===`refused`?ya(e,r.reason):(i(),ya(e,null),n.focus(),r.kind===`recorded`&&Y(e,r.keyCode)))};ya(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 Oa(e,t,n){e.addEventListener(`blur`,t),e.addEventListener(`keydown`,e=>{e.key===`Enter`?(e.preventDefault(),t()):e.key===`Escape`&&(e.preventDefault(),n())})}function ka(e){return e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&[`text`,`number`,`password`].includes(e.type)}function Aa(e,t){W.set(t,{base:q(e),isDirty:!1}),t.addEventListener(`input`,()=>{let e=W.get(t);e&&(e.isDirty=!0)})}function X(e,t,n){t.value!==n&&(t.value=n),W.set(t,{base:q(e),isDirty:!1}),ya(e,null)}function ja(e,t,n,r=!1){let i=W.get(t);if(!i)return;let a=ui(N,e,i,t.value,H,r);a.kind===`invalid`?ya(e,a.error):a.kind===`unchanged`?X(e,t,n):gi(e,a.value)?(X(e,t,n),at({title:e.title,message:e.warning??``,confirmLabel:`Save`,danger:!0,onConfirm:()=>Y(e,a.value)})):(W.set(t,{base:a.value,isDirty:!1}),Y(e,a.value))}function Ma(e){let t=p(`input`,`settings-view-input`);t.type=e.control===`password`?`password`:`text`;let n=()=>String(q(e)??``);t.value=n(),e.control===`password`&&(t.value=``,t.placeholder=n()?`Configured`:`Not configured`);let r=jr(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),Ta(e,t),Aa(e,t),Oa(t,()=>{if(e.control===`password`){let n=t.value;if(n===``)return;X(e,t,``),Y(e,n)}else ja(e,t,n())},()=>X(e,t,e.control===`password`?``:n())),t}function Na(e){let t=p(`input`,`settings-view-input`),n=Ir(e);t.type=`number`;let r=()=>ti(q(e));t.value=r(),t.step=e.integer===!1?String(e.step??`any`):`1`;let i=n?ba(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),Aa(e,t),Oa(t,()=>ja(e,t,r(),t.validity.badInput),()=>X(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 Pa(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 Fa(e,t,n){n!==String(q(e))&&(Pa(t,n),Y(e,n),Pa(t,String(q(e))))}function Ia(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=p(`button`,`settings-view-segment`,r.label);n.type=`button`,n.dataset.value=r.value,n.setAttribute(`role`,`radio`),n.addEventListener(`click`,()=>Fa(e,t,r.value)),t.appendChild(n)}return t.addEventListener(`keydown`,r=>{let i=ki[r.key];if(!i||n.length===0)return;r.preventDefault();let a=Math.max(0,n.findIndex(t=>t.value===String(q(e)))),o=n[(a+i+n.length)%n.length];Fa(e,t,o.value),t.querySelector(`[data-value="${CSS.escape(o.value)}"]`)?.focus()}),Pa(t,String(q(e))),t}function La(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(q(e)),t.addEventListener(`change`,()=>Y(e,t.value)),t}function Ra(e,t){let n=e.valueKind===`posthog-projects`?`One project id per line, or none for no project. Shift+Enter adds a line.`:`One entry per line. Shift+Enter adds a line.`;return t.length>0||!e.listEmptyText?n:`${e.listEmptyText} ${n}`}function za(e){let t=p(`textarea`,`settings-view-input settings-view-list-input`),n=()=>Pr(q(e)),r=()=>n().join(`
|
|
1
|
+
import{At as e,a as t,c as n,d as r,dt as i,i as a,l as o,o as s,p as c,r as l,st as u}from"./updates-view-core-D9wi2i2r.js";import{A as ee,B as te,F as ne,G as re,H as ie,I as ae,J as oe,K as se,L as d,M as ce,N as le,O as ue,P as de,R as fe,U as pe,V as me,W as he,X as ge,Y as _e,b as ve,j as ye,k as f,q as be,s as p,z as xe}from"./dom-helpers-DBbFg1c_.js";import{d as Se}from"./control-ws-ZZY6O0nz.js";import{$ as Ce,B as we,E as Te,F as Ee,G as De,I as Oe,L as ke,N as Ae,O as je,P as Me,R as Ne,S as Pe,T as Fe,U as Ie,W as Le,_ as Re,a as ze,b as Be,bt as Ve,ft as He,g as Ue,it as We,l as Ge,lt as Ke,nt as qe,o as Je,pt as Ye,vt as Xe,x as Ze,z as Qe}from"./ui-prefs-DfBm2IRm.js";import{b as $e,c as et,d as tt,i as nt,s as rt,t as it}from"./action-status-DN4P3ZYj.js";import{a as at}from"./modal-USMHOKBI.js";import{A as ot,An as st,C as ct,D as lt,Dn as ut,E as dt,En as ft,Fr as pt,Ir as mt,M as m,Mn as ht,N as gt,Nn as _t,O as vt,On as yt,P as bt,S as xt,T as St,Tn as Ct,_ as wt,_i as Tt,ar as Et,b as Dt,f as Ot,g as kt,gi as At,gr as jt,hr as Mt,i as Nt,j as h,jn as Pt,k as Ft,kn as It,m as Lt,mi as Rt,n as zt,nr as Bt,nt as Vt,or as Ht,r as Ut,rr as Wt,t as Gt,tr as Kt,tt as qt,v as Jt,w as Yt,wn as Xt,x as Zt,y as Qt}from"./index-Dugg1D6h.js";import{loadCustomSounds as $t,playAlertSound as en,resolveSoundId as tn,soundOptions as nn}from"./alert-sound-Da6VQFBS.js";import{agentLoginSummary as rn,openAgentConnectDialog as an,openRemoteSetupDialog as on}from"./dialogs-DAfZR2Oi.js";import{n as sn,r as cn,t as ln}from"./team-review-settings-core-DMHO8TWI.js";import{n as un,t as dn}from"./nyan-cat-BDagps-Z.js";function fn(){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=dn(),n=Xe(Je().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=Je();for(let e of Ve){let o=p(`article`,`flying-animal-tile`),s=Tt(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(Je().flyingAnimalsExcludedSprites);l.checked&&t.delete(e.sprite),l.checked||t.add(e.sprite),Me([...t]),kt(Be()),i()}),c.append(l,document.createTextNode(`Include`));let u=p(`button`,`btn-dialog btn-dialog-cancel`,`Fly now`);u.type=`button`,u.setAttribute(`aria-describedby`,t.id),u.addEventListener(`click`,()=>un(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 pn=`johncwaters/glimmervoid`,mn=Object.freeze([`auto`,`calculate`,`display`]);Object.freeze([`codex`,`grok`,`kimi`]),Object.freeze([`dailyUsd`,`monthlyUsd`]);var g={scope:`browser`,access:`editable`,takesEffect:`now`},_={scope:`browser`,access:`advanced`,takesEffect:`now`},v={scope:`machine`,access:`editable`,takesEffect:`now`},hn={scope:`machine`,access:`editable`,takesEffect:`new-sessions`},y={scope:`machine`,access:`readout`,takesEffect:`now`},b={scope:`machine`,access:`file-only`},gn=1e3,_n=60,vn=60,yn=gn*_n,bn=yn*vn,xn={label:`investigations`,storedPerDisplay:1},Sn={label:`sessions`,storedPerDisplay:1},Cn={label:`recurrences`,storedPerDisplay:1},wn={label:`actions`,storedPerDisplay:1},x={label:`seconds`,storedPerDisplay:1},Tn={label:`minutes`,storedPerDisplay:1},En={label:`hours`,storedPerDisplay:1},S={label:`days`,storedPerDisplay:1},Dn={label:`seconds`,storedPerDisplay:gn,storedLabel:`ms`},On={label:`minutes`,storedPerDisplay:yn,storedLabel:`ms`},kn={label:`minutes`,storedPerDisplay:_n,storedLabel:`seconds`},An={label:`hours`,storedPerDisplay:bn,storedLabel:`ms`},jn={label:`hours`,storedPerDisplay:vn,storedLabel:`minutes`},Mn={label:`USD`,storedPerDisplay:1},Nn={label:`users`,storedPerDisplay:1},Pn={label:`times`,storedPerDisplay:1},C=`A tuning knob kept out of the Settings view; the default suits almost every install.`,Fn=`A diagnostic switch kept out of the Settings view; change it in config.json while investigating.`,w=`Changes how the server process or its worktrees behave, so it is set in config.json with a restart or new sessions in mind.`,In=`A structured value with no dashboard control; edit it in config.json.`,Ln=`Never editable from the dashboard by rule; edit it in config.json.`;function Rn(e){return e.map(e=>({value:e,label:e[0].toUpperCase()+e.slice(1)}))}var zn=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.`}}),Bn=Object.freeze([{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`,...g},{id:`session-usage-chips`,path:`pref:sessionUsageChips`,title:`Show usage on session cards`,description:`Shows each card's transcript token count and CLI-reported cost when available, otherwise a calculated API list-price estimate.`,control:`toggle`,keywords:[`usage`,`cost`,`tokens`,`card`,`price`],defaultValue:!1,...g},{id:`phone-arrow-pad`,path:`pref:phoneArrowPad`,title:`Swipe arrow pad on phone (experimental)`,description:`Replace the four arrow keys above the phone keyboard with one pad: swipe on it to send arrow keys, one per short drag.`,control:`toggle`,keywords:[`experimental`,`mobile`,`keys`,`arrows`,`swipe`,`gesture`],defaultValue:!1,...g},{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,...g},{id:`animals-min-gap`,path:`pref:flyingAnimalsMinGapSeconds`,title:`Time between flights: minimum`,description:`Shortest pause between flights.`,control:`number`,integer:!1,step:.1,range:ye,unit:x,maximumSettingId:`animals-max-gap`,keywords:[`animals`,`frequency`],defaultValue:f.flyingAnimalsMinGapSeconds,..._},{id:`animals-max-gap`,path:`pref:flyingAnimalsMaxGapSeconds`,title:`Time between flights: maximum`,description:`Longest pause between flights.`,control:`number`,integer:!1,step:.1,range:ye,unit:x,keywords:[`animals`,`frequency`],defaultValue:f.flyingAnimalsMaxGapSeconds,..._},{id:`animals-min-duration`,path:`pref:flyingAnimalsMinDurationSeconds`,title:`Flight duration: minimum`,description:`Shortest flight, for faster animals.`,control:`number`,integer:!1,step:.1,range:ee,unit:x,maximumSettingId:`animals-max-duration`,keywords:[`animals`,`speed`],defaultValue:f.flyingAnimalsMinDurationSeconds,..._},{id:`animals-max-duration`,path:`pref:flyingAnimalsMaxDurationSeconds`,title:`Flight duration: maximum`,description:`Longest flight, for slower animals.`,control:`number`,integer:!1,step:.1,range:ee,unit:x,keywords:[`animals`,`speed`],defaultValue:f.flyingAnimalsMaxDurationSeconds,..._},{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:ce,unit:Pn,keywords:[`animals`,`size`],defaultValue:f.flyingAnimalsScale,..._},{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:f.flyingAnimalsOnPhone,..._}]},{id:`browser-notifications`,level:`browser`,title:`Notifications`,description:`How this browser, and the Telegram bot shared by every lane, get your attention.`,settings:[{id:`alert-sounds-enabled`,path:`pref:soundEnabled`,title:`Alert sounds`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sounds-enabled`}],description:`Play sounds when a session needs attention and when a merge celebration plays. The same switch as the note button in the desktop header.`,control:`toggle`,keywords:[`audio`,`mute`,`sound`,`notification`],defaultValue:!0,...g},{id:`alert-sound`,path:`pref:soundId`,title:`Alert sound`,legacyIds:[{sectionId:`browser-appearance`,settingId:`alert-sound`}],description:`Sound played when a session needs attention. Your own .ogg, .mp3, .wav, .m4a or .webm files dropped into the sounds folder of the Glimmervoid home (~/.glimmervoid/sounds/, or $GLIMMERVOID_HOME/sounds/) are listed after the built-in sounds. Glimmervoid never creates that folder, so make it yourself; new files show up the next time Settings opens.`,control:`select`,optionsFrom:`sounds`,keywords:[`audio`,`notification`,`custom`],defaultValue:`chime`,...g},{id:`desktop-notifications`,path:`pref:notificationsEnabled`,title:`Desktop notifications`,legacyIds:[{sectionId:`browser-appearance`,settingId:`desktop-notifications`}],description:`Raise a browser notification when a session needs attention while this dashboard is in the background.`,control:`toggle`,keywords:[`browser`,`attention`],defaultValue:!0,...g}]},{id:`machine-telegram`,level:`machine`,parent:`browser-notifications`,title:`Telegram`,description:`One bot shared by session, PR review and PostHog notifications.`,legacyIds:[`telegram`,`notifications`],settings:[{id:`telegram-bot-token`,path:`telegram.botToken`,title:`Bot token`,description:`Credential used by the shared Telegram bot. Create a bot by messaging @BotFather in Telegram and sending /newbot; it replies with this token. When GLIMMERVOID_TELEGRAM_BOT_TOKEN supplies it, this field is read-only.`,control:`password`,keywords:[`credential`,`api`],defaultValue:``,...v},{id:`telegram-chat-id`,path:`telegram.chatId`,title:`Chat id`,description:`Destination chat for enabled Telegram lanes. Send your bot any message, then open https://api.telegram.org/bot<token>/getUpdates in a browser and copy the number under message.chat.id.`,control:`text`,keywords:[`destination`,`channel`],defaultValue:``,...v},{id:`telegram-session-notifications`,path:`telegramNotifications`,title:`Send session notifications`,description:`Send session completion, input and failure alerts when no dashboard is open. Unacknowledged alerts also escalate after the phone escalation delay while a dashboard remains open.`,control:`toggle`,keywords:[`phone`,`off dashboard`,`test`],defaultValue:!1,status:`telegram-delivery`,...v}]},{id:`machine-sessions`,level:`machine`,title:`Sessions`,description:`How sessions start, where projects are found, and what the dashboard shows for them.`,legacyIds:[`machine-general`,`general`,`machine-repositories`,`repos`,`repositories`],settings:[{id:`auto-resume`,path:`autoResume`,title:`Auto-resume sessions on startup`,description:`Resume conversations that were live when Glimmervoid last shut down or crashed, and tell sessions that were mid-turn, or had a background agent, monitor or scheduled wakeup in flight, to continue.`,control:`toggle`,keywords:[`startup`,`conversation`],defaultValue:!0,...v},{id:`tab-order`,path:`viewTabOrder`,title:`Tab order`,description:`The order of the dashboard tabs in every browser: the header on desktop and the More menu on a phone. You can also drag a tab in the desktop header.`,control:`tab-order`,keywords:[`tabs`,`order`,`rearrange`,`reorder`,`header`,`more`,`menu`],defaultValue:[],...v},{id:`remote-sessions`,path:`remoteSessions`,title:`Remote Coder sessions (experimental)`,description:`Offer the Coder environments in config.json when adding a session, so the session runs in its own Coder workspace instead of on this machine. Off refuses new remote sessions; ones already running keep working until closed.`,control:`toggle`,keywords:[`experimental`,`coder`,`remote`,`workspace`,`cloud`],defaultValue:!1,...v},{id:`streamer-mode`,path:`streamerMode`,title:`Streamer mode`,description:`Hide sensitive details in the dashboard while screen sharing or streaming.`,control:`toggle`,keywords:[`streaming`,`screen share`,`privacy`],defaultValue:!1,...v},{id:`repository-roots`,path:`repoRoots`,title:`Repository roots`,description:`Directories scanned for projects when adding sessions.`,control:`list`,keywords:[`folders`,`project discovery`],defaultValue:[],listPlaceholder:`Repository root path`,listEmptyText:`No repository roots configured.`,...v},{id:`custom-agents`,path:`status:custom-agents`,title:`Custom agents`,description:`Extra agent CLIs a session can be spawned with, declared under customAgents in config.json.`,control:`readonly`,keywords:[`adapters`,`cli`],status:`custom-agents`,...y},{id:`agent-logins`,path:`status:agent-logins`,title:`Agent logins`,description:`How Claude Code and Codex sign in inside a Coder workspace. Each uses the login already on this machine; Connect signs one in for Glimmervoid alone when there is none.`,control:`readonly`,keywords:[`claude`,`codex`,`sign in`,`login`,`coder`,`remote`],status:`agent-logins`,...y},{id:`remote-setup`,path:`status:remote-setup`,title:`Remote host setup`,description:`Start a session that walks you through running Glimmervoid on another Linux machine you reach by ssh, as a service you open from your laptop and phone.`,control:`readonly`,keywords:[`remote`,`ssh`,`server`,`devbox`,`tailscale`,`pair`,`host`],status:`remote-setup`,...y}]},{id:`machine-safety`,level:`machine`,title:`Sane YOLO and unattended`,description:`Which risky commands and credential reads Sane YOLO blocks, and which unattended actions automated work may take.`,legacyIds:[`machine-guardrails`,`lanes-unattended`,`unattended`],settings:[{id:`skip-permissions-by-default`,path:`skipPermissionsByDefault`,title:`Skip permission prompts by default`,description:`Start sessions whose project sets no permission choice with the agent CLI permission bypass flag.`,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,...v},{id:`sane-yolo`,path:`saneYolo`,title:`Sane YOLO`,description:`Block catastrophic commands and reads of credentials in every session whose agent supports it, when the cc-safety-net executable is available and trusted hooks are installed. Missing or untrusted hooks leave a session unprotected.`,control:`toggle`,keywords:[`permissions`,`yolo`,`safety`],defaultValue:!0,...hn},{id:`sane-yolo-unreadable-paths`,path:`saneYoloUnreadablePaths`,title:`Unreadable folders`,description:`Extra folders and files Sane YOLO refuses to let an agent read, on top of the built-in credential list. A leading ~ means the home folder.`,control:`list`,keywords:[`guardrails`,`secrets`,`credentials`,`sane yolo`],defaultValue:[],listPlaceholder:`~/folder`,listEmptyText:`Only the built-in credential list is unreadable.`,...hn},{id:`branch-gc-delete-unmerged`,path:`branchGc.deleteUnmerged`,title:`Delete unmerged branches`,description:`Also delete stale remote branches with no merge proof. Off keeps every unmerged branch.`,control:`toggle`,keywords:[`git`,`cleanup`,`orphan`],danger:!0,warning:`Enabling this control lets branch cleanup delete stale remote branches without merge proof.`,defaultValue:!1,...v}]},{id:`machine-updates`,level:`machine`,title:`Updates`,description:`See which Glimmervoid version is running, which one is newest, and update in one step.`,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:`Whether this install is up to date, the running and newest versions, the last check, and the update and restart actions.`,control:`readonly`,keywords:[`version`,`available`,`current`,`check`,`restart`,`commit`,`installed`,`release`,`failure`],status:`update-actions`,...y},{id:`update-channel`,path:`updateChannel`,title:`Channel`,description:`Track stable releases, or Experimental builds published from every change to main before it reaches a release.`,control:`select`,options:Rn(i),keywords:[`release`,`prerelease`,`next`,`beta`,`early`],defaultValue:`release`,...v},{id:`check-updates`,path:`checkForUpdates`,title:`Check for updates automatically`,description:`Check for a newer Glimmervoid at launch, while a dashboard is connected, and when this page opens.`,control:`toggle`,keywords:[`release`,`github`],defaultValue:!0,...v}]},{id:`machine-usage`,level:`machine`,title:`Usage`,description:`Local transcript accounting and estimated-cost budgets.`,legacyIds:[`usage`],settings:[{id:`usage-enabled`,path:`usage.enabled`,title:`Track token usage`,description:`Read local CLI transcripts and roll them into the Usage view and session chips.`,control:`toggle`,keywords:[`tokens`,`cost`],defaultValue:!0,status:`usage-last-report`,...v},{id:`usage-your-day`,path:`usage.yourDay`,title:`Your day`,description:`Recap yesterday and suggest a pace for today from when you prompted sessions. Needs token usage tracking.`,control:`toggle`,keywords:[`burnout`,`breaks`,`pace`,`wellbeing`],defaultValue:!0,...v},{id:`usage-retain-days`,path:`usage.retainDays`,title:`Retain transcript detail`,description:`How long live transcript detail stays available. A monthly budget keeps detail from the start of the current month when that is longer.`,control:`number`,range:be,unit:S,keywords:[`history`,`retention`],defaultValue:90,...v},{id:`usage-daily-budget`,path:`usage.budget.dailyUsd`,title:`Daily budget`,description:`Estimated daily spend alert threshold. Alerts at 50%, 75% and 100% do not stop spending. Zero or below disables the threshold.`,control:`number`,range:re,unit:Mn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...v},{id:`usage-monthly-budget`,path:`usage.budget.monthlyUsd`,title:`Monthly budget`,description:`Estimated monthly spend alert threshold. Alerts at 50%, 75% and 100% do not stop spending. Zero or below disables the threshold.`,control:`number`,range:re,unit:Mn,keywords:[`spend`,`alert`],defaultValue:null,integer:!1,nullable:!0,zeroIsNull:!0,step:.01,...v}]},{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:`Poll PostHog error tracking and investigate issues that move.`,control:`toggle`,keywords:[`errors`,`monitoring`],defaultValue:!1,...v},{id:`posthog-host`,path:`posthog.host`,title:`Host`,description:`PostHog cloud or self-hosted HTTP URL.`,control:`text`,keywords:[`url`,`server`],defaultValue:`https://us.posthog.com`,...v},{id:`posthog-api-key`,path:`posthog.apiKey`,title:`Personal API key`,description:`Credential with read access to PostHog projects. When GLIMMERVOID_POSTHOG_API_KEY supplies it, this field is read-only.`,control:`password`,keywords:[`credential`,`token`],defaultValue:``,...v},{id:`posthog-projects`,path:`posthog.projects`,title:`Projects`,description:`PostHog project ids to monitor. config.json holds "all" or an array of ids, and an empty array monitors no project. In Settings that empty array shows as none, and an empty list saves "all".`,control:`list`,keywords:[`project ids`,`filter`],defaultValue:`all`,valueKind:`posthog-projects`,listPlaceholder:`Project id`,listEmptyText:`Every project the key can read.`,...v},{id:`posthog-interval`,path:`posthog.intervalMinutes`,title:`Poll interval`,description:`Delay between PostHog polling passes.`,control:`number`,integer:!1,step:`any`,range:d,unit:Tn,keywords:[`refresh`,`schedule`],defaultValue:15,...v},{id:`posthog-max-investigations`,path:`posthog.maxConcurrentInvestigations`,title:`Max concurrent investigations`,description:`Maximum investigation sessions running together.`,control:`number`,range:d,unit:xn,keywords:[`parallel`,`workers`],defaultValue:2,...v},{id:`posthog-min-users`,path:`posthog.minUsersToInvestigate`,title:`Min users to investigate`,description:`Minimum affected users for a new issue investigation. Regressions, worsening issues and eligible error spikes bypass this minimum.`,control:`number`,range:d,unit:Nn,keywords:[`threshold`,`affected`],defaultValue:1,...v},{id:`posthog-traffic-enabled`,path:`posthog.trafficSpikeEnabled`,title:`Traffic spike alerts`,description:`Ping when recent unique users exceed a project baseline.`,control:`toggle`,keywords:[`analytics`,`alert`],defaultValue:!0,...v},{id:`posthog-auto-fix`,path:`posthog.autoFix`,title:`Attempt fixes for major issues`,description:`Allow an agent to fix an issue onto a local branch; a pull request opens only after you approve it in the Radar tab.`,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,...v}]},{id:`lanes-team-review`,level:`lanes`,title:`Team review`,description:`Draft reviews of teammates' pull requests for you to post from the Reviews tab.`,legacyIds:[`team-review`,`reviews`],settings:[{id:`team-review-enabled`,path:`teamReview.enabled`,title:`Enable team review`,description:`Poll open pull requests from the team and draft a review of each one. Nothing is posted until you choose Approve or Comment.`,control:`toggle`,keywords:[`pull requests`,`github`],defaultValue:!0,...v},{id:`github-teams`,path:`github.teams`,title:`GitHub teams`,description:`Teams to search for review requests and members, one org/slug per entry. Leave empty to fall back to the legacy teamReview.org and teamReview.team keys in config.json.`,control:`list`,keywords:[`github`,`teams`,`review requests`],defaultValue:[],listPlaceholder:`org/team-slug`,listEmptyText:`No GitHub teams configured.`,...v},{id:`team-review-re-review-after-hours`,path:`teamReview.reReviewAfterHours`,title:`Re-review after`,description:`When a reviewed PR has a new head, review it again after this long since its last review. Re-run review runs it at any time.`,control:`number`,range:d,unit:En,keywords:[`review`,`delay`],defaultValue:24,integer:!1,step:.5,...v},{id:`team-review-skip-idle-after-days`,path:`teamReview.skipIdleAfterDays`,title:`Skip PRs idle for`,description:`Leave pull requests without GitHub activity for this long out of automatic review.`,control:`number`,range:d,unit:S,keywords:[`idle`,`activity`],defaultValue:14,integer:!1,step:.5,...v},{id:`team-review-skill`,path:`teamReview.skill`,title:`Review skill`,description:`Skill Claude Code follows for each review, picked from the skills it loads or typed by name. Leave empty for no skill: it reviews with whatever skills it has.`,control:`text`,keywords:[`skill`,`claude code`,`pr review`],defaultValue:``,suggestionsFrom:`review-skills`,...v},{id:`team-review-reviewer-model`,path:`teamReview.reviewer.model`,title:`Review model`,description:`Model the review agent runs. Leave empty to use the agent's own default model.`,control:`text`,keywords:[`model`,`opus`,`sonnet`,`reviewer`],defaultValue:``,suggestionsFrom:`review-models`,...v},{id:`team-review-reviewer-effort`,path:`teamReview.reviewer.effort`,title:`Review effort`,description:`Effort level the review agent runs at. Leave empty to use the agent's own default effort.`,control:`text`,keywords:[`effort`,`thinking`,`reasoning`,`reviewer`],defaultValue:``,suggestionsFrom:`review-efforts`,...v},{id:`team-review-stamp-reviewer-model`,path:`teamReview.stampReviewer.model`,title:`Small PR model`,description:`Model for small pull requests. With both small PR fields empty, small pull requests use the review model and effort above.`,control:`text`,keywords:[`stamp`,`model`,`small pull requests`],defaultValue:``,suggestionsFrom:`review-stamp-models`,...v},{id:`team-review-stamp-reviewer-effort`,path:`teamReview.stampReviewer.effort`,title:`Small PR effort`,description:`Effort for small pull requests. Leave empty to use the model's own default effort.`,control:`text`,keywords:[`stamp`,`effort`,`small pull requests`],defaultValue:``,suggestionsFrom:`review-stamp-efforts`,...v},{id:`team-review-sandbox-load-mcp-servers`,path:`teamReview.sandbox.loadMcpServers`,title:`Load my MCP servers`,description:`Give the Claude Code review agent your own MCP servers instead of none.`,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,...v},{id:`team-review-auto-rebase-my-prs`,path:`teamReview.autoRebaseMyPrs`,title:`Keep my pull requests rebased`,description:`On each poll, rebase your open, non-draft pull requests that are behind their base branch. A pull request with conflicts or checks still running is left alone, and a failed rebase is not retried until you push again.`,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,...v},{id:`team-review-keep-mergeable-enabled`,path:`teamReview.keepMergeableEnabled`,title:`Keep mergeable`,description:`Offer Keep mergeable on your pull requests: a guarded agent repairs conflicts and failing checks and pushes the repair. Off hides the control and starts no repair; the pull requests you chose stay chosen for when you turn it back on.`,control:`toggle`,keywords:[`repair`,`conflicts`,`my prs`],defaultValue:!0,...v},{id:`team-review-keep-mergeable-timeout`,path:`teamReview.keepMergeableTimeoutMinutes`,title:`Keep mergeable deadline`,description:`Longest a Keep mergeable repair session may run before it is stopped and nothing is pushed.`,control:`number`,range:le,unit:Tn,keywords:[`timeout`,`repair`],defaultValue:30,...v},{id:`team-review-merge-queue-enabled`,path:`teamReview.mergeQueueEnabled`,title:`Merge when ready`,description:`Offer Merge when ready on your pull requests: queued pull requests are rebased when behind and merged once ready, one per repository per poll. Off hides the control and merges nothing; the queue is kept for when you turn it back on.`,control:`toggle`,keywords:[`merge queue`,`auto merge`,`my prs`],defaultValue:!0,...v}]},{id:`lanes-workflows`,level:`lanes`,title:`Workflows`,description:`Rules that act on pull request events in the repositories you choose.`,legacyIds:[`workflows`],settings:[{id:`workflows-enabled`,path:`workflows.enabled`,title:`Run workflows`,description:`Poll the repositories your enabled rules watch and run their actions. Off stops polling and every action, whatever each rule says.`,control:`toggle`,keywords:[`pull requests`,`automation`,`master switch`],defaultValue:!0,...v},{id:`workflows-max-concurrent-sessions`,path:`workflows.maxConcurrentSessions`,title:`Concurrent agent sessions`,description:`Most workflow agent sessions running at once. Up to twenty later spawns wait for a free slot; additional spawns are dropped and logged.`,control:`number`,range:ge,unit:Sn,keywords:[`parallel`,`spawn`],defaultValue:2,...v},{id:`workflows-rules`,path:`status:workflow-rules`,title:`Workflow rules`,description:`Each rule watches repositories for one pull request event (opened, checks-failed, review-requested, approved, commented or merged), narrows it by author, labels, base branch, your own pull requests or a review request to your team, and then notifies you, labels or comments on the pull request, or starts a guarded agent session that pushes nothing. Rules start disabled. Turn each rule on or off here; everything else about a rule is set in config.json under workflows.rules.`,control:`readonly`,keywords:[`pull requests`,`automation`,`github`,`rules`],status:`workflows`,...y}]},{id:`lanes-benchmarks`,level:`lanes`,title:`Benchmarks`,description:`Compare agent setups on frozen cases from the suites in the benchmarks folder of the Glimmervoid home.`,legacyIds:[`benchmarks`],settings:[{id:`benchmarks-enabled`,path:`benchmarks.enabled`,title:`Enable benchmarks`,description:`Show the Bench tab. Nothing runs until you choose Mine or Run there.`,control:`toggle`,keywords:[`eval`,`arms`,`recall`,`compare`],defaultValue:!1,...v}]},{id:`lanes-coherence`,level:`lanes`,title:`Coherence (experimental)`,description:`Per-session Coherence hook status and decision journal for agent sessions.`,settings:[{id:`coherence-enabled`,path:`coherence.enabled`,title:`Show session Coherence`,description:`Shows each session's Coherence hook status and decision journal when the repository installed @posthog/coherence 1.8 or newer. Off by default.`,control:`toggle`,keywords:[`experimental`,`coherence`,`journal`,`decisions`],defaultValue:!1,...v}]},{id:`lanes-issues`,level:`lanes`,title:`Issues (experimental)`,description:`GitHub issues from your projects and teams in their own dashboard tab.`,settings:[{id:`issues-enabled`,path:`issues.enabled`,title:`Show the Issues tab`,description:`Poll GitHub issues for your projects and teams and list them in an Issues tab. Off stops the polling and hides the tab.`,control:`toggle`,keywords:[`experimental`,`issues`,`github`,`tab`],defaultValue:!1,...v}]},{id:`lanes-community`,level:`lanes`,title:`Community (experimental)`,description:`New posthog.com community questions researched by your own skill, with a draft reply you post yourself.`,settings:[{id:`community-enabled`,path:`community.enabled`,title:`Show the Community tab`,description:`Poll new community questions through the PostHog key above and research each one in a sandboxed lane. Only questions asked after you turn this on run. Off stops the polling and hides the tab.`,control:`toggle`,keywords:[`experimental`,`community`,`questions`,`forum`,`tab`],defaultValue:!1,...v},{id:`community-skill`,path:`community.skill`,title:`Research skill`,description:`Skill the research agent follows for each question, typed by name. Leave empty for no skill: the agent researches with whatever skills it has.`,control:`text`,keywords:[`skill`,`answering`,`claude code`],defaultValue:``,...v},{id:`community-project-id`,path:`community.projectId`,title:`PostHog project`,description:`PostHog project id that holds the synced community forum table and the Discord bot events.`,control:`number`,integer:!0,range:xe,unit:{label:`project id`,storedPerDisplay:1},keywords:[`project id`,`warehouse`],defaultValue:2,...v},{id:`community-interval`,path:`community.intervalMinutes`,title:`Poll interval`,description:`Delay between community polling passes.`,control:`number`,integer:!0,range:ue,unit:Tn,keywords:[`refresh`,`schedule`],defaultValue:5,...v},{id:`community-discord-channels`,path:`community.discordChannels`,title:`Discord channels`,description:`Discord channels whose new messages and threads are checked, by name without the #. A cheap model picks out the questions; only those are researched. Empty leaves Discord out.`,control:`list`,keywords:[`discord`,`channels`,`allowlist`],defaultValue:[],...v}]},{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,...v}]},{id:`browser-shortcuts`,level:`browser`,title:`Shortcuts`,description:`Keyboard shortcuts and their reference.`,legacyIds:[`shortcuts`],settings:[{id:`next-attention-key`,path:`pref:nextAttentionKeyCode`,title:`Jump to the next session needing you`,description:`The key held with Cmd on a Mac, or Alt elsewhere, that jumps to the next session needing you. Record a new one by pressing the whole shortcut.`,control:`shortcut-key`,keywords:[`shortcut`,`keyboard`,`hotkey`,`jump`,`next`,`attention`],defaultValue:`KeyJ`,...g}]}]),Vn=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:Fn,...b},{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:pe,unit:{label:`KB`,storedPerDisplay:1},keywords:[`history`,`backfill`],defaultValue:512,takesEffect:`new-sessions`,fileOnlyReason:C,...b},{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:de,unit:{label:`MB`,storedPerDisplay:1},keywords:[`memory`,`headroom`],defaultValue:600,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:Fn,...b},{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:Fn,...b},{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:Fn,...b},{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:Fn,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:w,...b},{id:`file-worktree-share`,path:`worktreeShare`,title:`Shared worktree paths`,group:`machine-detection-sessions`,description:`Local paths copied or linked during worktree preparation.`,control:`list`,keywords:[`files`,`context`],defaultValue:[`.env`,`.env.local`,`.claude`],takesEffect:`new-sessions`,fileOnlyReason:Ln,...b},{id:`file-port`,path:`port`,title:`Local port`,group:`machine-detection-sessions`,description:`Port used by the local dashboard listener.`,control:`number`,range:ae,unit:{label:`port`,storedPerDisplay:1},keywords:[`server`,`listener`],defaultValue:3e3,takesEffect:`restart`,fileOnlyReason:Ln,...b},{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:d,unit:Dn,keywords:[`timer`,`alerts`],defaultValue:3e3,takesEffect:`new-sessions`,fileOnlyReason:C,...b},{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:d,unit:On,keywords:[`timer`,`telegram`],defaultValue:3e5,takesEffect:`now`,fileOnlyReason:C,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:w,...b},{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:d,unit:S,keywords:[`git`,`retention`],defaultValue:14,takesEffect:`now`,fileOnlyReason:C,...b},{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:d,unit:An,keywords:[`git`,`schedule`],defaultValue:216e5,takesEffect:`now`,fileOnlyReason:C,...b},{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:Ln,...b},{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:C,...b},{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:`haiku`,takesEffect:`now`,fileOnlyReason:C,...b},{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:ne,unit:x,keywords:[`title`,`refiner`,`interval`],defaultValue:60,takesEffect:`now`,fileOnlyReason:C,...b},{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:he,unit:x,keywords:[`title`,`refiner`,`deadline`],defaultValue:60,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:C,...b},{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:C,...b},{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:C,...b},{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:C,...b},{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:Tn,keywords:[`poll`,`refresh`],defaultValue:5,takesEffect:`now`,fileOnlyReason:C,...b},{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:se.warehouseRetainDays,unit:S,keywords:[`history`,`warehouse`,`retention`],defaultValue:365,takesEffect:`now`,fileOnlyReason:C,...b},{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:se.sessionBlockHours,unit:En,keywords:[`block`,`window`,`hours`],defaultValue:5,takesEffect:`now`,fileOnlyReason:C,...b},{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:Rn(mn),keywords:[`pricing`,`estimate`],defaultValue:`auto`,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:d,unit:kn,keywords:[`deadline`,`session`],defaultValue:900,takesEffect:`now`,fileOnlyReason:C,...b},{id:`file-posthog-escalation`,path:`posthog.userEscalationThreshold`,title:`Escalation threshold`,group:`lanes-posthog`,description:`Affected-user count that escalates an issue.`,control:`number`,range:d,unit:Nn,keywords:[`threshold`,`severity`],defaultValue:25,takesEffect:`now`,fileOnlyReason:C,...b},{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:fe,unit:kn,keywords:[`deadline`,`repair`],defaultValue:1800,takesEffect:`now`,fileOnlyReason:C,...b},{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:ie,unit:Pn,keywords:[`baseline`,`ratio`],defaultValue:3,takesEffect:`now`,fileOnlyReason:C,...b},{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:me,unit:Nn,keywords:[`threshold`,`analytics`],defaultValue:10,takesEffect:`now`,fileOnlyReason:C,...b},{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:ne,unit:jn,keywords:[`silence`,`delay`],defaultValue:360,takesEffect:`now`,fileOnlyReason:C,...b},{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:te,unit:S,keywords:[`history`,`analytics`],defaultValue:7,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:d,unit:S,keywords:[`recurrence`,`window`],defaultValue:7,takesEffect:`now`,fileOnlyReason:C,...b},{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:d,unit:Cn,keywords:[`recurrence`,`transient`,`limit`],defaultValue:3,takesEffect:`now`,fileOnlyReason:C,...b},{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:C,...b},{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:In,...b},{id:`file-team-review-org`,path:`teamReview.org`,title:`GitHub organization (legacy)`,group:`lanes-team-review`,description:`Organization login that owns the team, for example PostHog. Read only when github.teams is empty.`,control:`text`,keywords:[`github`,`owner`,`legacy`],defaultValue:``,takesEffect:`now`,fileOnlyReason:`A legacy key: github.teams names teams as org/slug entries and wins whenever it is set.`,...b},{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.`,...b},{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:_e,unit:wn,keywords:[`cap`,`rate limit`],defaultValue:20,takesEffect:`now`,fileOnlyReason:C,...b},{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.`,...b}]),Hn=Object.freeze({sections:Bn,fileOnly:Vn}),Un=`experimental`;function Wn(e){return e.keywords.includes(Un)}function Gn(e,t){return t?e:e.flatMap(e=>{let t=e.settings.filter(e=>!Wn(e));return t.length===0&&e.settings.length>0?[]:[{...e,settings:t}]})}var Kn=Object.freeze(Object.fromEntries(Bn.flatMap(e=>(e.legacyIds??[]).map(t=>[t,e.id])))),qn=Object.freeze(Bn.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 Jn(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 Yn(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Xn(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 Zn(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)]=Jn(n)}function T(e){return e.flatMap(e=>e.settings)}function Qn(e){return e.access===`file-only`||e.control===`readonly`}function $n(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 er=6;function E(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):[]:Jn(t)}function tr(e){return e.control===`number`&&(e.unit?.storedPerDisplay??1)!==1}function nr(e){return String(Number(e.toFixed(er)))}function rr(e,t){let n=E(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 D(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 $n(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 Jn(t)}function O(e){return String(e||``).toLowerCase().match(/[a-z0-9]+/g)||[]}var ir=3,ar=2,or=1,sr=3,cr=30,lr=16;function ur(e,t){return e===t?ir:e.startsWith(t)?ar:t.length>=sr&&e.includes(t)?or:0}function k(e,t,n){let r=0;for(let n of t){let t=Math.max(0,...e.map(e=>ur(e,n)));if(t===0)return 0;r+=t}return r*n}function dr(e){return e.options?.map(e=>e.label).join(`, `)??``}function fr(e){return br(e.group??``)?.title??``}function pr(e,t,n){let r=k(O(e.title),n,1e3),i=k(O(e.keywords.join(` `)),n,100),a=k(t,n,10),o=k(O(e.path),n,10),s=k(O(dr(e)),n,10),c=k(O(e.description),n,1);return r+i+a+o+s+c}function mr(e){return e.section?.title??``}function hr(e,t){return Number(e.section===null)-Number(t.section===null)}function gr(e,t,n){return[[`title`,e.title],[`keywords`,e.keywords.join(` `)],[`section`,t?.title??fr(e)],[`description`,e.description],[`path`,e.path],[`options`,dr(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(ur(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 _r(e,t,n=[]){let r=O(t).slice(0,lr);if(r.length===0)return[];let i=[];for(let t of e){let e=O(t.title);for(let n of t.settings){let a=pr(n,e,r);a!==0&&i.push({section:t,setting:n,score:a,matches:gr(n,t,r)})}}for(let e of n){let t=pr(e,O(fr(e)),r);t!==0&&i.push({section:null,setting:e,score:t,matches:gr(e,null,r)})}return i.sort((e,t)=>t.score-e.score||hr(e,t)||mr(e).localeCompare(mr(t))||e.setting.title.localeCompare(t.setting.title)).slice(0,cr)}function vr(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 yr(e){let t=new Map,n=new Map;for(let r of[...T(e.sections),...e.fileOnly])t.set(r.id,r),n.set(r.path,r);return{byId:t,byPath:n}}yr(Hn);function br(e,t=Hn){let n=t.sections.find(t=>t.id===e);return n?{title:n.title,description:n.description}:zn[e]??null}var xr=new WeakMap,Sr=`Configured`,Cr=`•`.repeat(12),wr=`Each line must be a positive whole-number PostHog project id, or the one word none.`,Tr=3,Er=new Set([`customAgents`]),Dr=1e-9,Or=`Lanes`,kr=Object.freeze({now:`Applies now`,"new-sessions":`New sessions`,restart:`After restart`}),Ar=Object.freeze({browser:`This browser`,machine:`This machine`});function jr(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 A(e){return e.control===`password`}function Mr(e){return`${e.path}${Sr}`}function j(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)=>j(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)&&j(e[n],t[n]))}function Nr(e){return xr.get(e)||null}function Pr(e){return Array.isArray(e)?e.map(e=>String(e)):[]}function Fr(e){return e.split(`
|
|
2
|
+
`).map(e=>e.trim()).filter(e=>e!==``)}function Ir(e){let t=e.range;if(!t)return null;let n={min:Number(E(e,t.min))};return t.max!=null&&(n.max=Number(E(e,t.max))),t.exclusiveMin&&(n.exclusiveMin=!0),n}function Lr(e){let t=`Default ${rr(e,e.defaultValue)}`;return tr(e)?`${t}, stored as ${JSON.stringify(e.defaultValue)} ${e.unit?.storedLabel??``}`.trimEnd():t}function Rr(e,t){let n=Lr(e),r=Er.has(e.path)?void 0:Yn(t,e.path);if(r===void 0)return{currentText:null,defaultText:n,jsonFragment:null};let i={};return Zn(i,e.path,r),{currentText:`Current ${rr(e,r)}`,defaultText:n,jsonFragment:JSON.stringify(i,null,2)}}function zr(e,t,n){let r=t??e.find(e=>e.id===n.group);if(!r)return br(n.group??``)?.title??`config.json`;let i=e.find(e=>e.id===r.parent);return i?`${i.title} / ${r.title}`:r.level===`lanes`?`${Or} / ${r.title}`:r.title}function Br(e,t){return e.filter(e=>e.parent===t)}function Vr(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 Hr(e){return e.filter(e=>!e.parent)}function Ur(e){let t=e.filter(e=>e.level===`lanes`);return[{heading:null,sections:e.filter(e=>e.level!==`lanes`)},{heading:Or,sections:t}].filter(e=>e.sections.length>0)}function Wr(e,t,n,r){return r?`hidden`:n.trim()?`search`:t&&Vr(e,t)?`section`:`list`}function Gr(e,t={}){let n={};for(let r of T(e)){if(Qn(r))continue;if(r.path.startsWith(`pref:`)){let e=r.path.slice(5),i=t.prefs?.[e]??t[r.path];n[r.path]=E(r,i??r.defaultValue);continue}if(A(r)){let e=Yn(t,Mr(r))===!0;n[r.path]=e?Cr:``;continue}let e=Yn(t,r.path);n[r.path]=E(r,e??r.defaultValue)}return xr.set(n,Jn(t)),n}function Kr(e,t,n){let r=T(e).filter(e=>Qn(e)||e.path.startsWith(`pref:`)||jr(e,Nr(t)||{})||A(e)&&n[e.path]===Cr?!1:!j(t[e.path],n[e.path]));if(r.length===0)return{};let i=Nr(t)||{},a={},o=new Set;for(let e of r){let[t]=e.path.split(`.`);if(!e.path.includes(`.`))a[t]=D(e,n[e.path]);else{if(!o.has(t)){let e=i[t];a[t]=e&&typeof e==`object`&&!Array.isArray(e)?Jn(e):{},o.add(t)}Zn(a,e.path,D(e,n[e.path]))}}for(let t of T(e))A(t)&&Xn(a,Mr(t));return delete a.secretSources,a}function qr(e,t,n,r){return Si(Kr(e,t,{...t,[n.path]:r}))}function Jr(e){let t=e.unit?.label;return t?` of ${t}`:``}function M(e){let t=Ir(e);if(!t)return`Allowed range is unavailable.`;let n=`${e.integer!==!1&&!tr(e)?`whole number`:`number`}${Jr(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 Yr(e){return`Must be a multiple of ${rr(e,1)}.`}function Xr(e){return Math.abs(e-Math.round(e))<Dr&&Number.isSafeInteger(Math.round(e))}function Zr(e,t){return Number(D({...e,integer:!1,nullable:!1,zeroIsNull:!1},t))}function Qr(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 M(e);let r=Number(t);if(!Number.isFinite(r))return M(e);if(e.zeroIsNull&&r<=0)return null;let i=Zr(e,r);if(e.integer!==!1&&!Xr(i))return tr(e)?Yr(e):M(e);let a=Number(D(e,r));return n.exclusiveMin&&a<=n.min||!n.exclusiveMin&&a<n.min||n.max!=null&&a>n.max?M(e):null}function $r(e,t,n=!1){return n?M(e):Qr(e,t.trim())}function ei(e,t){let n=t.trim();if(e.nullable&&n===``)return null;let r=Number(n);return e.zeroIsNull&&r<=0?null:r}function ti(e){if(e==null||e===``)return``;let t=Number(e);return Number.isFinite(t)?nr(t):String(e)}function ni(e,t){return Array.isArray(t)?e.valueKind===`posthog-projects`&&D(e,t)===null?wr:null:`Must be a list.`}function ri(e,t){let n={};for(let r of T(e)){if(Qn(r))continue;let e=null;r.control===`number`&&(e=Qr(r,t[r.path])),r.control===`list`&&(e=ni(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 ii(T(e),t,n),n}function ii(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(D(r,a))>Number(D(i,o))&&(n[r.id]=`Minimum must not exceed the maximum (${ti(o)}).`,n[i.id]=`Maximum must not be below the minimum (${ti(a)}).`)}}function ai(e,t){return T(e).find(e=>e.id===t.maximumSettingId||e.maximumSettingId===t.id)}function oi(e,t,n){let r=ai(e,t);return ri([{id:`scoped`,level:`machine`,title:``,description:``,settings:r?[t,r]:[t]}],n)[t.id]??null}function si(e,t){return e.control===`number`?ei(e,t):e.control===`list`?Fr(t):t}function ci(e,t){return D(e,e.control===`list`?Pr(t):t)}function li(e){return e?.isDirty===!0}function ui(e,t,n,r,i,a=!1){if(!li(n))return{kind:`unchanged`};let o=t.control===`number`?$r(t,r,a):null;if(o)return{kind:`invalid`,error:o};let s=si(t,r);if(j(D(t,s),ci(t,n.base)))return{kind:`unchanged`};let c=oi(e,t,{...i,[t.path]:s});return c?{kind:`invalid`,error:c}:{kind:`changed`,value:s}}function di(e){return A(e)?``:E(e,e.defaultValue)}function fi(e,t){return j(t,di(e))}function pi(e){return e.presentation?e.presentation:(e.options?.length??0)<=Tr?`segmented`:`select`}function mi(e){return Array.isArray(e)?e.length>0:typeof e==`string`?e.trim()!==``:e===!0}function hi(e,t){return e.danger===!0&&!!e.warning&&mi(t)}function gi(e,t){return hi(e,t)}function _i(e){return e.title.charAt(0).toLowerCase()+e.title.slice(1)}function vi(e){return A(e)?`Reset removes the stored ${_i(e)}. Anything that relies on it stops until a new one is saved.`:gi(e,di(e))?e.warning??``:null}function yi(e){return[e.repos.join(`, `),e.trigger,e.actions.map(e=>e.type).join(`, `)].join(` `)}function bi(t){if(t==null)return[`No rules. Add workflows.rules to config.json.`];let n=e.safeParse(t);return n.success?n.data.rules.length===0?[`No rules. Add workflows.rules to config.json.`]:n.data.rules.map(e=>[e.name,e.enabled?`enabled`:`disabled`,yi(e)].join(` `)):[`The workflows block is invalid, so no rule runs: ${n.error.issues[0]?.message??`unknown problem`}`]}function xi(t){let n=e.safeParse(t??{});return n.success?n.data.rules.map(e=>({id:e.id,name:e.name,isEnabled:e.enabled,summary:yi(e)})):[]}function Si(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 Ci=2200,wi=1600,Ti=15e3,Ei=`https://glimmervoid.dev`,Di=`browser-appearance`,Oi=`flying-animals`,ki=Object.freeze({ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}),Ai=`lanes-features`,ji=Object.freeze({id:Ai,level:`lanes`,title:`Features`,description:`Optional tabs, each hidden until its own toggle is on.`,settings:[]}),Mi=`browser-shortcuts`,Ni=`browser-status-key`,Pi=Object.freeze({id:Ni,level:`browser`,title:`Status key`,description:`What each session status and pull request icon means.`,settings:[]}),Fi=`browser-about`,Ii=Object.freeze({id:Fi,level:`browser`,title:`About`,description:`The running build and where the project lives.`,settings:[]}),Li=`team-review-enabled`,Ri=Object.freeze({sounds:()=>nn(),themes:st});function zi(e){if(!e.optionsFrom)return e;let t=Ri[e.optionsFrom]?.()??[];return{...e,options:t.map(e=>({value:e.id,label:e.label}))}}function Bi(e){return e.isExperimentalBuild===!0}function Vi(){return Gn(Hn.sections,Bi(h()))}function Hi(){let e=Vi().map(e=>({...e,settings:e.settings.map(zi)})),t=e.findIndex(e=>e.id===Mi)+1,n=[...e.slice(0,t),Pi,...e.slice(t)],r=n.findIndex(e=>e.level===`lanes`);return Object.freeze([...n.slice(0,r),ji,...n.slice(r),Ii])}var N=Hi(),Ui=Bi(h()),P=!1,Wi=null,Gi=null,F=null,I=null,L=null,Ki=null,R=null,z=null,B=N[0],V=h(),H={},qi=new Map,Ji=new Map,U=new Map,W=new WeakMap,Yi=Promise.resolve(),Xi=new Map,G=``,Zi=!1,Qi=new Set,K=new Map;function $i(){return{themeId:Re(),flyingAnimalsEnabled:Be(),...ze(),soundEnabled:Te(),soundId:tn(Ue()),notificationsEnabled:Ze(),sessionUsageChips:Fe(),phoneArrowPad:Pe(),nextAttentionKeyCode:Ge()}}function ea(e){H=Gr(N,{...e,prefs:$i()})}function q(e){return U.has(e.id)?U.get(e.id):H[e.path]}function ta(e){return[e,...Br(N,e.id)]}function na(e){return ta(e).flatMap(e=>e.settings)}function ra(e){return N.find(t=>t.settings.some(t=>t.id===e.id))??B}function ia(e,t=null){history.replaceState(history.state,``,Qt(e,t))}function aa(e){requestAnimationFrame(()=>{let t=document.getElementById(e),n=t?.closest(`.settings-view-advanced-panel`);n&&(P=!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 oa(e){e.replaceChildren();for(let t of Ye(Kt,Ht())){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`,`/`)),Bt(t,e)}),r.append(p(`dt`,`shortcut-label`,e.label),t)}n.appendChild(r),e.appendChild(n)}}function sa(e){return ot().find(t=>t.gate!==void 0&&`fromSettings`in t.gate&&t.gate.fromSettings===e)?.label}function ca(e){let t=p(`ul`,`settings-view-stack settings-features`);for(let e of Nt){let n=N.find(t=>t.id===e.sectionId),r=fa(e.settingId),i=sa(Ut[e.rule]);if(!n||!r||!i)continue;let a=q(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),wt(e.sectionId,e.settingId,r.title)),t.appendChild(o)}e.appendChild(t)}function la(e){let t=new URL(e,Ei),{telemetryInstallId:n}=V;return typeof n==`string`&&n&&t.searchParams.set(`gv`,n),t.href}function ua(e,t){let n=p(`a`,`settings-about-link`,e);return n.href=t,n.target=`_blank`,n.rel=`noopener`,n}function da(e){let t=p(`div`,`settings-about`),n=p(`span`,`settings-about-version`,`GLIMMERVOID `);n.appendChild(p(`span`,`settings-about-v`,`v0.48.1-next.312`));let r=p(`span`,`settings-about-links`);r.append(ua(`GitHub`,`https://github.com/${pn}`),ua(`Changelog`,`https://github.com/${pn}/blob/main/CHANGELOG.md`),ua(`Website`,la(`/`))),t.append(n,r),e.appendChild(t)}function fa(e){return N.flatMap(e=>e.settings).find(t=>t.id===e)??null}function pa(e){if(H[`pref:soundEnabled`]===e)return;H[`pref:soundEnabled`]=e;let t=fa(`alert-sounds-enabled`);t&&Q(t)}var ma={"pref:flyingAnimalsMinGapSeconds":e=>Ne(Number(e)),"pref:flyingAnimalsMaxGapSeconds":e=>Oe(Number(e)),"pref:flyingAnimalsMinDurationSeconds":e=>ke(Number(e)),"pref:flyingAnimalsMaxDurationSeconds":e=>Ee(Number(e)),"pref:flyingAnimalsScale":e=>we(Number(e)),"pref:flyingAnimalsOnPhone":e=>Qe(e===!0)};function ha(e,t){if(e.path===`pref:sessionUsageChips`){Ce(t===!0),yt(t===!0);return}if(e.path===`pref:phoneArrowPad`){De(t===!0),ut(t===!0);return}if(e.path===`pref:nextAttentionKeyCode`){Ie(String(t)),Wt(Ge());let e=z?.querySelector(`.settings-view-shortcuts`);e&&oa(e);return}if(e.path===`pref:themeId`){We(String(t)),It(String(t));return}if(e.path===`pref:flyingAnimalsEnabled`){Ae(t===!0),kt(t===!0);return}let n=ma[e.path];n?(n(t),kt(Be())):e.path===`pref:soundEnabled`?qt(t===!0):e.path===`pref:soundId`?(qe(String(t)),en(String(t))):e.path===`pref:notificationsEnabled`&&(Le(t===!0),t===!0&&ht().then(()=>Q(e,{force:!0})))}function J(e,t){let n=Ji.get(e.id);n!==void 0&&clearTimeout(n),Ji.delete(e.id),t&&qi.set(e.id,t),t||qi.delete(e.id),Fo(e)}function ga(e){J(e,{tone:`saved`,text:`Saved`}),Ji.set(e.id,window.setTimeout(()=>J(e,null),Ci))}function _a(e,t){return e.id===Li&&t===!0&&q(e)!==!0&&ln(V.teamReview)}function Y(e,t){Xi.delete(e.id),_a(e,t)?(Q(e,{force:!0}),Ca(e)):e.path.startsWith(`pref:`)?(H[e.path]=t,ha(e,t),Q(e),ga(e)):U.has(e.id)&&JSON.stringify(U.get(e.id))===JSON.stringify(t)||(U.set(e.id,t),J(e,{tone:`saving`,text:`Saving`}),Yi=Yi.then(()=>va(e,t)))}async function va(e,t){let n=qr(N,H,e,t);if(Object.keys(n).length===0)U.delete(e.id),J(e,null),Q(e);else{J(e,{tone:`saving`,text:`Saving`});try{let r=await Se(`update-settings`,{settings:n});if(U.get(e.id)===t&&U.delete(e.id),r.type===`settings-error`){J(e,{tone:`error`,text:String(r.message)}),Q(e,{force:!0});return}if(r.type!==`settings-updated`){J(e,{tone:`error`,text:`The server did not confirm the save.`}),Q(e,{force:!0});return}Zt(r.settings),ga(e)}catch(n){U.get(e.id)===t&&U.delete(e.id),J(e,{tone:`error`,text:n?.message||`Failed to save the setting.`}),Q(e,{force:!0})}}}function ya(e,t){t&&Xi.set(e.id,t),t||Xi.delete(e.id),Fo(e)}function ba(e,t){if(!t.exclusiveMin)return t.min;if(e.integer!==!1)return t.min+1}function xa(e){return e?`On`:`Off`}function Sa(e){let t=p(`div`,`settings-view-toggle-wrap`),n=p(`label`,`settings-view-toggle`),r=p(`input`,`settings-view-checkbox`);r.type=`checkbox`,r.checked=q(e)===!0,e.id===`desktop-notifications`&&!_t()&&(r.checked=!1,r.disabled=!0),r.setAttribute(`aria-labelledby`,e.id);let i=p(`span`,`settings-view-toggle-state`,xa(r.checked));return r.addEventListener(`change`,()=>{let t=r.checked;gi(e,t)?(r.checked=!1,i.textContent=xa(!1),at({title:e.title,message:e.warning??``,confirmLabel:`Turn on`,danger:!0,onConfirm:()=>Y(e,!0)})):(i.textContent=xa(t),Y(e,t))}),n.append(r,i),t.appendChild(n),t}function Ca(e){at({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:()=>{wa(e)}})}async function wa(e){let t=V.teamReview,n={...t&&typeof t==`object`?t:{},enabled:!0,skill:``};J(e,{tone:`saving`,text:`Saving`});try{let t=await Se(`update-settings`,{settings:{teamReview:n}});if(t.type!==`settings-updated`){J(e,{tone:`error`,text:t.type===`settings-error`?String(t.message):`The server did not confirm the save.`});return}Zt(t.settings),ga(e)}catch(t){J(e,{tone:`error`,text:t?.message||`Failed to save the setting.`})}}function Ta(e,t){if(!e.suggestionsFrom)return;let n=sn(V.teamReviewEnvironment);n?.agents.length===0&&Yt();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 Ea(e){let t=p(`div`,`settings-view-shortcut-key`),n=Et(He(`next-attention`,Kt,String(q(e)))),r=p(`button`,`btn-dialog btn-dialog-cancel`,`Record`);r.type=`button`;let i=p(`span`,`settings-view-shortcut-key-prompt`);return i.setAttribute(`role`,`status`),r.addEventListener(`click`,()=>Da(e,t,r,i)),t.append(n,r,i),t}function Da(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=Ke(t,Kt);r.kind!==`ignored`&&(r.kind===`refused`?ya(e,r.reason):(i(),ya(e,null),n.focus(),r.kind===`recorded`&&Y(e,r.keyCode)))};ya(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 Oa(e,t,n){e.addEventListener(`blur`,t),e.addEventListener(`keydown`,e=>{e.key===`Enter`?(e.preventDefault(),t()):e.key===`Escape`&&(e.preventDefault(),n())})}function ka(e){return e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&[`text`,`number`,`password`].includes(e.type)}function Aa(e,t){W.set(t,{base:q(e),isDirty:!1}),t.addEventListener(`input`,()=>{let e=W.get(t);e&&(e.isDirty=!0)})}function X(e,t,n){t.value!==n&&(t.value=n),W.set(t,{base:q(e),isDirty:!1}),ya(e,null)}function ja(e,t,n,r=!1){let i=W.get(t);if(!i)return;let a=ui(N,e,i,t.value,H,r);a.kind===`invalid`?ya(e,a.error):a.kind===`unchanged`?X(e,t,n):gi(e,a.value)?(X(e,t,n),at({title:e.title,message:e.warning??``,confirmLabel:`Save`,danger:!0,onConfirm:()=>Y(e,a.value)})):(W.set(t,{base:a.value,isDirty:!1}),Y(e,a.value))}function Ma(e){let t=p(`input`,`settings-view-input`);t.type=e.control===`password`?`password`:`text`;let n=()=>String(q(e)??``);t.value=n(),e.control===`password`&&(t.value=``,t.placeholder=n()?`Configured`:`Not configured`);let r=jr(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),Ta(e,t),Aa(e,t),Oa(t,()=>{if(e.control===`password`){let n=t.value;if(n===``)return;X(e,t,``),Y(e,n)}else ja(e,t,n())},()=>X(e,t,e.control===`password`?``:n())),t}function Na(e){let t=p(`input`,`settings-view-input`),n=Ir(e);t.type=`number`;let r=()=>ti(q(e));t.value=r(),t.step=e.integer===!1?String(e.step??`any`):`1`;let i=n?ba(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),Aa(e,t),Oa(t,()=>ja(e,t,r(),t.validity.badInput),()=>X(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 Pa(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 Fa(e,t,n){n!==String(q(e))&&(Pa(t,n),Y(e,n),Pa(t,String(q(e))))}function Ia(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=p(`button`,`settings-view-segment`,r.label);n.type=`button`,n.dataset.value=r.value,n.setAttribute(`role`,`radio`),n.addEventListener(`click`,()=>Fa(e,t,r.value)),t.appendChild(n)}return t.addEventListener(`keydown`,r=>{let i=ki[r.key];if(!i||n.length===0)return;r.preventDefault();let a=Math.max(0,n.findIndex(t=>t.value===String(q(e)))),o=n[(a+i+n.length)%n.length];Fa(e,t,o.value),t.querySelector(`[data-value="${CSS.escape(o.value)}"]`)?.focus()}),Pa(t,String(q(e))),t}function La(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(q(e)),t.addEventListener(`change`,()=>Y(e,t.value)),t}function Ra(e,t){let n=e.valueKind===`posthog-projects`?`One project id per line, or none for no project. Shift+Enter adds a line.`:`One entry per line. Shift+Enter adds a line.`;return t.length>0||!e.listEmptyText?n:`${e.listEmptyText} ${n}`}function za(e){let t=p(`textarea`,`settings-view-input settings-view-list-input`),n=()=>Pr(q(e)),r=()=>n().join(`
|
|
3
3
|
`);t.rows=3,t.value=r(),t.autocomplete=`off`,t.spellcheck=!1,t.placeholder=e.listPlaceholder??``,t.setAttribute(`aria-labelledby`,e.id),Aa(e,t),t.addEventListener(`blur`,()=>ja(e,t,r())),t.addEventListener(`keydown`,n=>{n.key===`Escape`?(n.preventDefault(),X(e,t,r())):n.key!==`Enter`||n.shiftKey||(n.preventDefault(),ja(e,t,r()))});let i=p(`div`,`settings-view-list`);return i.append(t,p(`span`,`settings-view-list-hint`,Ra(e,n()))),i}var Ba=null;function Va(e){let t=zt(ot().map(e=>e.view),Pr(q(e))),n=p(`ol`,`settings-view-tab-order`);n.setAttribute(`aria-labelledby`,e.id);for(let[r,i]of t.entries()){let a=ot().find(e=>e.view===i)?.label??i,o=p(`li`,`settings-view-tab-order-item`);o.append(p(`span`,`settings-view-tab-order-label`,a),Ha(e,t,i,r-1,`Move up`,`Move ${a} up`),Ha(e,t,i,r+1,`Move down`,`Move ${a} down`)),n.append(o)}return n}function Ha(e,t,n,r,i,a){let o=`${n}:${i}`,s=p(`button`,`btn-dialog btn-dialog-cancel`,i);return s.type=`button`,s.setAttribute(`aria-label`,a),s.disabled=r<0||r>=t.length,o===Ba&&(s.dataset.restoresFocus=`true`),s.addEventListener(`click`,()=>{Ba=o,Y(e,Gt(t,n,r))}),s}function Ua(e,t,{isPrimary:n=!1,isEnabled:r=!0}={}){let i=p(`button`,`btn-dialog ${n?`btn-dialog-confirm`:`btn-dialog-cancel`} settings-update-button`,e);return i.type=`button`,i.disabled=!r,i.addEventListener(`click`,t),i}function Wa(e){let t=p(`span`,`settings-update-action-status`,e??``);return t.setAttribute(`role`,`status`),t}function Ga(){let{isCheckInFlight:e,checkSendFailure:t}=m();return e?`Checking for updates.`:t}function Ka(){let{status:e,lastAutoCheckAt:t}=m();e?(Zi=!1,n({status:e,checkForUpdates:V.checkForUpdates,now:Date.now(),lastAutoCheckAt:t})&&dt()):Zi=!0}function qa(e){return e===`update`?Ua(`Update`,St,{isPrimary:!0}):e===`restart`?Ua(`Restart`,lt,{isPrimary:!0}):Ua(`Check for updates`,dt,{isEnabled:!m().isCheckInFlight})}function Ja(){let{status:e,journal:t,request:n}=m(),i=r({status:e,journal:t,request:n}),a=p(`div`,`settings-update-actions`);if(i.actions.length>0){let e=p(`div`,`settings-update-buttons`);e.append(...i.actions.map(qa)),a.appendChild(e)}let o=Ga();return o&&a.appendChild(Wa(o)),i.note&&a.appendChild(Wa(i.note)),i.command&&a.appendChild(p(`code`,`settings-update-command`,i.command)),a}function Ya(e,...t){let n=p(`div`,`settings-update-fact`);return n.append(p(`span`,`settings-update-fact-label`,e),...t),n}function Xa(){let e=s(m().journal);if(!e)return null;let t=p(`div`,`settings-update-progress`);t.dataset.state=e.state,t.setAttribute(`role`,`status`),e.terminalLine&&t.appendChild(p(`div`,`settings-update-terminal`,e.terminalLine));let n=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)),n.appendChild(e)}if(t.appendChild(n),e.outputTail.length===0)return t;let r=p(`pre`,`settings-update-output`,e.outputTail.join(`
|
|
4
4
|
`));if(e.outputStepId&&(r.dataset.step=e.outputStepId),!e.outputStepLabel)return t.appendChild(r),t;let i=`Output from ${e.outputStepLabel}`;return r.setAttribute(`aria-label`,i),t.append(p(`div`,`settings-update-output-label`,i),r),t}function Za(){let e=t(m().status),n=[e.label];if(e.releaseUrl){let t=p(`a`,`settings-link`,`View release`);t.href=e.releaseUrl,t.target=`_blank`,t.rel=`noopener noreferrer`,n.push(t)}return Ya(`Latest`,...n)}function Qa(){let e=p(`div`,`settings-view-status-block settings-update-status`),{status:t,journal:n}=m(),r=c(t,n),i=p(`div`,`settings-update-summary`,r.headline);i.dataset.tone=r.tone,e.appendChild(i),e.appendChild(Ya(`Running`,l(t))),o(t)&&e.appendChild(Za());let s=typeof t?.lastCheckAt==`number`?t.lastCheckAt:null,u=Ya(`Last checked`,a({status:t,checkForUpdates:V.checkForUpdates,relativeTime:Lt(s)}));s&&(u.title=new Date(s).toLocaleString()),e.appendChild(u),e.appendChild(Ja());let ee=Xa();return ee&&e.appendChild(ee),e}function $a(e){return e===null?`not probed yet`:e?`resolved`:`not found on PATH`}function eo(){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} ${$a(e.resolvable)}`})}function to(){let e=p(`div`,`settings-view-status-block`);e.appendChild(p(`div`,`settings-section-title`,`Declared agents`));for(let t of eo())e.appendChild(p(`div`,`settings-readonly`,t));return e}function no(e){K.set(e,{tone:`ok`,text:`Saved`}),window.setTimeout(()=>{K.get(e)?.tone===`ok`&&(K.delete(e),$())},Ci)}async function ro(e,t){Qi.add(e.id),K.delete(e.id),$();try{let n=await Se(`update-settings`,{settings:{workflows:{rules:[{id:e.id,enabled:t}]}}},{timeoutMs:it});if(Qi.delete(e.id),n.type===`settings-error`&&K.set(e.id,{tone:`error`,text:String(n.message)}),n.type===`settings-updated`){no(e.id),Zt(n.settings);return}}catch(t){K.set(e.id,{tone:`error`,text:rt(t,it)})}Qi.delete(e.id),$()}function io(e){let t=nt(`settings-workflow-rule-status`);if(Qi.has(e.id))return t.show(`busy`,`Saving`),t.element;let n=K.get(e.id);return n&&t.show(n.tone,n.text),t.element}function ao(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=Qi.has(e.id),r.setAttribute(`aria-label`,`Run rule ${e.name}`),r.addEventListener(`change`,()=>{ro(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,io(e)),t}function oo(){let e=p(`div`,`settings-view-status-block`);e.appendChild(p(`div`,`settings-section-title`,`Rules`));let t=xi(V.workflows);if(t.length>0){for(let n of t)e.appendChild(ao(n));return e}for(let t of bi(V.workflows))e.appendChild(p(`div`,`settings-readonly`,t));return e}function so(){let e=p(`div`,`settings-view-status-block`);e.appendChild(p(`div`,`settings-section-title`,`Last report`));for(let t of Ot())e.appendChild(p(`div`,`settings-readonly`,t));return e}function co(){let e=p(`div`,`settings-view-status-block`);if((U.get(`remote-sessions`)??H.remoteSessions)!==!0)return e.appendChild(p(`div`,`settings-readonly`,`Turn on Remote Coder sessions (experimental) to connect agent logins for them.`)),e;for(let t of[`claude-code`,`codex`]){let n=p(`div`,`settings-telegram-test`),r=p(`button`,`btn-dialog btn-dialog-cancel`,`Connect`);r.type=`button`,r.addEventListener(`click`,()=>an(t)),n.append(p(`div`,`settings-readonly`,rn(Rt(t),t)),r),e.appendChild(n)}return e}function lo(){let e=p(`div`,`settings-view-status-block`),t=p(`button`,`btn-dialog btn-dialog-cancel`,`Set up remote host`);return t.type=`button`,t.addEventListener(`click`,on),e.appendChild(t),e}function uo(e){return e.status===`agent-logins`?co():e.status===`remote-setup`?lo():e.status===`update-actions`?Qa():e.status===`custom-agents`?to():e.status===`workflows`?oo():p(`div`,`settings-readonly`,`Not available`)}function fo(e){return e.control===`readonly`?uo(e):e.control===`toggle`?Sa(e):e.control===`number`?Na(e):e.control===`select`?pi(e)===`segmented`?Ia(e):La(e):e.control===`list`?za(e):e.control===`shortcut-key`?Ea(e):e.control===`tab-order`?Va(e):Ma(e)}function po(e){let t=jr(e,V);return t?`Supplied by ${t}. Change the server environment and restart to replace this credential.`:``}function mo(e){if(e.control===`readonly`)return null;if(e.status===`usage-last-report`){let e=so();return e.classList.add(`settings-view-status-slot`),e}if(e.id===`desktop-notifications`)return xo(e);if(e.id===`telemetry-enabled`)return bo();if(e.status===`telegram-delivery`)return _o();let t=po(e);return t?p(`div`,`settings-view-warning settings-view-status-slot`,t):null}function ho(){let e=u.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 go(e){e.replaceChildren(...ho().map(e=>p(`p`,`settings-view-warning`,e)))}function _o(){let e=p(`div`,`settings-view-status-slot settings-telegram-delivery`),t=p(`div`,`settings-telegram-delivery-lines`);go(t);let n=p(`button`,`btn-dialog btn-dialog-cancel`,`Send test message`);n.type=`button`;let r=nt(`settings-telegram-test-status`);n.addEventListener(`click`,async()=>{n.disabled=!0;let e=await et(`telegram-test`,{},r,{busyText:`Sending a test message to Telegram.`});n.disabled=!1,e?.type===`telegram-test-result`&&(V=xt({telegramDelivery:e.telegramDelivery}),go(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 vo(){Z.disabled=!0;let e=await et(`request-telemetry-deletion`,{},yo,{busyText:`Sending the deletion request.`,timeoutMs:Ti});Z.disabled=!1,e?.type===`telemetry-deletion-result`&&(e.ok?yo.show(`ok`,`Deletion requested. New usage starts under a new id.`):yo.show(`error`,`Not sent: PostHog did not take the request. Try again later.`))}var Z=p(`button`,`btn-dialog btn-dialog-cancel`,`Delete my data`);Z.type=`button`,Z.addEventListener(`click`,()=>{at({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:()=>{vo()}})});var yo=nt(`settings-telemetry-deletion-status`);function bo(){let e=p(`div`,`settings-view-status-slot settings-telemetry-data`);return e.append(ua(`Privacy details`,la(`/privacy`)),Z,yo.element),e}function xo(e){let t=Pt(()=>Q(e,{force:!0}));return t.element.hidden?null:(t.element.classList.add(`settings-view-status-slot`),t.element)}function So(e,t){let n=p(`span`,`settings-view-chip`,t);return n.dataset.chip=e,n}function Co(e,t){let n=ve(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.type=`button`,t.addEventListener(`click`,async()=>{i.textContent=await Co(r(),n),setTimeout(()=>{i.textContent=``},wi)}),e.append(t,i)}function To(e){let t=p(`div`,`settings-view-setting-heading`),n=ra(e),r=p(`h2`,`settings-view-setting-title`,e.title);r.id=e.id,r.addEventListener(`click`,()=>ia(n.id,e.id));let i=p(`button`,`settings-view-copy-link`,`#`);return i.setAttribute(`aria-label`,`Copy link`),t.appendChild(r),wo(t,i,{copiedText:`Link copied`,textToCopy:()=>new URL(Qt(n.id,e.id),location.href).href}),t}function Eo(e){let t=p(`div`,`settings-view-chips`);return t.append(So(`scope`,Ar[e.scope]),So(`effect`,kr[e.takesEffect])),t}function Do(e){return e.control===`readonly`||jr(e,V)?!1:!fi(e,q(e))}function Oo(e){let t=p(`div`,`settings-view-control-foot`),n=p(`span`,`settings-view-save-status`);n.setAttribute(`role`,`status`);let r=p(`button`,`settings-view-reset`,`Reset`);return r.type=`button`,r.title=`Reset to the default value`,r.addEventListener(`click`,()=>{let t=di(e),n=vi(e);n===null?Y(e,t):at({title:e.title,message:n,confirmLabel:`Reset`,danger:!0,onConfirm:()=>Y(e,t)})}),t.append(n,r),t}function ko(e,t){let n=e.querySelector(`.settings-view-save-status`),r=qi.get(t.id);n&&(n.textContent=r?.text??``,r&&(n.dataset.tone=r.tone),r||delete n.dataset.tone);let i=e.querySelector(`.settings-view-reset`);i&&(i.disabled=!Do(t));let a=e.querySelector(`.settings-view-field-error`),o=Xi.get(t.id);a&&!o&&a.remove(),a&&o&&(a.textContent=o),!a&&o&&e.querySelector(`.settings-view-setting-control`)?.appendChild(p(`div`,`settings-view-field-error`,o))}function Ao(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(To(e),p(`p`,`settings-view-setting-description`,e.description),Eo(e));let r=p(`div`,`settings-view-setting-control`);r.appendChild(fo(e)),e.control!==`readonly`&&r.appendChild(Oo(e)),t.append(n,r),hi(e,q(e))&&t.appendChild(p(`div`,`settings-view-warning settings-warning`,e.warning));let i=mo(e);return i&&t.appendChild(i),ko(t,e),t}function jo(e){return z?.querySelector(`[data-setting-id="${e.id}"]`)??null}function Mo(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 No(e,t){if(!ka(e)||!ka(t))return;e.disabled=t.disabled,e.placeholder=t.placeholder;let n=W.get(t);n&&!li(W.get(e))&&(W.set(e,{base:n.base,isDirty:!1}),e.value!==t.value&&(e.value=t.value))}function Po(e,t,n){if(e===n){No(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)?Po(i,a,n):i.replaceWith(a):e.appendChild(a)}for(let e of r.slice(i.length))e.remove()}function Q(e,{force:t=!1}={}){let n=jo(e);if(!n)return;let r=document.activeElement,i=n.contains(r),a=i&&!t&&ka(r)?r:null;(!a||!li(W.get(a)))&&Xi.delete(e.id);let o=Ao(e);a?Po(n,o,a):(n.replaceWith(o),i&&Mo(o))}function Fo(e){let t=jo(e);t&&ko(t,e)}function Io(e){jo(e)?.querySelector(`.settings-view-setting-control`)?.replaceChildren(uo(e))}function Lo(){for(let e of na(B))e.control===`readonly`?Io(e):Q(e)}function Ro(){let e=p(`button`,`btn-dialog btn-dialog-cancel`,`Reset all to defaults`);return e.type=`button`,e.addEventListener(`click`,()=>{je(),ea(V),kt(Be()),Uo()}),e}function zo(e){let t=p(`div`,`settings-view-advanced`),n=p(`button`,`dialog-advanced-toggle settings-view-advanced-toggle`,`Advanced`);n.type=`button`,n.setAttribute(`aria-expanded`,String(P)),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=!P,n.addEventListener(`click`,()=>{P=!P,r.hidden=!P,n.setAttribute(`aria-expanded`,String(P))});for(let t of e)r.append(Ao(t));return B.id===Di&&r.append(Ro()),t.append(n,r),t}function Bo(e){let t=p(`div`,`settings-view-streamer-placeholder`),n=p(`button`,`btn-dialog btn-dialog-confirm`,`Turn off streamer mode`);n.type=`button`;let r=p(`span`,`settings-view-copy-status`,``);r.setAttribute(`role`,`status`),n.addEventListener(`click`,async()=>{n.disabled=!0,r.textContent=``;let e=await ft(!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)}Ct(()=>Uo());function Vo(e){let t=p(`header`,`settings-view-subsection`),n=p(`h2`,`settings-view-subsection-title`,e.title);return n.addEventListener(`click`,()=>ia(e.id)),t.append(n,p(`p`,`settings-view-section-description`,e.description)),t}function Ho(e,t){for(let n of t.settings.filter(e=>e.access!==`advanced`))e.appendChild(Ao(n)),n.id===Oi&&e.appendChild(fn());let n=t.settings.filter(e=>e.access===`advanced`);n.length>0&&e.append(zo(n))}function Uo(){if($o(),G){Zo();return}if(!z)return;if(z.textContent=``,Xt()){Bo(z);return}let e=p(`header`,`settings-view-section-header`),t=p(`h1`,`settings-view-section-title`,B.title);if(t.tabIndex=-1,t.addEventListener(`click`,()=>ia(B.id)),e.append(t,p(`p`,`settings-view-section-description`,B.description)),z.appendChild(e),B.id===Mi){let e=p(`div`,`settings-view-stack`);Ho(e,B),z.appendChild(e);let t=p(`div`,`shortcut-groups settings-view-shortcuts`);oa(t),z.appendChild(t);return}if(B.id===Fi){da(z);return}if(B.id===Ni){z.appendChild(mt()),z.appendChild(pt());return}if(B.id===Ai){ca(z);return}let n=p(`div`,`settings-view-stack`);for(let e of ta(B))e.id!==B.id&&n.appendChild(Vo(e)),Ho(n,e);z.appendChild(n)}function Wo(e,{focusContent:t=!1,settingId:n=null,updateHash:r=!0,openPhoneSection:i=!0}={}){r&&G&&(G=``,L&&(L.value=``));let a=Vr(N,e)??B;B.id!==a.id&&(P=!1),B=a;let o=N.find(t=>t.id===e)??a;Go(I),i&&Mt()&&(Ki=o.id),Uo(),os(B)&&as(),B.id===`machine-updates`&&Ka(),r&&ia(o.id,n),n&&aa(n),t&&z?.querySelector(`h1`)?.focus()}function Go(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 Ko(e){return e.section!==null}function qo(e){L&&(L.value=``,G=``,ts(),Wo(e.section.id,{settingId:e.setting.id}))}function Jo(e){return _r(Vi(),e,Hn.fileOnly)}function Yo(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 Xo(e,t){let{currentText:n,defaultText:r,jsonFragment:i}=Rr(t.setting,V);if(n!==null&&e.appendChild(p(`span`,`settings-view-search-current`,n)),e.append(p(`span`,`settings-view-search-default`,r),Eo(t.setting),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,p(`button`,`settings-view-copy-json`,`Copy as JSON`),{copiedText:`JSON copied`,textToCopy:()=>i}),e.appendChild(a)}function Zo(){if(!z)return;if(z.textContent=``,Xt()){Bo(z);return}let e=Jo(G),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 "${G}"`)),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=zr(N,t.section,t.setting);e.appendChild(Yo(`p`,`settings-view-search-breadcrumb`,r,t,`section`));let i=Yo(`span`,`settings-view-setting-title`,t.setting.title,t,`title`);if(Ko(t)){let n=p(`button`,`settings-view-search-open`);n.type=`button`,n.appendChild(i),n.addEventListener(`click`,()=>qo(t)),e.appendChild(n)}Ko(t)||(e.classList.add(`settings-view-search-file-only`),e.appendChild(i)),e.append(Yo(`p`,`settings-view-setting-description`,t.setting.description,t,`description`),Yo(`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(Yo(`p`,`settings-view-list-hint`,n.text,t,n.field))}Ko(t)||Xo(e,t),n.appendChild(e)}z.appendChild(n)}function Qo(){return Wr(N,Ki,G,Xt())}function $o(){if(!F)return;let e=Qo(),t=F.dataset.settingsScreen!==e;F.dataset.settingsScreen=e,R&&(R.hidden=e!==`section`),t&&ct()}function es(){let e=B.id;ns(``),I?.querySelector(`[data-settings-section="${e}"]`)?.focus()}function ts(){if(I&&F){I.textContent=``;for(let e of Ur(Hr(N))){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=p(`button`,`settings-view-nav-item`,n.title);e.type=`button`,e.dataset.settingsSection=n.id,e.addEventListener(`click`,()=>Wo(n.id,{focusContent:Mt()})),t.appendChild(e)}I.appendChild(t)}G?($o(),Zo()):Wo(B.id,{updateHash:!1,openPhoneSection:!1})}}function ns(e,{updateHash:t=!0}={}){G=e.trim(),L&&(L.value=e),Ki=null,t&&history.replaceState(history.state,``,Dt(G)),ts()}function rs(e){if(G&&e.key===`Enter`&&e.target===L){let t=Jo(G).find(Ko);if(!t)return;e.preventDefault(),qo(t);return}if(e.key===`Escape`&&G){if(!L)return;e.preventDefault(),ns(``),L.focus();return}if(e.key!==`ArrowUp`&&e.key!==`ArrowDown`||!I)return;let t=[...I.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 is(e){Vt(pa),Wi=e,Wi.textContent=``,F=p(`div`,`settings-view-shell`);let t=p(`div`,`settings-view-sidebar`);L=p(`input`,`settings-view-search`),L.type=`search`,L.placeholder=`Search settings`,L.setAttribute(`aria-label`,`Search settings`),I=p(`nav`,`settings-view-nav`),I.setAttribute(`role`,`navigation`),I.setAttribute(`aria-label`,`Settings sections`),R=p(`button`,`settings-view-back`,`Settings`),R.prepend($e(tt)),R.type=`button`,R.hidden=!0,R.setAttribute(`aria-label`,`Back to settings sections`),R.addEventListener(`click`,vt),z=p(`div`,`settings-view-content`),z.setAttribute(`aria-live`,`polite`),L.addEventListener(`input`,()=>{let e=L;e&&ns(e.value)}),L.addEventListener(`keydown`,rs),I.addEventListener(`keydown`,rs),t.append(L,R,I),F.append(t,z),Wi.appendChild(F),V=h(),cs(),ea(V),Ft(Qo),gt(gs),ts(),as(),Gi?.disconnect(),Gi=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&as()}),Gi.observe(Wi),fs()}function as(){$t().then(ls)}function os(e){return na(e).some(e=>e.path===`pref:soundId`)}function ss(){N=Hi(),Ui=Bi(h()),B=Vr(N,B.id)??N[0]}function cs(){return Bi(V)!==Ui&&(ss(),!0)}function ls(){if(ss(),H[`pref:soundId`]=tn(Ue()),G){Zo();return}let e=fa(`alert-sound`);e&&os(B)&&Q(e)}function us(e,t,n){let r=Jt(e??n);r?ns(r.query):(ns(``,{updateHash:!1}),Mt()&&!e?history.replaceState(history.state,``,Dt(``)):Wo(e||B.id,{settingId:t}))}function ds(e){let t=vr(e,N,Kn,qn);us(t?.sectionId??null,t?.settingId??null,e)}function fs(){let e=bt();e&&(e.isLink?ds(e.hashAtRequest):us(e.sectionId,e.settingId,e.hashAtRequest))}function ps(){V=h();let e=cs();ea(V),G?Zo():e?(ts(),Uo()):Lo()}function ms(e,t){let n=t.querySelector(`.settings-view-status-slot`),r=mo(e);n&&r&&n.replaceWith(r),n&&!r&&n.remove(),!n&&r&&t.appendChild(r)}function $(){for(let e of na(B)){if(!e.status)continue;let t=jo(e);t&&(e.control===`readonly`?Io(e):ms(e,t))}}function hs(){if(B.id!==`machine-updates`)return;let e=fa(`update-actions`);e&&Io(e)}function gs(e){switch(e.kind){case`broadcast`:ps();return;case`status`:$();return;case`update`:hs(),e.frame===`status`&&Zi&&B.id===`machine-updates`&&Ka();return;case`activate`:fs();return;case`return-to-list`:es()}}function _s(){B.id===Di&&Uo()}window.matchMedia(`(prefers-reduced-motion: reduce)`).addEventListener(`change`,_s),jt(()=>{Ki=null,$o(),_s()}),At($);var vs={mount:is};export{vs as view};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./dom-helpers-DBbFg1c_.js";import{r as t,t as n}from"./modal-USMHOKBI.js";import{di as r,m as i,ui as a}from"./index-
|
|
1
|
+
import{s as e}from"./dom-helpers-DBbFg1c_.js";import{r as t,t as n}from"./modal-USMHOKBI.js";import{di as r,m as i,ui as a}from"./index-Dugg1D6h.js";import{t as o}from"./sandboxed-frame-D9MEfNuX.js";var s=null;function c(e,t){return`/shown/${encodeURIComponent(e)}/${encodeURIComponent(t.id)}`}function l(e){window.open(e,`_blank`,`noopener`)}function u(e){return e.pageTitle??e.name}function d(t,n,r){let i=c(t,n);if(n.kind===`image`){let t=e(`img`,r?`shown-thumb-media`:`shown-stage-media`);return t.src=i,t.alt=n.caption??n.name,t.loading=`lazy`,t.decoding=`async`,t}if(n.kind===`video`){let t=e(`video`,r?`shown-thumb-media`:`shown-stage-media`);return t.src=i,t.preload=`metadata`,t.muted=r,t.controls=!r,t.playsInline=!0,t}if(!r)return o({source:{kind:`url`,url:i},className:`shown-stage-frame`,title:u(n),allowsScripts:!0});let a=e(`div`,`shown-thumb-page`);return a.append(e(`span`,`shown-page-kind`,`HTML page`),e(`span`,`shown-page-title`,u(n))),a}function f(e){let t=r(e.sessionId);return t.find(t=>t.id===e.selectedFileId)??t.at(-1)??null}function p(t,n){let i=[...r(t.sessionId)].reverse();t.strip.hidden=i.length<2,t.strip.replaceChildren(...i.map(r=>{let i=e(`button`,`shown-thumb`);return i.type=`button`,i.title=r.caption??u(r),i.setAttribute(`aria-label`,u(r)),i.setAttribute(`aria-pressed`,String(r.id===n.id)),i.append(d(t.sessionId,r,!0)),i.addEventListener(`click`,()=>h(t,r.id)),i}))}function m(t){let n=f(t);if(!n){t.close();return}t.selectedFileId=n.id,t.title.textContent=u(n),t.stage.dataset.fileId!==n.id&&(t.stage.replaceChildren(d(t.sessionId,n,!1)),t.stage.dataset.fileId=n.id);let r=n.caption?[e(`p`,`shown-caption`,n.caption)]:[];t.details.replaceChildren(...r,e(`p`,`shown-meta`,`${n.name}, shown ${i(n.shownAt)}`)),p(t,n)}function h(e,t){e.selectedFileId=t,m(e)}function g(t,n){let r=e(`button`,`plan-control ${n}`,t);return r.type=`button`,r}function _(i,o=null){let u=r(i).at(-1);if(!u)return;s?.close();let d=t({dialogClass:`shown-lightbox`,closeOnBackdrop:!1,onEscape:()=>C.close()}),p=`shown-lightbox-title-${i}`,h=e(`h3`,`shown-lightbox-title`);h.id=p;let _=g(`Open full size`,`shown-open-full-size`),v=g(`Close`,`shown-close`),y=e(`div`,`shown-lightbox-header`);y.append(h,_,v);let b=e(`div`,`shown-stage`),x=e(`div`,`shown-details`),S=e(`div`,`shown-strip`);S.setAttribute(`aria-label`,`Shown files`),d.dialog.append(y,b,x,S),n(d.dialog,p);let C={sessionId:i,selectedFileId:o??u.id,title:h,stage:b,details:x,strip:S,btnOpenFullSize:_,close:()=>{s===C&&(s=null),d.close()}};s=C,_.addEventListener(`click`,()=>{let e=f(C);e&&l(c(i,e))}),v.addEventListener(`click`,()=>C.close()),b.addEventListener(`pointerleave`,()=>{b.contains(document.activeElement)&&d.dialog.focus()}),d.overlay.addEventListener(`click`,e=>{e.target===d.overlay&&C.close()}),m(C),a(i)}function v(e){return s?.sessionId===e}function y(e){s?.sessionId===e&&m(s)}export{v as isLightboxOpenOn,_ as openShownLightbox,y as repaintLightboxOn};
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Bt as e,C as t,Ft as n,It as r,Rt as i,S as a,Vt as o,n as s}from"./updates-view-core-D9wi2i2r.js";import{a as c,i as l,l as u,o as d,s as f}from"./dom-helpers-DBbFg1c_.js";import{r as p,u as m}from"./control-ws-ZZY6O0nz.js";import{dt as ee}from"./ui-prefs-DfBm2IRm.js";import{S as h,a as g,x as _}from"./action-status-DN4P3ZYj.js";import{$t as te,Gt as v,Jt as y,Kt as b,Tn as x,Ut as S,Vr as C,Wt as w,Yt as ne,Zt as re,_ as ie,an as ae,in as oe,m as T,p as E,qt as D,rn as se,tn as O,tr as ce,wn as le}from"./index-
|
|
1
|
+
import{Bt as e,C as t,Ft as n,It as r,Rt as i,S as a,Vt as o,n as s}from"./updates-view-core-D9wi2i2r.js";import{a as c,i as l,l as u,o as d,s as f}from"./dom-helpers-DBbFg1c_.js";import{r as p,u as m}from"./control-ws-ZZY6O0nz.js";import{dt as ee}from"./ui-prefs-DfBm2IRm.js";import{S as h,a as g,x as _}from"./action-status-DN4P3ZYj.js";import{$t as te,Gt as v,Jt as y,Kt as b,Tn as x,Ut as S,Vr as C,Wt as w,Yt as ne,Zt as re,_ as ie,an as ae,in as oe,m as T,p as E,qt as D,rn as se,tn as O,tr as ce,wn as le}from"./index-Dugg1D6h.js";var ue=`> [!NOTE]
|
|
2
2
|
> Automated review. Not written by a human.`,de=`> [!NOTE]
|
|
3
3
|
> Automated review by [Glimmervoid](https://glimmervoid.dev). Not written by a human.`,fe=`> [!NOTE]
|
|
4
4
|
> Automated review by [Glimmervoid](https://glimmervoid.dev), not written by a human. Approved by hand after checking it.`,pe=r.options.join(`|`),me=String.raw`\*\*(?:\[([^\]\n]+)\]\s+)?(${pe})\*\*`;function he(e){return[...e.matchAll(new RegExp(me,`g`))].flatMap(e=>{let t=r.safeParse(e[2]);return t.success?[t.data]:[]})}function ge(e){let t=new RegExp(String.raw`^${me}\s*(?:\r?\n|$)`).exec(e);if(!t)return null;let n=r.safeParse(t[2]);return n.success?{reviewer:t[1]??null,severity:n.data,length:t[0].length}:null}function _e(e){let t=e.trimStart(),n=[ue,de,fe].find(e=>t.startsWith(e));return n?t.slice(n.length).trim():e.trim()}var ve=`(line not in the diff)`,ye=String.raw`- ${me}`,be=String.raw`\*\*\x60([^\x60\n]+)\x60\*\* ${ve.replace(/[()]/g,`\\$&`)}`,xe=new RegExp(String.raw`^(?:${ye}|${be})`,`gm`),Se=new RegExp(String.raw`^${ye}\s*(?:\x60([^\x60\n]+)\x60:\s*)?`),Ce=new RegExp(String.raw`^${be}\s*`);function we(e){return r.options.find(t=>e.includes(t))??null}function Te(e){let t=Se.exec(e);if(t)return{severity:r.parse(t[2]),location:t[3]??null,body:e.slice(t[0].length).trim(),markdown:e};let n=Ce.exec(e),i=n?e.slice(n[0].length).trim():e;return{severity:we(he(i)),location:n?.[1]??null,body:i,markdown:e}}function Ee(e){let t=_e(e),n=t.search(xe);return(n===-1?t:t.slice(0,n)).trim()}function De(e){let t=_e(e),n=[...t.matchAll(xe)].map(e=>e.index);return n.map((e,r)=>t.slice(e,n[r+1]).trim()).filter(Boolean).map(Te)}var Oe={"direct-request":`Needs you`,"team-request":`Ready`,"changes-requested":`Author to fix`,"checks-failing":`Checks failing`,"checks-pending":`Checks running`,draft:`Draft`,"review-available":`Ready`,approved:`Approved`},ke={APPROVE:{label:`You approved`,tone:`ok`,icon:`passed`},COMMENT:{label:`You commented`,tone:`muted`,icon:`thread`},REQUEST_CHANGES:{label:`You requested changes`,tone:`wait`,icon:`changes-requested`}},Ae={APPROVED:{label:`You approved`,tone:`ok`,icon:`passed`},CHANGES_REQUESTED:{label:`You requested changes`,tone:`wait`,icon:`changes-requested`},COMMENTED:{label:`You commented`,tone:`muted`,icon:`thread`}};function je(e){let t=(e.githubReviews??[]).filter(e=>e.isViewer).sort((e,t)=>(Date.parse(t.submittedAt??``)||0)-(Date.parse(e.submittedAt??``)||0)).at(0);if(!e.postedEvent)return t?Ae[t.state]:null;if(!t)return ke[e.postedEvent];let n=Date.parse(t.submittedAt??``);return Number.isNaN(n)||e.postedAt!==void 0&&e.postedAt>n?ke[e.postedEvent]:Ae[t.state]}var Me={"changes-requested":`changes-requested`,"checks-failing":`failed`,"checks-pending":`running`,draft:`draft`};function Ne(e){let{reason:t}=b(e),n=Me[t];return n?{text:Oe[t],icon:n}:null}function Pe(e){return Ne(e)?.text??null}var Fe={discarded:{tone:`muted`,icon:`discarded`,meaning:`Not mine`}};function Ie(e,t){let n=Pe(t);return n?`${e}, ${n}`:e}function Le(t){if(e(t))return!0;let n=(t.githubReviews??[]).filter(e=>e.isViewer);return n.length===0||n.some(e=>e.commit===D(t))}var Re={tone:`warn`,icon:`your-turn`,meaning:`Comments resolved`};function ze(e,t){if(e.prStage)return{tone:ae(e.prStage),icon:se(e.prStage),meaning:oe(e.prStage)};let n=Fe[t];if(n)return n;if(t===`inReview`)return{tone:`wait`,icon:`running`,meaning:Ie(`In review`,e)};if(t===`queued`)return{tone:`muted`,icon:`queued`,meaning:Ie(`Queued`,e)};if(t===`settled`&&`reviewedHead`in e){let t=Le(e)?je(e):null;return t?{tone:t.tone,icon:t.icon,meaning:t.label}:{tone:`ok`,icon:`passed`,meaning:`Others reviewed`}}if(t===`posted`&&`reviewedHead`in e){let t=je(e);return t?{tone:t.tone,icon:t.icon,meaning:t.label}:{tone:`muted`,icon:`none`,meaning:`Posted`}}if(t===`attention`&&`status`in e)return e.status===`error`?{tone:`danger`,icon:`failed`,meaning:`Review failed`}:{tone:`warn`,icon:`stale`,meaning:`Out of date`};let r=Ne(e);return r?{tone:`wait`,icon:r.icon,meaning:r.text}:t===`ready`&&`reviewedHead`in e&&re(e)?Re:{tone:`warn`,icon:`your-turn`,meaning:`Waits on you`}}function Be(e){return!e||e.total===0?null:e.total===1?e.resolved===1?`Your 1 comment resolved`:`Your 1 comment unresolved`:e.resolved===e.total?`All ${e.total} of your comments resolved`:`${e.resolved} of ${e.total} of your comments resolved`}function Ve(e){return`${e} ${e===1?`comment`:`comments`}`}function He(e,t,n){let r=[`${O(e.repo,e.number)}: ${e.title}`],i=`reviewedHead`in e?e.assessment?.goal.trim():``;if(i&&r.push(i),r.push(ze(e,t).meaning),n.opened&&r.push(`Opened ${n.opened}`),n.reviewed&&r.push(`Reviewed ${n.reviewed}`),n.posted&&r.push(`Posted ${n.posted}`),!(`reviewedHead`in e))return r.join(`
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,S as t,U as n}from"./updates-view-core-D9wi2i2r.js";import{b as r,d as i,h as a,n as o,s}from"./dom-helpers-DBbFg1c_.js";import{at as c,v as l}from"./ui-prefs-DfBm2IRm.js";import{i as u}from"./action-status-DN4P3ZYj.js";import{$n as d,Jn as ee,Kn as f,Qn as p,Xn as m,Yn as h,Zn as g,qn as _}from"./index-
|
|
1
|
+
import{C as e,S as t,U as n}from"./updates-view-core-D9wi2i2r.js";import{b as r,d as i,h as a,n as o,s}from"./dom-helpers-DBbFg1c_.js";import{at as c,v as l}from"./ui-prefs-DfBm2IRm.js";import{i as u}from"./action-status-DN4P3ZYj.js";import{$n as d,Jn as ee,Kn as f,Qn as p,Xn as m,Yn as h,Zn as g,qn as _}from"./index-Dugg1D6h.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 te=[{kind:`thinking`,label:`Thinking`},{kind:`tool_result`,label:`Tool result`},{kind:`raw`,label:`Raw`}];function ne(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 y(e){let{rowCount:r,toolCallCount:i,errorCount:a,resultBytes:o}=e.metrics;return`${`${r} ${r===1?`row`:`rows`}`}, ${`${i} ${i===1?`tool`:`tools`}`}, ${`${a} ${a===1?`error`:`errors`}`}, ${n(o,`KB`)}, ${t(ne(e))}`}function b(e){return e.hasSelectionChanged||e.isRenderedTraceStale||!e.hasRenderedOnce}function x(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=l(),M=!1,N=null;function P(){return!!T&&!i(T)}function re(){let{sessionOptions:e,selectedSessionId:t}=p();return e.find(e=>e.id===t)??null}function ie(){let e=s(`label`,`trace-session-field`),t=s(`span`,`trace-session-label`,`Session`),n=s(`select`,`trace-session-select`),{sessionOptions:r,selectedSessionId:i}=p();n.disabled=r.length===0;for(let e of r){let t=s(`option`,null,e.label);t.value=e.id,t.selected=e.id===i,n.append(t)}return n.addEventListener(`change`,()=>ee(n.value)),e.append(t,n),e}function F(e){e.toggleAttribute(`data-hidden`,C(j,e.dataset.kind??``))}function I(){if(D)for(let e of D.querySelectorAll(`.trace-row`))F(e)}function L(e){if(D)for(let t of D.querySelectorAll(`details`))t.open=e}function R(){let e=s(`div`,`trace-filters`);for(let t of te){let n=s(`button`,`trace-filter`,t.label);n.type=`button`;let r=()=>{n.setAttribute(`aria-pressed`,String(!C(j,t.kind)))};r(),n.addEventListener(`click`,()=>{j=S(j,t.kind),c(j),r(),I()}),e.append(n)}for(let[t,n]of[[`Expand all`,!0],[`Collapse all`,!1]]){let r=s(`button`,`trace-expand-control`,t);r.type=`button`,r.addEventListener(`click`,()=>{L(n)}),e.append(r)}return e}function z(){let e=o(`trace`,`Session trace`,`Bodies load from the local trace file only when requested.`),t=s(`div`,`trace-controls`),{selectedTrace:n,traceFailureText:r}=p();t.append(ie());let i=n?.filePath??``,a=s(`code`,`trace-path`,i);a.title=i,t.append(a);let c=n?x(n.firstOffset,n.hasDroppedEarliestRows,n.grouping.turns[0]):null;if(c!==null&&t.append(s(`span`,`trace-session-start`,`Started ${new Date(c).toLocaleString()}`)),e.append(t,R()),!r)return e;let l=u(`trace-status`);return l.show(`error`,r),e.append(l.element),e}function B(e){let t=s(`div`,`trace-copy-wrap`),n=s(`button`,`trace-copy`,`Copy`);n.type=`button`;let i=s(`span`,`trace-copy-status`);return i.setAttribute(`role`,`status`),n.addEventListener(`click`,()=>{let t=r(e);t?(t.then(()=>{i.textContent=`Copied`}).catch(()=>{i.textContent=`Copy failed`}),setTimeout(()=>{i.textContent=``},1600)):i.textContent=`Copy failed`}),t.append(n,i),t}function V(){let e=s(`div`,`trace-earlier-wrap`),t=s(`button`,`trace-load-earlier`,`Load earlier`);return t.type=`button`,t.addEventListener(`click`,()=>{_()}),e.append(t),e}function H(t,n,r=``){let i=s(`details`,`trace-row${r?` ${r}`:``}`);i.dataset.kind=t.kind,i.dataset.tone=t.tone,F(i);let a=s(`summary`,`trace-row-summary`);a.append(s(`span`,`trace-offset`,e(n,t.record.ts)),s(`span`,`trace-kind`,t.tag),s(`span`,`trace-row-label`,t.text));for(let e of t.badges){let t=s(`span`,`trace-badge`,e);t.dataset.badge=e,a.append(t)}let o=s(`div`,`trace-row-body`);i.append(a,o);let c=!1;return i.addEventListener(`toggle`,()=>{if(!i.open||c)return;c=!0;let e=v(t.record);o.append(B(e),s(`pre`,`trace-row-pre`,e))}),i}function U(e){return s(`span`,`trace-turn-metrics`,y(e))}function W(e,t){e&&t&&(t.textContent=y(e))}function G(t,n){let r=t.children,i=Math.min(n.rows.length,r.length);for(let t=0;t<i;t+=1){let i=r[t]?.querySelector(`.trace-offset`);i&&(i.textContent=e(n.startedAt,n.rows[t].record.ts))}}function K(e,t,n){let r=H(t,e.startedAt,`trace-turn-head`);return a(r,`.trace-row-summary`).append(n),r}function q(e){let t=s(`section`,`trace-turn`),n=U(e);if(e.head&&t.append(K(e,e.head,n)),!e.head){let e=s(`h2`,`trace-leading-title`);e.append(s(`span`,`trace-leading-label`,`Before first prompt`),n),t.append(e)}let r=s(`div`,`trace-rows`);for(let t of e.rows)r.append(H(t,e.startedAt));return e.hasTrimmedRows&&t.append(s(`p`,`trace-trimmed`,`Earlier rows trimmed`)),t.append(r),{section:t,rowsElement:r,metricsElement:n}}function J(e){if(!e)return w(null);let{pendingSessionId:t,selectedTrace:n}=p();return t===e.id&&!n?.hasLoadedOnce?`Loading trace.`:w(e)}function Y(){if(!T)return;let e=s(`div`,`trace-content`);E=z(),e.append(E),D=null,O=null,k=[];let t=re(),n=p().selectedTrace?.grouping.turns??[];if(!t||n.length===0){e.append(s(`p`,`trace-empty`,J(t))),T.replaceChildren(e),A=!1;return}d(g())&&(O=V(),e.append(O));let r=s(`div`,`trace-turns`);for(let e of n){let t=q(e);k.push(t),r.append(t.section)}D=r,I(),e.append(r),T.replaceChildren(e),A=!1}function X(){T&&(P()?Y():A=!0)}function Z(){if(!E||!P())return;let e=z();E.replaceWith(e),E=e}function Q(e){if(!D)return;let t=p().selectedTrace?.grouping.turns[e.turnIndex];if(!t)return;if(e.isNewTurn){let e=q(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(H(r,t.startedAt));W(t,n.metricsElement)}}function ae(e){let t=e.parentElement;t&&!t.querySelector(`.trace-trimmed`)&&t.insertBefore(s(`p`,`trace-trimmed`,`Earlier rows trimmed`),e)}function $(){d(g())?!O&&D?.parentElement&&(O=V(),D.parentElement.insertBefore(O,D)):(O?.remove(),O=null)}function oe(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();ae(t.rowsElement),W(p().selectedTrace?.grouping.turns[0],t.metricsElement)}e.hasJustDroppedEarliestRows&&Z(),$()}function se(e){if(P()&&!A&&D)for(let t of e)Q(t);else D=null,M=!0}function ce(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=U(r),o=K(r,e.mergedHead,a);n.insertBefore(o,i),t.metricsElement=a}e.mergedHead||W(r,t.metricsElement);let a=document.createDocumentFragment();for(let t of e.mergedRows)a.append(H(t,r.startedAt));i.prepend(a),G(i,r)}let i=document.createDocumentFragment(),a=[];for(let t of e.newTurns){let e=q(t);a.push(e),i.append(e.section)}D.prepend(i),k.unshift(...a)}function le(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&&ce(e)}function ue(e){oe(e),M&&(M=!1,X());let t=N;N=null,t&&(t.canPrependInPlace||X(),t.canPrependInPlace&&Z(),t.scrollElement&&(t.scrollElement.scrollTop=t.previousScrollTop+t.scrollElement.scrollHeight-t.previousScrollHeight))}function de(e){switch(e.kind){case`selection-reset`:A=!0;return;case`rebuild`:X();return;case`header`:Z();return;case`sessions`:(e.hasSelectionChanged||!E)&&X(),!e.hasSelectionChanged&&E&&Z();return;case`records-appended`:se(e.appends);return;case`records-prepended`:le(e.prepend);return;case`trimmed`:ue(e.trim);return}}function fe(e){T||(T=s(`div`,`trace-panel`),e.append(T),h(P),m(de),Y())}function pe(){T&&b({hasSelectionChanged:f(),isRenderedTraceStale:A,hasRenderedOnce:!!E})&&Y()}var me={mount:fe,refresh:pe};export{me as view};
|
|
Binary file
|