bb-app 0.0.11 → 0.0.12
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/AppSettingsView-BnxUHmxx.js +1 -0
- package/app/dist/assets/InternalReplayListView-csLG2lko.js +1 -0
- package/app/dist/assets/{ProjectArchivedThreadsView-o1R22xfj.js → ProjectArchivedThreadsView-CH0nwbDU.js} +1 -1
- package/app/dist/assets/ProjectSettingsView-nWbGXc1H.js +1 -0
- package/app/dist/assets/ThreadDetailRoute-CO285nQR.js +2642 -0
- package/app/dist/assets/ThreadUnarchiveButton-CQaA-gHV.js +1 -0
- package/app/dist/assets/{angular-html-CN4B7z8Z.js → angular-html-BOmrr01g.js} +1 -1
- package/app/dist/assets/{angular-ts-Be9rCyh7.js → angular-ts-DCM7qcSK.js} +1 -1
- package/app/dist/assets/{apl-C-09mkOY.js → apl-DuVJ59sz.js} +1 -1
- package/app/dist/assets/{astro-DQR04HMP.js → astro-AQMIDGwi.js} +1 -1
- package/app/dist/assets/{blade-CHOb28s9.js → blade-CsPbsxBX.js} +1 -1
- package/app/dist/assets/{c-Czi5ZOPg.js → c-D9gG2MMW.js} +1 -1
- package/app/dist/assets/{chunk-JZWAC4HX-CmnT162V.js → chunk-JZWAC4HX-vAKkV_Y-.js} +1 -1
- package/app/dist/assets/{cobol-C0UrcShI.js → cobol-DD9s4tIq.js} +1 -1
- package/app/dist/assets/{coffee-DLCACHKU.js → coffee-6iFiN2xF.js} +1 -1
- package/app/dist/assets/{cpp-CKRDyJLk.js → cpp-DyiPD7p1.js} +1 -1
- package/app/dist/assets/{crystal-DzdlwfxO.js → crystal-XjoV3Lue.js} +1 -1
- package/app/dist/assets/{css-J88DqgyO.js → css-DJovgfNT.js} +1 -1
- package/app/dist/assets/dialog-BvotBFA0.js +22 -0
- package/app/dist/assets/{edge-BiusF5O8.js → edge-DYu9rQsg.js} +1 -1
- package/app/dist/assets/effective-hosts-CgZiG_wS.js +68 -0
- package/app/dist/assets/{elixir-DVV1N8WB.js → elixir-CGc4gb59.js} +1 -1
- package/app/dist/assets/{elm-ZwoouJdM.js → elm-DfNAAF5X.js} +1 -1
- package/app/dist/assets/{erb-6WVNn8lP.js → erb-CF74Kl7K.js} +1 -1
- package/app/dist/assets/{git-rebase-CI6iVcd4.js → git-rebase-2bSFR8VV.js} +1 -1
- package/app/dist/assets/{glimmer-js-MU0okVIL.js → glimmer-js-D1yNTSaa.js} +1 -1
- package/app/dist/assets/{glimmer-ts-BXJcqrHb.js → glimmer-ts-DVblM7L5.js} +1 -1
- package/app/dist/assets/{glsl-CthKK13_.js → glsl-gxzJizaK.js} +1 -1
- package/app/dist/assets/{graphql-Cfx6sMIN.js → graphql-BpTTKDqK.js} +1 -1
- package/app/dist/assets/{hack-Cfn0L20S.js → hack-DDSUlOik.js} +1 -1
- package/app/dist/assets/{haml-DpOUW3De.js → haml-BZNAh4-P.js} +1 -1
- package/app/dist/assets/{handlebars-Dq6TUqDg.js → handlebars-DlYJLEcO.js} +1 -1
- package/app/dist/assets/{html-CrFhd97J.js → html-MZ0Poiph.js} +1 -1
- package/app/dist/assets/{html-derivative-SXrZiT2S.js → html-derivative-ChK_TvO6.js} +1 -1
- package/app/dist/assets/{http-BxRXAeum.js → http-CEE8xOHO.js} +1 -1
- package/app/dist/assets/{hurl-BsAa903H.js → hurl-B5aHyN9a.js} +1 -1
- package/app/dist/assets/index-SSlA_QcC.css +2 -0
- package/app/dist/assets/index-u9J_LInz.js +1366 -0
- package/app/dist/assets/{java-BZRe3u16.js → java-C-CCkGSB.js} +1 -1
- package/app/dist/assets/{javascript-YzZUmjcN.js → javascript-CoPUJA8j.js} +1 -1
- package/app/dist/assets/{jinja-CkL9mgnB.js → jinja-Ce_R6KUf.js} +1 -1
- package/app/dist/assets/{jison-DY01LEsx.js → jison-DxdoAlKK.js} +1 -1
- package/app/dist/assets/{json-DeVTS63Q.js → json-PteH9L8Y.js} +1 -1
- package/app/dist/assets/{jsx-B73xjEBK.js → jsx-N08PKjBU.js} +1 -1
- package/app/dist/assets/{julia-D5UCqxaX.js → julia-D_eVESw1.js} +1 -1
- package/app/dist/assets/{just-BfeKX4XX.js → just-BVZ_2gix.js} +1 -1
- package/app/dist/assets/{latex-CllT7gYn.js → latex-CvglVjdX.js} +1 -1
- package/app/dist/assets/{liquid-Bgz2sjbj.js → liquid-C2RPsEhH.js} +1 -1
- package/app/dist/assets/localhost-badge-CHDdiNhq.js +1 -0
- package/app/dist/assets/{lua-CKg4_5Yw.js → lua-D9-kqDch.js} +1 -1
- package/app/dist/assets/{marko-CSplXaxm.js → marko-jVSfYuio.js} +1 -1
- package/app/dist/assets/{mdc-CR1bPJlt.js → mdc-DVHnOYT4.js} +1 -1
- package/app/dist/assets/mutation-cache-effects-plW3Wjx9.js +1 -0
- package/app/dist/assets/mutation-errors-INqXreOn.js +2 -0
- package/app/dist/assets/{nginx-Chba8emm.js → nginx-DfHWE4gw.js} +1 -1
- package/app/dist/assets/{nim-BJOCNxTB.js → nim-fW6F-8R_.js} +1 -1
- package/app/dist/assets/page-shell-omz5VWqw.js +39 -0
- package/app/dist/assets/{perl-DtYnB2VK.js → perl-C916SOdN.js} +1 -1
- package/app/dist/assets/{php-Cm6MwVxd.js → php-BDWQ0WnL.js} +1 -1
- package/app/dist/assets/{pill-Ds03GLze.js → pill-8eXFxAuz.js} +1 -1
- package/app/dist/assets/{pug-Cs95QZUY.js → pug-BTGBL6ey.js} +1 -1
- package/app/dist/assets/{qml-DV4H8TeV.js → qml-BB7gtLw5.js} +1 -1
- package/app/dist/assets/{r-BOwNWtkP.js → r-4Ktj_4BV.js} +1 -1
- package/app/dist/assets/{razor-rzD3KE0N.js → razor-C_Ejzpyk.js} +1 -1
- package/app/dist/assets/{regexp-D5UpjLq1.js → regexp-DdimReFO.js} +1 -1
- package/app/dist/assets/{rst-nRBldbnW.js → rst-Ba-8orMO.js} +1 -1
- package/app/dist/assets/{ruby-DK9_UnsF.js → ruby-DNE0wFLx.js} +1 -1
- package/app/dist/assets/{sas-BxxScrc4.js → sas-D6QyIc5Y.js} +1 -1
- package/app/dist/assets/{scss-dYaO_Ssw.js → scss-BpYltub1.js} +1 -1
- package/app/dist/assets/{settings-section-BgEyrMBV.js → settings-section-BkJbbK-p.js} +1 -1
- package/app/dist/assets/{shellscript-BGY92qaj.js → shellscript-B1QZDlVi.js} +1 -1
- package/app/dist/assets/{shellsession-DHio1RBs.js → shellsession-C2YSc67H.js} +1 -1
- package/app/dist/assets/{soy-CWnh82_C.js → soy-Ba6Otyql.js} +1 -1
- package/app/dist/assets/split-button-_uHFVDB-.js +1 -0
- package/app/dist/assets/{sql-BgOSYFXh.js → sql-Bnzimrzw.js} +1 -1
- package/app/dist/assets/{stata-Di5c1EGu.js → stata-BmWbZaNS.js} +1 -1
- package/app/dist/assets/{surrealql-CKgBuPai.js → surrealql-BDEpTym4.js} +1 -1
- package/app/dist/assets/{svelte-DGNSQgHP.js → svelte-D3__atge.js} +1 -1
- package/app/dist/assets/{templ--mBJoDNy.js → templ-B2QvG8e0.js} +1 -1
- package/app/dist/assets/{tex-Drg-gBC1.js → tex-oleGAEAp.js} +1 -1
- package/app/dist/assets/thread-queries-DpnZLohh.js +1 -0
- package/app/dist/assets/{ts-tags-_EoiaFc_.js → ts-tags-C4rrn99M.js} +1 -1
- package/app/dist/assets/{tsx-C3E3ZPo7.js → tsx-5jd1D3TG.js} +1 -1
- package/app/dist/assets/{twig-BkmJOmf1.js → twig-BxJeHYNu.js} +1 -1
- package/app/dist/assets/{typescript-zC8doK3K.js → typescript-81bZW67U.js} +1 -1
- package/app/dist/assets/{vue-Dqnq1uw7.js → vue-DSNd-6Ch.js} +1 -1
- package/app/dist/assets/{vue-html-CZNe_SnY.js → vue-html-CQT5rCwO.js} +1 -1
- package/app/dist/assets/{vue-vine-ChEJZJ0Y.js → vue-vine-BafaCKEQ.js} +1 -1
- package/app/dist/assets/workspace-open-target-preference-yN4DFIsy.js +1 -0
- package/app/dist/assets/{xml-DHqUJISw.js → xml-AdWB6zlJ.js} +1 -1
- package/app/dist/assets/{xsl-B_xW8s_z.js → xsl-Dy6hQs2F.js} +1 -1
- package/app/dist/assets/{yaml-CHAY15k-.js → yaml-BdzELsfc.js} +1 -1
- package/app/dist/index.html +10 -10
- package/dist/bb-app.js +1 -1
- package/dist/bb-host-daemon.js +1 -1
- package/host-daemon/dist/bb +325 -563
- package/host-daemon/dist/bb-claude-code-bridge.mjs +26 -26
- package/host-daemon/dist/daemon-bundle.mjs +337 -342
- package/package.json +1 -1
- package/server/dist/default-template/apps/status/manifest.json +9 -0
- package/server/dist/drizzle/0008_thread_pinning.sql +3 -0
- package/server/dist/drizzle/meta/0008_snapshot.json +3285 -0
- package/server/dist/drizzle/meta/_journal.json +7 -0
- package/server/dist/index.js +3510 -2512
- package/app/dist/assets/AppSettingsView-Dh4Od2M3.js +0 -1
- package/app/dist/assets/InternalReplayListView-BjzY8fhh.js +0 -1
- package/app/dist/assets/ProjectSettingsView-BoH5a1hi.js +0 -1
- package/app/dist/assets/ThreadDetailRoute-Caqz8odF.js +0 -2867
- package/app/dist/assets/ThreadUnarchiveButton-2shfHri9.js +0 -1
- package/app/dist/assets/dialog-JFJupr8S.js +0 -22
- package/app/dist/assets/effective-hosts-BS3g3uzj.js +0 -68
- package/app/dist/assets/index-DYJoFBAk.css +0 -2
- package/app/dist/assets/index-DbhAkEqX.js +0 -1366
- package/app/dist/assets/localhost-badge-BESHcXM2.js +0 -1
- package/app/dist/assets/mutation-cache-effects-BX02KjBd.js +0 -1
- package/app/dist/assets/mutation-errors-DgGC9CkY.js +0 -2
- package/app/dist/assets/page-shell-CaMV_G2I.js +0 -39
- package/app/dist/assets/split-button-PlurXMEc.js +0 -1
- package/app/dist/assets/thread-queries-DI7HoSpk.js +0 -1
- package/app/dist/assets/workspace-open-target-preference-Dve5Zih1.js +0 -1
- package/server/dist/default-template/STATUS.html +0 -380
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bi as e,Cr as t,Gt as n,Ji as r,Ma as i,Qt as a,Ra as o,Vt as s,Yi as c,ca as l,la as u,qi as d,qt as f,sr as ee,t as p}from"./page-shell-omz5VWqw.js";import{Mt as m,c as h,f as g,h as _,n as v,u as y}from"./effective-hosts-CgZiG_wS.js";import{a as b,c as te,i as x,m as S,o as C,r as w,s as T,t as E}from"./dialog-BvotBFA0.js";import{d as ne,f as D,i as re,l as ie}from"./mutation-errors-INqXreOn.js";import{dn as ae,un as O}from"./index-u9J_LInz.js";import{i as k,n as oe,r as A,t as j}from"./settings-section-BkJbbK-p.js";import{a as M,c as N,i as P,o as F,r as I,s as L}from"./workspace-open-target-preference-yN4DFIsy.js";var R=o(i(),1),z=`size-2 shrink-0 rounded-full ring-1 ring-inset transition-all bg-success ring-success/25 shadow-[0_0_0_4px_color-mix(in_oklch,var(--color-success)_16%,transparent)]`,B=u();function V({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,B.jsx)(E,{open:e!==null,onOpenChange:n,children:(0,B.jsx)(w,{children:e?(0,B.jsx)(H,{target:e,pending:t,onDelete:r}):null})})}function H({target:t,pending:n,onDelete:r}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(C,{children:[(0,B.jsx)(T,{children:`Remove host?`}),(0,B.jsx)(x,{children:`Remove "${t.name}" and all of its project sources? This cannot be undone.`})]}),(0,B.jsx)(b,{children:(0,B.jsx)(e,{type:`button`,variant:`destructive`,disabled:n,onClick:()=>r(t.id),children:`Remove host`})})]})}function se({target:e,pending:t,onOpenChange:n,onRename:r}){return(0,B.jsx)(E,{open:e!==null,onOpenChange:n,children:(0,B.jsx)(w,{children:e?(0,B.jsx)(U,{target:e,pending:t,onRename:r},e.id):null})})}function U({target:t,pending:n,onRename:r}){let i=(0,R.useId)(),[a,o]=(0,R.useState)(t.currentName),[s,c]=(0,R.useState)(null);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(C,{children:[(0,B.jsx)(T,{children:`Rename host`}),(0,B.jsx)(x,{children:`Choose a new name for this host.`})]}),(0,B.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{if(e.preventDefault(),n)return;let i=a.trim();if(!i){c(`Host name cannot be empty.`);return}r(t.id,i)},children:[(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(S,{id:i,"aria-label":`Host name`,value:a,autoFocus:!0,disabled:n,onChange:e=>{o(e.target.value),s&&c(null)}}),s?(0,B.jsx)(`p`,{className:`text-sm text-destructive`,children:s}):null]}),(0,B.jsx)(b,{children:(0,B.jsx)(e,{type:`submit`,disabled:n,children:`Rename host`})})]})]})}function ce({open:e,onOpenChange:t}){return(0,B.jsx)(E,{open:e,onOpenChange:t,children:(0,B.jsx)(w,{className:`sm:max-w-2xl`,children:(0,B.jsx)(W,{})})})}function W(){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(C,{children:[(0,B.jsx)(T,{children:`Unable to add new host`}),(0,B.jsx)(x,{children:`You need to specify the URL that allows the new host to talk to the server.`})]}),(0,B.jsxs)(`div`,{className:`min-w-0 space-y-2 text-sm text-foreground`,children:[(0,B.jsx)(`p`,{children:`Run this on the server machine, then restart bb:`}),(0,B.jsx)(`pre`,{className:`min-w-0 overflow-x-auto rounded-md border border-border bg-surface-recessed px-3 py-2 font-mono text-xs leading-5`,children:(0,B.jsx)(`code`,{children:`npx bb-app config BB_APP_URL http://<your-machine>.<tailnet>.ts.net:38886`})})]})]})}function G(e){return new Date(e).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}function le({host:e,open:t,target:n,onOpenChange:r}){let i=t&&n!==null;return(0,B.jsx)(E,{open:i,onOpenChange:r,children:(0,B.jsx)(w,{className:`sm:max-w-2xl`,children:i&&n?(0,B.jsx)(K,{host:e,target:n}):null})})}function K({host:e,target:t}){let[n,r]=(0,R.useState)(()=>t.expiresAt<=Date.now()),i=e?.status===`connected`,a=!i&&!n,o=i?`Host connected`:n?`Join command expired`:`Waiting for host`;return(0,R.useEffect)(()=>{let e=t.expiresAt-Date.now();if(e<=0){r(!0);return}r(!1);let n=window.setTimeout(()=>r(!0),e);return()=>window.clearTimeout(n)},[t.expiresAt]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(C,{children:[(0,B.jsx)(T,{children:`New host`}),(0,B.jsx)(x,{children:`Run this command from the new host.`})]}),(0,B.jsxs)(`div`,{className:`min-w-0 space-y-3`,children:[(0,B.jsxs)(`div`,{className:`relative min-w-0 rounded-md border border-border bg-surface-recessed`,children:[(0,B.jsx)(`pre`,{className:`max-h-56 min-w-0 overflow-y-auto whitespace-pre-wrap break-all px-3 py-2.5 pr-10 text-xs leading-5`,children:(0,B.jsx)(`code`,{children:t.joinCommand})}),(0,B.jsx)(D,{text:t.joinCommand,label:`Copy host command`,className:`absolute right-2 top-2`})]}),(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs text-muted-foreground`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[i?(0,B.jsx)(d,{name:`CircleCheck`,className:`size-4 text-success`,"aria-hidden":`true`}):n?(0,B.jsx)(d,{name:`AlertCircle`,className:`size-4 text-destructive`,"aria-hidden":`true`}):null,(0,B.jsx)(`span`,{className:a?`animate-shine font-medium`:`font-medium text-foreground`,children:o}),a?(0,B.jsxs)(`span`,{children:[`· Expires at `,G(t.expiresAt)]}):null]})]})]})}var q={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 J(e){return q[e]}var ue=[{label:`System`,value:`system`},{label:`Light`,value:`light`},{label:`Dark`,value:`dark`}],de={dark:`Dark`,light:`Light`,system:`System`},Y={capability:`openDirectory`,emptyDescription:`No local app can open directories.`,label:`Directory default`},X={capability:`openFile`,emptyDescription:`No local app can open files.`,label:`File default`},Z=`This default can be changed when the local host daemon is available.`;function Q({definition:t,hasDaemon:n,onTargetChange:i,preferredTargetId:a,targets:o}){let s=(0,R.useMemo)(()=>o.filter(e=>P({capability:t.capability,target:e})),[t.capability,o]),c=(0,R.useMemo)(()=>I({capability:t.capability,preferredTargetId:a,targets:o}),[t.capability,a,o]),l=n?s.length===0?t.emptyDescription:null:Z,u=c?.id??a,f=c?.label??(a?J(a):`Unavailable`);return(0,B.jsx)(k,{label:t.label,children:(0,B.jsxs)(h,{children:[(0,B.jsx)(_,{asChild:!0,children:(0,B.jsxs)(e,{variant:`outline`,size:`sm`,className:`w-full justify-between border-border/60 bg-card sm:w-48`,"aria-label":t.label,children:[(0,B.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[u?(0,B.jsx)(N,{targetId:u,className:`size-5`}):null,(0,B.jsx)(`span`,{className:`min-w-0 truncate`,children:f})]}),(0,B.jsx)(d,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,B.jsx)(y,{align:`end`,className:`w-48`,children:l?(0,B.jsx)(`div`,{role:`note`,className:`px-2 py-[0.3125rem] text-xs leading-snug text-foreground`,children:l}):s.map(e=>(0,B.jsxs)(g,{onSelect:()=>i(e.id),children:[(0,B.jsx)(N,{targetId:e.id,className:`size-5`}),(0,B.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label}),(0,B.jsx)(d,{name:`Check`,className:r(`ml-auto`,c?.id!==e.id&&`opacity-0`,m)})]},e.id))})]})})}function fe({directoryTargetId:e,fileTargetId:t,hasDaemon:n,onDirectoryTargetChange:r,onFileTargetChange:i,targets:a}){return(0,B.jsx)(A,{title:`Open File Preferences`,children:(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsx)(Q,{definition:Y,hasDaemon:n,onTargetChange:r,preferredTargetId:e,targets:a}),(0,B.jsx)(Q,{definition:X,hasDaemon:n,onTargetChange:i,preferredTargetId:t,targets:a})]})})}function $(){let i=ne(),{hasDaemon:o}=te(),{workspaceOpenTargets:u}=L({enabled:o}),[b,x]=F(),[S,C]=M(),{data:w=[],isLoading:T}=v(),E=l(),[D,N]=(0,R.useState)(null),[P,I]=(0,R.useState)(null),[H,U]=(0,R.useState)(null),[W,G]=(0,R.useState)(!1),[K,q]=(0,R.useState)(!1),J=c({meta:{errorMessage:`Failed to rename host.`},mutationFn:({id:e,name:t})=>ee(e,{name:t}),onSuccess:()=>{O({queryClient:E}),N(null)}}),Y=c({meta:{errorMessage:`Failed to remove host.`},mutationFn:({id:e})=>a(e),onSuccess:()=>{ae({queryClient:E}),I(null)}}),X=c({meta:{errorMessage:`Failed to create host join command`,showErrorToast:!1},mutationFn:()=>f(),onSuccess:e=>{O({queryClient:E}),U(e),G(!0)},onError:e=>{if(e instanceof s&&e.code===`app_url_required`){q(!0);return}re({error:e,fallbackMessage:`Failed to create host join command`})}}),Z=c({meta:{errorMessage:`Failed to cancel host join.`},mutationFn:({id:e})=>n(e),onSuccess:(e,t)=>{O({queryClient:E}),U(e=>e?.hostId===t.id?null:e),G(!1)}}),Q=H===null?null:w.find(e=>e.id===H.hostId)??null,$=X.isPending||Z.isPending;async function pe(){if(H!==null&&H.expiresAt>Date.now()&&Q?.status!==`connected`){G(!0);return}if(H!==null&&Q?.status!==`connected`)try{await Z.mutateAsync({id:H.hostId})}catch{return}X.mutate()}(0,R.useEffect)(()=>{if(!W||Q?.status!==`connected`)return;let e=window.setTimeout(()=>{U(null),G(!1)},1500);return()=>window.clearTimeout(e)},[W,Q?.status]);function me(e){if(e){G(!0);return}H!==null&&Q?.status!==`connected`&&Z.mutate({id:H.hostId}),U(null),G(!1)}return(0,B.jsxs)(p,{contentClassName:`pt-4 md:pt-5`,children:[(0,B.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6`,children:[(0,B.jsx)(A,{title:`Appearance`,children:(0,B.jsx)(k,{label:`Theme`,children:(0,B.jsxs)(h,{children:[(0,B.jsx)(_,{asChild:!0,children:(0,B.jsxs)(e,{variant:`outline`,size:`sm`,className:`w-full justify-between border-border/60 bg-card sm:w-48`,"aria-label":`Theme`,children:[de[i],(0,B.jsx)(d,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,B.jsx)(y,{align:`end`,className:`w-48`,children:ue.map(e=>(0,B.jsxs)(g,{onSelect:()=>ie(e.value),children:[e.label,(0,B.jsx)(d,{name:`Check`,className:r(`ml-auto`,i!==e.value&&`opacity-0`,m)})]},e.value))})]})})}),(0,B.jsx)(fe,{directoryTargetId:b,fileTargetId:S,hasDaemon:o,onDirectoryTargetChange:x,onFileTargetChange:C,targets:u}),(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(A,{title:`Hosts`,children:T?(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):(0,B.jsx)(oe,{children:w.length===0?(0,B.jsx)(j,{children:(0,B.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No registered hosts.`})}):w.map(n=>{let r=n.status===`connected`;return(0,B.jsxs)(j,{children:[(0,B.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[n.name,(0,B.jsx)(`span`,{className:`ml-1.5 text-xs text-muted-foreground`,children:n.id})]}),r?(0,B.jsx)(`span`,{className:z,title:`Connected`}):n.lastSeenAt===null?(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:`Never connected`}):(0,B.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`Offline · `,t(n.lastSeenAt)]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(_,{asChild:!0,children:(0,B.jsx)(e,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,"aria-label":`Host actions`,children:(0,B.jsx)(d,{name:`MoreHorizontal`,className:`size-4`})})}),(0,B.jsxs)(y,{align:`end`,className:`w-40`,children:[(0,B.jsx)(g,{onSelect:()=>N({id:n.id,currentName:n.name}),children:`Rename`}),(0,B.jsx)(g,{className:`text-destructive focus:text-destructive`,onSelect:()=>I({id:n.id,name:n.name}),children:`Remove`})]})]})]},n.id)})})}),T?null:(0,B.jsx)(`div`,{className:`flex justify-start`,children:(0,B.jsxs)(e,{type:`button`,size:`sm`,variant:`ghost`,className:`h-auto justify-start gap-1.5 px-2 py-1 text-muted-foreground`,disabled:$,onClick:()=>{pe()},children:[(0,B.jsx)(d,{name:`Plus`,className:`size-3.5`}),`Add another host`]})})]})]}),(0,B.jsx)(se,{target:D,pending:J.isPending,onOpenChange:e=>{e||N(null)},onRename:(e,t)=>J.mutate({id:e,name:t})}),(0,B.jsx)(V,{target:P,pending:Y.isPending,onOpenChange:e=>{e||I(null)},onDelete:e=>Y.mutate({id:e})}),(0,B.jsx)(le,{open:W,target:H,host:Q,onOpenChange:me}),(0,B.jsx)(ce,{open:K,onOpenChange:q})]})}export{$ as AppSettingsView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bi as e,Ji as t,Ma as n,Mn as r,Ra as i,Xi as a,Yi as o,ca as s,en as c,la as l,lt as u,qi as d,t as f,tr as p}from"./page-shell-omz5VWqw.js";import{n as m}from"./effective-hosts-CgZiG_wS.js";import{n as h}from"./chunk-JZWAC4HX-vAKkV_Y-.js";import{D as g,fn as _,on as v,sn as y}from"./index-u9J_LInz.js";import{n as b,r as x,t as S}from"./split-button-_uHFVDB-.js";import{t as C}from"./pill-8eXFxAuz.js";var w=i(n(),1),T=l(),E=1,D=[.5,1,2,5,10],O=`block min-w-0 truncate text-foreground underline underline-offset-2 transition-colors hover:text-foreground/80`;function k(e){return`${e}×`}function A(e){return new Date(e).toLocaleString()}function j(){let n=s(),[i,l]=(0,w.useState)(()=>new Set),j=e=>{l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},M=a({queryKey:u(),queryFn:()=>r()}),{data:N=[]}=m(),P=(0,w.useMemo)(()=>new Map(N.map(e=>[e.id,e.name])),[N]),F=o({mutationFn:e=>c(e),onSuccess:()=>{_({queryClient:n})}}),I=o({mutationFn:({captureId:e,speed:t})=>p(e,{speed:t}),onSuccess:e=>{window.open(y({projectId:e.projectId,threadId:e.replayThreadId}),`_blank`,`noopener`)}}),L=M.data?.captures??[];return(0,T.jsx)(f,{contentClassName:`pt-4 md:pt-5`,children:(0,T.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-4`,children:[(0,T.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-border bg-surface-recessed px-3 py-2 text-sm text-muted-foreground`,children:[(0,T.jsx)(d,{name:`Info`,className:`mt-0.5 size-4 shrink-0`}),(0,T.jsxs)(`p`,{className:`m-0`,children:[`Replay previously captured conversations in a fresh thread. To record new captures, create threads with`,` `,(0,T.jsx)(`code`,{className:`font-mono text-xs`,children:`BB_DEV_REPLAY_CAPTURE=true pnpm dev`}),`.`]})]}),M.isLoading?(0,T.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):M.isError?(0,T.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load replay captures.`}):L.length===0?(0,T.jsx)(`p`,{className:`rounded-md border border-dashed border-border px-3 py-4 text-sm text-muted-foreground`,children:`No replay captures found on any connected host.`}):(0,T.jsx)(`div`,{className:`space-y-1`,children:L.map(n=>{let r=n.userInputPreview||n.captureId,a=n.kind===`thread-start`,o=a?`new`:`follow-up`,s=g(n.providerId),c=s?.icon,l=i.has(n.captureId),u=F.isPending&&F.variables===n.captureId,f=I.isPending&&I.variables?.captureId===n.captureId,p=I.isError&&I.variables?.captureId===n.captureId,m=n.eventCounts.rawProviderEvents===0,_={label:`Start replay at ${k(E)}`,onSelect:()=>I.mutate({captureId:n.captureId,speed:E}),content:(0,T.jsxs)(T.Fragment,{children:[f?(0,T.jsx)(d,{name:`Spinner`,className:`size-3 animate-spin`}):null,`Replay`]})},w=D.map(e=>({label:`Start replay at ${k(e)}`,onSelect:()=>I.mutate({captureId:n.captureId,speed:e}),content:(0,T.jsx)(`span`,{children:k(e)})}));return(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`flex h-9 items-center gap-3 text-sm`,children:[(0,T.jsxs)(`button`,{type:`button`,onClick:()=>j(n.captureId),"aria-expanded":l,className:`flex min-w-0 flex-1 items-center gap-2 text-left`,children:[(0,T.jsx)(d,{name:`ChevronRight`,className:t(`size-3 shrink-0 text-muted-foreground transition-transform`,l&&`rotate-90`)}),(0,T.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`min-w-0 max-w-xs truncate`,children:r}),n.title?(0,T.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:n.title}):null,(0,T.jsx)(C,{variant:a?`secondary`:`outline`,className:`shrink-0`,children:o}),c?(0,T.jsx)(c,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-label":s?.ariaLabel}):(0,T.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:n.providerId})]})]}),(0,T.jsx)(S,{disabled:f||m,primaryAction:_,secondaryActions:w,triggerLabel:`Choose replay speed`,mobileTitle:`Replay speed`}),(0,T.jsx)(e,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Delete replay capture`,title:`Delete replay capture`,disabled:u,onClick:()=>F.mutate(n.captureId),className:`size-6`,children:u?(0,T.jsx)(d,{name:`Spinner`,className:`size-3 animate-spin`}):(0,T.jsx)(d,{name:`Trash2`,className:`size-3`})})]}),l?(0,T.jsxs)(`div`,{className:`space-y-2 pb-3 pt-2`,children:[(0,T.jsxs)(b,{children:[(0,T.jsx)(x,{label:`Capture`,valueClassName:`min-w-0 truncate font-mono`,children:n.captureId}),(0,T.jsx)(x,{label:`Host`,valueClassName:`min-w-0 truncate`,children:P.get(n.hostId)??n.hostId}),(0,T.jsx)(x,{label:`Provider`,valueClassName:`min-w-0 truncate`,children:n.providerId}),(0,T.jsx)(x,{label:`Project`,valueClassName:`min-w-0`,children:(0,T.jsx)(h,{to:v(n.projectId),className:O,children:n.projectName??n.projectId})}),(0,T.jsx)(x,{label:`Thread`,valueClassName:`min-w-0`,children:(0,T.jsx)(h,{to:y({projectId:n.projectId,threadId:n.threadId}),className:t(O,!n.title&&`font-mono`),children:n.title??n.threadId})}),(0,T.jsx)(x,{label:`Captured`,valueClassName:`min-w-0 truncate`,children:A(n.capturedAt)}),(0,T.jsx)(x,{label:`Raw events`,valueClassName:`min-w-0 truncate`,children:n.eventCounts.rawProviderEvents})]}),p?(0,T.jsx)(`p`,{className:`text-xs text-destructive`,children:`Failed to start replay.`}):null]}):null]},`${n.hostId}:${n.captureId}`)})})]})})}export{j as InternalReplayListView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Bi as e,Ma as t,Ra as n,la as r,t as i,zi as a}from"./page-shell-omz5VWqw.js";import{k as o,n as s,x as c}from"./thread-queries-DpnZLohh.js";import{d as l,n as u}from"./chunk-JZWAC4HX-vAKkV_Y-.js";import{sn as d}from"./index-u9J_LInz.js";import{t as f}from"./pill-8eXFxAuz.js";import{t as p}from"./ThreadUnarchiveButton-CQaA-gHV.js";var m=n(t(),1),h=r(),g=[{value:`all`,label:`All`},{value:`manager`,label:`Managers`},{value:`managed`,label:`Managed`},{value:`unmanaged`,label:`Unmanaged`}];function _(e){return e.type===`manager`?`manager`:e.parentThreadId===null?null:`managed`}function v(){let{projectId:t}=l(),[n,r]=(0,m.useState)(`all`),v=s({projectId:t,kind:n}),y=o(),b=(0,m.useMemo)(()=>(v.data?.pages??[]).flat().filter(e=>e.archivedAt!=null),[v.data]);if(!t)return(0,h.jsx)(i,{contentClassName:`min-h-full items-center justify-center`,children:(0,h.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Project not found`})});let x=v.isPending,S=!x&&b.length===0;return(0,h.jsx)(i,{contentClassName:`pt-0`,children:(0,h.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl`,children:[(0,h.jsxs)(`div`,{className:`sticky top-0 z-10 -mx-4 bg-background px-4 pt-4 md:-mx-5 md:px-5 md:pt-5`,children:[(0,h.jsx)(a,{placement:`below`,tone:`background`}),(0,h.jsx)(`div`,{className:`inline-flex items-center gap-1 rounded-lg border border-border p-0.5`,role:`tablist`,"aria-label":`Filter archived threads`,children:g.map(t=>{let i=n===t.value;return(0,h.jsx)(e,{type:`button`,variant:`ghost`,size:`sm`,role:`tab`,"aria-selected":i,"aria-pressed":i,className:`h-7 rounded-md px-2 text-xs font-medium text-muted-foreground sm:px-3`,onClick:()=>r(t.value),children:t.label},t.value)})})]}),(0,h.jsxs)(`div`,{className:`space-y-3 pt-3`,children:[x?(0,h.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading archived threads…`}):S?(0,h.jsx)(`p`,{className:`rounded-md border border-dashed border-border px-3 py-4 text-sm text-muted-foreground`,children:`No archived threads yet.`}):(0,h.jsx)(`div`,{className:`space-y-1`,children:b.map(e=>{let t=_(e);return(0,h.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,h.jsx)(u,{to:d({projectId:e.projectId,threadId:e.id}),className:`min-w-0 flex-1`,children:(0,h.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate`,children:c(e)}),t?(0,h.jsx)(f,{variant:`outline`,className:`shrink-0`,children:t}):null]})}),(0,h.jsx)(p,{isPending:y.isPending&&y.variables?.id===e.id,onUnarchive:()=>{y.mutate({id:e.id})},threadType:e.type,className:`hover:bg-accent-foreground/15`})]},e.id)})}),v.hasNextPage?(0,h.jsx)(e,{type:`button`,variant:`ghost`,onClick:()=>{v.fetchNextPage()},disabled:v.isFetchingNextPage,className:`h-9 w-full justify-center rounded-md px-3 text-sm font-normal text-muted-foreground`,children:v.isFetchingNextPage?`Loading…`:`Load more`}):null]})]})})}export{v as ProjectArchivedThreadsView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bi as e,Jr as t,Ma as n,Ra as r,Wn as i,Yi as a,Yr as o,ca as s,la as c,qi as l,t as u}from"./page-shell-omz5VWqw.js";import{c as d,f,h as p,n as m,u as h}from"./effective-hosts-CgZiG_wS.js";import{d as g}from"./chunk-JZWAC4HX-vAKkV_Y-.js";import{a as _,i as v,o as y,r as b,s as x,t as S}from"./dialog-BvotBFA0.js";import{a as C}from"./mutation-cache-effects-plW3Wjx9.js";import{b as w,f as T,o as E,r as D,t as O,x as k}from"./localhost-badge-CHDdiNhq.js";import{$t as A,cn as j,en as M,ln as N}from"./index-u9J_LInz.js";import{n as P,r as F,t as I}from"./settings-section-BkJbbK-p.js";import{t as L}from"./pill-8eXFxAuz.js";var R=r(n(),1),z=c();function B({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,z.jsx)(S,{open:e!==null,onOpenChange:n,children:(0,z.jsx)(b,{children:e?(0,z.jsx)(V,{target:e,pending:t,onDelete:r}):null})})}function V({target:t,pending:n,onDelete:r}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(y,{children:[(0,z.jsx)(x,{children:`Remove source?`}),(0,z.jsx)(v,{children:`Remove "${t.label}" from this project? This cannot be undone.`})]}),(0,z.jsx)(_,{children:(0,z.jsx)(e,{type:`button`,variant:`destructive`,disabled:n,onClick:()=>r(t.id),children:`Remove source`})})]})}function H({source:t,isLocalhostSource:n,isLocalPathInvalid:r,hostName:i,isEditPending:a,isOnlySource:o,onEditLocalPath:s,onRemove:c}){return(0,z.jsxs)(I,{children:[(0,z.jsx)(l,{name:D,className:`size-4 shrink-0 text-muted-foreground`}),(0,z.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,z.jsx)(`span`,{className:`min-w-0 flex-shrink truncate`,children:t.path}),(0,z.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:i}),n?(0,z.jsx)(`span`,{className:`self-center`,children:(0,z.jsx)(O,{})}):null,r?(0,z.jsx)(L,{variant:`destructive`,children:`Invalid local path`}):null]}),(0,z.jsxs)(d,{children:[(0,z.jsx)(p,{asChild:!0,children:(0,z.jsx)(e,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,"aria-label":`Source actions`,children:(0,z.jsx)(l,{name:`MoreHorizontal`,className:`size-4`})})}),(0,z.jsxs)(h,{align:`end`,className:`w-40`,children:[n?(0,z.jsx)(f,{disabled:a,onSelect:e=>{e.preventDefault(),s(t)},children:`Edit local path`}):null,(0,z.jsx)(f,{className:`text-destructive focus:text-destructive`,disabled:o,onSelect:()=>c(t),children:`Remove`})]})]})]})}function U(e,t){return t.get(e.hostId)??e.hostId}function W(){let{projectId:n}=g(),r=k(),c=w({enabled:r.isSuccess||r.isError}),l=c.data,d=r.isFetching||c.isLoading,{data:f=[]}=m(),p=s(),[h,_]=(0,R.useState)(null),v=a({meta:{errorMessage:`Failed to remove source.`},mutationFn:({sourceId:e})=>n?i(n,e):Promise.resolve(),onSuccess:()=>{C({projectId:n,queryClient:p}),_(null)}}),y=E(),b=T(),x=l?.find(e=>e.id===n),S=x?.sources,D=(0,R.useMemo)(()=>S??[],[S]),O=(0,R.useMemo)(()=>new Map(f.map(e=>[e.id,e.name])),[f]),I=x?.name??``,L=y.isPending||b.isPending,V=M({isPending:L,submit:(0,R.useCallback)(({path:e,hostId:t,target:r,closeDialog:i})=>{if(n){if(r.kind===`add-source`)y.mutate({projectId:n,path:e,hostId:t},{onSuccess:i});else if(r.kind===`update`){let r=D.find(e=>o(e)&&e.hostId===t);if(!r)return;b.mutate({projectId:n,sourceId:r.id,path:e},{onSuccess:i})}}},[y,n,D,b])}),W=(0,R.useCallback)(()=>{n&&V.openPicker({kind:`add-source`,projectId:n,projectName:I})},[V,n,I]),G=(0,R.useCallback)(e=>{n&&V.openPicker({kind:`update`,projectId:n,projectName:I,currentPath:e.path})},[V,n,I]),K=V.localDaemonHostId,q=N((0,R.useMemo)(()=>K?D.filter(e=>o(e)&&e.hostId===K).map(e=>e.path):[],[K,D])),J=K!=null&&!t(D,K)?(0,z.jsx)(`div`,{className:`mt-2 flex gap-2`,children:(0,z.jsx)(e,{size:`sm`,variant:`outline`,disabled:y.isPending,onClick:W,children:`Add local path`})}):null;return(0,z.jsxs)(u,{contentClassName:`pt-4 md:pt-5`,children:[(0,z.jsx)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6`,children:(0,z.jsx)(F,{title:`Project Sources`,children:d?(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`}):D.length===0?(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No sources configured.`}),J]}):(0,z.jsxs)(`div`,{children:[(0,z.jsx)(P,{children:D.map(e=>{let t=o(e)&&K!=null&&e.hostId===K;return(0,z.jsx)(H,{source:e,isLocalhostSource:t,isLocalPathInvalid:t&&j(q,e.path),hostName:o(e)?O.get(e.hostId)??e.hostId:``,isEditPending:L,isOnlySource:D.length<=1,onEditLocalPath:G,onRemove:e=>_({id:e.id,label:U(e,O)})},e.id)})}),J]})})}),(0,z.jsx)(A,{target:V.projectPathDialog.target,pending:L,platform:V.platform,onOpenChange:V.projectPathDialog.onOpenChange,onSubmit:V.submitProjectPath}),(0,z.jsx)(B,{target:h,pending:v.isPending,onOpenChange:e=>{e||_(null)},onDelete:e=>v.mutate({sourceId:e})})]})}export{W as ProjectSettingsView};
|