cezarion 0.18.0-dev.8338 → 0.18.0-dev.8347
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/package.json +3 -3
- package/web/dist/assets/accounts-section-D3rKSj1e.js +1 -0
- package/web/dist/assets/{activity-motion-wGHBuD_L.js → activity-motion-CFgok4CI.js} +1 -1
- package/web/dist/assets/{activity-route-BhT-npje.js → activity-route-HvdWBepL.js} +1 -1
- package/web/dist/assets/{agent-config-section-BIkW506A.js → agent-config-section-DbmhTCJA.js} +2 -2
- package/web/dist/assets/agent-defaults-section-5fBA2FMV.js +1 -0
- package/web/dist/assets/{appearance-CipbKN5k.js → appearance-ZpysBpxH.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-Dx8afb0D.js → archive-on-merge-field-BlGo3o7a.js} +1 -1
- package/web/dist/assets/attention-CvHM4cjG.js +1 -0
- package/web/dist/assets/{automations-route-DKKwkBjL.js → automations-route-aINxoEQX.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-OqVigspU.js → commit-diff-panel-BzAqXG0p.js} +1 -1
- package/web/dist/assets/{diff-CpkjO5Q-.js → diff-lVUk7FAR.js} +2 -2
- package/web/dist/assets/{diff-view-D6QC4z_i.js → diff-view-B5RGiepv.js} +1 -1
- package/web/dist/assets/{file-preview-C-oYrG0r.js → file-preview-Bn5u5k1W.js} +1 -1
- package/web/dist/assets/{folder-browser-DJd_sQFq.js → folder-browser-CffyHz8w.js} +1 -1
- package/web/dist/assets/{git-toolbar-BiWUXSvy.js → git-toolbar-xLFz5nnr.js} +1 -1
- package/web/dist/assets/{github-DSZtAYK0.js → github-DxiILmDg.js} +1 -1
- package/web/dist/assets/{global-activity-route-ylV7sfQb.js → global-activity-route-BmqMaZug.js} +1 -1
- package/web/dist/assets/index-DndX-kC-.js +21 -0
- package/web/dist/assets/{label-HRVFTN4V.js → label-6PgIe3Ny.js} +1 -1
- package/web/dist/assets/{live-reads-Djkq38NT.js → live-reads-BxjlQXfN.js} +1 -1
- package/web/dist/assets/{markdown-Drj1MCd_.js → markdown-DHYxiDex.js} +1 -1
- package/web/dist/assets/{notifications-section-BNncS89W.js → notifications-section-xHvjaRxV.js} +1 -1
- package/web/dist/assets/{open-in-menu-BeAj_aq3.js → open-in-menu-AZMtej8C.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-C9bYs_nr.js → preview-pane-connected-C5Lsjf2P.js} +2 -2
- package/web/dist/assets/{project-location-DJEH4PmN.js → project-location-DzOgHfcA.js} +1 -1
- package/web/dist/assets/{project-router-C6zhlnwO.js → project-router-CDPfL2Jz.js} +1 -1
- package/web/dist/assets/{project-scope-context-d3J3hWPR.js → project-scope-context-D9axDY18.js} +2 -2
- package/web/dist/assets/{projects-section-DAyPYxaB.js → projects-section-0ov7IK9p.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-BUTjHN-R.js → prompt-templates-section-DgLWN4ZB.js} +1 -1
- package/web/dist/assets/{queries-dnpdX9VT.js → queries-DzwCG927.js} +1 -1
- package/web/dist/assets/{reference-chip-DHWnJcWz.js → reference-chip-BnIoiMgY.js} +1 -1
- package/web/dist/assets/remote-settings-notice-kmlL_JEi.js +1 -0
- package/web/dist/assets/{repo-git-CahuM1Bi.js → repo-git-D-L0KYwh.js} +1 -1
- package/web/dist/assets/{report-reader-BMw7TyID.js → report-reader-Fb02sGC6.js} +1 -1
- package/web/dist/assets/{reports-BqhgWSM-.js → reports--yxm1Dbp.js} +1 -1
- package/web/dist/assets/{resources-section-CPdErsDL.js → resources-section-CZu7afz7.js} +1 -1
- package/web/dist/assets/run-header-Bajufo9w.js +2 -0
- package/web/dist/assets/settings-agent-picker-XdHS0cXP.js +1 -0
- package/web/dist/assets/{settings-shell-Cg1j_HUU.js → settings-shell-63smMna1.js} +1 -1
- package/web/dist/assets/{sidebar-section-C7mKySo9.js → sidebar-section-Dgf9Tda6.js} +1 -1
- package/web/dist/assets/{skills-DL6gTurZ.js → skills-CVoGqJeT.js} +1 -1
- package/web/dist/assets/{tab-link-Cq8g7cFx.js → tab-link-BaKE6KnE.js} +1 -1
- package/web/dist/assets/{task-changes-BYdPYqmr.js → task-changes-Cd30VNwk.js} +1 -1
- package/web/dist/assets/{task-commits-CZs64PxA.js → task-commits-33kwaiVP.js} +1 -1
- package/web/dist/assets/{task-files-CHDvZdch.js → task-files-W2NkAX0s.js} +1 -1
- package/web/dist/assets/{task-github-item-BaAS8tc7.js → task-github-item-C7dEQxMN.js} +1 -1
- package/web/dist/assets/{task-groups-BF7_ZZTh.js → task-groups-DoiPFEfM.js} +1 -1
- package/web/dist/assets/{task-thread-DKTYTRYk.js → task-thread-Bi5cKYmZ.js} +6 -6
- package/web/dist/assets/{tasks-table-CzLkD-kr.js → tasks-table-CmESFng9.js} +1 -1
- package/web/dist/assets/{thread-state-Cnu6irf1.js → thread-state-DI7JLoTx.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-C0HmC08K.js → use-hand-to-agent-state-B869bBKO.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-qJcgwcf9.js → useInfiniteQuery-GZp9laKm.js} +1 -1
- package/web/dist/assets/useQuery-CzVHT8UE.js +1 -0
- package/web/dist/assets/{workflows-BxrHkrIx.js → workflows-CeRdeF9n.js} +3 -3
- package/web/dist/assets/{workspace-tools-DK0GgizV.js → workspace-tools-YqTAoyv7.js} +1 -1
- package/web/dist/assets/{worktrees-section-CBWXq2mc.js → worktrees-section-9fwC5DGp.js} +1 -1
- package/web/dist/index.html +14 -14
- package/web/dist/assets/accounts-section-qnA3YX9G.js +0 -1
- package/web/dist/assets/agent-defaults-section-D9oxRh7t.js +0 -1
- package/web/dist/assets/attention-VcsXbAZz.js +0 -1
- package/web/dist/assets/index-CS5yyNbo.js +0 -21
- package/web/dist/assets/remote-settings-notice-BTtluTx2.js +0 -1
- package/web/dist/assets/run-header-BpdSJ6lc.js +0 -2
- package/web/dist/assets/settings-agent-picker-By-EZVYH.js +0 -1
- package/web/dist/assets/useQuery-CkUPLiaa.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{It as r,ht as i,vt as a}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{It as r,ht as i,vt as a}from"./queries-DzwCG927.js";import{n as o}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import"./tasks-table-CmESFng9.js";import{n as s}from"./toaster-Bo5vCbz-.js";import{t as c}from"./button-BQ2y4XRB.js";import{t as l}from"./status-dot-DtAOFiIi.js";import{r as u,t as d}from"./agents-settings-path-7X6_cvUg.js";import{Hn as f,Kn as p,Qt as m,Wn as h,Xt as g,Yt as _,Zt as v}from"./index-DndX-kC-.js";var y=e(t(),1),b=n();function x({health:e,projects:t,repository:n,onAction:r}){return(0,b.jsxs)(`section`,{className:`space-y-4 rounded-xl border border-border bg-card p-6 max-md:p-4`,"aria-labelledby":`add-project-heading`,children:[(0,b.jsx)(`h2`,{id:`add-project-heading`,className:`text-lg font-normal leading-[1.5]`,children:`Add project`}),(0,b.jsx)(`p`,{className:`text-[13px] leading-[1.5] text-muted-foreground`,children:`Start a new repository, open an existing local folder, or clone a GitHub repository.`}),(0,b.jsxs)(`dl`,{className:`space-y-4 text-[13px] leading-[1.5] text-muted-foreground`,children:[e.data?.repoRoot?(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-x-3`,children:[(0,b.jsx)(`dt`,{children:`Local folder`}),(0,b.jsx)(`dd`,{className:`min-w-0 break-all`,children:e.data.repo?.root??e.data.repoRoot})]}):null,n?(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-x-3`,children:[(0,b.jsx)(`dt`,{children:`Repository`}),(0,b.jsx)(`dd`,{className:`min-w-0 break-all`,children:n.replace(/^https:\/\//,``)})]}):null,t.data?.projectsDir?(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-x-3`,children:[(0,b.jsx)(`dt`,{children:`Checkout folder`}),(0,b.jsx)(`dd`,{className:`min-w-0 break-all`,children:t.data.projectsDir})]}):null]}),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,"data-action":`new-project`,onClick:()=>r(`new`),children:`New project`}),(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,onClick:()=>r(`local`),children:`Open local folder`}),(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,onClick:()=>r(`clone`),children:`Clone from GitHub`})]})]})}function S({health:e,copying:t,onCopy:n}){return(0,b.jsxs)(`section`,{className:`space-y-4 rounded-xl border border-border bg-card p-6 max-md:p-4`,"aria-labelledby":`tools-heading`,children:[(0,b.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,b.jsx)(`h2`,{id:`tools-heading`,className:`text-lg font-normal leading-[1.5]`,children:`Tools diagnostics`}),(0,b.jsx)(o,{to:d,"data-slot":`tools-settings`,className:_,children:`Tool settings ›`})]}),(0,b.jsx)(`p`,{className:`text-[13px] leading-[1.5] text-muted-foreground`,children:`Check the tools available to this local workspace.`}),e.isError?(0,b.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:`Could not refresh tool diagnostics. Recheck to retry.`}):null,!e.data&&!e.isError?(0,b.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:`Checking installed tools…`}):null,e.data?(0,b.jsx)(`dl`,{className:`space-y-4 text-[13px] leading-[1.5] text-muted-foreground`,children:e.data.checks.map(e=>{let t=g(e);return(0,b.jsxs)(`div`,{"data-slot":`tool-row`,"data-tool":e.name,"data-available":e.available,className:`flex flex-wrap items-center gap-x-4 gap-y-1`,children:[(0,b.jsxs)(`dt`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(l,{tone:m(e)}),(0,b.jsx)(`span`,{className:`font-mono text-[13px] font-medium text-foreground`,children:e.name})]}),(0,b.jsxs)(`dd`,{className:`flex min-w-0 flex-1 items-center gap-x-3 text-muted-foreground`,children:[(0,b.jsxs)(`span`,{className:`min-w-0 break-words`,children:[v(e),e.version?` · ${e.version}`:``]}),e.available?null:(0,b.jsx)(o,{to:u(e.name),"data-slot":`tool-setup`,className:`${_} ml-auto`,children:`Set up ›`})]}),t?(0,b.jsx)(`dd`,{"data-slot":`tool-hint`,className:`basis-full min-w-0 break-words pl-[15px] text-xs leading-snug text-muted-foreground`,children:t}):null]},e.name)})}):null,e.data?.checks.length===0?(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No tool diagnostics reported by this server.`}):null,(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,disabled:e.isFetching,onClick:()=>void e.refetch(),children:e.isFetching?`Checking tools…`:`Recheck tools`}),(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,disabled:!e.data||t,onClick:()=>void n(),children:t?`Copying…`:`Copy diagnostics`})]})]})}function C(){let e=i(),t=a(),n=r(e.data?.repo?.remote),[o,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(!1);return(0,b.jsxs)(`div`,{"data-route":`workspace-tools`,className:`w-full space-y-[22px] px-9 py-9 max-md:px-[18px] max-md:py-6`,children:[(0,b.jsx)(`h1`,{className:`text-[28px] font-normal leading-[1.5] max-md:text-[24px]`,children:`Workspace tools`}),(0,b.jsx)(x,{health:e,projects:t,repository:n,onAction:c}),(0,b.jsx)(S,{health:e,copying:l,onCopy:async()=>{if(!(!e.data||l)){u(!0);try{await navigator.clipboard.writeText(JSON.stringify({version:e.data.version,checks:e.data.checks},null,2)),s(`Diagnostics copied`)}catch{s(`Could not copy diagnostics. Please try again.`,{tone:`danger`})}finally{u(!1)}}}}),o===`new`?(0,b.jsx)(f,{open:!0,onOpenChange:e=>{e||c(null)}}):null,o===`local`?(0,b.jsx)(p,{open:!0,onOpenChange:e=>{e||c(null)}}):null,o===`clone`?(0,b.jsx)(h,{open:!0,onOpenChange:e=>{e||c(null)}}):null]})}export{C as WorkspaceToolsRoute};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./react-runtime-CCIEwYL0.js";import{A as t,An as n,Mr as r,ci as i,jr as a}from"./project-scope-context-
|
|
1
|
+
import{t as e}from"./react-runtime-CCIEwYL0.js";import{A as t,An as n,Mr as r,ci as i,jr as a}from"./project-scope-context-D9axDY18.js";import{Lt as o,_ as s,ht as c,in as l}from"./queries-DzwCG927.js";import{n as u}from"./toaster-Bo5vCbz-.js";import{u as d}from"./design-icons-CzEoMH9c.js";import{t as f}from"./button-BQ2y4XRB.js";import{t as p}from"./project-router-CDPfL2Jz.js";import{t as m}from"./centered-state-V15AR_qo.js";import{Qn as h,_n as g}from"./index-DndX-kC-.js";import{n as _,r as v,t as y}from"./remote-settings-notice-kmlL_JEi.js";import{n as b}from"./saved-draft-BwzBc-_Y.js";import{t as x}from"./settings-field-Bl6WuvGX.js";import{n as S}from"./project-location-DzOgHfcA.js";var C=e();function w({copy:e,savedCommandCount:t,settingsAdmin:n,configPath:r,issue:i,invalid:a,children:o}){let s=e.slot;return(0,C.jsxs)(C.Fragment,{children:[t===0&&i===null?(0,C.jsx)(`p`,{"data-slot":`${s}-empty`,className:`text-sm text-foreground`,children:e.empty}):null,o,n===!1?(0,C.jsxs)(`p`,{"data-slot":`${s}-readonly`,className:`text-xs text-foreground`,children:[`Edit `,(0,C.jsxs)(`code`,{children:[e.key,`.commands`]}),` in`,` `,r===null?(0,C.jsxs)(C.Fragment,{children:[`the project’s `,(0,C.jsx)(`code`,{children:`.ai/cezar/config.json`})]}):(0,C.jsx)(`code`,{className:`break-all`,children:r}),` `,`on the machine running Squawk. `,e.fileEditApplies,` No restart is needed. To edit here, the host operator runs `,(0,C.jsx)(`code`,{children:y}),`.`]}):null,i===null?null:(0,C.jsxs)(`p`,{"data-slot":`${s}-issue`,className:`text-[11px] text-danger`,children:[`config.json has an invalid `,e.key,` (`,i,`) — saving replaces it.`]}),a===null?null:(0,C.jsx)(`p`,{"data-slot":`${s}-invalid`,className:`text-[11px] text-danger`,children:a})]})}function T(e,t){let n=e.split(`
|
|
2
2
|
`).map(e=>e.trim()).filter(e=>e!==``),i=Number(t);return{commands:n,timeoutSeconds:i,invalid:n.length>20?`Enter at most 20 commands.`:n.some(e=>e.length>4e3)?`Keep each command under ${a.toLocaleString(`en-US`)} characters.`:t.trim()===``||!Number.isInteger(i)||i<1||i>7200?`Enter a whole number of seconds from 1 to ${r}.`:null}}var E={setup:{key:`worktreeSetup`,issueKey:`worktreeSetupIssue`,slot:`worktree-setup`,title:`Prepare new worktrees`,hint:`Runs in every new task and worker worktree before the agent starts, in order, stopping at the first failure. Leave commands empty to skip setup.`,empty:`No setup commands configured. No commands will run in new worktrees.`,label:`Worktree setup commands, one per line`,example:`npm ci`,fileEditApplies:`Valid file edits apply to new worktrees.`,saved:`Worktree setup saved`,cleared:`Worktree setup cleared`,save:`Save setup`},teardown:{key:`worktreeTeardown`,issueKey:`worktreeTeardownIssue`,slot:`worktree-teardown`,title:`Stop worker services before destroy`,hint:`Runs in a worker’s worktree when the worker is destroyed, before destroy stops the worker’s processes, in order, stopping at the first failure. A failure is recorded on the worker and destroy goes on. Leave commands empty to skip teardown.`,empty:`No teardown commands configured. Destroy runs no commands in worker worktrees.`,label:`Worktree teardown commands, one per line`,example:`docker compose down`,fileEditApplies:`Valid file edits apply to the next worker destroy.`,saved:`Worktree teardown saved`,cleared:`Worktree teardown cleared`,save:`Save teardown`}};function D({config:e,copy:a}){let s=i(),d=c(),p=v(),m=S(),h=m===null?null:`${m.replace(/\/$/,``)}/.ai/cezar/config.json`,y=d.data?.capabilities?.settingsAdmin===!0,E=e[a.key],D=e[a.issueKey],O=E?.commands??[],k=E?.timeoutSeconds??900,[A,j]=b(O.join(`
|
|
3
3
|
`)),[M,N]=b(String(k)),{commands:P,timeoutSeconds:F,invalid:I}=T(A,M),L=P.length===O.length&&P.every((e,t)=>e===O[t])&&(P.length===0||F===k),R=D===null&&L;g(y&&!L);let z=l({mutationFn:e=>t(e),onSuccess:e=>{s.setQueryData(o.config,e),j(P.join(`
|
|
4
4
|
`)),u(P.length===0?a.cleared:a.saved)},onError:e=>{u(e.message,{tone:`danger`}),e instanceof n&&e.status===409&&p()}}),B=()=>z.mutate({[a.key]:P.length===0?null:{commands:P,...F===900?{}:{timeoutSeconds:F}}}),V=`block rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50 read-only:bg-muted read-only:text-muted-foreground`;return(0,C.jsxs)(x,{title:a.title,hint:a.hint,children:[(0,C.jsx)(_,{risk:`These commands run on the machine running Squawk`}),(0,C.jsxs)(w,{copy:a,savedCommandCount:O.length,settingsAdmin:d.data?.capabilities?.settingsAdmin,configPath:h,issue:D,invalid:I,children:[(0,C.jsx)(`textarea`,{"data-slot":`${a.slot}-commands`,"data-reports-dirty":``,"aria-label":a.label,rows:4,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,value:A,readOnly:!y,disabled:z.isPending,onChange:e=>j(e.target.value),className:`${V} min-h-24 w-full resize-y font-mono text-[13px] leading-relaxed`}),(0,C.jsxs)(`p`,{className:`text-xs text-soft-foreground`,children:[`Example only: `,(0,C.jsx)(`code`,{children:a.example}),`. Commands run only after they are saved.`]}),(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-soft-foreground`,children:[(0,C.jsx)(`span`,{children:`Timeout per command`}),(0,C.jsx)(`input`,{type:`number`,inputMode:`numeric`,min:1,max:r,step:1,"data-slot":`${a.slot}-timeout`,"data-reports-dirty":``,value:M,readOnly:!y,disabled:z.isPending,onChange:e=>N(e.target.value),className:`${V} min-h-11 w-28 md:min-h-0`}),(0,C.jsx)(`span`,{children:`seconds`})]}),(0,C.jsx)(f,{type:`button`,variant:`primary`,size:`sm`,className:`min-h-11 self-start md:min-h-0`,"data-action":`${a.slot}-save`,disabled:!y||R||I!==null||z.isPending,onClick:B,children:a.save})]})]})]})}var O=0,k=1e3;function A(){let e=s();return e.isPending?(0,C.jsx)(`p`,{"data-slot":`worktrees-loading`,className:`p-4 text-[13px] text-soft-foreground md:p-6`,children:`Loading worktree settings…`}):e.isError?(0,C.jsx)(m,{icon:(0,C.jsx)(h,{}),tone:`danger`,title:`Worktree settings did not load`,subtitle:e.error.message,heading:`h2`}):(0,C.jsx)(j,{config:e.data})}function j({config:e}){let n=i(),r=l({mutationFn:e=>t(e),onSuccess:e=>n.setQueryData(o.config,e),onError:e=>u(e.message,{tone:`danger`})}),[a,s]=b(String(e.worktreeRetention)),c=Number(a),m=a.trim()===``||!Number.isInteger(c)||c<O||c>k,h=e.worktreeRetention===(m?-1:c);return g(!h),(0,C.jsxs)(`div`,{"data-slot":`worktrees-section`,className:`mx-auto flex w-full max-w-2xl flex-col gap-7 p-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:p-6 md:pb-6`,children:[(0,C.jsxs)(x,{title:`Keep N finished worktrees`,hint:`Older finished worktrees are reclaimed to free disk; their branch is kept so the work stays recoverable. 0 = unlimited. In-review and running tasks are never reclaimed, so the count on disk can exceed this.`,children:[(0,C.jsxs)(`div`,{"data-reports-dirty":``,className:`flex items-center gap-2`,children:[(0,C.jsx)(`input`,{type:`number`,inputMode:`numeric`,min:O,max:k,step:1,"aria-label":`Keep last N finished worktrees`,"data-slot":`resources-worktree-retention`,value:a,disabled:r.isPending,onChange:e=>s(e.target.value),className:`block w-32 rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50`}),(0,C.jsx)(`span`,{className:`text-xs text-soft-foreground`,children:`worktrees`}),(0,C.jsx)(f,{type:`button`,variant:`primary`,size:`sm`,className:`self-start`,"data-action":`resources-save-retention`,disabled:h||m||r.isPending,onClick:()=>r.mutate({worktreeRetention:c},{onSuccess:()=>{n.invalidateQueries({queryKey:o.worktrees}),u(c===0?`Keeping all worktrees (unlimited)`:`Keeping the last ${c} finished worktree${c===1?``:`s`}`)}}),children:`Save retention`})]}),m?(0,C.jsxs)(`p`,{"data-slot":`resources-retention-invalid`,className:`text-[11px] text-danger`,children:[`Enter a whole number from `,O,` to `,k,` (0 = unlimited).`]}):(0,C.jsx)(`p`,{className:`text-[11px] text-soft-foreground`,children:c===0?`Keeping every finished worktree.`:`Keeping the last ${c} finished worktree${c===1?``:`s`} on disk.`})]}),(0,C.jsx)(D,{config:e,copy:E.setup}),(0,C.jsx)(D,{config:e,copy:E.teardown}),(0,C.jsxs)(p,{to:`/git/cleanup`,"data-slot":`worktrees-manage-link`,className:`inline-flex min-h-11 items-center gap-1 self-start text-[13px] font-medium text-link-foreground hover:underline focus-visible:outline-2 focus-visible:outline-ring md:min-h-0`,children:[`Manage worktrees on Git`,(0,C.jsx)(d,{"aria-hidden":`true`,className:`size-[14px]`})]})]})}export{A as WorktreesSection};
|
package/web/dist/index.html
CHANGED
|
@@ -59,28 +59,28 @@
|
|
|
59
59
|
}
|
|
60
60
|
})()
|
|
61
61
|
</script>
|
|
62
|
-
<script type="module" crossorigin src="/assets/index-
|
|
62
|
+
<script type="module" crossorigin src="/assets/index-DndX-kC-.js"></script>
|
|
63
63
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
|
|
64
64
|
<link rel="modulepreload" crossorigin href="/assets/react-runtime-CCIEwYL0.js">
|
|
65
65
|
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-rHxsej31.js">
|
|
66
66
|
<link rel="modulepreload" crossorigin href="/assets/utils-DSMR_WLb.js">
|
|
67
67
|
<link rel="modulepreload" crossorigin href="/assets/live-refetch-CZb2VOyu.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/live-protocol-DteqtbyN.js">
|
|
69
|
-
<link rel="modulepreload" crossorigin href="/assets/project-scope-context-
|
|
70
|
-
<link rel="modulepreload" crossorigin href="/assets/useInfiniteQuery-
|
|
71
|
-
<link rel="modulepreload" crossorigin href="/assets/useQuery-
|
|
72
|
-
<link rel="modulepreload" crossorigin href="/assets/live-reads-
|
|
69
|
+
<link rel="modulepreload" crossorigin href="/assets/project-scope-context-D9axDY18.js">
|
|
70
|
+
<link rel="modulepreload" crossorigin href="/assets/useInfiniteQuery-GZp9laKm.js">
|
|
71
|
+
<link rel="modulepreload" crossorigin href="/assets/useQuery-CzVHT8UE.js">
|
|
72
|
+
<link rel="modulepreload" crossorigin href="/assets/live-reads-BxjlQXfN.js">
|
|
73
73
|
<link rel="modulepreload" crossorigin href="/assets/toaster-Bo5vCbz-.js">
|
|
74
|
-
<link rel="modulepreload" crossorigin href="/assets/queries-
|
|
74
|
+
<link rel="modulepreload" crossorigin href="/assets/queries-DzwCG927.js">
|
|
75
75
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-Czpn1I53.js">
|
|
76
76
|
<link rel="modulepreload" crossorigin href="/assets/chunk-KS7C4IRE-Cg8l-LDN.js">
|
|
77
77
|
<link rel="modulepreload" crossorigin href="/assets/cez-idle-CQtDz5jk.js">
|
|
78
78
|
<link rel="modulepreload" crossorigin href="/assets/dist-BW234Kg5.js">
|
|
79
79
|
<link rel="modulepreload" crossorigin href="/assets/dist-C5mlVBmd.js">
|
|
80
|
-
<link rel="modulepreload" crossorigin href="/assets/label-
|
|
81
|
-
<link rel="modulepreload" crossorigin href="/assets/attention-
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/task-groups-
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/tasks-table-
|
|
80
|
+
<link rel="modulepreload" crossorigin href="/assets/label-6PgIe3Ny.js">
|
|
81
|
+
<link rel="modulepreload" crossorigin href="/assets/attention-CvHM4cjG.js">
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/task-groups-DoiPFEfM.js">
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/tasks-table-CmESFng9.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="/assets/design-icons-CzEoMH9c.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-BHp8sXmF.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="/assets/bot-TkDIw4y-.js">
|
|
@@ -94,22 +94,22 @@
|
|
|
94
94
|
<link rel="modulepreload" crossorigin href="/assets/dist-BAoXdNsT.js">
|
|
95
95
|
<link rel="modulepreload" crossorigin href="/assets/dropdown-menu-4e2iKSMT.js">
|
|
96
96
|
<link rel="modulepreload" crossorigin href="/assets/own-lookup-DS54wXvD.js">
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/open-in-menu-
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/open-in-menu-AZMtej8C.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/dist-C28wFbz0.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="/assets/chevron-down-CHGyCDBH.js">
|
|
100
100
|
<link rel="modulepreload" crossorigin href="/assets/nav-row-styles-DqKjMToI.js">
|
|
101
101
|
<link rel="modulepreload" crossorigin href="/assets/chevron-right-BENZ-1ZN.js">
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/folder-browser-
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/folder-browser-CffyHz8w.js">
|
|
103
103
|
<link rel="modulepreload" crossorigin href="/assets/eye-B8okNWXU.js">
|
|
104
104
|
<link rel="modulepreload" crossorigin href="/assets/format-BNCkW110.js">
|
|
105
105
|
<link rel="modulepreload" crossorigin href="/assets/play-CmVAj_fu.js">
|
|
106
106
|
<link rel="modulepreload" crossorigin href="/assets/popover-BPgUYFyu.js">
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/reference-chip-
|
|
107
|
+
<link rel="modulepreload" crossorigin href="/assets/reference-chip-BnIoiMgY.js">
|
|
108
108
|
<link rel="modulepreload" crossorigin href="/assets/dist-Da4ckcJG.js">
|
|
109
109
|
<link rel="modulepreload" crossorigin href="/assets/switch-Bv2Zf1uU.js">
|
|
110
110
|
<link rel="modulepreload" crossorigin href="/assets/badge-D9JrXe0o.js">
|
|
111
111
|
<link rel="modulepreload" crossorigin href="/assets/dialog-BVF6dIeS.js">
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/project-router-
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/project-router-CDPfL2Jz.js">
|
|
113
113
|
<link rel="modulepreload" crossorigin href="/assets/status-dot-DtAOFiIi.js">
|
|
114
114
|
<link rel="modulepreload" crossorigin href="/assets/command-CDt1BsZy.js">
|
|
115
115
|
<link rel="modulepreload" crossorigin href="/assets/project-order-AcHI4Dcl.js">
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{An as r,Ar as i,Pn as a,ci as o,jn as s,nn as c}from"./project-scope-context-d3J3hWPR.js";import{$t as l,Ct as u,Gt as d,Ht as f,Kt as p,Mt as m,Rt as h,Ut as g,Xt as _,bt as v,ht as y,in as b,kt as x,lt as S,ot as C,st as w,ut as ee,yt as te}from"./queries-dnpdX9VT.js";import{t as ne}from"./useQuery-CkUPLiaa.js";import{f as T}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{n as E}from"./toaster-Bo5vCbz-.js";import{y as D}from"./design-icons-CzEoMH9c.js";import{t as O}from"./createLucideIcon-BHp8sXmF.js";import{t as k}from"./folder-browser-DJd_sQFq.js";import{t as A}from"./button-BQ2y4XRB.js";import{t as j}from"./badge-D9JrXe0o.js";import{a as M,i as N,o as P,r as F,s as I,t as L}from"./dialog-BVF6dIeS.js";import{t as R}from"./status-dot-DtAOFiIi.js";import{n as z}from"./agents-settings-path-7X6_cvUg.js";import{t as B}from"./centered-state-V15AR_qo.js";import{Gt as V,Ht as H,Jt as U,Kt as W,N as G,Ut as K,Vt as q,Wt as J,j as re,qt as Y}from"./index-CS5yyNbo.js";import{n as X,r as ie,t as ae}from"./settings-agent-picker-By-EZVYH.js";var oe=O(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),Z=e(t(),1),Q=n(),se=`~/.claude-second`;function ce({open:e,onOpenChange:t,providers:n,initialProvider:r}){let i=_().data,[a,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(null),[l,u]=(0,Z.useState)(r??n[0]??`claude`),[f,p]=(0,Z.useState)(``),[m,h]=(0,Z.useState)(``),[g,v]=(0,Z.useState)(!1),y=ee(),b=m.trim();return(0,Q.jsx)(L,{open:e,onOpenChange:t,children:(0,Q.jsxs)(F,{"data-slot":`add-account-dialog`,className:`sm:max-w-lg`,children:[(0,Q.jsxs)(P,{children:[(0,Q.jsx)(I,{children:`Add agent account`}),(0,Q.jsx)(N,{children:`The config folder this account uses. It does not have to exist yet — Connect signs in and the CLI creates it.`})]}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:`Agent`}),(0,Q.jsx)(`select`,{"aria-label":`Agent`,"data-slot":`add-account-provider`,value:l,onChange:e=>u(e.target.value),className:`rounded-md border border-input bg-card px-2 py-1 text-[13px] outline-none focus-visible:border-ring`,children:n.map(e=>(0,Q.jsx)(`option`,{value:e,children:e},e))})]}),(0,Q.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Name`}),(0,Q.jsx)(`input`,{type:`text`,"aria-label":`Account name`,"data-slot":`add-account-label`,value:f,placeholder:`Work`,onChange:e=>p(e.target.value),className:`min-w-0 flex-1 rounded-md border border-input bg-card px-2 py-1 text-[13px] outline-none focus-visible:border-ring`})]})]}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Q.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Folder`}),(0,Q.jsx)(`input`,{type:`text`,spellCheck:!1,autoComplete:`off`,"aria-label":`Config folder`,"data-slot":`add-account-dir`,value:m,placeholder:d(i,l)?.accountFolderExample??se,onChange:e=>{h(e.target.value),c(null),y.reset()},className:`min-w-0 flex-1 rounded-md border border-input bg-card px-2 py-1 font-mono text-[13px] outline-none focus-visible:border-ring`}),(0,Q.jsx)(A,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`add-account-browse`,"aria-expanded":g,onClick:()=>v(e=>!e),children:g?`Hide folders`:`Browse…`})]}),(0,Q.jsxs)(`p`,{className:`text-[11px] text-soft-foreground`,children:[`A `,(0,Q.jsx)(`code`,{children:`~`}),` is kept as written and expanded when the agent runs.`]})]}),g?(0,Q.jsx)(k,{path:a,selected:s,onSelect:e=>{c(e),h(e.path),y.reset()},onEnter:e=>{o(e),c(null),y.reset()},showHidden:!0,emptyHint:`No subfolders here — pick this folder by typing its path above.`}):null,y.isError?(0,Q.jsx)(`p`,{"data-slot":`add-account-error`,className:`min-w-0 break-words text-[13px] text-danger`,children:y.error instanceof Error?y.error.message:`could not add that folder`}):null,(0,Q.jsxs)(M,{className:`min-w-0 sm:items-center sm:justify-end`,children:[(0,Q.jsx)(A,{variant:`outline`,onClick:()=>t(!1),children:`Cancel`}),(0,Q.jsx)(A,{"data-slot":`add-account-confirm`,disabled:b===``||y.isPending,onClick:()=>{b===``||y.isPending||y.mutate({provider:l,configDir:b,...f.trim()?{label:f.trim()}:{}},{onSuccess:()=>{t(!1),p(``),h(``),c(null),v(!1),E(`Account added — use Connect to sign in`)}})},children:y.isPending?`Adding…`:`Add account`})]})]})})}async function le(e){return a(await s.api.v1[`runner-install`][`:runner`].$get({param:{runner:e}}),`/runner-install/:runner`)}async function ue(e,t){return a(await s.api.v1[`runner-install`][`:runner`].$post({param:{runner:e},json:{action:t}}),`/runner-install/:runner`)}var de={idle:``,checking:`Checking for updates…`,downloading:`Downloading CLI…`,verifying:`Verifying CLI…`,extracting:`Extracting CLI…`,activating:`Activating CLI…`,removing:`Removing CLI…`,failed:``};function fe(e){let t=y().data?.capabilities?.settingsAdmin===!0,n=o(),r=[`runner-install`,e],i=ne({queryKey:r,queryFn:()=>le(e),enabled:t,retry:!1,refetchInterval:e=>{if(e.state.error)return!1;let t=e.state.data?.phase;return t&&t!==`idle`&&t!==`failed`?1e3:6e4}}),a=b({mutationFn:t=>ue(e,t),retry:!1,onSuccess:e=>{n.setQueryData(r,e)}}),s=i.data;return{allowed:t,data:s,busy:a.isPending||!!s&&s.phase!==`idle`&&s.phase!==`failed`,error:a.error?.message??i.error?.message??s?.error,action:a,status:i}}function pe({state:e}){let{data:t,busy:n,action:r,status:i}=e;if(t?.supported===!1)return(0,Q.jsx)(`p`,{children:`This host is not supported by the CLI installer.`});let a=!!t?.installedVersion;return(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Q.jsx)(A,{className:`min-h-11 active:opacity-80`,disabled:n||!t,onClick:()=>r.mutate(a?`update`:`install`),children:a?`Update CLI`:`Install CLI`}),a?(0,Q.jsx)(A,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>r.mutate(`remove`),children:`Remove CLI`}):null,(0,Q.jsx)(A,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>{i.isError?i.refetch():r.mutate(`check`)},children:`Check for updates`})]})}function $({runner:e}){let t=fe(e),{allowed:n,data:r,busy:i,error:a}=t;return n?(0,Q.jsxs)(`section`,{"aria-label":`CLI installation`,className:`grid gap-3`,children:[(0,Q.jsxs)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:[r?.installedVersion?`Installed CLI ${r.installedVersion}`:`CLI not installed`,r?.latestVersion?` · Latest ${r.latestVersion}`:``,i&&r?` · ${de[r.phase]}`:``]}),a?(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}):null,(0,Q.jsx)(pe,{state:t}),r?.installedVersion?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Removing the CLI keeps account data and lets running tasks finish.`}):null]}):null}var me={connected:{label:`Connected`,tone:`success`},disconnected:{label:`Not connected`,tone:`pending`},"not-installed":{label:`Not installed`,tone:`neutral`},unknown:{label:`Could not verify`,tone:`danger`}};function he(){let e=w(),t=_();if(e.isPending||t.isPending)return(0,Q.jsx)(`p`,{"data-slot":`accounts-loading`,className:`p-4 text-[13px] text-soft-foreground md:p-6`,children:`Loading agents…`});let n=e.error??t.error;return n?(0,Q.jsx)(B,{icon:(0,Q.jsx)(oe,{}),tone:`danger`,title:`Agents did not load`,subtitle:n.message,heading:`h2`}):(0,Q.jsx)(_e,{data:e.data,runners:t.data})}function ge(){let{hash:e}=T();(0,Z.useEffect)(()=>{if(!e)return;let t=document.getElementById(decodeURIComponent(e.slice(1)));t&&(t.scrollIntoView?.({block:`start`}),t.focus({preventScroll:!0}))},[e])}function _e({data:e,runners:t}){let n=y(),[r,i]=(0,Z.useState)(null),[a,o]=(0,Z.useState)(null),s=u();return ge(),(0,Q.jsxs)(`div`,{"data-slot":`accounts-section`,className:`mx-auto flex w-full max-w-2xl flex-col gap-5 p-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:p-6 md:pb-6`,children:[(0,Q.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Install, update and sign in to each agent, and set what a project runs when it has not chosen.`}),e.editable?null:(0,Q.jsx)(`p`,{"data-slot":`accounts-hosted`,className:`text-[13px] text-soft-foreground`,children:`Agent accounts are managed from the machine that owns the checkout — this cockpit runs in hosted mode.`}),(0,Q.jsx)(`div`,{"data-slot":`agent-cards`,className:`flex flex-col gap-4`,children:t.runners.map(r=>(0,Q.jsx)(ye,{entry:r,check:n.data?.checks?.find(e=>e.name===r.id),settingsAdmin:n.data?.capabilities?.settingsAdmin===!0,runners:t,editable:e.editable,accounts:e.profiles.filter(e=>e.provider===r.id),canCarryAccounts:e.profileCapableProviders.includes(r.id),onAdd:()=>i(r.id),onRemove:o},r.id))}),(0,Q.jsx)(be,{runners:t}),r===null?null:(0,Q.jsx)(ce,{open:!0,onOpenChange:e=>!e&&i(null),providers:e.profileCapableProviders,initialProvider:r},r),(0,Q.jsx)(q,{open:a!==null,onOpenChange:e=>!e&&o(null),children:(0,Q.jsxs)(J,{"data-slot":`accounts-remove-confirm`,children:[(0,Q.jsxs)(Y,{children:[(0,Q.jsxs)(U,{children:[`Remove “`,a?.label,`”?`]}),(0,Q.jsxs)(V,{children:[`This only forgets the account. Nothing in `,a?.configDir,` is deleted — not your login, not your sessions. Projects using it fall back to the default account, and tasks that ran under it can no longer be resumed from here.`]})]}),(0,Q.jsxs)(W,{children:[(0,Q.jsx)(K,{children:`Cancel`}),(0,Q.jsx)(H,{"data-action":`accounts-remove-confirm`,disabled:s.isPending,onClick:()=>{let e=a;e&&s.mutate(e.id,{onSuccess:()=>{o(null),E(`Removed ${e.label}`)},onError:e=>E(e.message,{tone:`danger`})})},children:`Remove`})]})]})})]})}function ve({entry:e,check:t}){return t===void 0?(0,Q.jsx)(`span`,{"data-slot":`agent-installed`,children:`Checking…`}):t.available?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{"data-slot":`agent-installed`,children:`Installed`}),t.version?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,Q.jsx)(`span`,{"data-slot":`agent-version`,children:t.version})]}):null]}):(0,Q.jsxs)(`span`,{"data-slot":`agent-installed`,children:[`Not installed`,e.installHint?(0,Q.jsxs)(Q.Fragment,{children:[` — `,(0,Q.jsx)(`code`,{className:`break-all`,children:e.installHint})]}):null]})}function ye({entry:e,check:t,settingsAdmin:n,runners:r,editable:i,accounts:a,canCarryAccounts:o,onAdd:s,onRemove:c}){let l=e.id,u=e.managedInstall===!0&&n,d=a.filter(e=>e.isDefault).length,f=`${z(l)}-title`;return(0,Q.jsxs)(`section`,{id:z(l),tabIndex:-1,"aria-labelledby":f,"data-slot":`accounts-provider`,"data-provider":l,className:`settings-agent-card flex flex-col gap-4 rounded-lg border border-border bg-card p-4`,children:[(0,Q.jsx)(`h3`,{id:f,className:`settings-account-provider-title`,children:e.displayName}),u?(0,Q.jsx)($,{runner:l}):null,(0,Q.jsxs)(`div`,{className:`settings-account-installation settings-readout`,children:[u?null:(0,Q.jsx)(ve,{entry:e,check:t}),i?(0,Q.jsxs)(`span`,{className:`settings-account-count`,children:[a.length,` `,a.length===1?`account`:`accounts`,` (`,d,` discovered, `,a.length-d,` added)`]}):null]}),i?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`ul`,{children:a.map(e=>(0,Q.jsx)(Ce,{account:e,runners:r,onRemove:()=>c(e)},e.id))}),o?(0,Q.jsx)(`div`,{className:`settings-account-add-row`,children:(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`accounts-add`,"data-provider":l,onClick:s,children:`Add account`})}):(0,Q.jsxs)(`p`,{"data-slot":`accounts-single-only`,className:`text-[11px] text-soft-foreground`,children:[e.displayName,` can only hold one account here: it keeps its credentials outside its config folder, so a second folder would change settings without changing the login — which would say “work account” while billing the other one.`]})]}):e.browserLogin?(0,Q.jsxs)(`div`,{"data-slot":`hosted-sign-in`,className:`flex flex-wrap items-center gap-3`,children:[(0,Q.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Discovered account`}),(0,Q.jsx)(X,{provider:l,label:e.displayName})]}):null]})}function be({runners:e}){let[t,n]=(0,Z.useState)(null),r=o(),i=m(),a=te(),s=l(p(e)),u=b({mutationFn:e=>c(e),onSuccess:e=>r.setQueryData(h.config,e),onError:e=>E(e.message,{tone:`danger`})});if(i.data===void 0)return null;let d=ie([],e),g=i.data.agentDefaults.runner??`claude`,_=f(t??g,p(e))??t??g,v=i.data.agentDefaults.models??{};return(0,Q.jsxs)(`section`,{"data-slot":`accounts-defaults`,className:`flex flex-col gap-3 rounded-lg border border-border bg-card/40 p-3.5`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:`Defaults for new projects`}),(0,Q.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`What a project runs when it has not chosen for itself — set once instead of per repository. A project that has chosen keeps its own.`})]}),(0,Q.jsx)(ae,{rows:d,runner:g,accountFor:()=>null,providerStatus:a,disabled:u.isPending,onPick:e=>{e!==g&&u.mutate({agentDefaults:{runner:e}})}}),(0,Q.jsxs)(`div`,{className:`settings-account-models flex flex-col gap-2`,children:[(0,Q.jsxs)(`label`,{className:`settings-model-agent-choice`,children:[(0,Q.jsx)(`span`,{children:`Default model for`}),(0,Q.jsx)(`select`,{"aria-label":`Model agent`,value:_,onChange:e=>n(e.target.value),children:e.runners.map(e=>(0,Q.jsx)(`option`,{value:e.id,children:e.displayName},e.id))})]}),e.runners.filter(e=>e.id===_).map(t=>(0,Q.jsxs)(`label`,{className:`settings-account-model flex items-center gap-3`,children:[(0,Q.jsx)(D,{className:`size-4 text-accent-icon shrink-0`}),(0,Q.jsx)(`span`,{className:`w-24 shrink-0 text-xs text-muted-foreground`,children:t.displayName}),(0,Q.jsxs)(`select`,{"aria-label":`Default model for ${t.pickerLabel}`,"data-slot":`accounts-default-model`,"data-runner":t.id,value:v[t.id]??``,disabled:u.isPending,onChange:e=>u.mutate({agentDefaults:{models:{[t.id]:e.target.value||null}}}),className:`block w-full max-w-xs rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50`,children:[G(t.id,e,s[t.id]?.data,[v[t.id]]).map(e=>(0,Q.jsx)(`option`,{value:e.id,children:e.id===``?`Native default`:e.label},e.id)),(0,Q.jsx)(xe,{runner:t.id,runners:e,catalog:s[t.id]})]})]},t.id))]})]})}function xe({runner:e,runners:t,catalog:n}){let r=re(e,t,n);return r?(0,Q.jsx)(`option`,{disabled:!0,children:r}):null}function Se({account:e,runners:t,status:n}){let i=S();return(0,Q.jsxs)(Q.Fragment,{children:[n&&n.status!==`connected`&&d(t,e.provider)?.browserLogin?(0,Q.jsx)(X,{provider:e.provider,...e.isDefault?{}:{profileId:e.id},label:e.label}):null,n&&n.status!==`connected`&&d(t,e.provider)?.terminalLogin!==!1?(0,Q.jsx)(A,{type:`button`,size:`sm`,"data-action":`account-connect`,disabled:i.isPending,onClick:()=>i.mutate({provider:e.provider,...e.isDefault?{}:{profileId:e.id}},{onSuccess:e=>E(e.opened?`Finish signing in in the terminal, then Check again.`:`This account is already connected.`),onError:e=>E(e instanceof r&&e.command?`${e.message} — run: ${e.command}`:e.message,{tone:`danger`})}),children:`Connect`}):null]})}function Ce({account:e,runners:t,onRemove:n}){let r=i(e),a=v(),o=C(r,e.status===void 0),s=e.status??o.data?.status,c=s?me[s.status]:void 0;return(0,Q.jsx)(`li`,{"data-slot":`account-row`,"data-account":e.id,className:`flex flex-col gap-2 px-3.5 py-3`,children:(0,Q.jsxs)(`div`,{className:`settings-account-card`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[13px] font-medium text-foreground`,children:e.label}),e.isDefault?(0,Q.jsx)(j,{variant:`ghost`,className:`shrink-0 text-[12px] text-muted-foreground`,children:`discovered`}):null]}),(0,Q.jsxs)(`div`,{className:`settings-account-readout settings-readout`,children:[(0,Q.jsx)(`p`,{"data-slot":`account-path`,className:`mt-0.5 truncate font-mono text-[11px] text-soft-foreground`,title:e.path,children:e.configDir}),(0,Q.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,Q.jsx)(R,{tone:c?.tone??`neutral`,pulse:c===void 0}),(0,Q.jsx)(`span`,{"data-slot":`account-status`,children:c?.label??`Checking…`}),!s||s.requiresAccountHome===!1?null:e.exists?e.looksValid?null:(0,Q.jsxs)(`span`,{"data-slot":`account-unrecognised`,children:[`— this folder does not look like `,g(t,e.provider),` config yet`]}):(0,Q.jsx)(`span`,{"data-slot":`account-missing`,children:`— folder not created yet; Connect will make it`})]}),s?.hint?(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s.hint}):null]})]}),(0,Q.jsxs)(`div`,{className:`settings-account-actions`,children:[(0,Q.jsx)(Se,{account:e,runners:t,status:s}),(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-recheck`,disabled:a.isPending,title:`Re-probe this account's login now, instead of waiting for the cached answer`,onClick:()=>a.mutate(r,{onError:e=>E(e.message,{tone:`danger`})}),children:`Check again`}),(0,Q.jsx)(we,{account:e,onRemove:n})]})]})})}function we({account:e,onRemove:t}){let[n,r]=(0,Z.useState)(!1),[i,a]=(0,Z.useState)(e.label),o=x();return(0,Q.jsx)(Q.Fragment,{children:e.isDefault?null:(0,Q.jsx)(`div`,{"data-slot":`account-manage`,className:`settings-account-management`,children:n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`input`,{type:`text`,autoFocus:!0,"aria-label":`Name for ${e.label}`,"data-slot":`account-rename-input`,value:i,onChange:e=>a(e.target.value),className:`w-48 rounded-md border border-input bg-card px-2 py-1 text-xs outline-none focus-visible:border-ring`}),(0,Q.jsx)(A,{type:`button`,size:`sm`,"data-action":`account-rename-save`,disabled:o.isPending||i.trim()===``||i.trim()===e.label,onClick:()=>o.mutate({id:e.id,label:i.trim()},{onSuccess:()=>r(!1),onError:e=>E(e.message,{tone:`danger`})}),children:`Save`}),(0,Q.jsx)(A,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{a(e.label),r(!1)},children:`Cancel`})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename`,onClick:()=>r(!0),children:`Rename`}),(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-remove`,onClick:t,children:`Remove account`}),(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Renaming changes what Squawk calls this account, not its folder.`})]})})})}export{he as GlobalAgentsSection};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{A as r,An as i,Ut as a,br as o,ci as s,r as c,un as l}from"./project-scope-context-d3J3hWPR.js";import{$t as u,Dt as d,Et as f,Kt as p,Lt as m,Qt as h,Rt as g,S as _,Ut as v,Wt as y,Xt as b,_ as x,in as S,st as C,vt as w,xt as T,yt as E}from"./queries-dnpdX9VT.js";import{n as D}from"./toaster-Bo5vCbz-.js";import{s as O}from"./design-icons-CzEoMH9c.js";import{t as k}from"./button-BQ2y4XRB.js";import{t as A}from"./switch-Bv2Zf1uU.js";import{t as j}from"./status-dot-DtAOFiIi.js";import{t as M}from"./centered-state-V15AR_qo.js";import{N,_n as P,j as F}from"./index-CS5yyNbo.js";import{t as I}from"./textarea-vJt9undk.js";import{a as L,i as R,n as z,r as B,t as V}from"./settings-agent-picker-By-EZVYH.js";import{n as H}from"./saved-draft-BwzBc-_Y.js";var U=e(t(),1),W=n(),G={connected:{label:`Credentials found`,tone:`success`},disconnected:{label:`Not connected`,tone:`pending`},"not-installed":{label:`Not installed`,tone:`neutral`},unknown:{label:`Could not verify`,tone:`danger`}};function K(e,t,n){return{providers:e.providers.map(e=>e.provider===t?{...e,enabled:n}:e)}}function q(e,t){return e?G[e]:t?{label:`Checking…`,tone:`neutral`}:G.unknown}function J(e,t){return e===`unknown`||t&&!e}function Y({provider:e,state:t,current:n,statusIsError:r}){return t===`not-installed`?(0,W.jsxs)(`p`,{className:`mt-1.5 text-xs text-soft-foreground`,children:[`Install `,e.displayName,`, then run `,(0,W.jsx)(`code`,{children:e.loginCommand}),`.`]}):J(t,r)?(0,W.jsx)(`p`,{className:`mt-1.5 text-xs text-soft-foreground`,children:`Verification failed. Check again when the provider is available.`}):n?.hint?(0,W.jsx)(`p`,{className:`mt-1.5 text-xs text-soft-foreground`,children:n.hint}):null}function X({provider:e,state:t,current:n,isConnecting:r,incidentId:i,refresh:a,connect:o,retry:s,queueToggle:c}){let l=t===`disconnected`||t===`unknown`;return(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t===`not-installed`?null:(0,W.jsx)(A,{checked:n?.enabled??!0,"aria-label":`Use ${e.displayName}`,onCheckedChange:t=>c(e.id,t)}),l?(0,W.jsx)(k,{type:`button`,variant:`ghost`,size:`sm`,disabled:a.isPending,onClick:()=>a.mutate(void 0,{onError:e=>D(e.message,{tone:`danger`})}),children:`Check again`}):null,t===`disconnected`&&e.browserLogin?(0,W.jsx)(z,{provider:e.id,label:e.displayName}):null,t===`disconnected`&&e.terminalLogin!==!1?(0,W.jsx)(k,{type:`button`,variant:`outline`,size:`sm`,disabled:o.isPending,onClick:()=>o.mutate(e.id),children:r?`Opening…`:`Connect`}):null,i===void 0?null:(0,W.jsx)(k,{type:`button`,variant:`outline`,size:`sm`,disabled:s.isPending,onClick:()=>s.mutate({provider:e.id,authFailureId:i},{onSuccess:()=>D(`${e.displayName} can be tried again.`),onError:e=>D(e.message,{tone:`danger`})}),children:`Try again`})]})}function ee({manual:e,provider:t,connected:n,onCopy:r}){return e===null||e.provider!==t||n?null:(0,W.jsxs)(`div`,{role:`region`,"aria-label":`${e.label} manual sign-in`,className:`rounded-md border border-pending/40 bg-pending/5 px-3.5 py-3`,children:[(0,W.jsx)(`p`,{className:`text-[13px] text-foreground`,children:e.message}),(0,W.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2`,children:[(0,W.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto rounded-sm bg-muted px-2 py-1.5 text-xs`,children:e.command}),(0,W.jsx)(k,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void r(e.command),children:`Copy command`})]})]})}function te(){let e=b(),t=E(),n=T(),r=f(),c=s(),[u,d]=(0,U.useState)(null),p=(0,U.useRef)(Promise.resolve()),m=(0,U.useRef)({}),_=(0,U.useRef)({}),x=(0,U.useRef)(t.data);(0,U.useEffect)(()=>{u&&o(t.data,u.provider)?.status===`connected`&&d(null)},[u,t.data]),(0,U.useEffect)(()=>{if(t.data){if(Object.values(_.current).every(e=>e===0)||!x.current){x.current=t.data;return}x.current={providers:t.data.providers.map(e=>({...e,enabled:(_.current[e.provider]??0)>0?o(x.current,e.provider)?.enabled??e.enabled:e.enabled}))}}},[t.data]);let C=(0,U.useCallback)((e,t)=>{let n=g.providerStatus,r=c.getQueryData(n);if(!r)return;x.current||=r;let i=K(r,e,t);_.current[e]=(_.current[e]??0)+1,c.setQueryData(n,i);let a=(m.current[e]??0)+1;m.current[e]=a,p.current=p.current.then(async()=>{try{let r=await l(e,t),i=o(r,e)?.enabled;if(i===void 0)return;if(x.current=K(x.current??r,e,i),a===m.current[e]){let t=c.getQueryData(n);c.setQueryData(n,t?K(t,e,i):r)}}catch(t){if(a===m.current[e]){let r=o(x.current,e)?.enabled,i=c.getQueryData(n);i&&r!==void 0?c.setQueryData(n,K(i,e,r)):x.current?c.setQueryData(n,x.current):c.removeQueries({queryKey:n,exact:!0}),D(t instanceof Error?t.message:String(t),{tone:`danger`})}}finally{_.current[e]=(_.current[e]??0)-1}})},[c]),w=S({mutationFn:e=>a(e),onSuccess:async(e,t)=>{d(null),D(e.opened?`Finish signing in in the terminal, then check again.`:`Provider is already connected.`),await c.invalidateQueries({queryKey:g.providerStatus}),await h(c,t,`none`)},onError:(t,n)=>{if(t instanceof i&&t.command){let r=v(e.data,n);d({provider:n,label:r,message:t.message,command:t.command});return}D(t.message,{tone:`danger`})}}),O=async e=>{try{await navigator.clipboard.writeText(e),D(`Command copied`)}catch{D(`Could not copy the command`,{tone:`danger`})}};return(0,W.jsxs)(`section`,{id:`providers`,"data-slot":`provider-settings`,className:`scroll-mt-20`,children:[(0,W.jsxs)(`div`,{className:`mb-2`,children:[(0,W.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`Providers`}),(0,W.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Connect the coding agents available on this computer.`})]}),t.isError?(0,W.jsxs)(`div`,{role:`alert`,className:`mb-3 flex flex-wrap items-center justify-between gap-2 rounded-md border border-danger/30 bg-danger/5 px-3 py-2.5`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`text-[13px] font-medium text-foreground`,children:`Provider status could not be loaded`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.error.message})]}),(0,W.jsx)(k,{type:`button`,variant:`outline`,size:`sm`,disabled:t.isFetching,onClick:()=>void t.refetch(),children:`Retry`})]}):null,(0,W.jsx)(`div`,{className:`flex flex-col gap-2`,children:y(e.data).map(e=>{let i=o(t.data,e.id),a=i?.status,s=q(a,t.isPending),c=w.isPending&&w.variables===e.id,l=i?.authFailureId;return(0,W.jsxs)(U.Fragment,{children:[(0,W.jsxs)(`div`,{"data-slot":`provider-card`,"data-provider":e.id,className:`rounded-md border border-border bg-card px-3.5 py-3`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,W.jsxs)(`div`,{className:`min-w-0`,children:[(0,W.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:e.displayName}),(0,W.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,W.jsx)(j,{tone:s.tone,pulse:t.isPending}),(0,W.jsx)(`span`,{children:s.label}),i?.enabled===!1?(0,W.jsx)(`span`,{children:`Disabled`}):null]}),(0,W.jsx)(Y,{provider:e,state:a,current:i,statusIsError:t.isError})]}),(0,W.jsx)(X,{provider:e,state:a,current:i,isConnecting:c,incidentId:l,refresh:n,connect:w,retry:r,queueToggle:C})]}),l===void 0?null:(0,W.jsx)(`p`,{className:`mt-2 text-xs text-soft-foreground`,children:`Use this after completing the provider sign-in flow. Squawk cannot validate the credential without a task/model request; it will verify it on the next task.`})]}),(0,W.jsx)(ee,{manual:u,provider:e.id,connected:a===`connected`,onCopy:O})]},e.id)})})]})}var Z=2e4;function ne(){let e=x(),t=b(),n=u(p(t.data)),r=E();return e.isPending?(0,W.jsx)(`p`,{"data-slot":`agents-loading`,className:`p-4 text-[13px] text-soft-foreground md:p-6`,children:`Loading agent settings…`}):e.isError?(0,W.jsx)(M,{icon:(0,W.jsx)(O,{}),tone:`danger`,title:`Agent settings did not load`,subtitle:e.error.message,heading:`h2`}):(0,W.jsx)(re,{config:e.data,catalogs:n,providerStatus:r,runners:t.data})}function re({config:e,catalogs:t,providerStatus:n,runners:i}){let a=_(),o=s(),c=S({mutationFn:e=>r(e),onSuccess:e=>{o.setQueryData(m.config,e),o.invalidateQueries({queryKey:m.health}),o.invalidateQueries({queryKey:m.repo})},onError:e=>D(e.message,{tone:`danger`})}),[l,u]=H(e.systemPrompt??``),d=l.trim(),f=d===(e.systemPrompt??``),p=d.length>Z;return P(!f),(0,W.jsxs)(`div`,{"data-slot":`agent-defaults-section`,className:`mx-auto flex w-full max-w-2xl flex-col gap-7 p-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:p-6 md:pb-6`,children:[(0,W.jsx)(ie,{defaultRunner:e.defaultRunner,providerStatus:n,saving:c.isPending,onPick:e=>c.mutate({defaultRunner:e})}),(0,W.jsx)(Q,{title:`Default model`,hint:e.modelsLocked?`Models are locked to the defaults configured in the native coding-agent settings.`:`The model preselected in the composer for each runner. Auto lets the runner decide per task.`,children:(0,W.jsx)(`div`,{className:`flex flex-col gap-4`,children:y(i).map(r=>{let{providerConnected:a,providerReason:o}=L(n,r.id),s=t[r.id],l=F(r.id,i,s),u=N(r.id,i,s?.data,[e.defaultModels[r.id]]),d=e.defaultModels[r.id]??``,f=u.find(e=>e.id===d)?.label??d??`auto (default)`;return(0,W.jsxs)(`label`,{className:`settings-option-row`,children:[(0,W.jsx)(`div`,{children:(0,W.jsx)(`h3`,{children:r.pickerLabel})}),e.modelsLocked?(0,W.jsx)(`output`,{"aria-label":`Default model for ${r.pickerLabel}`,"data-slot":`agents-model`,"data-runner":r.id,title:`Model selection is locked to native coding-agent settings.`,className:`block rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs`,children:f}):(0,W.jsxs)(`select`,{"aria-label":`Default model for ${r.pickerLabel}`,"data-slot":`agents-model`,"data-runner":r.id,value:d,title:o??r.pickerDescription,disabled:c.isPending||!a,onChange:e=>c.mutate({defaultModels:{[r.id]:e.target.value||null}}),className:`block rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50`,children:[u.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.id===``?`Native agent default`:e.label},e.id)),l?(0,W.jsx)(`option`,{disabled:!0,children:l}):null]})]},r.id)})})}),(0,W.jsxs)(Q,{title:`System prompt`,hint:`Extra instructions for every run in this project.`,reportsDirty:!0,children:[(0,W.jsx)(I,{"aria-label":`System prompt`,"data-slot":`agents-system-prompt`,value:l,onChange:e=>u(e.target.value),placeholder:`Extra rules for every agent run — conventions, tone, review requirements…`,className:`min-h-48 w-full`}),(0,W.jsxs)(`div`,{className:`settings-form-actions`,children:[(0,W.jsx)(k,{type:`button`,variant:`primary`,size:`sm`,"data-action":`agents-save-prompt`,disabled:f||p||c.isPending,onClick:()=>c.mutate({systemPrompt:d===``?null:d},{onSuccess:()=>D(d===``?`System prompt cleared`:`System prompt saved`)}),children:`Save prompt`}),p?(0,W.jsxs)(`p`,{"data-slot":`agents-prompt-limit`,className:`text-[11px] text-danger`,children:[d.length.toLocaleString(),` characters — the limit is`,` `,Z.toLocaleString(),`.`]}):(0,W.jsx)(`p`,{className:`text-[11px] text-soft-foreground`,children:`Leave empty and save to clear. Applied to new runs only.`})]})]}),(0,W.jsxs)(`section`,{"data-slot":`agents-task-runs`,className:`settings-field flex flex-col gap-5`,children:[(0,W.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`Task runs`}),(0,W.jsx)($,{title:`Live title updates`,hint:`Refresh a task's short title through the namer model as the run progresses. A manual rename always wins and stops updates for that task.`,children:(0,W.jsxs)(`label`,{className:`flex w-fit items-center gap-3`,children:[(0,W.jsx)(A,{"aria-label":`Live title updates`,"data-slot":`agents-live-title-updates`,checked:e.liveTitleUpdates??!0,disabled:c.isPending,onCheckedChange:e=>c.mutate({liveTitleUpdates:e},{onSuccess:()=>D(e?`Live title updates on`:`Live title updates off`)})}),(0,W.jsxs)(`span`,{className:`text-[13px] text-muted-foreground`,children:[e.liveTitleUpdates??!0?`On`:`Off`,e.liveTitleUpdates===null&&` (default)`]})]})}),(0,W.jsx)($,{title:`Review changes before finishing`,hint:`When on, a task with changes pauses so you can Accept, Send back, or open a Draft PR. Autonomous tasks always skip this and finish on their own. Default: off — tasks finish without asking.`,children:(0,W.jsxs)(`label`,{className:`flex w-fit items-center gap-3`,children:[(0,W.jsx)(A,{"aria-label":`Review changes before finishing`,"data-slot":`agents-review-gate`,checked:e.reviewGate??!1,disabled:c.isPending,onCheckedChange:e=>c.mutate({reviewGate:e},{onSuccess:()=>D(e?`Review gate on`:`Review gate off`)})}),(0,W.jsxs)(`span`,{className:`text-[13px] text-muted-foreground`,children:[e.reviewGate??!1?`On`:`Off`,e.reviewGate===null&&` (default)`]})]})}),(0,W.jsx)($,{title:`Base branch`,hint:`New task worktrees branch from this and draft PRs target it. Also settable from the Git view.`,children:a.data?.info?(0,W.jsxs)(`select`,{"aria-label":`Base branch`,"data-slot":`agents-base-branch`,value:e.baseBranch??``,disabled:c.isPending,onChange:e=>c.mutate({baseBranch:e.target.value||null}),className:`block rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50`,children:[(0,W.jsx)(`option`,{value:``,children:`follow checked-out branch (default)`}),a.data.branches.map(e=>(0,W.jsx)(`option`,{value:e,children:e},e))]}):(0,W.jsx)(`p`,{"data-slot":`agents-base-branch-unavailable`,className:`text-[13px] text-soft-foreground`,children:a.isPending?`Loading branches…`:`Not a git repository — tasks run in place, no branching.`})})]}),(0,W.jsxs)(`details`,{className:`settings-disclosure`,children:[(0,W.jsx)(`summary`,{children:`Provider connections`}),(0,W.jsx)(te,{})]})]})}function ie({defaultRunner:e,providerStatus:t,saving:n,onPick:r}){let i=C(),a=w(),s=c(),l=_(),u=d(),f=s.projectId??`default`,p=l.data?.info?.root,m=p?i.data?.selections[p]:void 0,h=b().data,g=B(i.data?.profiles??[],h),v=R(g,h);return(0,W.jsxs)(Q,{title:`Default runner`,hint:`Project defaults. A task can override these choices.`,children:[(0,W.jsx)(V,{rows:g,runner:e,accountFor:e=>m?.[e]??null,providerStatus:t,disabled:n,accountDisabled:u.isPending||a.data===void 0,onPick:(t,n,i)=>{t!==e&&r(t),i&&u.mutate({projectId:f,provider:t,profileId:n},{onError:e=>D(e.message,{tone:`danger`})})}}),!t.isPending&&!t.isError&&o(t.data,e)?.enabled===!1?(0,W.jsx)(`p`,{"data-slot":`agents-runner-disabled`,className:`text-[13px] text-muted-foreground`,children:`This provider is disabled. Enable it above or choose another provider.`}):null,v?(0,W.jsx)(`p`,{className:`max-w-md text-[13px] text-muted-foreground`,children:`The account is personal and never committed. Tasks already started under another account can’t be resumed here — their sessions live in that account’s folder.`}):null]})}function Q({title:e,hint:t,reportsDirty:n,children:r}){return(0,W.jsxs)(`section`,{"data-reports-dirty":n?``:void 0,className:`settings-field flex flex-col gap-2`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:e}),(0,W.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:t})]}),r]})}function $({title:e,hint:t,children:n}){return(0,W.jsxs)(`section`,{className:`settings-option-row`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h3`,{children:e}),(0,W.jsx)(`p`,{children:t})]}),n]})}export{ne as AgentDefaultsSection};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Tn as e,bn as t}from"./project-scope-context-d3J3hWPR.js";function n(n){return t[e(n).bucket]<=t.waiting}export{n as t};
|