bb-app 0.0.23 → 0.0.24
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/app/dist/assets/{ArchivedThreadsView-uaqXbNXK.js → ArchivedThreadsView-B_FdTn5I.js} +1 -1
- package/app/dist/assets/{AutomationDetailView-CmLqIvGd.js → AutomationDetailView-Cd01Q2xR.js} +1 -1
- package/app/dist/assets/{AutomationsView-XXyx4bTZ.js → AutomationsView-C1dipdzI.js} +1 -1
- package/app/dist/assets/{PopoutChatView-BltDWwfc.js → PopoutChatView-D_LJFur7.js} +2 -2
- package/app/dist/assets/{ProjectSettingsView-C6iC7SJB.js → ProjectSettingsView-CV8uCfSb.js} +1 -1
- package/app/dist/assets/{SettingsView-B8AZTSky.js → SettingsView-DVVXUCYo.js} +1 -1
- package/app/dist/assets/{ThreadDetailRoute-CRWPcaBh.js → ThreadDetailRoute-CpP0bs3F.js} +1 -1
- package/app/dist/assets/{index-CuU9b8Fw.js → index-CNgSfqzP.js} +2 -2
- package/app/dist/index.html +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$i as e,Da as t,Pa as n,ga as r,la as i,ma as a,t as o}from"./page-shell-Bk7f1lhT.js";import{R as s,j as c,r as l,w as u}from"./thread-queries-DINnPyF3.js";import{S as d}from"./route-paths-DLMPskef.js";import{n as f}from"./empty-state-BfC-sdZL.js";import{m as p}from"./index-
|
|
1
|
+
import{$i as e,Da as t,Pa as n,ga as r,la as i,ma as a,t as o}from"./page-shell-Bk7f1lhT.js";import{R as s,j as c,r as l,w as u}from"./thread-queries-DINnPyF3.js";import{S as d}from"./route-paths-DLMPskef.js";import{n as f}from"./empty-state-BfC-sdZL.js";import{m as p}from"./index-CNgSfqzP.js";import{t as m}from"./pill-BU6FdMLZ.js";import{t as h}from"./ThreadUnarchiveButton-h7Qut-rK.js";var g=a(),_=n();function v({folderId:e,projectId:t,sidebarOrganizationMode:n}){let r=t===`proj_personal`&&n===`chronological`;return{projectId:e||r?void 0:t,...e?{folderId:e}:{},...!e&&r?{unfiled:!0}:{}}}function y(e){return e.parentThreadId===null?null:`child`}function b(){let n=(0,g.c)(18),{projectId:a}=s(),[b]=t(),S=i(p),C,w;if(n[0]!==a||n[1]!==b||n[2]!==S){let e=b.get(`folderId`)??void 0;C=l,w=v({folderId:e,projectId:a,sidebarOrganizationMode:S}),n[0]=a,n[1]=b,n[2]=S,n[3]=C,n[4]=w}else C=n[3],w=n[4];let T=C(w),E=c(),D;n[5]===T.data?.pages?D=n[6]:(D=(T.data?.pages??[]).flat().filter(x),n[5]=T.data?.pages,n[6]=D);let O=D;if(!a){let e;return n[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(o,{contentClassName:`min-h-full items-center justify-center`,children:(0,_.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Project not found`})}),n[7]=e):e=n[7],e}let k=T.isPending,A=!k&&O.length===0,j;n[8]!==O||n[9]!==k||n[10]!==A||n[11]!==E?(j=k?(0,_.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading archived threads…`}):A?(0,_.jsx)(f,{className:`py-4 text-left`,children:`No archived threads yet.`}):(0,_.jsx)(`div`,{className:`space-y-1`,children:O.map(e=>{let t=y(e);return(0,_.jsxs)(`div`,{className:`group flex h-9 items-center gap-3 rounded-md px-3 text-sm transition-colors hover:bg-state-hover`,children:[(0,_.jsx)(r,{to:d({projectId:e.projectId,threadId:e.id}),className:`min-w-0 flex-1`,children:(0,_.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`truncate`,children:u(e)}),t?(0,_.jsx)(m,{variant:`outline`,className:`shrink-0`,children:t}):null]})}),(0,_.jsx)(h,{isPending:E.isPending&&E.variables?.id===e.id,onUnarchive:()=>{E.mutate({id:e.id})},className:`hover:bg-accent-foreground/15`})]},e.id)})}),n[8]=O,n[9]=k,n[10]=A,n[11]=E,n[12]=j):j=n[12];let M;n[13]===T?M=n[14]:(M=T.hasNextPage?(0,_.jsx)(e,{type:`button`,variant:`ghost`,onClick:()=>{T.fetchNextPage()},disabled:T.isFetchingNextPage,className:`h-9 w-full justify-center rounded-md px-3 text-sm font-normal text-muted-foreground`,children:T.isFetchingNextPage?`Loading…`:`Load more`}):null,n[13]=T,n[14]=M);let N;return n[15]!==j||n[16]!==M?(N=(0,_.jsx)(o,{contentClassName:`pt-0`,children:(0,_.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,_.jsxs)(`div`,{className:`space-y-3 pt-4 md:pt-5`,children:[j,M]})})}),n[15]=j,n[16]=M,n[17]=N):N=n[17],N}function x(e){return e.archivedAt!=null}export{b as ArchivedThreadsView};
|
package/app/dist/assets/{AutomationDetailView-CmLqIvGd.js → AutomationDetailView-Cd01Q2xR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$i as e,Ea as t,Pa as n,ga as r,ma as i,oa as a,sa as o,t as s,wa as c}from"./page-shell-Bk7f1lhT.js";import{d as l,n as u,t as d}from"./ConfirmDeleteDialog-Chonac8k.js";import{S as f,f as p}from"./route-paths-DLMPskef.js";import{n as m}from"./empty-state-BfC-sdZL.js";import{c as h,d as g,f as _,p as v,s as y,u as b}from"./index-CuU9b8Fw.js";import{t as x}from"./pill-BU6FdMLZ.js";import{t as S}from"./format-schedule-DKrFr5xh.js";var C=i(),w=n(),T=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function E(e){return T.format(new Date(e))}function D(e){if(e.finishedAt===null)return null;let t=(e.finishedAt-e.startedAt)/1e3;return t<0?null:`${t.toFixed(+(t<10))}s`}function O(e){return e.status===`succeeded`&&e.runMode===`script`&&(e.output===null||e.output.trim().length===0)}function k(e){switch(e.status){case`running`:return{label:`Running`,tone:`muted`};case`failed`:return{label:`Failed`,tone:`fail`};case`skipped`:return{label:`Skipped`,tone:`muted`};case`succeeded`:return O(e)?{label:`Succeeded · silent`,tone:`muted`}:{label:`Succeeded`,tone:`ok`};default:return e.status}}var A={ok:`text-foreground`,fail:`text-destructive`,muted:`text-muted-foreground`};function j(e){let{environment:t}=e;if(t.type===`reuse`)return`Reuses an existing environment`;switch(t.workspace.type){case`personal`:return`Personal workspace`;case`managed-worktree`:return`Managed worktree`;case`unmanaged`:return t.workspace.path?`Workspace: ${t.workspace.path}`:`Unmanaged workspace`;default:return t.workspace}}function M(e){let{execution:t}=e;return t.mode===`agent`?`Agent · ${t.providerId}/${t.model} · ${t.permissionMode}`:`Script · ${t.interpreter??`bash`} ${t.scriptFile??`inline script`} · ${Math.round(t.timeoutMs/1e3)}s timeout`}function N(e){let t=(0,C.c)(31),{run:n,projectId:i}=e,a;t[0]===n?a=t[1]:(a=k(n),t[0]=n,t[1]=a);let s=a,c;t[2]===n?c=t[3]:(c=D(n),t[2]=n,t[3]=c);let l=c,u;if(t[4]!==l||t[5]!==i||t[6]!==n||t[7]!==s.label||t[8]!==s.tone){let e=O(n),a=n.runMode===`script`&&(n.output!==null||n.error!==null||e),c=A[s.tone],d;t[10]===c?d=t[11]:(d=o(`font-medium`,c),t[10]=c,t[11]=d);let p;t[12]!==s.label||t[13]!==d?(p=(0,w.jsx)(`span`,{className:d,children:s.label}),t[12]=s.label,t[13]=d,t[14]=p):p=t[14];let m;t[15]===n.startedAt?m=t[16]:(m=E(n.startedAt),t[15]=n.startedAt,t[16]=m);let h=l?` · ${l}`:``,g;t[17]!==m||t[18]!==h?(g=(0,w.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[m,h]}),t[17]=m,t[18]=h,t[19]=g):g=t[19];let _;t[20]!==i||t[21]!==n.exitCode||t[22]!==n.runMode||t[23]!==n.threadId?(_=n.runMode===`agent`&&n.threadId?(0,w.jsx)(r,{to:f({projectId:i,threadId:n.threadId}),className:`ml-auto text-xs text-muted-foreground hover:text-foreground hover:underline`,children:`View thread`}):n.runMode===`script`&&n.exitCode!==null?(0,w.jsxs)(`span`,{className:`ml-auto font-mono text-xs text-muted-foreground`,children:[`exit `,n.exitCode]}):null,t[20]=i,t[21]=n.exitCode,t[22]=n.runMode,t[23]=n.threadId,t[24]=_):_=t[24];let v;t[25]!==_||t[26]!==p||t[27]!==g?(v=(0,w.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[p,g,_]}),t[25]=_,t[26]=p,t[27]=g,t[28]=v):v=t[28];let y;t[29]===n.skipReason?y=t[30]:(y=n.skipReason?(0,w.jsx)(`p`,{className:`border-t border-border-seam px-3 py-2 text-xs text-muted-foreground`,children:n.skipReason}):null,t[29]=n.skipReason,t[30]=y),u=(0,w.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border`,children:[v,y,a?(0,w.jsx)(`pre`,{className:o(`whitespace-pre-wrap border-t border-border-seam bg-surface-recessed px-3 py-2 font-mono text-xs leading-relaxed`,n.error?`text-destructive`:`text-foreground`,e&&`italic text-subtle-foreground`),children:n.error??(e?`no output — silent gate, nothing surfaced`:n.output??``)}):null]}),t[4]=l,t[5]=i,t[6]=n,t[7]=s.label,t[8]=s.tone,t[9]=u}else u=t[9];return u}function P(t){let n=(0,C.c)(64),{automation:r,runs:i,runsLoading:c,runsError:l,onPause:u,onResume:d,onRun:f,onDelete:p,actionsPending:h}=t,g=r.enabled?`bg-success`:`bg-muted-foreground/50`,_;n[0]===g?_=n[1]:(_=o(`size-1.5 shrink-0 rounded-full`,g),n[0]=g,n[1]=_);let v;n[2]===_?v=n[3]:(v=(0,w.jsx)(`span`,{"aria-hidden":`true`,className:_}),n[2]=_,n[3]=v);let y;n[4]===r.name?y=n[5]:(y=(0,w.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-base font-semibold`,children:r.name}),n[4]=r.name,n[5]=y);let b;n[6]===r.execution.mode?b=n[7]:(b=r.execution.mode===`script`?(0,w.jsx)(x,{variant:`outline`,className:`shrink-0`,children:`Script`}):null,n[6]=r.execution.mode,n[7]=b);let T;n[8]===r.origin?T=n[9]:(T=r.origin===`agent`?(0,w.jsx)(x,{variant:`secondary`,className:`shrink-0`,children:`API`}):null,n[8]=r.origin,n[9]=T);let E;n[10]!==v||n[11]!==y||n[12]!==b||n[13]!==T?(E=(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[v,y,b,T]}),n[10]=v,n[11]=y,n[12]=b,n[13]=T,n[14]=E):E=n[14];let D;n[15]===r.trigger.cron?D=n[16]:(D=S(r.trigger.cron),n[15]=r.trigger.cron,n[16]=D);let O;n[17]!==r.trigger.timezone||n[18]!==D?(O=(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[D,` ·`,` `,r.trigger.timezone]}),n[17]=r.trigger.timezone,n[18]=D,n[19]=O):O=n[19];let k;n[20]===r?k=n[21]:(k=M(r),n[20]=r,n[21]=k);let A;n[22]===k?A=n[23]:(A=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:k}),n[22]=k,n[23]=A);let P;n[24]===r?P=n[25]:(P=j(r),n[24]=r,n[25]=P);let F;n[26]===P?F=n[27]:(F=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:P}),n[26]=P,n[27]=F);let I;n[28]!==r.execution.mode||n[29]!==r.execution.prompt?(I=r.execution.mode===`agent`?(0,w.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-xs text-muted-foreground`,children:r.execution.prompt}):null,n[28]=r.execution.mode,n[29]=r.execution.prompt,n[30]=I):I=n[30];let L;n[31]!==A||n[32]!==F||n[33]!==I||n[34]!==E||n[35]!==O?(L=(0,w.jsxs)(`div`,{className:`space-y-2`,children:[E,O,A,F,I]}),n[31]=A,n[32]=F,n[33]=I,n[34]=E,n[35]=O,n[36]=L):L=n[36];let R;n[37]!==h||n[38]!==r.enabled||n[39]!==u||n[40]!==d?(R=r.enabled?(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,"aria-label":`Pause`,title:`Pause`,disabled:h,onClick:u,children:[(0,w.jsx)(a,{name:`Pause`,className:`size-4`}),`Pause`]}):(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,"aria-label":`Resume`,title:`Resume`,disabled:h,onClick:d,children:[(0,w.jsx)(a,{name:`Play`,className:`size-4`}),`Resume`]}),n[37]=h,n[38]=r.enabled,n[39]=u,n[40]=d,n[41]=R):R=n[41];let z;n[42]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,w.jsx)(a,{name:`Zap`,className:`size-4`}),n[42]=z):z=n[42];let B;n[43]!==h||n[44]!==f?(B=(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,"aria-label":`Run now`,title:`Run now`,disabled:h,onClick:f,children:[z,`Run now`]}),n[43]=h,n[44]=f,n[45]=B):B=n[45];let V;n[46]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,w.jsx)(a,{name:`Trash2`,className:`size-4`}),n[46]=V):V=n[46];let H;n[47]!==h||n[48]!==p?(H=(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,className:`text-destructive hover:text-destructive`,"aria-label":`Delete automation`,title:`Delete automation`,disabled:h,onClick:p,children:[V,`Delete`]}),n[47]=h,n[48]=p,n[49]=H):H=n[49];let U;n[50]!==R||n[51]!==B||n[52]!==H?(U=(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[R,B,H]}),n[50]=R,n[51]=B,n[52]=H,n[53]=U):U=n[53];let W;n[54]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,w.jsx)(`p`,{className:`text-xs font-medium uppercase text-muted-foreground`,children:`Run history`}),n[54]=W):W=n[54];let G;n[55]!==r.projectId||n[56]!==i||n[57]!==l||n[58]!==c?(G=(0,w.jsxs)(`section`,{className:`space-y-2`,children:[W,l?(0,w.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load runs.`}):c?(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):i.length===0?(0,w.jsx)(m,{className:`py-6`,children:`No runs yet.`}):(0,w.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>(0,w.jsx)(N,{run:e,projectId:r.projectId},e.id))})]}),n[55]=r.projectId,n[56]=i,n[57]=l,n[58]=c,n[59]=G):G=n[59];let K;return n[60]!==L||n[61]!==U||n[62]!==G?(K=(0,w.jsx)(s,{contentClassName:`pt-4 md:pt-5`,children:(0,w.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6`,children:[L,U,G]})}),n[60]=L,n[61]=U,n[62]=G,n[63]=K):K=n[63],K}function F(){let e=(0,C.c)(46),n=t(),r=n.projectId??``,i=n.automationId??``,a=c(),o=y(r,i),f=h(r,i),m=g(),x=_(),S=v(),T=b(),E=l(),{mutate:D}=m,{mutate:O}=x,{mutate:k}=S,{mutate:A}=T,{onClose:j,onOpen:M}=E,N;e[0]!==i||e[1]!==D||e[2]!==r?(N=()=>{D({projectId:r,automationId:i})},e[0]=i,e[1]=D,e[2]=r,e[3]=N):N=e[3];let F=N,I;e[4]!==i||e[5]!==r||e[6]!==O?(I=()=>{O({projectId:r,automationId:i})},e[4]=i,e[5]=r,e[6]=O,e[7]=I):I=e[7];let L=I,R;e[8]!==i||e[9]!==r||e[10]!==k?(R=()=>{k({projectId:r,automationId:i})},e[8]=i,e[9]=r,e[10]=k,e[11]=R):R=e[11];let z=R,B;e[12]!==i||e[13]!==j||e[14]!==A||e[15]!==a||e[16]!==r?(B=()=>{A({projectId:r,automationId:i},{onSuccess:()=>{j(),a(p(),{replace:!0})}})},e[12]=i,e[13]=j,e[14]=A,e[15]=a,e[16]=r,e[17]=B):B=e[17];let V=B,H=o.data,U=o.isError&&H===void 0;if(o.isFetching&&H===void 0&&!U){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(s,{contentClassName:`pt-4 md:pt-5`,children:(0,w.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})})}),e[18]=t):t=e[18],t}if(U||!H){let t;return e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(s,{contentClassName:`pt-4 md:pt-5`,children:(0,w.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,w.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load automation.`})})}),e[19]=t):t=e[19],t}let W;e[20]===f.data?.runs?W=e[21]:(W=f.data?.runs??[],e[20]=f.data?.runs,e[21]=W);let G=W,K=f.isError&&f.data===void 0,q=f.isFetching&&f.data===void 0&&!K,J=m.isPending||x.isPending||S.isPending||T.isPending,Y;e[22]===M?Y=e[23]:(Y=()=>{M(!0)},e[22]=M,e[23]=Y);let X;e[24]!==J||e[25]!==H||e[26]!==F||e[27]!==L||e[28]!==z||e[29]!==K||e[30]!==q||e[31]!==G||e[32]!==Y?(X=(0,w.jsx)(P,{automation:H,runs:G,runsLoading:q,runsError:K,onPause:F,onResume:L,onRun:z,onDelete:Y,actionsPending:J}),e[24]=J,e[25]=H,e[26]=F,e[27]=L,e[28]=z,e[29]=K,e[30]=q,e[31]=G,e[32]=Y,e[33]=X):X=e[33];let ee=`"${H.name}" and its run history will be permanently removed.`,Z;e[34]!==j||e[35]!==V||e[36]!==T.isPending||e[37]!==ee?(Z=(0,w.jsx)(u,{title:`Delete automation?`,description:ee,confirmLabel:`Delete`,pending:T.isPending,onConfirm:V,onCancel:j}),e[34]=j,e[35]=V,e[36]=T.isPending,e[37]=ee,e[38]=Z):Z=e[38];let Q;e[39]!==E.isOpen||e[40]!==E.onOpenChange||e[41]!==Z?(Q=(0,w.jsx)(d,{open:E.isOpen,onOpenChange:E.onOpenChange,children:Z}),e[39]=E.isOpen,e[40]=E.onOpenChange,e[41]=Z,e[42]=Q):Q=e[42];let $;return e[43]!==X||e[44]!==Q?($=(0,w.jsxs)(w.Fragment,{children:[X,Q]}),e[43]=X,e[44]=Q,e[45]=$):$=e[45],$}export{F as AutomationDetailView};
|
|
1
|
+
import{$i as e,Ea as t,Pa as n,ga as r,ma as i,oa as a,sa as o,t as s,wa as c}from"./page-shell-Bk7f1lhT.js";import{d as l,n as u,t as d}from"./ConfirmDeleteDialog-Chonac8k.js";import{S as f,f as p}from"./route-paths-DLMPskef.js";import{n as m}from"./empty-state-BfC-sdZL.js";import{c as h,d as g,f as _,p as v,s as y,u as b}from"./index-CNgSfqzP.js";import{t as x}from"./pill-BU6FdMLZ.js";import{t as S}from"./format-schedule-DKrFr5xh.js";var C=i(),w=n(),T=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function E(e){return T.format(new Date(e))}function D(e){if(e.finishedAt===null)return null;let t=(e.finishedAt-e.startedAt)/1e3;return t<0?null:`${t.toFixed(+(t<10))}s`}function O(e){return e.status===`succeeded`&&e.runMode===`script`&&(e.output===null||e.output.trim().length===0)}function k(e){switch(e.status){case`running`:return{label:`Running`,tone:`muted`};case`failed`:return{label:`Failed`,tone:`fail`};case`skipped`:return{label:`Skipped`,tone:`muted`};case`succeeded`:return O(e)?{label:`Succeeded · silent`,tone:`muted`}:{label:`Succeeded`,tone:`ok`};default:return e.status}}var A={ok:`text-foreground`,fail:`text-destructive`,muted:`text-muted-foreground`};function j(e){let{environment:t}=e;if(t.type===`reuse`)return`Reuses an existing environment`;switch(t.workspace.type){case`personal`:return`Personal workspace`;case`managed-worktree`:return`Managed worktree`;case`unmanaged`:return t.workspace.path?`Workspace: ${t.workspace.path}`:`Unmanaged workspace`;default:return t.workspace}}function M(e){let{execution:t}=e;return t.mode===`agent`?`Agent · ${t.providerId}/${t.model} · ${t.permissionMode}`:`Script · ${t.interpreter??`bash`} ${t.scriptFile??`inline script`} · ${Math.round(t.timeoutMs/1e3)}s timeout`}function N(e){let t=(0,C.c)(31),{run:n,projectId:i}=e,a;t[0]===n?a=t[1]:(a=k(n),t[0]=n,t[1]=a);let s=a,c;t[2]===n?c=t[3]:(c=D(n),t[2]=n,t[3]=c);let l=c,u;if(t[4]!==l||t[5]!==i||t[6]!==n||t[7]!==s.label||t[8]!==s.tone){let e=O(n),a=n.runMode===`script`&&(n.output!==null||n.error!==null||e),c=A[s.tone],d;t[10]===c?d=t[11]:(d=o(`font-medium`,c),t[10]=c,t[11]=d);let p;t[12]!==s.label||t[13]!==d?(p=(0,w.jsx)(`span`,{className:d,children:s.label}),t[12]=s.label,t[13]=d,t[14]=p):p=t[14];let m;t[15]===n.startedAt?m=t[16]:(m=E(n.startedAt),t[15]=n.startedAt,t[16]=m);let h=l?` · ${l}`:``,g;t[17]!==m||t[18]!==h?(g=(0,w.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[m,h]}),t[17]=m,t[18]=h,t[19]=g):g=t[19];let _;t[20]!==i||t[21]!==n.exitCode||t[22]!==n.runMode||t[23]!==n.threadId?(_=n.runMode===`agent`&&n.threadId?(0,w.jsx)(r,{to:f({projectId:i,threadId:n.threadId}),className:`ml-auto text-xs text-muted-foreground hover:text-foreground hover:underline`,children:`View thread`}):n.runMode===`script`&&n.exitCode!==null?(0,w.jsxs)(`span`,{className:`ml-auto font-mono text-xs text-muted-foreground`,children:[`exit `,n.exitCode]}):null,t[20]=i,t[21]=n.exitCode,t[22]=n.runMode,t[23]=n.threadId,t[24]=_):_=t[24];let v;t[25]!==_||t[26]!==p||t[27]!==g?(v=(0,w.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[p,g,_]}),t[25]=_,t[26]=p,t[27]=g,t[28]=v):v=t[28];let y;t[29]===n.skipReason?y=t[30]:(y=n.skipReason?(0,w.jsx)(`p`,{className:`border-t border-border-seam px-3 py-2 text-xs text-muted-foreground`,children:n.skipReason}):null,t[29]=n.skipReason,t[30]=y),u=(0,w.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border`,children:[v,y,a?(0,w.jsx)(`pre`,{className:o(`whitespace-pre-wrap border-t border-border-seam bg-surface-recessed px-3 py-2 font-mono text-xs leading-relaxed`,n.error?`text-destructive`:`text-foreground`,e&&`italic text-subtle-foreground`),children:n.error??(e?`no output — silent gate, nothing surfaced`:n.output??``)}):null]}),t[4]=l,t[5]=i,t[6]=n,t[7]=s.label,t[8]=s.tone,t[9]=u}else u=t[9];return u}function P(t){let n=(0,C.c)(64),{automation:r,runs:i,runsLoading:c,runsError:l,onPause:u,onResume:d,onRun:f,onDelete:p,actionsPending:h}=t,g=r.enabled?`bg-success`:`bg-muted-foreground/50`,_;n[0]===g?_=n[1]:(_=o(`size-1.5 shrink-0 rounded-full`,g),n[0]=g,n[1]=_);let v;n[2]===_?v=n[3]:(v=(0,w.jsx)(`span`,{"aria-hidden":`true`,className:_}),n[2]=_,n[3]=v);let y;n[4]===r.name?y=n[5]:(y=(0,w.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-base font-semibold`,children:r.name}),n[4]=r.name,n[5]=y);let b;n[6]===r.execution.mode?b=n[7]:(b=r.execution.mode===`script`?(0,w.jsx)(x,{variant:`outline`,className:`shrink-0`,children:`Script`}):null,n[6]=r.execution.mode,n[7]=b);let T;n[8]===r.origin?T=n[9]:(T=r.origin===`agent`?(0,w.jsx)(x,{variant:`secondary`,className:`shrink-0`,children:`API`}):null,n[8]=r.origin,n[9]=T);let E;n[10]!==v||n[11]!==y||n[12]!==b||n[13]!==T?(E=(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[v,y,b,T]}),n[10]=v,n[11]=y,n[12]=b,n[13]=T,n[14]=E):E=n[14];let D;n[15]===r.trigger.cron?D=n[16]:(D=S(r.trigger.cron),n[15]=r.trigger.cron,n[16]=D);let O;n[17]!==r.trigger.timezone||n[18]!==D?(O=(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[D,` ·`,` `,r.trigger.timezone]}),n[17]=r.trigger.timezone,n[18]=D,n[19]=O):O=n[19];let k;n[20]===r?k=n[21]:(k=M(r),n[20]=r,n[21]=k);let A;n[22]===k?A=n[23]:(A=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:k}),n[22]=k,n[23]=A);let P;n[24]===r?P=n[25]:(P=j(r),n[24]=r,n[25]=P);let F;n[26]===P?F=n[27]:(F=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:P}),n[26]=P,n[27]=F);let I;n[28]!==r.execution.mode||n[29]!==r.execution.prompt?(I=r.execution.mode===`agent`?(0,w.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-xs text-muted-foreground`,children:r.execution.prompt}):null,n[28]=r.execution.mode,n[29]=r.execution.prompt,n[30]=I):I=n[30];let L;n[31]!==A||n[32]!==F||n[33]!==I||n[34]!==E||n[35]!==O?(L=(0,w.jsxs)(`div`,{className:`space-y-2`,children:[E,O,A,F,I]}),n[31]=A,n[32]=F,n[33]=I,n[34]=E,n[35]=O,n[36]=L):L=n[36];let R;n[37]!==h||n[38]!==r.enabled||n[39]!==u||n[40]!==d?(R=r.enabled?(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,"aria-label":`Pause`,title:`Pause`,disabled:h,onClick:u,children:[(0,w.jsx)(a,{name:`Pause`,className:`size-4`}),`Pause`]}):(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,"aria-label":`Resume`,title:`Resume`,disabled:h,onClick:d,children:[(0,w.jsx)(a,{name:`Play`,className:`size-4`}),`Resume`]}),n[37]=h,n[38]=r.enabled,n[39]=u,n[40]=d,n[41]=R):R=n[41];let z;n[42]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,w.jsx)(a,{name:`Zap`,className:`size-4`}),n[42]=z):z=n[42];let B;n[43]!==h||n[44]!==f?(B=(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,"aria-label":`Run now`,title:`Run now`,disabled:h,onClick:f,children:[z,`Run now`]}),n[43]=h,n[44]=f,n[45]=B):B=n[45];let V;n[46]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,w.jsx)(a,{name:`Trash2`,className:`size-4`}),n[46]=V):V=n[46];let H;n[47]!==h||n[48]!==p?(H=(0,w.jsxs)(e,{type:`button`,variant:`outline`,size:`sm`,className:`text-destructive hover:text-destructive`,"aria-label":`Delete automation`,title:`Delete automation`,disabled:h,onClick:p,children:[V,`Delete`]}),n[47]=h,n[48]=p,n[49]=H):H=n[49];let U;n[50]!==R||n[51]!==B||n[52]!==H?(U=(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[R,B,H]}),n[50]=R,n[51]=B,n[52]=H,n[53]=U):U=n[53];let W;n[54]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,w.jsx)(`p`,{className:`text-xs font-medium uppercase text-muted-foreground`,children:`Run history`}),n[54]=W):W=n[54];let G;n[55]!==r.projectId||n[56]!==i||n[57]!==l||n[58]!==c?(G=(0,w.jsxs)(`section`,{className:`space-y-2`,children:[W,l?(0,w.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load runs.`}):c?(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):i.length===0?(0,w.jsx)(m,{className:`py-6`,children:`No runs yet.`}):(0,w.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>(0,w.jsx)(N,{run:e,projectId:r.projectId},e.id))})]}),n[55]=r.projectId,n[56]=i,n[57]=l,n[58]=c,n[59]=G):G=n[59];let K;return n[60]!==L||n[61]!==U||n[62]!==G?(K=(0,w.jsx)(s,{contentClassName:`pt-4 md:pt-5`,children:(0,w.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6`,children:[L,U,G]})}),n[60]=L,n[61]=U,n[62]=G,n[63]=K):K=n[63],K}function F(){let e=(0,C.c)(46),n=t(),r=n.projectId??``,i=n.automationId??``,a=c(),o=y(r,i),f=h(r,i),m=g(),x=_(),S=v(),T=b(),E=l(),{mutate:D}=m,{mutate:O}=x,{mutate:k}=S,{mutate:A}=T,{onClose:j,onOpen:M}=E,N;e[0]!==i||e[1]!==D||e[2]!==r?(N=()=>{D({projectId:r,automationId:i})},e[0]=i,e[1]=D,e[2]=r,e[3]=N):N=e[3];let F=N,I;e[4]!==i||e[5]!==r||e[6]!==O?(I=()=>{O({projectId:r,automationId:i})},e[4]=i,e[5]=r,e[6]=O,e[7]=I):I=e[7];let L=I,R;e[8]!==i||e[9]!==r||e[10]!==k?(R=()=>{k({projectId:r,automationId:i})},e[8]=i,e[9]=r,e[10]=k,e[11]=R):R=e[11];let z=R,B;e[12]!==i||e[13]!==j||e[14]!==A||e[15]!==a||e[16]!==r?(B=()=>{A({projectId:r,automationId:i},{onSuccess:()=>{j(),a(p(),{replace:!0})}})},e[12]=i,e[13]=j,e[14]=A,e[15]=a,e[16]=r,e[17]=B):B=e[17];let V=B,H=o.data,U=o.isError&&H===void 0;if(o.isFetching&&H===void 0&&!U){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(s,{contentClassName:`pt-4 md:pt-5`,children:(0,w.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})})}),e[18]=t):t=e[18],t}if(U||!H){let t;return e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(s,{contentClassName:`pt-4 md:pt-5`,children:(0,w.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,w.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load automation.`})})}),e[19]=t):t=e[19],t}let W;e[20]===f.data?.runs?W=e[21]:(W=f.data?.runs??[],e[20]=f.data?.runs,e[21]=W);let G=W,K=f.isError&&f.data===void 0,q=f.isFetching&&f.data===void 0&&!K,J=m.isPending||x.isPending||S.isPending||T.isPending,Y;e[22]===M?Y=e[23]:(Y=()=>{M(!0)},e[22]=M,e[23]=Y);let X;e[24]!==J||e[25]!==H||e[26]!==F||e[27]!==L||e[28]!==z||e[29]!==K||e[30]!==q||e[31]!==G||e[32]!==Y?(X=(0,w.jsx)(P,{automation:H,runs:G,runsLoading:q,runsError:K,onPause:F,onResume:L,onRun:z,onDelete:Y,actionsPending:J}),e[24]=J,e[25]=H,e[26]=F,e[27]=L,e[28]=z,e[29]=K,e[30]=q,e[31]=G,e[32]=Y,e[33]=X):X=e[33];let ee=`"${H.name}" and its run history will be permanently removed.`,Z;e[34]!==j||e[35]!==V||e[36]!==T.isPending||e[37]!==ee?(Z=(0,w.jsx)(u,{title:`Delete automation?`,description:ee,confirmLabel:`Delete`,pending:T.isPending,onConfirm:V,onCancel:j}),e[34]=j,e[35]=V,e[36]=T.isPending,e[37]=ee,e[38]=Z):Z=e[38];let Q;e[39]!==E.isOpen||e[40]!==E.onOpenChange||e[41]!==Z?(Q=(0,w.jsx)(d,{open:E.isOpen,onOpenChange:E.onOpenChange,children:Z}),e[39]=E.isOpen,e[40]=E.onOpenChange,e[41]=Z,e[42]=Q):Q=e[42];let $;return e[43]!==X||e[44]!==Q?($=(0,w.jsxs)(w.Fragment,{children:[X,Q]}),e[43]=X,e[44]=Q,e[45]=$):$=e[45],$}export{F as AutomationDetailView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{$i as t,Pa as n,ga as r,ma as i,no as a,oa as o,sa as s,t as c,wa as l}from"./page-shell-Bk7f1lhT.js";import{a as u,c as d,r as f,s as p,t as m}from"./dropdown-menu-Jq5katdD.js";import{d as h,n as g,t as _}from"./ConfirmDeleteDialog-Chonac8k.js";import{b as v,d as y}from"./route-paths-DLMPskef.js";import{n as b}from"./empty-state-BfC-sdZL.js";import{t as x}from"./PromptBoxActionsMenu-Ci6SVh-V.js";import{d as S,f as C,l as w,p as T,u as E}from"./index-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{$i as t,Pa as n,ga as r,ma as i,no as a,oa as o,sa as s,t as c,wa as l}from"./page-shell-Bk7f1lhT.js";import{a as u,c as d,r as f,s as p,t as m}from"./dropdown-menu-Jq5katdD.js";import{d as h,n as g,t as _}from"./ConfirmDeleteDialog-Chonac8k.js";import{b as v,d as y}from"./route-paths-DLMPskef.js";import{n as b}from"./empty-state-BfC-sdZL.js";import{t as x}from"./PromptBoxActionsMenu-Ci6SVh-V.js";import{d as S,f as C,l as w,p as T,u as E}from"./index-CNgSfqzP.js";import{t as D}from"./pill-BU6FdMLZ.js";import{n as O}from"./format-schedule-DKrFr5xh.js";var k=i(),A=e(a(),1),j=n();function M(e){let t=[],n=[];for(let r of e)r.automation.enabled?t.push(r):n.push(r);let r=[];return t.length>0&&r.push({status:`active`,label:`Active`,entries:t}),n.length>0&&r.push({status:`paused`,label:`Paused`,entries:n}),r}function N(e,t){let{automation:n}=e;return[n.enabled?{key:`pause`,label:`Pause`,destructive:!1,run:()=>t.onPause(e)}:{key:`resume`,label:`Resume`,destructive:!1,run:()=>t.onResume(e)},{key:`run`,label:`Run now`,destructive:!1,run:()=>t.onRun(e)},{key:`delete`,label:`Delete`,destructive:!0,run:()=>t.onDelete(e)}]}function P(e){let t=(0,k.c)(5),{entry:n,actions:r}=e,i;t[0]!==r||t[1]!==n?(i=N(n,r).map(F),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,j.jsx)(j.Fragment,{children:i}),t[3]=i,t[4]=a),a}function F(e){return(0,j.jsxs)(A.Fragment,{children:[e.key===`delete`?(0,j.jsx)(p,{}):null,(0,j.jsx)(u,{className:e.destructive?`text-destructive focus:text-destructive`:void 0,onSelect:()=>{e.run()},children:e.label})]},e.key)}function I(e){let n=(0,k.c)(42),{entry:i,actions:a}=e,{automation:c,project:l}=i,u=l.id===`proj_personal`?null:l.name,p=c.enabled?`bg-success`:`bg-muted-foreground/50`,h;n[0]===p?h=n[1]:(h=s(`size-1.5 shrink-0 rounded-full`,p),n[0]=p,n[1]=h);let g;n[2]===h?g=n[3]:(g=(0,j.jsx)(`span`,{"aria-hidden":`true`,className:h}),n[2]=h,n[3]=g);let _;n[4]!==c.id||n[5]!==c.projectId?(_=y({projectId:c.projectId,automationId:c.id}),n[4]=c.id,n[5]=c.projectId,n[6]=_):_=n[6];let v;n[7]!==c.name||n[8]!==_?(v=(0,j.jsx)(r,{to:_,className:`min-w-0 flex-1 truncate hover:underline`,children:c.name}),n[7]=c.name,n[8]=_,n[9]=v):v=n[9];let b;n[10]===u?b=n[11]:(b=u?(0,j.jsx)(D,{variant:`outline`,className:`shrink-0`,children:u}):null,n[10]=u,n[11]=b);let x;n[12]===c.execution.mode?x=n[13]:(x=c.execution.mode===`script`?(0,j.jsx)(D,{variant:`outline`,className:`shrink-0`,children:`Script`}):null,n[12]=c.execution.mode,n[13]=x);let S;n[14]===c.origin?S=n[15]:(S=c.origin===`agent`?(0,j.jsx)(D,{variant:`secondary`,className:`shrink-0`,children:`API`}):null,n[14]=c.origin,n[15]=S);let C;n[16]!==c.enabled||n[17]!==c.nextRunAt?(C=O({enabled:c.enabled,nextRunAt:c.nextRunAt}),n[16]=c.enabled,n[17]=c.nextRunAt,n[18]=C):C=n[18];let w;n[19]===C?w=n[20]:(w=(0,j.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:C}),n[19]=C,n[20]=w);let T=`${c.name} actions`,E=`${c.name} actions`,A;n[21]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,j.jsx)(o,{name:`MoreHorizontal`,className:`size-4`}),n[21]=A):A=n[21];let M;n[22]!==T||n[23]!==E?(M=(0,j.jsx)(d,{asChild:!0,children:(0,j.jsx)(t,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0 rounded-md p-0 text-muted-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground`,"aria-label":T,title:E,children:A})}),n[22]=T,n[23]=E,n[24]=M):M=n[24];let N=`${c.name} actions`,F;n[25]!==a||n[26]!==i?(F=(0,j.jsx)(P,{entry:i,actions:a}),n[25]=a,n[26]=i,n[27]=F):F=n[27];let I;n[28]!==N||n[29]!==F?(I=(0,j.jsx)(f,{align:`end`,className:`w-40`,mobileTitle:N,children:F}),n[28]=N,n[29]=F,n[30]=I):I=n[30];let L;n[31]!==M||n[32]!==I?(L=(0,j.jsxs)(m,{children:[M,I]}),n[31]=M,n[32]=I,n[33]=L):L=n[33];let R;return n[34]!==w||n[35]!==L||n[36]!==g||n[37]!==v||n[38]!==b||n[39]!==x||n[40]!==S?(R=(0,j.jsxs)(`div`,{className:`group flex h-9 items-center gap-3 rounded-md px-3 text-sm transition-colors hover:bg-state-hover`,children:[g,v,b,x,S,w,L]}),n[34]=w,n[35]=L,n[36]=g,n[37]=v,n[38]=b,n[39]=x,n[40]=S,n[41]=R):R=n[41],R}function L(e){let n=(0,k.c)(21),{entries:r,isLoading:i,hasInitialLoadError:a,actions:s,onCreateAutomation:l}=e,u,d,f,p,m;if(n[0]!==s||n[1]!==r||n[2]!==a||n[3]!==i||n[4]!==l){let e=M(r),h=!i&&!a&&r.length===0;u=c,m=`pt-4 md:pt-5`,d=`mx-auto w-full max-w-3xl space-y-6`;let g;n[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,j.jsx)(o,{name:`MessageSquarePlus`,className:`size-4`}),n[10]=g):g=n[10],n[11]===l?f=n[12]:(f=(0,j.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,j.jsxs)(t,{type:`button`,variant:`default`,size:`sm`,onClick:l,children:[g,`Create via chat`]})}),n[11]=l,n[12]=f),p=i?(0,j.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):a?(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load automations.`}):h?(0,j.jsx)(b,{className:`py-6`,children:`No automations yet.`}):(0,j.jsx)(`div`,{className:`space-y-6`,children:e.map(e=>(0,j.jsxs)(`section`,{children:[(0,j.jsx)(`p`,{className:`text-xs font-medium uppercase text-muted-foreground`,children:e.label}),(0,j.jsx)(`div`,{className:`mt-1.5 space-y-1`,children:e.entries.map(e=>(0,j.jsx)(I,{entry:e,actions:s},e.automation.id))})]},e.status))}),n[0]=s,n[1]=r,n[2]=a,n[3]=i,n[4]=l,n[5]=u,n[6]=d,n[7]=f,n[8]=p,n[9]=m}else u=n[5],d=n[6],f=n[7],p=n[8],m=n[9];let h;n[13]!==d||n[14]!==f||n[15]!==p?(h=(0,j.jsxs)(`div`,{className:d,children:[f,p]}),n[13]=d,n[14]=f,n[15]=p,n[16]=h):h=n[16];let g;return n[17]!==u||n[18]!==m||n[19]!==h?(g=(0,j.jsx)(u,{contentClassName:m,children:h}),n[17]=u,n[18]=m,n[19]=h,n[20]=g):g=n[20],g}function R(){let e=(0,k.c)(39),t=w(),n=l(),r=S(),i=C(),a=T(),o=E(),s=h(),{mutate:c}=r,{mutate:u}=i,{mutate:d}=a,{mutate:f}=o,{onClose:p,onOpen:m}=s,y=t.data,b;e[0]===y?.automations?b=e[1]:(b=y?.automations??[],e[0]=y?.automations,e[1]=b);let D=b,O=t.isError&&y===void 0,A=t.isFetching&&y===void 0&&!O,M;e[2]===c?M=e[3]:(M=e=>{c({projectId:e.automation.projectId,automationId:e.automation.id})},e[2]=c,e[3]=M);let N=M,P;e[4]===u?P=e[5]:(P=e=>{u({projectId:e.automation.projectId,automationId:e.automation.id})},e[4]=u,e[5]=P);let F=P,I;e[6]===d?I=e[7]:(I=e=>{d({projectId:e.automation.projectId,automationId:e.automation.id})},e[6]=d,e[7]=I);let R=I,z;e[8]===m?z=e[9]:(z=e=>{m(e)},e[8]=m,e[9]=z);let B=z,V;e[10]!==N||e[11]!==F||e[12]!==R||e[13]!==B?(V={onPause:N,onResume:F,onRun:R,onDelete:B},e[10]=N,e[11]=F,e[12]=R,e[13]=B,e[14]=V):V=e[14];let H=V,U;e[15]!==p||e[16]!==s.target||e[17]!==f?(U=()=>{let e=s.target;e&&f({projectId:e.automation.projectId,automationId:e.automation.id},{onSuccess:()=>p()})},e[15]=p,e[16]=s.target,e[17]=f,e[18]=U):U=e[18];let W=U,G;e[19]===n?G=e[20]:(G=()=>{n(v(),{state:{focusPrompt:!0,initialPrompt:x}})},e[19]=n,e[20]=G);let K=G,q;e[21]!==H||e[22]!==D||e[23]!==K||e[24]!==O||e[25]!==A?(q=(0,j.jsx)(L,{entries:D,isLoading:A,hasInitialLoadError:O,actions:H,onCreateAutomation:K}),e[21]=H,e[22]=D,e[23]=K,e[24]=O,e[25]=A,e[26]=q):q=e[26];let J=s.target?`"${s.target.automation.name}" and its run history will be permanently removed.`:``,Y;e[27]!==p||e[28]!==W||e[29]!==o.isPending||e[30]!==J?(Y=(0,j.jsx)(g,{title:`Delete automation?`,description:J,confirmLabel:`Delete`,pending:o.isPending,onConfirm:W,onCancel:p}),e[27]=p,e[28]=W,e[29]=o.isPending,e[30]=J,e[31]=Y):Y=e[31];let X;e[32]!==s.isOpen||e[33]!==s.onOpenChange||e[34]!==Y?(X=(0,j.jsx)(_,{open:s.isOpen,onOpenChange:s.onOpenChange,children:Y}),e[32]=s.isOpen,e[33]=s.onOpenChange,e[34]=Y,e[35]=X):X=e[35];let Z;return e[36]!==q||e[37]!==X?(Z=(0,j.jsxs)(j.Fragment,{children:[q,X]}),e[36]=q,e[37]=X,e[38]=Z):Z=e[38],Z}export{R as AutomationsView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ThreadDetailRoute-
|
|
2
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{Pa as t,Qt as n,ba as r,en as i,ma as a,no as o,oa as s,sa as c,va as l,wa as u,ya as d}from"./page-shell-Bk7f1lhT.js";import{R as f}from"./responsive-overlay-B2MopAmF.js";import{t as p}from"./preload-helper-ca-nBW7U.js";import{I as m,P as h,k as g}from"./useWorkspaceOpenTargets-BpryDUp6.js";import{R as _}from"./thread-queries-DINnPyF3.js";import{g as v,h as y}from"./route-paths-DLMPskef.js";import{t as b}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ThreadDetailRoute-CpP0bs3F.js","assets/chunk-jRWAZmH_.js","assets/index-CNgSfqzP.js","assets/preload-helper-ca-nBW7U.js","assets/ConfirmDeleteDialog-Chonac8k.js","assets/page-shell-Bk7f1lhT.js","assets/responsive-overlay-B2MopAmF.js","assets/diff-worker-pool-dGjdloQM.js","assets/PromptBoxActionsMenu-Ci6SVh-V.js","assets/dropdown-menu-Jq5katdD.js","assets/host-display-CZ-geDrp.js","assets/mutation-cache-effects-CYdNsa6j.js","assets/environment-diff-patch-cache-owner-COcMUAeE.js","assets/empty-state-BfC-sdZL.js","assets/useWorkspaceOpenTargets-BpryDUp6.js","assets/useHostDaemon-BTmXG9sm.js","assets/browser-storage-DTh24u2Q.js","assets/thread-queries-DINnPyF3.js","assets/route-paths-DLMPskef.js","assets/diff-worker-pool-BrP-ENHg.css","assets/useLocalPathPicker-Av8mrZfX.js","assets/index-CNN3z-LS.css","assets/WorkspaceOpenTargetIcon-Cf0w5RdT.js","assets/ThreadUnarchiveButton-h7Qut-rK.js","assets/pill-BU6FdMLZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{Pa as t,Qt as n,ba as r,en as i,ma as a,no as o,oa as s,sa as c,va as l,wa as u,ya as d}from"./page-shell-Bk7f1lhT.js";import{R as f}from"./responsive-overlay-B2MopAmF.js";import{t as p}from"./preload-helper-ca-nBW7U.js";import{I as m,P as h,k as g}from"./useWorkspaceOpenTargets-BpryDUp6.js";import{R as _}from"./thread-queries-DINnPyF3.js";import{g as v,h as y}from"./route-paths-DLMPskef.js";import{t as b}from"./index-CNgSfqzP.js";var x=a(),S=e(o(),1),C=t(),w=(0,S.lazy)(()=>p(()=>import(`./ThreadDetailRoute-CpP0bs3F.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]))),T=`data-bb-popout-route`,E=`data-bb-popout-card`,D=`[data-radix-popper-content-wrapper], [data-radix-portal]`;function O(){let e=(0,x.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsxs)(`div`,{className:`flex min-h-[120px] flex-1 items-center justify-center text-sm text-muted-foreground`,children:[(0,C.jsx)(s,{name:`Spinner`,className:`mr-2 size-4 animate-spin`}),`Loading...`]}),e[0]=t):t=e[0],t}function k(e){return e instanceof Element?document.querySelector(`[${E}]`)?.contains(e)===!0?!0:e.closest(D)!==null:!1}function A(){return document.querySelector(D)!==null}function j(){let e=(0,x.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,S.useEffect)(M,t)}function M(){return document.documentElement.setAttribute(T,``),document.body.setAttribute(T,``),N}function N(){document.documentElement.removeAttribute(T),document.body.removeAttribute(T)}function P(){let e=(0,x.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=m(),e[0]=t):t=e[0];let n=t?.popout??null,r=(0,S.useRef)(!1),i=(0,S.useRef)(!1),a=(0,S.useRef)(!1),o,s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{if(n===null)return;r.current=!1,i.current=!1,a.current=A();let e=function(e){r.current!==e&&(r.current=e,n?.setMouseEventsIgnored({ignore:e}))},t=function(){let t=A();i.current=!1,a.current=t,e(!t)},o=function(){if(A()){a.current=!0,e(!1);return}a.current&&(a.current=!1,e(!i.current))},s=function(t){if(i.current=k(t.target),a.current){e(!1);return}e(!i.current)},c=function(){if(i.current=!1,a.current){e(!1);return}e(!0)},l=new MutationObserver(o);return l.observe(document.body,{childList:!0,subtree:!0}),t(),window.addEventListener(`mousemove`,s),window.addEventListener(`mouseleave`,c),window.addEventListener(`focus`,t),()=>{l.disconnect(),window.removeEventListener(`mousemove`,s),window.removeEventListener(`mouseleave`,c),window.removeEventListener(`focus`,t),r.current&&n.setMouseEventsIgnored({ignore:!1})}},s=[n],e[1]=o,e[2]=s):(o=e[1],s=e[2]),(0,S.useEffect)(o,s)}function F(e){let t=(0,x.c)(9),{children:n,isThreadOpen:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={padding:`28px`},t[0]=i):i=t[0];let a=r&&`flex-1`,o;t[1]===a?o=t[2]:(o=c(`flex min-h-0 w-full flex-col overflow-hidden rounded-2xl border border-border bg-background shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_2px_8px_rgba(0,0,0,0.08),0_8px_20px_rgba(0,0,0,0.16)] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.07),0_2px_8px_rgba(0,0,0,0.4),0_8px_20px_rgba(0,0,0,0.5)]`,a),t[1]=a,t[2]=o);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,C.jsx)(O,{}),t[3]=s):s=t[3];let l;t[4]===n?l=t[5]:(l=(0,C.jsx)(S.Suspense,{fallback:s,children:n}),t[4]=n,t[5]=l);let u;return t[6]!==o||t[7]!==l?(u=(0,C.jsx)(f,{isCompactViewport:!1,children:(0,C.jsx)(`div`,{className:`flex h-screen flex-col overflow-visible bg-transparent text-foreground`,"data-bb-popout-transparent-region":``,style:i,children:(0,C.jsx)(`div`,{className:o,"data-bb-popout-card":``,children:l})})}),t[6]=o,t[7]=l,t[8]=u):u=t[8],u}function I(){let e=(0,x.c)(7),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=m(),e[0]=t):t=e[0];let n=t,r=u(),i;e[1]===r?i=e[2]:(i=e=>{r(v(e))},e[1]=r,e[2]=i);let a=i,o;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{n?.popout.toggle()},e[3]=o):o=e[3];let s=o,c;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,C.jsx)(`div`,{className:`${h} h-5 shrink-0`}),e[4]=c):c=e[4];let l;return e[5]===a?l=e[6]:(l=(0,C.jsxs)(C.Fragment,{children:[c,(0,C.jsx)(`div`,{className:`${g} shrink-0 px-3 pb-3 pt-1`,children:(0,C.jsx)(b,{surface:`popout`,onThreadCreated:a,onEscapeEmptyPrompt:s})})]}),e[5]=a,e[6]=l),l}function L(){let e=(0,x.c)(7),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=m(),e[0]=t):t=e[0];let r=t,a=u();i(),n();let o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{r?.popout.toggle()},e[1]=o):o=e[1];let s=o,c;e[2]===a?c=e[3]:(c=()=>{a(y())},e[2]=a,e[3]=c);let l=c,d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{r?.popout.openInMain(e)},e[4]=d):d=e[4];let f=d,p;return e[5]===l?p=e[6]:(p=(0,C.jsx)(w,{surface:`popout`,onPopoutHide:s,onPopoutNewQuickThread:l,onPopoutOpenInMain:f}),e[5]=l,e[6]=p),p}function R(){let e=(0,x.c)(20),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=m(),e[0]=t):t=e[0];let n=t?.popout??null,i=u(),a=(0,S.useRef)(i),o=(0,S.useRef)(n),s=(0,S.useRef)(!1),c=(0,S.useRef)(!1),[f,p]=(0,S.useState)(!1),{projectId:h,threadId:g}=_(),b;bb0:{if(h===void 0||g===void 0){b=null;break bb0}let t;e[1]!==h||e[2]!==g?(t={projectId:h,threadId:g},e[1]=h,e[2]=g,e[3]=t):t=e[3],b=t}let w=b,T=w!==null;j(),P();let E,D;e[4]===i?(E=e[5],D=e[6]):(E=()=>{a.current=i},D=[i],e[4]=i,e[5]=E,e[6]=D),(0,S.useEffect)(E,D);let O,k;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{if(o.current!==n&&(o.current=n,s.current=!1,c.current=!1,p(!1)),n===null)return;let e=!1,t=function(e){a.current(e===null?y():v(e),{replace:!0})},r=function(e){c.current||(c.current=!0,t(e),p(!0))},i=n.onThreadChanged(e=>{t(e),c.current||(c.current=!0,p(!0))});return s.current||(s.current=!0,n.getCurrentThread().then(t=>{e||r(t)})),()=>{e=!0,i()}},k=[n],e[7]=O,e[8]=k):(O=e[7],k=e[8]),(0,S.useEffect)(O,k);let A,M;if(e[9]!==f||e[10]!==w?(A=()=>{f&&n?.stateChanged(w)},M=[f,n,w],e[9]=f,e[10]=w,e[11]=A,e[12]=M):(A=e[11],M=e[12]),(0,S.useEffect)(A,M),n===null){let t;return e[13]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsx)(`div`,{className:`flex h-screen items-center justify-center bg-background p-6 text-center text-sm text-muted-foreground`,children:`Popout chat is only available in the desktop app.`}),e[13]=t):t=e[13],t}let N;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,C.jsx)(d,{index:!0,element:(0,C.jsx)(I,{})}),e[14]=N):N=e[14];let R;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,C.jsx)(d,{path:`threads/:threadId`,element:(0,C.jsx)(L,{})}),e[15]=R):R=e[15];let z;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,C.jsx)(d,{path:`projects/:projectId/threads/:threadId`,element:(0,C.jsx)(L,{})}),e[16]=z):z=e[16];let B;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,C.jsxs)(r,{children:[N,R,z,(0,C.jsx)(d,{path:`*`,element:(0,C.jsx)(l,{to:y(),replace:!0})})]}),e[17]=B):B=e[17];let V;return e[18]===T?V=e[19]:(V=(0,C.jsx)(F,{isThreadOpen:T,children:B}),e[18]=T,e[19]=V),V}export{R as PopoutChatView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{$i as t,Ea as n,Pa as r,bi as i,ma as a,no as o,oa as s,t as c,yi as l}from"./page-shell-Bk7f1lhT.js";import{a as u,c as d,r as f,t as p}from"./dropdown-menu-Jq5katdD.js";import{b as m,d as h,g,p as _,t as v,x as y}from"./host-display-CZ-geDrp.js";import{n as b,t as x}from"./ConfirmDeleteDialog-Chonac8k.js";import{t as S}from"./useLocalPathPicker-Av8mrZfX.js";import{b as C,h as w,y as T}from"./index-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{$i as t,Ea as n,Pa as r,bi as i,ma as a,no as o,oa as s,t as c,yi as l}from"./page-shell-Bk7f1lhT.js";import{a as u,c as d,r as f,t as p}from"./dropdown-menu-Jq5katdD.js";import{b as m,d as h,g,p as _,t as v,x as y}from"./host-display-CZ-geDrp.js";import{n as b,t as x}from"./ConfirmDeleteDialog-Chonac8k.js";import{t as S}from"./useLocalPathPicker-Av8mrZfX.js";import{b as C,h as w,y as T}from"./index-CNgSfqzP.js";import{t as E}from"./pill-BU6FdMLZ.js";import{n as ee,r as te,t as D}from"./settings-section-zwQ4epnc.js";var ne=e(o(),1),O=a(),k=r();function re(e){let t=(0,O.c)(8),{target:n,pending:r,onOpenChange:i,onDelete:a}=e,o=n!==null,s;t[0]!==a||t[1]!==r||t[2]!==n?(s=n?(0,k.jsx)(A,{target:n,pending:r,onDelete:a}):null,t[0]=a,t[1]=r,t[2]=n,t[3]=s):s=t[3];let c;return t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,k.jsx)(x,{open:o,onOpenChange:i,children:s}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function A(e){let t=(0,O.c)(7),{target:n,pending:r,onDelete:i}=e,a=`Remove "${n.label}" from this project? This cannot be undone.`,o;t[0]!==i||t[1]!==n.id?(o=()=>i(n.id),t[0]=i,t[1]=n.id,t[2]=o):o=t[2];let s;return t[3]!==r||t[4]!==a||t[5]!==o?(s=(0,k.jsx)(b,{title:`Remove source?`,description:a,confirmLabel:`Remove source`,pending:r,onConfirm:o}),t[3]=r,t[4]=a,t[5]=o,t[6]=s):s=t[6],s}function ie(e){let n=(0,O.c)(26),{source:r,canEditLocalPath:i,isLocalPathInvalid:a,isEditPending:o,isOnlySource:c,onEditLocalPath:l,onRemove:m}=e,h;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,k.jsx)(s,{name:v,className:`size-4 shrink-0 text-muted-foreground`}),n[0]=h):h=n[0];let g;n[1]===r.path?g=n[2]:(g=(0,k.jsx)(`span`,{className:`min-w-0 flex-shrink truncate`,children:r.path}),n[1]=r.path,n[2]=g);let _;n[3]===a?_=n[4]:(_=a?(0,k.jsx)(E,{variant:`destructive`,children:`Invalid local path`}):null,n[3]=a,n[4]=_);let y;n[5]!==g||n[6]!==_?(y=(0,k.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[g,_]}),n[5]=g,n[6]=_,n[7]=y):y=n[7];let b;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,k.jsx)(d,{asChild:!0,children:(0,k.jsx)(t,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0 data-[state=open]:bg-state-active data-[state=open]:text-foreground`,"aria-label":`Source actions`,children:(0,k.jsx)(s,{name:`MoreHorizontal`,className:`size-4`})})}),n[8]=b):b=n[8];let x;n[9]!==i||n[10]!==o||n[11]!==l||n[12]!==r?(x=i?(0,k.jsx)(u,{disabled:o,onSelect:()=>{l(r)},children:`Edit local path`}):null,n[9]=i,n[10]=o,n[11]=l,n[12]=r,n[13]=x):x=n[13];let S;n[14]!==m||n[15]!==r?(S=()=>m(r),n[14]=m,n[15]=r,n[16]=S):S=n[16];let C;n[17]!==c||n[18]!==S?(C=(0,k.jsx)(u,{className:`text-destructive focus:text-destructive`,disabled:c,onSelect:S,children:`Remove`}),n[17]=c,n[18]=S,n[19]=C):C=n[19];let w;n[20]!==x||n[21]!==C?(w=(0,k.jsxs)(p,{children:[b,(0,k.jsxs)(f,{align:`end`,className:`w-40`,children:[x,C]})]}),n[20]=x,n[21]=C,n[22]=w):w=n[22];let T;return n[23]!==y||n[24]!==w?(T=(0,k.jsxs)(D,{children:[h,y,w]}),n[23]=y,n[24]=w,n[25]=T):T=n[25],T}function j(){let e=(0,O.c)(64),{projectId:r}=n(),a=m(),o;e[0]===a.data?.projects?o=e[1]:(o=a.data?.projects.map(y),e[0]=a.data?.projects,e[1]=o);let s=o,u=a.isFetching&&s===void 0,[d,f]=(0,ne.useState)(null),p=_(),v=h(),b=g(),x;e[2]!==r||e[3]!==s?(x=s?.find(e=>e.id===r),e[2]=r,e[3]=s,e[4]=x):x=e[4];let E=x,D=E?.sources,A;e[5]===D?A=e[6]:(A=D??[],e[5]=D,e[6]=A);let j=A,M=E?.name??``,N=v.isPending||b.isPending,P;e[7]!==v||e[8]!==r||e[9]!==j||e[10]!==b?(P=e=>{let{path:t,hostId:n,target:a,closeDialog:o}=e;if(r){if(a.kind===`add-source`)v.mutate({projectId:r,path:t,hostId:n},{onSuccess:o});else if(a.kind===`update`){let e=j.find(e=>i(e)&&e.hostId===n);if(!e)return;b.mutate({projectId:r,sourceId:e.id,path:t},{onSuccess:o})}}},e[7]=v,e[8]=r,e[9]=j,e[10]=b,e[11]=P):P=e[11];let F=P,I;e[12]!==N||e[13]!==F?(I={isPending:N,submit:F},e[12]=N,e[13]=F,e[14]=I):I=e[14];let L=S(I),R;e[15]!==L||e[16]!==r||e[17]!==M?(R=()=>{r&&L.openPicker({kind:`add-source`,projectId:r,projectName:M})},e[15]=L,e[16]=r,e[17]=M,e[18]=R):R=e[18];let z=R,B;e[19]!==L||e[20]!==r||e[21]!==M?(B=e=>{r&&L.openPicker({kind:`update`,projectId:r,projectName:M,currentPath:e.path})},e[19]=L,e[20]=r,e[21]=M,e[22]=B):B=e[22];let oe=B,V=L.hostId,H;bb0:{if(!V){let t;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[23]=t):t=e[23],H=t;break bb0}let t;if(e[24]!==V||e[25]!==j){let n;e[27]===V?n=e[28]:(n=e=>i(e)&&e.hostId===V,e[27]=V,e[28]=n),t=j.filter(n).map(ae),e[24]=V,e[25]=j,e[26]=t}else t=e[26];H=t}let U=C(H),W;e[29]!==V||e[30]!==j?(W=V!=null&&!l(j,V),e[29]=V,e[30]=j,e[31]=W):W=e[31];let G=W,K;e[32]!==v.isPending||e[33]!==z||e[34]!==G?(K=G?(0,k.jsx)(`div`,{className:`mt-2 flex gap-2`,children:(0,k.jsx)(t,{size:`sm`,variant:`outline`,disabled:v.isPending,onClick:z,children:`Add local path`})}):null,e[32]=v.isPending,e[33]=z,e[34]=G,e[35]=K):K=e[35];let q=K,J;e[36]!==q||e[37]!==u||e[38]!==N||e[39]!==oe||e[40]!==U||e[41]!==V||e[42]!==j?(J=(0,k.jsx)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6`,children:(0,k.jsx)(te,{title:`Project Sources`,children:u?(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):j.length===0?(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No sources configured.`}),q]}):(0,k.jsxs)(`div`,{children:[(0,k.jsx)(ee,{children:j.map(e=>{let t=i(e)&&V!=null&&e.hostId===V;return(0,k.jsx)(ie,{source:e,canEditLocalPath:t,isLocalPathInvalid:t&&T(U,e.path),isEditPending:N,isOnlySource:j.length<=1,onEditLocalPath:oe,onRemove:e=>f({id:e.id,label:e.path})},e.id)})}),q]})})}),e[36]=q,e[37]=u,e[38]=N,e[39]=oe,e[40]=U,e[41]=V,e[42]=j,e[43]=J):J=e[43];let Y;e[44]!==L.hostId||e[45]!==L.hostName||e[46]!==L.platform||e[47]!==L.projectPathDialog.onOpenChange||e[48]!==L.projectPathDialog.target||e[49]!==L.submitProjectPath||e[50]!==N?(Y=(0,k.jsx)(w,{target:L.projectPathDialog.target,pending:N,platform:L.platform,hostId:L.hostId,hostName:L.hostName,onOpenChange:L.projectPathDialog.onOpenChange,onSubmit:L.submitProjectPath}),e[44]=L.hostId,e[45]=L.hostName,e[46]=L.platform,e[47]=L.projectPathDialog.onOpenChange,e[48]=L.projectPathDialog.target,e[49]=L.submitProjectPath,e[50]=N,e[51]=Y):Y=e[51];let X;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(X=e=>{e||f(null)},e[52]=X):X=e[52];let Z;e[53]!==p||e[54]!==r?(Z=e=>{r&&p.mutate({projectId:r,sourceId:e},{onSuccess:()=>f(null)})},e[53]=p,e[54]=r,e[55]=Z):Z=e[55];let Q;e[56]!==p.isPending||e[57]!==d||e[58]!==Z?(Q=(0,k.jsx)(re,{target:d,pending:p.isPending,onOpenChange:X,onDelete:Z}),e[56]=p.isPending,e[57]=d,e[58]=Z,e[59]=Q):Q=e[59];let $;return e[60]!==J||e[61]!==Y||e[62]!==Q?($=(0,k.jsxs)(c,{contentClassName:`pt-4 md:pt-5`,children:[J,Y,Q]}),e[60]=J,e[61]=Y,e[62]=Q,e[63]=$):$=e[63],$}function ae(e){return e.path}export{j as ProjectSettingsView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{$i as t,Ii as n,Li as r,Pa as i,Ti as a,ma as o,no as s,oa as c,sa as l,t as u,wa as d,wi as f}from"./page-shell-Bk7f1lhT.js";import{B as p,a as m,c as h,r as g,s as _,t as v}from"./dropdown-menu-Jq5katdD.js";import{C as y,H as b,I as x,V as S,W as C,_ as w,a as T,c as E,f as D,i as O,l as k,m as A,o as j,s as M,t as N,x as P,y as F,z as I}from"./useWorkspaceOpenTargets-BpryDUp6.js";import{t as ee}from"./useHostDaemon-BTmXG9sm.js";import{b as te}from"./route-paths-DLMPskef.js";import{a as L,i as R,n as z,o as ne,r as B}from"./index-CuU9b8Fw.js";import{i as V,r as H}from"./settings-section-zwQ4epnc.js";import{t as U}from"./WorkspaceOpenTargetIcon-Cf0w5RdT.js";var W=e(s(),1),G=o(),K=i(),q=[{key:`codex`,name:`Codex`,signInHint:"Run `codex` to sign in and see your usage.",expiredHint:"Your Codex session expired. Run `codex`, then reload usage."},{key:`claudeCode`,name:`Claude Code`,signInHint:"Run `claude` to sign in and see your usage.",expiredHint:"Your Claude session expired. Run `claude`, then reload usage."}];function J(e){return e>=95?`bg-destructive`:e>=80?`bg-warning`:`bg-primary`}function Y(e){if(!e)return null;let t=new Date(e);if(Number.isNaN(t.getTime()))return null;let n=t.getTime()-Date.now();if(n<=0)return`Resetting now`;let r=Math.round(n/6e4);if(r<60)return`Resets in ${r} min`;let i=Math.floor(r/60);if(i<24){let e=r%60;return e>0?`Resets in ${i} hr ${e} min`:`Resets in ${i} hr`}let a=n<10080*6e4;return`Resets ${t.toLocaleString(void 0,{weekday:a?`short`:void 0,month:a?void 0:`short`,day:a?void 0:`numeric`,hour:`numeric`,minute:`2-digit`})}`}function X(e){let t=(0,G.c)(22),{window:n}=e,r;t[0]===n.resetsAt?r=t[1]:(r=Y(n.resetsAt),t[0]=n.resetsAt,t[1]=r);let i=r,a;t[2]===n.label?a=t[3]:(a=(0,K.jsx)(`span`,{className:`text-xs text-foreground`,children:n.label}),t[2]=n.label,t[3]=a);let o;t[4]===n.usedPercent?o=t[5]:(o=(0,K.jsxs)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:[n.usedPercent,`% used`]}),t[4]=n.usedPercent,t[5]=o);let s;t[6]!==a||t[7]!==o?(s=(0,K.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8];let c;t[9]===n.usedPercent?c=t[10]:(c=l(`h-full rounded-full`,J(n.usedPercent)),t[9]=n.usedPercent,t[10]=c);let u=`${Math.max(n.usedPercent,2)}%`,d;t[11]===u?d=t[12]:(d={width:u},t[11]=u,t[12]=d);let f;t[13]!==c||t[14]!==d?(f=(0,K.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-muted`,children:(0,K.jsx)(`div`,{className:c,style:d})}),t[13]=c,t[14]=d,t[15]=f):f=t[15];let p;t[16]===i?p=t[17]:(p=i?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i}):null,t[16]=i,t[17]=p);let m;return t[18]!==s||t[19]!==f||t[20]!==p?(m=(0,K.jsxs)(`div`,{className:`space-y-1`,children:[s,f,p]}),t[18]=s,t[19]=f,t[20]=p,t[21]=m):m=t[21],m}function Z(e){let t=(0,G.c)(15),{config:n,usage:r,isLoading:i,isError:a}=e,o=r?.status===`ok`?r.planLabel:null,s;t[0]===n.name?s=t[1]:(s=(0,K.jsx)(`h3`,{className:`text-sm font-normal text-foreground`,children:n.name}),t[0]=n.name,t[1]=s);let c;t[2]===o?c=t[3]:(c=o?(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:o}):null,t[2]=o,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]!==n||t[8]!==a||t[9]!==i||t[10]!==r?(u=(0,K.jsx)(Q,{config:n,usage:r,isLoading:i,isError:a}),t[7]=n,t[8]=a,t[9]=i,t[10]=r,t[11]=u):u=t[11];let d;return t[12]!==l||t[13]!==u?(d=(0,K.jsxs)(`div`,{className:`space-y-3.5`,children:[l,u]}),t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function Q(e){let t=(0,G.c)(14),{config:n,usage:r,isLoading:i,isError:a}=e;if(a){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Couldn't load usage right now. Make sure bb's host is connected, then reload usage.`}),t[0]=e):e=t[0],e}if(!r){let e=i?`Loading usage…`:`Usage unavailable.`,n;return t[1]===e?n=t[2]:(n=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e}),t[1]=e,t[2]=n),n}switch(r.status){case`ok`:{if(r.windows.length===0){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No usage limits reported for this plan.`}),t[3]=e):e=t[3],e}let e;t[4]===r.windows?e=t[5]:(e=r.windows.map($),t[4]=r.windows,t[5]=e);let n;return t[6]===e?n=t[7]:(n=(0,K.jsx)(`div`,{className:`space-y-3.5`,children:e}),t[6]=e,t[7]=n),n}case`unauthenticated`:{let e;return t[8]===n.signInHint?e=t[9]:(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.signInHint}),t[8]=n.signInHint,t[9]=e),e}case`expired`:{let e;return t[10]===n.expiredHint?e=t[11]:(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.expiredHint}),t[10]=n.expiredHint,t[11]=e),e}case`error`:{let e;return t[12]===r.message?e=t[13]:(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r.message}),t[12]=r.message,t[13]=e),e}default:return null}}function $(e){return(0,K.jsx)(X,{window:e},e.label)}function re(e){let n=(0,G.c)(21),{usage:r,isLoading:i,isError:a,isFetching:o,onRefresh:s}=e,u=o?`Reloading usage data`:`Reload usage data`,d=o&&`animate-spin`,f;n[0]===d?f=n[1]:(f=l(`size-3.5`,d),n[0]=d,n[1]=f);let p;n[2]===f?p=n[3]:(p=(0,K.jsx)(c,{name:`RotateCcw`,className:f}),n[2]=f,n[3]=p);let m;n[4]!==o||n[5]!==s||n[6]!==u||n[7]!==p?(m=(0,K.jsx)(C,{asChild:!0,children:(0,K.jsx)(t,{variant:`ghost`,size:`icon`,className:`size-7 text-muted-foreground hover:text-foreground`,disabled:o,onClick:s,title:void 0,"aria-label":u,children:p})}),n[4]=o,n[5]=s,n[6]=u,n[7]=p,n[8]=m):m=n[8];let h;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,K.jsx)(b,{side:`bottom`,children:`Reload usage data`}),n[9]=h):h=n[9];let g;n[10]===m?g=n[11]:(g=(0,K.jsxs)(S,{delayDuration:300,disableHoverableContent:!0,children:[m,h]}),n[10]=m,n[11]=g);let _;n[12]!==a||n[13]!==i||n[14]!==r?(_=q.map(e=>(0,K.jsx)(`div`,{className:`py-3.5 first:pt-0 last:pb-0`,children:(0,K.jsx)(Z,{config:e,usage:r[e.key],isLoading:i,isError:a})},e.key)),n[12]=a,n[13]=i,n[14]=r,n[15]=_):_=n[15];let v;n[16]===_?v=n[17]:(v=(0,K.jsx)(`div`,{className:`divide-y divide-border`,children:_}),n[16]=_,n[17]=v);let y;return n[18]!==g||n[19]!==v?(y=(0,K.jsx)(H,{title:`Usage limits`,description:`Your Codex and Claude Code subscription usage.`,action:g,children:v}),n[18]=g,n[19]=v,n[20]=y):y=n[20],y}function ie(){let e=(0,G.c)(10),t=y(),n;e[0]===t.data?n=e[1]:(n=t.data??{},e[0]=t.data,e[1]=n);let r;e[2]===t?r=e[3]:(r=()=>{t.refetch()},e[2]=t,e[3]=r);let i;return e[4]!==n||e[5]!==r||e[6]!==t.isError||e[7]!==t.isFetching||e[8]!==t.isLoading?(i=(0,K.jsx)(re,{usage:n,isLoading:t.isLoading,isError:t.isError,isFetching:t.isFetching,onRefresh:r}),e[4]=n,e[5]=r,e[6]=t.isError,e[7]=t.isFetching,e[8]=t.isLoading,e[9]=i):i=e[9],i}var ae={antigravity:`Antigravity`,cursor:`Cursor`,"default-app":`Default App`,finder:`Finder`,ghostty:`Ghostty`,iterm2:`iTerm2`,"sublime-text":`Sublime Text`,terminal:`Terminal`,vscode:`VS Code`,windsurf:`Windsurf`,xcode:`Xcode`,zed:`Zed`};function oe(e){return ae[e]}function se(e){return n.find(t=>t.id===e.themeId)?.name??e.themeId}var ce=[{label:`System`,value:`system`},{label:`Light`,value:`light`},{label:`Dark`,value:`dark`}],le={dark:`Dark`,light:`Light`,system:`System`},ue=[{label:`Default`,value:`default`},{label:`Red`,value:`red`},{label:`Orange`,value:`orange`},{label:`Yellow`,value:`yellow`},{label:`Green`,value:`green`},{label:`Teal`,value:`teal`},{label:`Blue`,value:`blue`},{label:`Purple`,value:`purple`},{label:`Pink`,value:`pink`}],de={blue:`Blue`,default:`Default`,green:`Green`,orange:`Orange`,pink:`Pink`,purple:`Purple`,red:`Red`,teal:`Teal`,yellow:`Yellow`},fe=`h-7 w-full justify-between border-border/60 bg-card px-2 text-xs sm:w-36`,pe=`min-w-[var(--radix-dropdown-menu-trigger-width)]`,me="Create a custom bb palette. First run `bb theme dir` to find the custom theme directory. Ask me for the palette name and visual direction, then create `<theme-dir>/<name>/theme.css` with light and dark theme variables compatible with bb's theme tokens.",he=`Palettes change bb's colors across light and dark mode. Choose a built-in palette or create one from a prompt.`;function ge(e){let t=(0,G.c)(10),{value:n}=e,r=n===`default`&&`bg-foreground`,i;t[0]===r?i=t[1]:(i=l(`size-4 shrink-0`,r),t[0]=r,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=R(),t[2]=a):a=t[2];let o;t[3]===n?o=t[4]:(o=n===`default`?void 0:{backgroundColor:B[n]},t[3]=n,t[4]=o);let s;t[5]===o?s=t[6]:(s={mask:`url("${a}") center / contain no-repeat`,...o},t[5]=o,t[6]=s);let c;return t[7]!==i||t[8]!==s?(c=(0,K.jsx)(`span`,{"aria-hidden":!0,className:i,style:s}),t[7]=i,t[8]=s,t[9]=c):c=t[9],c}function _e(e){let n=(0,G.c)(19),{disabled:r,faviconColor:i,onFaviconColorChange:a}=e,o;n[0]===i?o=n[1]:(o=(0,K.jsx)(ge,{value:i}),n[0]=i,n[1]=o);let s=de[i],u;n[2]===s?u=n[3]:(u=(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:s}),n[2]=s,n[3]=u);let d;n[4]!==o||n[5]!==u?(d=(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[o,u]}),n[4]=o,n[5]=u,n[6]=d):d=n[6];let f;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),n[7]=f):f=n[7];let _;n[8]!==r||n[9]!==d?(_=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":`Favicon color`,disabled:r,children:[d,f]})}),n[8]=r,n[9]=d,n[10]=_):_=n[10];let y;n[11]!==i||n[12]!==a?(y=ue.map(e=>(0,K.jsxs)(m,{onSelect:()=>a(e.value),children:[(0,K.jsx)(ge,{value:e.value}),e.label,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,i!==e.value&&`opacity-0`,p)})]},e.value)),n[11]=i,n[12]=a,n[13]=y):y=n[13];let b;n[14]===y?b=n[15]:(b=(0,K.jsx)(g,{align:`end`,className:pe,children:y}),n[14]=y,n[15]=b);let x;return n[16]!==_||n[17]!==b?(x=(0,K.jsx)(V,{label:`Favicon color`,description:`Tint browser tabs to tell instances apart.`,children:(0,K.jsxs)(v,{children:[_,b]})}),n[16]=_,n[17]=b,n[18]=x):x=n[18],x}var ve={capability:`openDirectory`,emptyDescription:`No local app can open directories.`,label:`Directory default`},ye={capability:`openFile`,emptyDescription:`No local app can open files.`,label:`File default`};function be(e){let n=(0,G.c)(36),{definition:r,onTargetChange:i,preferredTargetId:a,targets:o}=e,s;if(n[0]!==r.capability||n[1]!==o){let e;n[3]===r.capability?e=n[4]:(e=e=>T({capability:r.capability,target:e}),n[3]=r.capability,n[4]=e),s=o.filter(e),n[0]=r.capability,n[1]=o,n[2]=s}else s=n[2];let u=s,d;n[5]!==r.capability||n[6]!==a||n[7]!==o?(d=O({capability:r.capability,preferredTargetId:a,targets:o}),n[5]=r.capability,n[6]=a,n[7]=o,n[8]=d):d=n[8];let f=d,_=u.length===0?r.emptyDescription:null,y=f?.id??a,b;n[9]!==a||n[10]!==f?.label?(b=f?.label??(a?oe(a):`Unavailable`),n[9]=a,n[10]=f?.label,n[11]=b):b=n[11];let x=b,S;n[12]===y?S=n[13]:(S=y?(0,K.jsx)(U,{targetId:y,className:`size-5`}):null,n[12]=y,n[13]=S);let C;n[14]===x?C=n[15]:(C=(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:x}),n[14]=x,n[15]=C);let w;n[16]!==S||n[17]!==C?(w=(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[S,C]}),n[16]=S,n[17]=C,n[18]=w):w=n[18];let E;n[19]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),n[19]=E):E=n[19];let D;n[20]!==r.label||n[21]!==w?(D=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":r.label,children:[w,E]})}),n[20]=r.label,n[21]=w,n[22]=D):D=n[22];let k;n[23]!==u||n[24]!==i||n[25]!==f?.id||n[26]!==_?(k=_?(0,K.jsx)(`div`,{role:`note`,className:`px-2 py-[0.3125rem] text-xs leading-snug text-foreground`,children:_}):u.map(e=>(0,K.jsxs)(m,{onSelect:()=>i(e.id),children:[(0,K.jsx)(U,{targetId:e.id,className:`size-5`}),(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label}),(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,f?.id!==e.id&&`opacity-0`,p)})]},e.id)),n[23]=u,n[24]=i,n[25]=f?.id,n[26]=_,n[27]=k):k=n[27];let A;n[28]===k?A=n[29]:(A=(0,K.jsx)(g,{align:`end`,className:pe,children:k}),n[28]=k,n[29]=A);let j;n[30]!==A||n[31]!==D?(j=(0,K.jsxs)(v,{children:[D,A]}),n[30]=A,n[31]=D,n[32]=j):j=n[32];let M;return n[33]!==r.label||n[34]!==j?(M=(0,K.jsx)(V,{label:r.label,children:j}),n[33]=r.label,n[34]=j,n[35]=M):M=n[35],M}function xe(e){let t=(0,G.c)(11),{directoryTargetId:n,fileTargetId:r,hasDaemon:i,onDirectoryTargetChange:a,onFileTargetChange:o,targets:s}=e;if(!i)return null;let c;t[0]!==n||t[1]!==a||t[2]!==s?(c=(0,K.jsx)(be,{definition:ve,onTargetChange:a,preferredTargetId:n,targets:s}),t[0]=n,t[1]=a,t[2]=s,t[3]=c):c=t[3];let l;t[4]!==r||t[5]!==o||t[6]!==s?(l=(0,K.jsx)(be,{definition:ye,onTargetChange:o,preferredTargetId:r,targets:s}),t[4]=r,t[5]=o,t[6]=s,t[7]=l):l=t[7];let u;return t[8]!==c||t[9]!==l?(u=(0,K.jsx)(H,{title:`File Preferences`,children:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[c,l]})}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}var Se=`Open links in the in-app browser`,Ce=`Rewrite localhost links`,we=`Navigate to threads on creation`,Te=`Markdown formatting in prompt box`;function Ee(e){let t=(0,G.c)(3),{navigateToThreadAfterCreate:n,onNavigateToThreadAfterCreateChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:we,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":we})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function De(e){let t=(0,G.c)(3),{enabled:n,onEnabledChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:Se,description:`Open web links inside bb.`,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":Se})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Oe(e){let t=(0,G.c)(3),{enabled:n,onEnabledChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:Ce,description:`Point localhost links at this host.`,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":Ce})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function ke(e){let t=(0,G.c)(3),{enabled:n,onEnabledChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:Te,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":Te})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Ae(e){let r=(0,G.c)(65),{appearance:i,appearanceDisabled:a,customThemes:o,desktopBrowserAvailable:s,faviconColor:u,navigateToThreadAfterCreate:d,onAppearanceThemeChange:f,onFaviconColorChange:y,onNavigateToThreadAfterCreateChange:b,onOpenLinksInAppBrowserChange:x,onRewriteLocalhostLinksChange:S,onRichTextEditingChange:C,onCreatePalette:w,onThemePreferenceChange:T,openLinksInAppBrowser:E,rewriteLocalhostLinks:D,richTextEditing:O,themePreference:k}=e,A=le[k],j;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),r[0]=j):j=r[0];let M;r[1]===A?M=r[2]:(M=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":`Theme`,children:[A,j]})}),r[1]=A,r[2]=M);let N;r[3]!==T||r[4]!==k?(N=ce.map(e=>(0,K.jsxs)(m,{onSelect:()=>T(e.value),children:[e.label,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,k!==e.value&&`opacity-0`,p)})]},e.value)),r[3]=T,r[4]=k,r[5]=N):N=r[5];let P;r[6]===N?P=r[7]:(P=(0,K.jsx)(g,{align:`end`,className:pe,children:N}),r[6]=N,r[7]=P);let F;r[8]!==M||r[9]!==P?(F=(0,K.jsx)(V,{label:`Theme`,children:(0,K.jsxs)(v,{children:[M,P]})}),r[8]=M,r[9]=P,r[10]=F):F=r[10];let I;r[11]===i?I=r[12]:(I=se(i),r[11]=i,r[12]=I);let ee;r[13]===I?ee=r[14]:(ee=(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:I}),r[13]=I,r[14]=ee);let te;r[15]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),r[15]=te):te=r[15];let L;r[16]!==a||r[17]!==ee?(L=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":`Palette`,disabled:a,children:[ee,te]})}),r[16]=a,r[17]=ee,r[18]=L):L=r[18];let R;r[19]!==i||r[20]!==f?(R=n.map(e=>(0,K.jsxs)(m,{onSelect:()=>f(e.id),children:[e.name,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,i.themeId!==e.id&&`opacity-0`,p)})]},e.id)),r[19]=i,r[20]=f,r[21]=R):R=r[21];let z;if(r[22]!==i||r[23]!==o||r[24]!==f){let e;r[26]!==i||r[27]!==f?(e=e=>(0,K.jsxs)(m,{onSelect:()=>f(e),children:[e,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,i.themeId!==e&&`opacity-0`,p)})]},`custom:${e}`),r[26]=i,r[27]=f,r[28]=e):e=r[28],z=o.map(e),r[22]=i,r[23]=o,r[24]=f,r[25]=z}else z=r[25];let ne;r[29]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,K.jsx)(_,{}),r[29]=ne):ne=r[29];let B;r[30]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsx)(c,{name:`Plus`,className:p}),r[30]=B):B=r[30];let U;r[31]===w?U=r[32]:(U=(0,K.jsxs)(m,{onSelect:w,children:[B,`Create`]}),r[31]=w,r[32]=U);let W;r[33]!==R||r[34]!==z||r[35]!==U?(W=(0,K.jsxs)(g,{align:`end`,className:pe,children:[R,z,ne,U]}),r[33]=R,r[34]=z,r[35]=U,r[36]=W):W=r[36];let q;r[37]!==L||r[38]!==W?(q=(0,K.jsx)(V,{label:`Palette`,description:he,children:(0,K.jsxs)(v,{children:[L,W]})}),r[37]=L,r[38]=W,r[39]=q):q=r[39];let J;r[40]!==a||r[41]!==u||r[42]!==y?(J=(0,K.jsx)(_e,{disabled:a,faviconColor:u,onFaviconColorChange:y}),r[40]=a,r[41]=u,r[42]=y,r[43]=J):J=r[43];let Y;r[44]!==d||r[45]!==b?(Y=(0,K.jsx)(Ee,{navigateToThreadAfterCreate:d,onNavigateToThreadAfterCreateChange:b}),r[44]=d,r[45]=b,r[46]=Y):Y=r[46];let X;r[47]!==C||r[48]!==O?(X=(0,K.jsx)(ke,{enabled:O,onEnabledChange:C}),r[47]=C,r[48]=O,r[49]=X):X=r[49];let Z;r[50]!==s||r[51]!==x||r[52]!==E?(Z=s?(0,K.jsx)(De,{enabled:E,onEnabledChange:x}):null,r[50]=s,r[51]=x,r[52]=E,r[53]=Z):Z=r[53];let Q;r[54]!==S||r[55]!==D?(Q=(0,K.jsx)(Oe,{enabled:D,onEnabledChange:S}),r[54]=S,r[55]=D,r[56]=Q):Q=r[56];let $;return r[57]!==q||r[58]!==J||r[59]!==Y||r[60]!==X||r[61]!==Z||r[62]!==Q||r[63]!==F?($=(0,K.jsx)(H,{title:`General`,children:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[F,q,J,Y,X,Z,Q]})}),r[57]=q,r[58]=J,r[59]=Y,r[60]=X,r[61]=Z,r[62]=Q,r[63]=F,r[64]=$):$=r[64],$}var je=`Mock CLI Traffic`,Me=`Popout chat`,Ne=`Hotkey`,Pe=`UI forking`;function Fe(e){return e.split(`+`).map(e=>{switch(e){case`Alt`:case`Option`:return`⌥`;case`Command`:case`Cmd`:return`⌘`;case`CommandOrControl`:case`CmdOrCtrl`:return`⌘/Ctrl`;case`Control`:case`Ctrl`:return`⌃`;case`Shift`:return`⇧`;default:return e}}).join(` `)}function Ie(e){return e===`Alt`||e===`Control`||e===`Meta`||e===`OS`||e===`Shift`}function Le(e){if(e===` `||e===`Spacebar`)return`Space`;if(e.length===1)return e===`+`?`Plus`:e.toUpperCase();if(e.startsWith(`Arrow`))return e.slice(5);switch(e){case`Backspace`:case`Delete`:case`Down`:case`End`:case`Enter`:case`Home`:case`Insert`:case`Left`:case`PageDown`:case`PageUp`:case`Right`:case`Space`:case`Tab`:case`Up`:return e;default:return/^F(?:[1-9]|1[0-9]|2[0-4])$/.test(e)?e:null}}function Re(e){if(Ie(e.key))return null;let t=Le(e.key);if(t===null)return null;let n=[];if(e.metaKey&&n.push(`Command`),e.ctrlKey&&n.push(`Control`),e.altKey&&n.push(`Alt`),e.shiftKey&&n.push(`Shift`),n.length===0)return null;let r=[...n,t].join(`+`);return a(r)?r:null}function ze(e){let n=(0,G.c)(20),{disabled:r,hotkey:i,onHotkeyChange:a}=e,[o,s]=(0,W.useState)(!1),[c,u]=(0,W.useState)(null),d;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(){s(!0),u(null)},n[0]=d):d=n[0];let f=d,p;n[1]!==a||n[2]!==o?(p=function(e){if(!o)return;if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){s(!1),u(null);return}let t=Re(e);if(t===null){u(`Use at least one modifier with a key.`);return}a(t),s(!1),u(null)},n[1]=a,n[2]=o,n[3]=p):p=n[3];let m=p,h;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=function(){s(!1),u(null)},n[4]=h):h=n[4];let g=h,_=o?`border-ring text-foreground`:null,v;n[5]===_?v=n[6]:(v=l(`h-7 min-w-24 px-2 font-mono text-xs`,_),n[5]=_,n[6]=v);let y;n[7]!==i||n[8]!==o?(y=o?`Press keys`:Fe(i),n[7]=i,n[8]=o,n[9]=y):y=n[9];let b;n[10]!==r||n[11]!==m||n[12]!==v||n[13]!==y?(b=(0,K.jsx)(t,{type:`button`,variant:`outline`,size:`sm`,className:v,disabled:r,onClick:f,onBlur:g,onKeyDown:m,"aria-label":`Record popout chat hotkey`,children:y}),n[10]=r,n[11]=m,n[12]=v,n[13]=y,n[14]=b):b=n[14];let x;n[15]===c?x=n[16]:(x=c?(0,K.jsx)(`p`,{className:`text-xs text-destructive`,children:c}):null,n[15]=c,n[16]=x);let S;return n[17]!==b||n[18]!==x?(S=(0,K.jsxs)(`div`,{className:`flex flex-col items-start gap-1 sm:items-end`,children:[b,x]}),n[17]=b,n[18]=x,n[19]=S):S=n[19],S}function Be(e){let t=(0,G.c)(28),{claudeCodeMockCliTrafficEnabled:n,desktopShellAvailable:r,disabled:i,onClaudeCodeMockCliTrafficEnabledChange:a,onPopoutChatEnabledChange:o,onPopoutChatHotkeyChange:s,onUiForkingEnabledChange:c,popoutChatEnabled:l,popoutChatHotkey:u,uiForkingEnabled:d}=e,f;t[0]!==n||t[1]!==i||t[2]!==a?(f=(0,K.jsx)(V,{label:je,labelBadge:`dev-only`,description:`Route Claude Code through CLI-style traffic.`,children:(0,K.jsx)(k,{checked:n,disabled:i,onCheckedChange:a,"aria-label":je})}),t[0]=n,t[1]=i,t[2]=a,t[3]=f):f=t[3];let p;t[4]!==i||t[5]!==c||t[6]!==d?(p=(0,K.jsx)(V,{label:Pe,description:`Let the bb CLI (bb ui) fork, edit, and live-reload the app's own frontend. Off keeps the shipped UI.`,children:(0,K.jsx)(k,{checked:d,disabled:i,onCheckedChange:c,"aria-label":Pe})}),t[4]=i,t[5]=c,t[6]=d,t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r?null:(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Desktop only`}),t[8]=r,t[9]=m);let h=i||!r,g;t[10]!==o||t[11]!==l||t[12]!==h?(g=(0,K.jsx)(k,{checked:l,disabled:h,onCheckedChange:o,"aria-label":Me}),t[10]=o,t[11]=l,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==m||t[15]!==g?(_=(0,K.jsx)(V,{label:Me,description:`Open compact desktop chat with a hotkey.`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m,g]})}),t[14]=m,t[15]=g,t[16]=_):_=t[16];let v;t[17]!==r||t[18]!==i||t[19]!==s||t[20]!==l||t[21]!==u?(v=l?(0,K.jsx)(`div`,{className:`border-l border-border pl-3`,children:(0,K.jsx)(V,{label:Ne,description:`Record the popout chat shortcut.`,children:(0,K.jsx)(ze,{disabled:i||!r,hotkey:u,onHotkeyChange:s})})}):null,t[17]=r,t[18]=i,t[19]=s,t[20]=l,t[21]=u,t[22]=v):v=t[22];let y;return t[23]!==f||t[24]!==p||t[25]!==_||t[26]!==v?(y=(0,K.jsx)(H,{title:`Experiments`,description:`Early features that are off by default. Opt in to try them.`,children:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[f,p,_,v]})}),t[23]=f,t[24]=p,t[25]=_,t[26]=v,t[27]=y):y=t[27],y}function Ve(){let e=(0,G.c)(57),t=d(),n=F(),i=P(),{hasDaemon:a}=ee(),o;e[0]===a?o=e[1]:(o={enabled:a},e[0]=a,e[1]=o);let{workspaceOpenTargets:s}=N(o),[c,l]=M(),[p,m]=j(),[h,g]=D(),[_,v]=A(),[y,b]=z(),[x,S]=E(),[C]=(0,W.useState)(I),[T]=(0,W.useState)(He),O=i.data?.experiments??f,k=ne(),R=i.data?.appearance??r,B=L(),V=i.data===void 0||B.isPending,H;e[2]===i.data?.customThemes?H=e[3]:(H=i.data?.customThemes??[],e[2]=i.data?.customThemes,e[3]=H);let U;e[4]===B?U=e[5]:(U=e=>B.mutate({themeId:e}),e[4]=B,e[5]=U);let q;e[6]===t?q=e[7]:(q=()=>t(te(),{state:{focusPrompt:!0,initialPrompt:me}}),e[6]=t,e[7]=q);let J;e[8]!==R.themeId||e[9]!==B?(J=e=>B.mutate({themeId:R.themeId,faviconColor:e}),e[8]=R.themeId,e[9]=B,e[10]=J):J=e[10];let Y;e[11]!==R||e[12]!==C||e[13]!==y||e[14]!==h||e[15]!==_||e[16]!==x||e[17]!==b||e[18]!==g||e[19]!==v||e[20]!==S||e[21]!==V||e[22]!==H||e[23]!==U||e[24]!==q||e[25]!==J||e[26]!==n?(Y=(0,K.jsx)(Ae,{appearance:R,appearanceDisabled:V,customThemes:H,desktopBrowserAvailable:C,faviconColor:R.faviconColor,navigateToThreadAfterCreate:y,openLinksInAppBrowser:h,rewriteLocalhostLinks:_,richTextEditing:x,themePreference:n,onAppearanceThemeChange:U,onCreatePalette:q,onFaviconColorChange:J,onNavigateToThreadAfterCreateChange:b,onOpenLinksInAppBrowserChange:g,onRewriteLocalhostLinksChange:v,onRichTextEditingChange:S,onThemePreferenceChange:w}),e[11]=R,e[12]=C,e[13]=y,e[14]=h,e[15]=_,e[16]=x,e[17]=b,e[18]=g,e[19]=v,e[20]=S,e[21]=V,e[22]=H,e[23]=U,e[24]=q,e[25]=J,e[26]=n,e[27]=Y):Y=e[27];let X;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,K.jsx)(ie,{}),e[28]=X):X=e[28];let Z;e[29]!==c||e[30]!==p||e[31]!==a||e[32]!==l||e[33]!==m||e[34]!==s?(Z=(0,K.jsx)(xe,{directoryTargetId:c,fileTargetId:p,hasDaemon:a,onDirectoryTargetChange:l,onFileTargetChange:m,targets:s}),e[29]=c,e[30]=p,e[31]=a,e[32]=l,e[33]=m,e[34]=s,e[35]=Z):Z=e[35];let Q=i.data===void 0||k.isPending,$,re,ae,oe;e[36]!==O||e[37]!==k?($=e=>k.mutate({...O,claudeCodeMockCliTraffic:e}),re=e=>k.mutate({...O,popoutChat:e}),ae=e=>k.mutate({...O,popoutChatHotkey:e}),oe=e=>k.mutate({...O,uiForking:e}),e[36]=O,e[37]=k,e[38]=$,e[39]=re,e[40]=ae,e[41]=oe):($=e[38],re=e[39],ae=e[40],oe=e[41]);let se;e[42]!==T||e[43]!==O.claudeCodeMockCliTraffic||e[44]!==O.popoutChat||e[45]!==O.popoutChatHotkey||e[46]!==O.uiForking||e[47]!==$||e[48]!==re||e[49]!==ae||e[50]!==oe||e[51]!==Q?(se=(0,K.jsx)(Be,{claudeCodeMockCliTrafficEnabled:O.claudeCodeMockCliTraffic,desktopShellAvailable:T,disabled:Q,onClaudeCodeMockCliTrafficEnabledChange:$,onPopoutChatEnabledChange:re,onPopoutChatHotkeyChange:ae,onUiForkingEnabledChange:oe,popoutChatEnabled:O.popoutChat,popoutChatHotkey:O.popoutChatHotkey,uiForkingEnabled:O.uiForking}),e[42]=T,e[43]=O.claudeCodeMockCliTraffic,e[44]=O.popoutChat,e[45]=O.popoutChatHotkey,e[46]=O.uiForking,e[47]=$,e[48]=re,e[49]=ae,e[50]=oe,e[51]=Q,e[52]=se):se=e[52];let ce;return e[53]!==se||e[54]!==Y||e[55]!==Z?(ce=(0,K.jsx)(u,{contentClassName:`pt-4 md:pt-5`,children:(0,K.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-10`,children:[Y,X,Z,se]})}),e[53]=se,e[54]=Y,e[55]=Z,e[56]=ce):ce=e[56],ce}function He(){return x()!==null}export{Ve as SettingsView};
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{$i as t,Ii as n,Li as r,Pa as i,Ti as a,ma as o,no as s,oa as c,sa as l,t as u,wa as d,wi as f}from"./page-shell-Bk7f1lhT.js";import{B as p,a as m,c as h,r as g,s as _,t as v}from"./dropdown-menu-Jq5katdD.js";import{C as y,H as b,I as x,V as S,W as C,_ as w,a as T,c as E,f as D,i as O,l as k,m as A,o as j,s as M,t as N,x as P,y as F,z as I}from"./useWorkspaceOpenTargets-BpryDUp6.js";import{t as ee}from"./useHostDaemon-BTmXG9sm.js";import{b as te}from"./route-paths-DLMPskef.js";import{a as L,i as R,n as z,o as ne,r as B}from"./index-CNgSfqzP.js";import{i as V,r as H}from"./settings-section-zwQ4epnc.js";import{t as U}from"./WorkspaceOpenTargetIcon-Cf0w5RdT.js";var W=e(s(),1),G=o(),K=i(),q=[{key:`codex`,name:`Codex`,signInHint:"Run `codex` to sign in and see your usage.",expiredHint:"Your Codex session expired. Run `codex`, then reload usage."},{key:`claudeCode`,name:`Claude Code`,signInHint:"Run `claude` to sign in and see your usage.",expiredHint:"Your Claude session expired. Run `claude`, then reload usage."}];function J(e){return e>=95?`bg-destructive`:e>=80?`bg-warning`:`bg-primary`}function Y(e){if(!e)return null;let t=new Date(e);if(Number.isNaN(t.getTime()))return null;let n=t.getTime()-Date.now();if(n<=0)return`Resetting now`;let r=Math.round(n/6e4);if(r<60)return`Resets in ${r} min`;let i=Math.floor(r/60);if(i<24){let e=r%60;return e>0?`Resets in ${i} hr ${e} min`:`Resets in ${i} hr`}let a=n<10080*6e4;return`Resets ${t.toLocaleString(void 0,{weekday:a?`short`:void 0,month:a?void 0:`short`,day:a?void 0:`numeric`,hour:`numeric`,minute:`2-digit`})}`}function X(e){let t=(0,G.c)(22),{window:n}=e,r;t[0]===n.resetsAt?r=t[1]:(r=Y(n.resetsAt),t[0]=n.resetsAt,t[1]=r);let i=r,a;t[2]===n.label?a=t[3]:(a=(0,K.jsx)(`span`,{className:`text-xs text-foreground`,children:n.label}),t[2]=n.label,t[3]=a);let o;t[4]===n.usedPercent?o=t[5]:(o=(0,K.jsxs)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:[n.usedPercent,`% used`]}),t[4]=n.usedPercent,t[5]=o);let s;t[6]!==a||t[7]!==o?(s=(0,K.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8];let c;t[9]===n.usedPercent?c=t[10]:(c=l(`h-full rounded-full`,J(n.usedPercent)),t[9]=n.usedPercent,t[10]=c);let u=`${Math.max(n.usedPercent,2)}%`,d;t[11]===u?d=t[12]:(d={width:u},t[11]=u,t[12]=d);let f;t[13]!==c||t[14]!==d?(f=(0,K.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-muted`,children:(0,K.jsx)(`div`,{className:c,style:d})}),t[13]=c,t[14]=d,t[15]=f):f=t[15];let p;t[16]===i?p=t[17]:(p=i?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i}):null,t[16]=i,t[17]=p);let m;return t[18]!==s||t[19]!==f||t[20]!==p?(m=(0,K.jsxs)(`div`,{className:`space-y-1`,children:[s,f,p]}),t[18]=s,t[19]=f,t[20]=p,t[21]=m):m=t[21],m}function Z(e){let t=(0,G.c)(15),{config:n,usage:r,isLoading:i,isError:a}=e,o=r?.status===`ok`?r.planLabel:null,s;t[0]===n.name?s=t[1]:(s=(0,K.jsx)(`h3`,{className:`text-sm font-normal text-foreground`,children:n.name}),t[0]=n.name,t[1]=s);let c;t[2]===o?c=t[3]:(c=o?(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:o}):null,t[2]=o,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]!==n||t[8]!==a||t[9]!==i||t[10]!==r?(u=(0,K.jsx)(Q,{config:n,usage:r,isLoading:i,isError:a}),t[7]=n,t[8]=a,t[9]=i,t[10]=r,t[11]=u):u=t[11];let d;return t[12]!==l||t[13]!==u?(d=(0,K.jsxs)(`div`,{className:`space-y-3.5`,children:[l,u]}),t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function Q(e){let t=(0,G.c)(14),{config:n,usage:r,isLoading:i,isError:a}=e;if(a){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Couldn't load usage right now. Make sure bb's host is connected, then reload usage.`}),t[0]=e):e=t[0],e}if(!r){let e=i?`Loading usage…`:`Usage unavailable.`,n;return t[1]===e?n=t[2]:(n=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e}),t[1]=e,t[2]=n),n}switch(r.status){case`ok`:{if(r.windows.length===0){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No usage limits reported for this plan.`}),t[3]=e):e=t[3],e}let e;t[4]===r.windows?e=t[5]:(e=r.windows.map($),t[4]=r.windows,t[5]=e);let n;return t[6]===e?n=t[7]:(n=(0,K.jsx)(`div`,{className:`space-y-3.5`,children:e}),t[6]=e,t[7]=n),n}case`unauthenticated`:{let e;return t[8]===n.signInHint?e=t[9]:(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.signInHint}),t[8]=n.signInHint,t[9]=e),e}case`expired`:{let e;return t[10]===n.expiredHint?e=t[11]:(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.expiredHint}),t[10]=n.expiredHint,t[11]=e),e}case`error`:{let e;return t[12]===r.message?e=t[13]:(e=(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r.message}),t[12]=r.message,t[13]=e),e}default:return null}}function $(e){return(0,K.jsx)(X,{window:e},e.label)}function re(e){let n=(0,G.c)(21),{usage:r,isLoading:i,isError:a,isFetching:o,onRefresh:s}=e,u=o?`Reloading usage data`:`Reload usage data`,d=o&&`animate-spin`,f;n[0]===d?f=n[1]:(f=l(`size-3.5`,d),n[0]=d,n[1]=f);let p;n[2]===f?p=n[3]:(p=(0,K.jsx)(c,{name:`RotateCcw`,className:f}),n[2]=f,n[3]=p);let m;n[4]!==o||n[5]!==s||n[6]!==u||n[7]!==p?(m=(0,K.jsx)(C,{asChild:!0,children:(0,K.jsx)(t,{variant:`ghost`,size:`icon`,className:`size-7 text-muted-foreground hover:text-foreground`,disabled:o,onClick:s,title:void 0,"aria-label":u,children:p})}),n[4]=o,n[5]=s,n[6]=u,n[7]=p,n[8]=m):m=n[8];let h;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,K.jsx)(b,{side:`bottom`,children:`Reload usage data`}),n[9]=h):h=n[9];let g;n[10]===m?g=n[11]:(g=(0,K.jsxs)(S,{delayDuration:300,disableHoverableContent:!0,children:[m,h]}),n[10]=m,n[11]=g);let _;n[12]!==a||n[13]!==i||n[14]!==r?(_=q.map(e=>(0,K.jsx)(`div`,{className:`py-3.5 first:pt-0 last:pb-0`,children:(0,K.jsx)(Z,{config:e,usage:r[e.key],isLoading:i,isError:a})},e.key)),n[12]=a,n[13]=i,n[14]=r,n[15]=_):_=n[15];let v;n[16]===_?v=n[17]:(v=(0,K.jsx)(`div`,{className:`divide-y divide-border`,children:_}),n[16]=_,n[17]=v);let y;return n[18]!==g||n[19]!==v?(y=(0,K.jsx)(H,{title:`Usage limits`,description:`Your Codex and Claude Code subscription usage.`,action:g,children:v}),n[18]=g,n[19]=v,n[20]=y):y=n[20],y}function ie(){let e=(0,G.c)(10),t=y(),n;e[0]===t.data?n=e[1]:(n=t.data??{},e[0]=t.data,e[1]=n);let r;e[2]===t?r=e[3]:(r=()=>{t.refetch()},e[2]=t,e[3]=r);let i;return e[4]!==n||e[5]!==r||e[6]!==t.isError||e[7]!==t.isFetching||e[8]!==t.isLoading?(i=(0,K.jsx)(re,{usage:n,isLoading:t.isLoading,isError:t.isError,isFetching:t.isFetching,onRefresh:r}),e[4]=n,e[5]=r,e[6]=t.isError,e[7]=t.isFetching,e[8]=t.isLoading,e[9]=i):i=e[9],i}var ae={antigravity:`Antigravity`,cursor:`Cursor`,"default-app":`Default App`,finder:`Finder`,ghostty:`Ghostty`,iterm2:`iTerm2`,"sublime-text":`Sublime Text`,terminal:`Terminal`,vscode:`VS Code`,windsurf:`Windsurf`,xcode:`Xcode`,zed:`Zed`};function oe(e){return ae[e]}function se(e){return n.find(t=>t.id===e.themeId)?.name??e.themeId}var ce=[{label:`System`,value:`system`},{label:`Light`,value:`light`},{label:`Dark`,value:`dark`}],le={dark:`Dark`,light:`Light`,system:`System`},ue=[{label:`Default`,value:`default`},{label:`Red`,value:`red`},{label:`Orange`,value:`orange`},{label:`Yellow`,value:`yellow`},{label:`Green`,value:`green`},{label:`Teal`,value:`teal`},{label:`Blue`,value:`blue`},{label:`Purple`,value:`purple`},{label:`Pink`,value:`pink`}],de={blue:`Blue`,default:`Default`,green:`Green`,orange:`Orange`,pink:`Pink`,purple:`Purple`,red:`Red`,teal:`Teal`,yellow:`Yellow`},fe=`h-7 w-full justify-between border-border/60 bg-card px-2 text-xs sm:w-36`,pe=`min-w-[var(--radix-dropdown-menu-trigger-width)]`,me="Create a custom bb palette. First run `bb theme dir` to find the custom theme directory. Ask me for the palette name and visual direction, then create `<theme-dir>/<name>/theme.css` with light and dark theme variables compatible with bb's theme tokens.",he=`Palettes change bb's colors across light and dark mode. Choose a built-in palette or create one from a prompt.`;function ge(e){let t=(0,G.c)(10),{value:n}=e,r=n===`default`&&`bg-foreground`,i;t[0]===r?i=t[1]:(i=l(`size-4 shrink-0`,r),t[0]=r,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=R(),t[2]=a):a=t[2];let o;t[3]===n?o=t[4]:(o=n===`default`?void 0:{backgroundColor:B[n]},t[3]=n,t[4]=o);let s;t[5]===o?s=t[6]:(s={mask:`url("${a}") center / contain no-repeat`,...o},t[5]=o,t[6]=s);let c;return t[7]!==i||t[8]!==s?(c=(0,K.jsx)(`span`,{"aria-hidden":!0,className:i,style:s}),t[7]=i,t[8]=s,t[9]=c):c=t[9],c}function _e(e){let n=(0,G.c)(19),{disabled:r,faviconColor:i,onFaviconColorChange:a}=e,o;n[0]===i?o=n[1]:(o=(0,K.jsx)(ge,{value:i}),n[0]=i,n[1]=o);let s=de[i],u;n[2]===s?u=n[3]:(u=(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:s}),n[2]=s,n[3]=u);let d;n[4]!==o||n[5]!==u?(d=(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[o,u]}),n[4]=o,n[5]=u,n[6]=d):d=n[6];let f;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),n[7]=f):f=n[7];let _;n[8]!==r||n[9]!==d?(_=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":`Favicon color`,disabled:r,children:[d,f]})}),n[8]=r,n[9]=d,n[10]=_):_=n[10];let y;n[11]!==i||n[12]!==a?(y=ue.map(e=>(0,K.jsxs)(m,{onSelect:()=>a(e.value),children:[(0,K.jsx)(ge,{value:e.value}),e.label,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,i!==e.value&&`opacity-0`,p)})]},e.value)),n[11]=i,n[12]=a,n[13]=y):y=n[13];let b;n[14]===y?b=n[15]:(b=(0,K.jsx)(g,{align:`end`,className:pe,children:y}),n[14]=y,n[15]=b);let x;return n[16]!==_||n[17]!==b?(x=(0,K.jsx)(V,{label:`Favicon color`,description:`Tint browser tabs to tell instances apart.`,children:(0,K.jsxs)(v,{children:[_,b]})}),n[16]=_,n[17]=b,n[18]=x):x=n[18],x}var ve={capability:`openDirectory`,emptyDescription:`No local app can open directories.`,label:`Directory default`},ye={capability:`openFile`,emptyDescription:`No local app can open files.`,label:`File default`};function be(e){let n=(0,G.c)(36),{definition:r,onTargetChange:i,preferredTargetId:a,targets:o}=e,s;if(n[0]!==r.capability||n[1]!==o){let e;n[3]===r.capability?e=n[4]:(e=e=>T({capability:r.capability,target:e}),n[3]=r.capability,n[4]=e),s=o.filter(e),n[0]=r.capability,n[1]=o,n[2]=s}else s=n[2];let u=s,d;n[5]!==r.capability||n[6]!==a||n[7]!==o?(d=O({capability:r.capability,preferredTargetId:a,targets:o}),n[5]=r.capability,n[6]=a,n[7]=o,n[8]=d):d=n[8];let f=d,_=u.length===0?r.emptyDescription:null,y=f?.id??a,b;n[9]!==a||n[10]!==f?.label?(b=f?.label??(a?oe(a):`Unavailable`),n[9]=a,n[10]=f?.label,n[11]=b):b=n[11];let x=b,S;n[12]===y?S=n[13]:(S=y?(0,K.jsx)(U,{targetId:y,className:`size-5`}):null,n[12]=y,n[13]=S);let C;n[14]===x?C=n[15]:(C=(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:x}),n[14]=x,n[15]=C);let w;n[16]!==S||n[17]!==C?(w=(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[S,C]}),n[16]=S,n[17]=C,n[18]=w):w=n[18];let E;n[19]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),n[19]=E):E=n[19];let D;n[20]!==r.label||n[21]!==w?(D=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":r.label,children:[w,E]})}),n[20]=r.label,n[21]=w,n[22]=D):D=n[22];let k;n[23]!==u||n[24]!==i||n[25]!==f?.id||n[26]!==_?(k=_?(0,K.jsx)(`div`,{role:`note`,className:`px-2 py-[0.3125rem] text-xs leading-snug text-foreground`,children:_}):u.map(e=>(0,K.jsxs)(m,{onSelect:()=>i(e.id),children:[(0,K.jsx)(U,{targetId:e.id,className:`size-5`}),(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label}),(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,f?.id!==e.id&&`opacity-0`,p)})]},e.id)),n[23]=u,n[24]=i,n[25]=f?.id,n[26]=_,n[27]=k):k=n[27];let A;n[28]===k?A=n[29]:(A=(0,K.jsx)(g,{align:`end`,className:pe,children:k}),n[28]=k,n[29]=A);let j;n[30]!==A||n[31]!==D?(j=(0,K.jsxs)(v,{children:[D,A]}),n[30]=A,n[31]=D,n[32]=j):j=n[32];let M;return n[33]!==r.label||n[34]!==j?(M=(0,K.jsx)(V,{label:r.label,children:j}),n[33]=r.label,n[34]=j,n[35]=M):M=n[35],M}function xe(e){let t=(0,G.c)(11),{directoryTargetId:n,fileTargetId:r,hasDaemon:i,onDirectoryTargetChange:a,onFileTargetChange:o,targets:s}=e;if(!i)return null;let c;t[0]!==n||t[1]!==a||t[2]!==s?(c=(0,K.jsx)(be,{definition:ve,onTargetChange:a,preferredTargetId:n,targets:s}),t[0]=n,t[1]=a,t[2]=s,t[3]=c):c=t[3];let l;t[4]!==r||t[5]!==o||t[6]!==s?(l=(0,K.jsx)(be,{definition:ye,onTargetChange:o,preferredTargetId:r,targets:s}),t[4]=r,t[5]=o,t[6]=s,t[7]=l):l=t[7];let u;return t[8]!==c||t[9]!==l?(u=(0,K.jsx)(H,{title:`File Preferences`,children:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[c,l]})}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}var Se=`Open links in the in-app browser`,Ce=`Rewrite localhost links`,we=`Navigate to threads on creation`,Te=`Markdown formatting in prompt box`;function Ee(e){let t=(0,G.c)(3),{navigateToThreadAfterCreate:n,onNavigateToThreadAfterCreateChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:we,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":we})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function De(e){let t=(0,G.c)(3),{enabled:n,onEnabledChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:Se,description:`Open web links inside bb.`,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":Se})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Oe(e){let t=(0,G.c)(3),{enabled:n,onEnabledChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:Ce,description:`Point localhost links at this host.`,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":Ce})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function ke(e){let t=(0,G.c)(3),{enabled:n,onEnabledChange:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,K.jsx)(V,{label:Te,children:(0,K.jsx)(k,{checked:n,onCheckedChange:r,"aria-label":Te})}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Ae(e){let r=(0,G.c)(65),{appearance:i,appearanceDisabled:a,customThemes:o,desktopBrowserAvailable:s,faviconColor:u,navigateToThreadAfterCreate:d,onAppearanceThemeChange:f,onFaviconColorChange:y,onNavigateToThreadAfterCreateChange:b,onOpenLinksInAppBrowserChange:x,onRewriteLocalhostLinksChange:S,onRichTextEditingChange:C,onCreatePalette:w,onThemePreferenceChange:T,openLinksInAppBrowser:E,rewriteLocalhostLinks:D,richTextEditing:O,themePreference:k}=e,A=le[k],j;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),r[0]=j):j=r[0];let M;r[1]===A?M=r[2]:(M=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":`Theme`,children:[A,j]})}),r[1]=A,r[2]=M);let N;r[3]!==T||r[4]!==k?(N=ce.map(e=>(0,K.jsxs)(m,{onSelect:()=>T(e.value),children:[e.label,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,k!==e.value&&`opacity-0`,p)})]},e.value)),r[3]=T,r[4]=k,r[5]=N):N=r[5];let P;r[6]===N?P=r[7]:(P=(0,K.jsx)(g,{align:`end`,className:pe,children:N}),r[6]=N,r[7]=P);let F;r[8]!==M||r[9]!==P?(F=(0,K.jsx)(V,{label:`Theme`,children:(0,K.jsxs)(v,{children:[M,P]})}),r[8]=M,r[9]=P,r[10]=F):F=r[10];let I;r[11]===i?I=r[12]:(I=se(i),r[11]=i,r[12]=I);let ee;r[13]===I?ee=r[14]:(ee=(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:I}),r[13]=I,r[14]=ee);let te;r[15]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,K.jsx)(c,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`}),r[15]=te):te=r[15];let L;r[16]!==a||r[17]!==ee?(L=(0,K.jsx)(h,{asChild:!0,children:(0,K.jsxs)(t,{variant:`outline`,size:`sm`,className:fe,"aria-label":`Palette`,disabled:a,children:[ee,te]})}),r[16]=a,r[17]=ee,r[18]=L):L=r[18];let R;r[19]!==i||r[20]!==f?(R=n.map(e=>(0,K.jsxs)(m,{onSelect:()=>f(e.id),children:[e.name,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,i.themeId!==e.id&&`opacity-0`,p)})]},e.id)),r[19]=i,r[20]=f,r[21]=R):R=r[21];let z;if(r[22]!==i||r[23]!==o||r[24]!==f){let e;r[26]!==i||r[27]!==f?(e=e=>(0,K.jsxs)(m,{onSelect:()=>f(e),children:[e,(0,K.jsx)(c,{name:`Check`,className:l(`ml-auto`,i.themeId!==e&&`opacity-0`,p)})]},`custom:${e}`),r[26]=i,r[27]=f,r[28]=e):e=r[28],z=o.map(e),r[22]=i,r[23]=o,r[24]=f,r[25]=z}else z=r[25];let ne;r[29]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,K.jsx)(_,{}),r[29]=ne):ne=r[29];let B;r[30]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsx)(c,{name:`Plus`,className:p}),r[30]=B):B=r[30];let U;r[31]===w?U=r[32]:(U=(0,K.jsxs)(m,{onSelect:w,children:[B,`Create`]}),r[31]=w,r[32]=U);let W;r[33]!==R||r[34]!==z||r[35]!==U?(W=(0,K.jsxs)(g,{align:`end`,className:pe,children:[R,z,ne,U]}),r[33]=R,r[34]=z,r[35]=U,r[36]=W):W=r[36];let q;r[37]!==L||r[38]!==W?(q=(0,K.jsx)(V,{label:`Palette`,description:he,children:(0,K.jsxs)(v,{children:[L,W]})}),r[37]=L,r[38]=W,r[39]=q):q=r[39];let J;r[40]!==a||r[41]!==u||r[42]!==y?(J=(0,K.jsx)(_e,{disabled:a,faviconColor:u,onFaviconColorChange:y}),r[40]=a,r[41]=u,r[42]=y,r[43]=J):J=r[43];let Y;r[44]!==d||r[45]!==b?(Y=(0,K.jsx)(Ee,{navigateToThreadAfterCreate:d,onNavigateToThreadAfterCreateChange:b}),r[44]=d,r[45]=b,r[46]=Y):Y=r[46];let X;r[47]!==C||r[48]!==O?(X=(0,K.jsx)(ke,{enabled:O,onEnabledChange:C}),r[47]=C,r[48]=O,r[49]=X):X=r[49];let Z;r[50]!==s||r[51]!==x||r[52]!==E?(Z=s?(0,K.jsx)(De,{enabled:E,onEnabledChange:x}):null,r[50]=s,r[51]=x,r[52]=E,r[53]=Z):Z=r[53];let Q;r[54]!==S||r[55]!==D?(Q=(0,K.jsx)(Oe,{enabled:D,onEnabledChange:S}),r[54]=S,r[55]=D,r[56]=Q):Q=r[56];let $;return r[57]!==q||r[58]!==J||r[59]!==Y||r[60]!==X||r[61]!==Z||r[62]!==Q||r[63]!==F?($=(0,K.jsx)(H,{title:`General`,children:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[F,q,J,Y,X,Z,Q]})}),r[57]=q,r[58]=J,r[59]=Y,r[60]=X,r[61]=Z,r[62]=Q,r[63]=F,r[64]=$):$=r[64],$}var je=`Mock CLI Traffic`,Me=`Popout chat`,Ne=`Hotkey`,Pe=`UI forking`;function Fe(e){return e.split(`+`).map(e=>{switch(e){case`Alt`:case`Option`:return`⌥`;case`Command`:case`Cmd`:return`⌘`;case`CommandOrControl`:case`CmdOrCtrl`:return`⌘/Ctrl`;case`Control`:case`Ctrl`:return`⌃`;case`Shift`:return`⇧`;default:return e}}).join(` `)}function Ie(e){return e===`Alt`||e===`Control`||e===`Meta`||e===`OS`||e===`Shift`}function Le(e){if(e===` `||e===`Spacebar`)return`Space`;if(e.length===1)return e===`+`?`Plus`:e.toUpperCase();if(e.startsWith(`Arrow`))return e.slice(5);switch(e){case`Backspace`:case`Delete`:case`Down`:case`End`:case`Enter`:case`Home`:case`Insert`:case`Left`:case`PageDown`:case`PageUp`:case`Right`:case`Space`:case`Tab`:case`Up`:return e;default:return/^F(?:[1-9]|1[0-9]|2[0-4])$/.test(e)?e:null}}function Re(e){if(Ie(e.key))return null;let t=Le(e.key);if(t===null)return null;let n=[];if(e.metaKey&&n.push(`Command`),e.ctrlKey&&n.push(`Control`),e.altKey&&n.push(`Alt`),e.shiftKey&&n.push(`Shift`),n.length===0)return null;let r=[...n,t].join(`+`);return a(r)?r:null}function ze(e){let n=(0,G.c)(20),{disabled:r,hotkey:i,onHotkeyChange:a}=e,[o,s]=(0,W.useState)(!1),[c,u]=(0,W.useState)(null),d;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(){s(!0),u(null)},n[0]=d):d=n[0];let f=d,p;n[1]!==a||n[2]!==o?(p=function(e){if(!o)return;if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){s(!1),u(null);return}let t=Re(e);if(t===null){u(`Use at least one modifier with a key.`);return}a(t),s(!1),u(null)},n[1]=a,n[2]=o,n[3]=p):p=n[3];let m=p,h;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=function(){s(!1),u(null)},n[4]=h):h=n[4];let g=h,_=o?`border-ring text-foreground`:null,v;n[5]===_?v=n[6]:(v=l(`h-7 min-w-24 px-2 font-mono text-xs`,_),n[5]=_,n[6]=v);let y;n[7]!==i||n[8]!==o?(y=o?`Press keys`:Fe(i),n[7]=i,n[8]=o,n[9]=y):y=n[9];let b;n[10]!==r||n[11]!==m||n[12]!==v||n[13]!==y?(b=(0,K.jsx)(t,{type:`button`,variant:`outline`,size:`sm`,className:v,disabled:r,onClick:f,onBlur:g,onKeyDown:m,"aria-label":`Record popout chat hotkey`,children:y}),n[10]=r,n[11]=m,n[12]=v,n[13]=y,n[14]=b):b=n[14];let x;n[15]===c?x=n[16]:(x=c?(0,K.jsx)(`p`,{className:`text-xs text-destructive`,children:c}):null,n[15]=c,n[16]=x);let S;return n[17]!==b||n[18]!==x?(S=(0,K.jsxs)(`div`,{className:`flex flex-col items-start gap-1 sm:items-end`,children:[b,x]}),n[17]=b,n[18]=x,n[19]=S):S=n[19],S}function Be(e){let t=(0,G.c)(28),{claudeCodeMockCliTrafficEnabled:n,desktopShellAvailable:r,disabled:i,onClaudeCodeMockCliTrafficEnabledChange:a,onPopoutChatEnabledChange:o,onPopoutChatHotkeyChange:s,onUiForkingEnabledChange:c,popoutChatEnabled:l,popoutChatHotkey:u,uiForkingEnabled:d}=e,f;t[0]!==n||t[1]!==i||t[2]!==a?(f=(0,K.jsx)(V,{label:je,labelBadge:`dev-only`,description:`Route Claude Code through CLI-style traffic.`,children:(0,K.jsx)(k,{checked:n,disabled:i,onCheckedChange:a,"aria-label":je})}),t[0]=n,t[1]=i,t[2]=a,t[3]=f):f=t[3];let p;t[4]!==i||t[5]!==c||t[6]!==d?(p=(0,K.jsx)(V,{label:Pe,description:`Let the bb CLI (bb ui) fork, edit, and live-reload the app's own frontend. This feature is unstable, and your forks will probably break in the future. Off keeps the shipped UI.`,children:(0,K.jsx)(k,{checked:d,disabled:i,onCheckedChange:c,"aria-label":Pe})}),t[4]=i,t[5]=c,t[6]=d,t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r?null:(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Desktop only`}),t[8]=r,t[9]=m);let h=i||!r,g;t[10]!==o||t[11]!==l||t[12]!==h?(g=(0,K.jsx)(k,{checked:l,disabled:h,onCheckedChange:o,"aria-label":Me}),t[10]=o,t[11]=l,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==m||t[15]!==g?(_=(0,K.jsx)(V,{label:Me,description:`Open compact desktop chat with a hotkey.`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m,g]})}),t[14]=m,t[15]=g,t[16]=_):_=t[16];let v;t[17]!==r||t[18]!==i||t[19]!==s||t[20]!==l||t[21]!==u?(v=l?(0,K.jsx)(`div`,{className:`border-l border-border pl-3`,children:(0,K.jsx)(V,{label:Ne,description:`Record the popout chat shortcut.`,children:(0,K.jsx)(ze,{disabled:i||!r,hotkey:u,onHotkeyChange:s})})}):null,t[17]=r,t[18]=i,t[19]=s,t[20]=l,t[21]=u,t[22]=v):v=t[22];let y;return t[23]!==f||t[24]!==p||t[25]!==_||t[26]!==v?(y=(0,K.jsx)(H,{title:`Experiments`,description:`Early features that are off by default. Opt in to try them.`,children:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[f,p,_,v]})}),t[23]=f,t[24]=p,t[25]=_,t[26]=v,t[27]=y):y=t[27],y}function Ve(){let e=(0,G.c)(57),t=d(),n=F(),i=P(),{hasDaemon:a}=ee(),o;e[0]===a?o=e[1]:(o={enabled:a},e[0]=a,e[1]=o);let{workspaceOpenTargets:s}=N(o),[c,l]=M(),[p,m]=j(),[h,g]=D(),[_,v]=A(),[y,b]=z(),[x,S]=E(),[C]=(0,W.useState)(I),[T]=(0,W.useState)(He),O=i.data?.experiments??f,k=ne(),R=i.data?.appearance??r,B=L(),V=i.data===void 0||B.isPending,H;e[2]===i.data?.customThemes?H=e[3]:(H=i.data?.customThemes??[],e[2]=i.data?.customThemes,e[3]=H);let U;e[4]===B?U=e[5]:(U=e=>B.mutate({themeId:e}),e[4]=B,e[5]=U);let q;e[6]===t?q=e[7]:(q=()=>t(te(),{state:{focusPrompt:!0,initialPrompt:me}}),e[6]=t,e[7]=q);let J;e[8]!==R.themeId||e[9]!==B?(J=e=>B.mutate({themeId:R.themeId,faviconColor:e}),e[8]=R.themeId,e[9]=B,e[10]=J):J=e[10];let Y;e[11]!==R||e[12]!==C||e[13]!==y||e[14]!==h||e[15]!==_||e[16]!==x||e[17]!==b||e[18]!==g||e[19]!==v||e[20]!==S||e[21]!==V||e[22]!==H||e[23]!==U||e[24]!==q||e[25]!==J||e[26]!==n?(Y=(0,K.jsx)(Ae,{appearance:R,appearanceDisabled:V,customThemes:H,desktopBrowserAvailable:C,faviconColor:R.faviconColor,navigateToThreadAfterCreate:y,openLinksInAppBrowser:h,rewriteLocalhostLinks:_,richTextEditing:x,themePreference:n,onAppearanceThemeChange:U,onCreatePalette:q,onFaviconColorChange:J,onNavigateToThreadAfterCreateChange:b,onOpenLinksInAppBrowserChange:g,onRewriteLocalhostLinksChange:v,onRichTextEditingChange:S,onThemePreferenceChange:w}),e[11]=R,e[12]=C,e[13]=y,e[14]=h,e[15]=_,e[16]=x,e[17]=b,e[18]=g,e[19]=v,e[20]=S,e[21]=V,e[22]=H,e[23]=U,e[24]=q,e[25]=J,e[26]=n,e[27]=Y):Y=e[27];let X;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,K.jsx)(ie,{}),e[28]=X):X=e[28];let Z;e[29]!==c||e[30]!==p||e[31]!==a||e[32]!==l||e[33]!==m||e[34]!==s?(Z=(0,K.jsx)(xe,{directoryTargetId:c,fileTargetId:p,hasDaemon:a,onDirectoryTargetChange:l,onFileTargetChange:m,targets:s}),e[29]=c,e[30]=p,e[31]=a,e[32]=l,e[33]=m,e[34]=s,e[35]=Z):Z=e[35];let Q=i.data===void 0||k.isPending,$,re,ae,oe;e[36]!==O||e[37]!==k?($=e=>k.mutate({...O,claudeCodeMockCliTraffic:e}),re=e=>k.mutate({...O,popoutChat:e}),ae=e=>k.mutate({...O,popoutChatHotkey:e}),oe=e=>k.mutate({...O,uiForking:e}),e[36]=O,e[37]=k,e[38]=$,e[39]=re,e[40]=ae,e[41]=oe):($=e[38],re=e[39],ae=e[40],oe=e[41]);let se;e[42]!==T||e[43]!==O.claudeCodeMockCliTraffic||e[44]!==O.popoutChat||e[45]!==O.popoutChatHotkey||e[46]!==O.uiForking||e[47]!==$||e[48]!==re||e[49]!==ae||e[50]!==oe||e[51]!==Q?(se=(0,K.jsx)(Be,{claudeCodeMockCliTrafficEnabled:O.claudeCodeMockCliTraffic,desktopShellAvailable:T,disabled:Q,onClaudeCodeMockCliTrafficEnabledChange:$,onPopoutChatEnabledChange:re,onPopoutChatHotkeyChange:ae,onUiForkingEnabledChange:oe,popoutChatEnabled:O.popoutChat,popoutChatHotkey:O.popoutChatHotkey,uiForkingEnabled:O.uiForking}),e[42]=T,e[43]=O.claudeCodeMockCliTraffic,e[44]=O.popoutChat,e[45]=O.popoutChatHotkey,e[46]=O.uiForking,e[47]=$,e[48]=re,e[49]=ae,e[50]=oe,e[51]=Q,e[52]=se):se=e[52];let ce;return e[53]!==se||e[54]!==Y||e[55]!==Z?(ce=(0,K.jsx)(u,{contentClassName:`pt-4 md:pt-5`,children:(0,K.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-10`,children:[Y,X,Z,se]})}),e[53]=se,e[54]=Y,e[55]=Z,e[56]=ce):ce=e[56],ce}function He(){return x()!==null}export{Ve as SettingsView};
|