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.
Files changed (121) hide show
  1. package/app/dist/assets/AppSettingsView-BnxUHmxx.js +1 -0
  2. package/app/dist/assets/InternalReplayListView-csLG2lko.js +1 -0
  3. package/app/dist/assets/{ProjectArchivedThreadsView-o1R22xfj.js → ProjectArchivedThreadsView-CH0nwbDU.js} +1 -1
  4. package/app/dist/assets/ProjectSettingsView-nWbGXc1H.js +1 -0
  5. package/app/dist/assets/ThreadDetailRoute-CO285nQR.js +2642 -0
  6. package/app/dist/assets/ThreadUnarchiveButton-CQaA-gHV.js +1 -0
  7. package/app/dist/assets/{angular-html-CN4B7z8Z.js → angular-html-BOmrr01g.js} +1 -1
  8. package/app/dist/assets/{angular-ts-Be9rCyh7.js → angular-ts-DCM7qcSK.js} +1 -1
  9. package/app/dist/assets/{apl-C-09mkOY.js → apl-DuVJ59sz.js} +1 -1
  10. package/app/dist/assets/{astro-DQR04HMP.js → astro-AQMIDGwi.js} +1 -1
  11. package/app/dist/assets/{blade-CHOb28s9.js → blade-CsPbsxBX.js} +1 -1
  12. package/app/dist/assets/{c-Czi5ZOPg.js → c-D9gG2MMW.js} +1 -1
  13. package/app/dist/assets/{chunk-JZWAC4HX-CmnT162V.js → chunk-JZWAC4HX-vAKkV_Y-.js} +1 -1
  14. package/app/dist/assets/{cobol-C0UrcShI.js → cobol-DD9s4tIq.js} +1 -1
  15. package/app/dist/assets/{coffee-DLCACHKU.js → coffee-6iFiN2xF.js} +1 -1
  16. package/app/dist/assets/{cpp-CKRDyJLk.js → cpp-DyiPD7p1.js} +1 -1
  17. package/app/dist/assets/{crystal-DzdlwfxO.js → crystal-XjoV3Lue.js} +1 -1
  18. package/app/dist/assets/{css-J88DqgyO.js → css-DJovgfNT.js} +1 -1
  19. package/app/dist/assets/dialog-BvotBFA0.js +22 -0
  20. package/app/dist/assets/{edge-BiusF5O8.js → edge-DYu9rQsg.js} +1 -1
  21. package/app/dist/assets/effective-hosts-CgZiG_wS.js +68 -0
  22. package/app/dist/assets/{elixir-DVV1N8WB.js → elixir-CGc4gb59.js} +1 -1
  23. package/app/dist/assets/{elm-ZwoouJdM.js → elm-DfNAAF5X.js} +1 -1
  24. package/app/dist/assets/{erb-6WVNn8lP.js → erb-CF74Kl7K.js} +1 -1
  25. package/app/dist/assets/{git-rebase-CI6iVcd4.js → git-rebase-2bSFR8VV.js} +1 -1
  26. package/app/dist/assets/{glimmer-js-MU0okVIL.js → glimmer-js-D1yNTSaa.js} +1 -1
  27. package/app/dist/assets/{glimmer-ts-BXJcqrHb.js → glimmer-ts-DVblM7L5.js} +1 -1
  28. package/app/dist/assets/{glsl-CthKK13_.js → glsl-gxzJizaK.js} +1 -1
  29. package/app/dist/assets/{graphql-Cfx6sMIN.js → graphql-BpTTKDqK.js} +1 -1
  30. package/app/dist/assets/{hack-Cfn0L20S.js → hack-DDSUlOik.js} +1 -1
  31. package/app/dist/assets/{haml-DpOUW3De.js → haml-BZNAh4-P.js} +1 -1
  32. package/app/dist/assets/{handlebars-Dq6TUqDg.js → handlebars-DlYJLEcO.js} +1 -1
  33. package/app/dist/assets/{html-CrFhd97J.js → html-MZ0Poiph.js} +1 -1
  34. package/app/dist/assets/{html-derivative-SXrZiT2S.js → html-derivative-ChK_TvO6.js} +1 -1
  35. package/app/dist/assets/{http-BxRXAeum.js → http-CEE8xOHO.js} +1 -1
  36. package/app/dist/assets/{hurl-BsAa903H.js → hurl-B5aHyN9a.js} +1 -1
  37. package/app/dist/assets/index-SSlA_QcC.css +2 -0
  38. package/app/dist/assets/index-u9J_LInz.js +1366 -0
  39. package/app/dist/assets/{java-BZRe3u16.js → java-C-CCkGSB.js} +1 -1
  40. package/app/dist/assets/{javascript-YzZUmjcN.js → javascript-CoPUJA8j.js} +1 -1
  41. package/app/dist/assets/{jinja-CkL9mgnB.js → jinja-Ce_R6KUf.js} +1 -1
  42. package/app/dist/assets/{jison-DY01LEsx.js → jison-DxdoAlKK.js} +1 -1
  43. package/app/dist/assets/{json-DeVTS63Q.js → json-PteH9L8Y.js} +1 -1
  44. package/app/dist/assets/{jsx-B73xjEBK.js → jsx-N08PKjBU.js} +1 -1
  45. package/app/dist/assets/{julia-D5UCqxaX.js → julia-D_eVESw1.js} +1 -1
  46. package/app/dist/assets/{just-BfeKX4XX.js → just-BVZ_2gix.js} +1 -1
  47. package/app/dist/assets/{latex-CllT7gYn.js → latex-CvglVjdX.js} +1 -1
  48. package/app/dist/assets/{liquid-Bgz2sjbj.js → liquid-C2RPsEhH.js} +1 -1
  49. package/app/dist/assets/localhost-badge-CHDdiNhq.js +1 -0
  50. package/app/dist/assets/{lua-CKg4_5Yw.js → lua-D9-kqDch.js} +1 -1
  51. package/app/dist/assets/{marko-CSplXaxm.js → marko-jVSfYuio.js} +1 -1
  52. package/app/dist/assets/{mdc-CR1bPJlt.js → mdc-DVHnOYT4.js} +1 -1
  53. package/app/dist/assets/mutation-cache-effects-plW3Wjx9.js +1 -0
  54. package/app/dist/assets/mutation-errors-INqXreOn.js +2 -0
  55. package/app/dist/assets/{nginx-Chba8emm.js → nginx-DfHWE4gw.js} +1 -1
  56. package/app/dist/assets/{nim-BJOCNxTB.js → nim-fW6F-8R_.js} +1 -1
  57. package/app/dist/assets/page-shell-omz5VWqw.js +39 -0
  58. package/app/dist/assets/{perl-DtYnB2VK.js → perl-C916SOdN.js} +1 -1
  59. package/app/dist/assets/{php-Cm6MwVxd.js → php-BDWQ0WnL.js} +1 -1
  60. package/app/dist/assets/{pill-Ds03GLze.js → pill-8eXFxAuz.js} +1 -1
  61. package/app/dist/assets/{pug-Cs95QZUY.js → pug-BTGBL6ey.js} +1 -1
  62. package/app/dist/assets/{qml-DV4H8TeV.js → qml-BB7gtLw5.js} +1 -1
  63. package/app/dist/assets/{r-BOwNWtkP.js → r-4Ktj_4BV.js} +1 -1
  64. package/app/dist/assets/{razor-rzD3KE0N.js → razor-C_Ejzpyk.js} +1 -1
  65. package/app/dist/assets/{regexp-D5UpjLq1.js → regexp-DdimReFO.js} +1 -1
  66. package/app/dist/assets/{rst-nRBldbnW.js → rst-Ba-8orMO.js} +1 -1
  67. package/app/dist/assets/{ruby-DK9_UnsF.js → ruby-DNE0wFLx.js} +1 -1
  68. package/app/dist/assets/{sas-BxxScrc4.js → sas-D6QyIc5Y.js} +1 -1
  69. package/app/dist/assets/{scss-dYaO_Ssw.js → scss-BpYltub1.js} +1 -1
  70. package/app/dist/assets/{settings-section-BgEyrMBV.js → settings-section-BkJbbK-p.js} +1 -1
  71. package/app/dist/assets/{shellscript-BGY92qaj.js → shellscript-B1QZDlVi.js} +1 -1
  72. package/app/dist/assets/{shellsession-DHio1RBs.js → shellsession-C2YSc67H.js} +1 -1
  73. package/app/dist/assets/{soy-CWnh82_C.js → soy-Ba6Otyql.js} +1 -1
  74. package/app/dist/assets/split-button-_uHFVDB-.js +1 -0
  75. package/app/dist/assets/{sql-BgOSYFXh.js → sql-Bnzimrzw.js} +1 -1
  76. package/app/dist/assets/{stata-Di5c1EGu.js → stata-BmWbZaNS.js} +1 -1
  77. package/app/dist/assets/{surrealql-CKgBuPai.js → surrealql-BDEpTym4.js} +1 -1
  78. package/app/dist/assets/{svelte-DGNSQgHP.js → svelte-D3__atge.js} +1 -1
  79. package/app/dist/assets/{templ--mBJoDNy.js → templ-B2QvG8e0.js} +1 -1
  80. package/app/dist/assets/{tex-Drg-gBC1.js → tex-oleGAEAp.js} +1 -1
  81. package/app/dist/assets/thread-queries-DpnZLohh.js +1 -0
  82. package/app/dist/assets/{ts-tags-_EoiaFc_.js → ts-tags-C4rrn99M.js} +1 -1
  83. package/app/dist/assets/{tsx-C3E3ZPo7.js → tsx-5jd1D3TG.js} +1 -1
  84. package/app/dist/assets/{twig-BkmJOmf1.js → twig-BxJeHYNu.js} +1 -1
  85. package/app/dist/assets/{typescript-zC8doK3K.js → typescript-81bZW67U.js} +1 -1
  86. package/app/dist/assets/{vue-Dqnq1uw7.js → vue-DSNd-6Ch.js} +1 -1
  87. package/app/dist/assets/{vue-html-CZNe_SnY.js → vue-html-CQT5rCwO.js} +1 -1
  88. package/app/dist/assets/{vue-vine-ChEJZJ0Y.js → vue-vine-BafaCKEQ.js} +1 -1
  89. package/app/dist/assets/workspace-open-target-preference-yN4DFIsy.js +1 -0
  90. package/app/dist/assets/{xml-DHqUJISw.js → xml-AdWB6zlJ.js} +1 -1
  91. package/app/dist/assets/{xsl-B_xW8s_z.js → xsl-Dy6hQs2F.js} +1 -1
  92. package/app/dist/assets/{yaml-CHAY15k-.js → yaml-BdzELsfc.js} +1 -1
  93. package/app/dist/index.html +10 -10
  94. package/dist/bb-app.js +1 -1
  95. package/dist/bb-host-daemon.js +1 -1
  96. package/host-daemon/dist/bb +325 -563
  97. package/host-daemon/dist/bb-claude-code-bridge.mjs +26 -26
  98. package/host-daemon/dist/daemon-bundle.mjs +337 -342
  99. package/package.json +1 -1
  100. package/server/dist/default-template/apps/status/manifest.json +9 -0
  101. package/server/dist/drizzle/0008_thread_pinning.sql +3 -0
  102. package/server/dist/drizzle/meta/0008_snapshot.json +3285 -0
  103. package/server/dist/drizzle/meta/_journal.json +7 -0
  104. package/server/dist/index.js +3510 -2512
  105. package/app/dist/assets/AppSettingsView-Dh4Od2M3.js +0 -1
  106. package/app/dist/assets/InternalReplayListView-BjzY8fhh.js +0 -1
  107. package/app/dist/assets/ProjectSettingsView-BoH5a1hi.js +0 -1
  108. package/app/dist/assets/ThreadDetailRoute-Caqz8odF.js +0 -2867
  109. package/app/dist/assets/ThreadUnarchiveButton-2shfHri9.js +0 -1
  110. package/app/dist/assets/dialog-JFJupr8S.js +0 -22
  111. package/app/dist/assets/effective-hosts-BS3g3uzj.js +0 -68
  112. package/app/dist/assets/index-DYJoFBAk.css +0 -2
  113. package/app/dist/assets/index-DbhAkEqX.js +0 -1366
  114. package/app/dist/assets/localhost-badge-BESHcXM2.js +0 -1
  115. package/app/dist/assets/mutation-cache-effects-BX02KjBd.js +0 -1
  116. package/app/dist/assets/mutation-errors-DgGC9CkY.js +0 -2
  117. package/app/dist/assets/page-shell-CaMV_G2I.js +0 -39
  118. package/app/dist/assets/split-button-PlurXMEc.js +0 -1
  119. package/app/dist/assets/thread-queries-DI7HoSpk.js +0 -1
  120. package/app/dist/assets/workspace-open-target-preference-Dve5Zih1.js +0 -1
  121. package/server/dist/default-template/STATUS.html +0 -380
@@ -1 +0,0 @@
1
- import{Bi as e,Bt as t,Hi as n,Kt as r,Ni as i,Ta as a,Vi as o,Wt as s,Zt as c,gr as l,ja as u,na as d,t as f,ta as ee,tr as p}from"./page-shell-CaMV_G2I.js";import{Mt as m,c as h,f as g,h as _,n as v,u as y}from"./effective-hosts-BS3g3uzj.js";import{a as b,c as te,i as x,o as S,p as C,r as w,s as T,t as E}from"./dialog-JFJupr8S.js";import{d as ne,f as D,i as re,l as ie}from"./mutation-errors-DgGC9CkY.js";import{ln as O,un as ae}from"./index-DbhAkEqX.js";import{i as k,n as oe,r as A,t as j}from"./settings-section-BgEyrMBV.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-Dve5Zih1.js";var R=u(a(),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=d();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:e,pending:t,onDelete:n}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(S,{children:[(0,B.jsx)(T,{children:`Remove host?`}),(0,B.jsx)(x,{children:`Remove "${e.name}" and all of its project sources? This cannot be undone.`})]}),(0,B.jsx)(b,{children:(0,B.jsx)(i,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>n(e.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:e,pending:t,onRename:n}){let r=(0,R.useId)(),[a,o]=(0,R.useState)(e.currentName),[s,c]=(0,R.useState)(null);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(S,{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:r=>{if(r.preventDefault(),t)return;let i=a.trim();if(!i){c(`Host name cannot be empty.`);return}n(e.id,i)},children:[(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(C,{id:r,"aria-label":`Host name`,value:a,autoFocus:!0,disabled:t,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)(i,{type:`submit`,disabled:t,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)(S,{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:t,target:n}){let[r,i]=(0,R.useState)(()=>n.expiresAt<=Date.now()),a=t?.status===`connected`,o=!a&&!r,s=a?`Host connected`:r?`Join command expired`:`Waiting for host`;return(0,R.useEffect)(()=>{let e=n.expiresAt-Date.now();if(e<=0){i(!0);return}i(!1);let t=window.setTimeout(()=>i(!0),e);return()=>window.clearTimeout(t)},[n.expiresAt]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(S,{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:n.joinCommand})}),(0,B.jsx)(D,{text:n.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:[a?(0,B.jsx)(e,{name:`CircleCheck`,className:`size-4 text-success`,"aria-hidden":`true`}):r?(0,B.jsx)(e,{name:`AlertCircle`,className:`size-4 text-destructive`,"aria-hidden":`true`}):null,(0,B.jsx)(`span`,{className:o?`animate-shine font-medium`:`font-medium text-foreground`,children:s}),o?(0,B.jsxs)(`span`,{children:[`· Expires at `,G(n.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 is connected.`;function Q({definition:t,hasDaemon:n,onTargetChange:r,preferredTargetId:a,targets:s}){let c=(0,R.useMemo)(()=>s.filter(e=>P({capability:t.capability,target:e})),[t.capability,s]),l=(0,R.useMemo)(()=>I({capability:t.capability,preferredTargetId:a,targets:s}),[t.capability,a,s]),u=n?c.length===0?t.emptyDescription:null:Z,d=l?.id??a,f=l?.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)(i,{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:[d?(0,B.jsx)(N,{targetId:d,className:`size-5`}):null,(0,B.jsx)(`span`,{className:`min-w-0 truncate`,children:f})]}),(0,B.jsx)(e,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,B.jsx)(y,{align:`end`,className:`w-48`,children:u?(0,B.jsx)(`div`,{role:`note`,className:`px-2 py-[0.3125rem] text-xs leading-snug text-foreground`,children:u}):c.map(t=>(0,B.jsxs)(g,{onSelect:()=>r(t.id),children:[(0,B.jsx)(N,{targetId:t.id,className:`size-5`}),(0,B.jsx)(`span`,{className:`min-w-0 truncate`,children:t.label}),(0,B.jsx)(e,{name:`Check`,className:o(`ml-auto`,l?.id!==t.id&&`opacity-0`,m)})]},t.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 a=ne(),{hasDaemon:u}=te(),{workspaceOpenTargets:d}=L({enabled:u}),[b,x]=F(),[S,C]=M(),{data:w=[],isLoading:T}=v(),E=ee(),[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=n({meta:{errorMessage:`Failed to rename host.`},mutationFn:({id:e,name:t})=>p(e,{name:t}),onSuccess:()=>{O({queryClient:E}),N(null)}}),Y=n({meta:{errorMessage:`Failed to remove host.`},mutationFn:({id:e})=>c(e),onSuccess:()=>{ae({queryClient:E}),I(null)}}),X=n({meta:{errorMessage:`Failed to create host join command`,showErrorToast:!1},mutationFn:()=>r(),onSuccess:e=>{O({queryClient:E}),U(e),G(!0)},onError:e=>{if(e instanceof t&&e.code===`app_url_required`){q(!0);return}re({error:e,fallbackMessage:`Failed to create host join command`})}}),Z=n({meta:{errorMessage:`Failed to cancel host join.`},mutationFn:({id:e})=>s(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)(f,{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)(i,{variant:`outline`,size:`sm`,className:`w-full justify-between border-border/60 bg-card sm:w-48`,"aria-label":`Theme`,children:[de[a],(0,B.jsx)(e,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,B.jsx)(y,{align:`end`,className:`w-48`,children:ue.map(t=>(0,B.jsxs)(g,{onSelect:()=>ie(t.value),children:[t.label,(0,B.jsx)(e,{name:`Check`,className:o(`ml-auto`,a!==t.value&&`opacity-0`,m)})]},t.value))})]})})}),(0,B.jsx)(fe,{directoryTargetId:b,fileTargetId:S,hasDaemon:u,onDirectoryTargetChange:x,onFileTargetChange:C,targets:d}),(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(t=>{let n=t.status===`connected`;return(0,B.jsxs)(j,{children:[(0,B.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[t.name,(0,B.jsx)(`span`,{className:`ml-1.5 text-xs text-muted-foreground`,children:t.id})]}),n?(0,B.jsx)(`span`,{className:z,title:`Connected`}):t.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 · `,l(t.lastSeenAt)]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(_,{asChild:!0,children:(0,B.jsx)(i,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,"aria-label":`Host actions`,children:(0,B.jsx)(e,{name:`MoreHorizontal`,className:`size-4`})})}),(0,B.jsxs)(y,{align:`end`,className:`w-40`,children:[(0,B.jsx)(g,{onSelect:()=>N({id:t.id,currentName:t.name}),children:`Rename`}),(0,B.jsx)(g,{className:`text-destructive focus:text-destructive`,onSelect:()=>I({id:t.id,name:t.name}),children:`Remove`})]})]})]},t.id)})})}),T?null:(0,B.jsx)(`div`,{className:`flex justify-start`,children:(0,B.jsxs)(i,{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)(e,{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};
@@ -1 +0,0 @@
1
- import{$t as e,An as t,Bi as n,Hi as r,Ni as i,Ta as a,Ui as o,Vi as s,Xn as c,ja as l,lt as u,na as d,t as f,ta as p}from"./page-shell-CaMV_G2I.js";import{n as m}from"./effective-hosts-BS3g3uzj.js";import{n as h}from"./chunk-JZWAC4HX-CmnT162V.js";import{E as g,an as _,dn as v,on as y}from"./index-DbhAkEqX.js";import{n as b,r as x,t as S}from"./split-button-PlurXMEc.js";import{t as C}from"./pill-Ds03GLze.js";var w=l(a(),1),T=d(),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 a=p(),[l,d]=(0,w.useState)(()=>new Set),j=e=>{d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},M=o({queryKey:u(),queryFn:()=>t()}),{data:N=[]}=m(),P=(0,w.useMemo)(()=>new Map(N.map(e=>[e.id,e.name])),[N]),F=r({mutationFn:t=>e(t),onSuccess:()=>{v({queryClient:a})}}),I=r({mutationFn:({captureId:e,speed:t})=>c(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)(n,{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(e=>{let t=e.userInputPreview||e.captureId,r=e.kind===`thread-start`,a=r?`new`:`follow-up`,o=g(e.providerId),c=o?.icon,u=l.has(e.captureId),d=F.isPending&&F.variables===e.captureId,f=I.isPending&&I.variables?.captureId===e.captureId,p=I.isError&&I.variables?.captureId===e.captureId,m=e.eventCounts.rawProviderEvents===0,v={label:`Start replay at ${k(E)}`,onSelect:()=>I.mutate({captureId:e.captureId,speed:E}),content:(0,T.jsxs)(T.Fragment,{children:[f?(0,T.jsx)(n,{name:`Spinner`,className:`size-3 animate-spin`}):null,`Replay`]})},w=D.map(t=>({label:`Start replay at ${k(t)}`,onSelect:()=>I.mutate({captureId:e.captureId,speed:t}),content:(0,T.jsx)(`span`,{children:k(t)})}));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(e.captureId),"aria-expanded":u,className:`flex min-w-0 flex-1 items-center gap-2 text-left`,children:[(0,T.jsx)(n,{name:`ChevronRight`,className:s(`size-3 shrink-0 text-muted-foreground transition-transform`,u&&`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:t}),e.title?(0,T.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:e.title}):null,(0,T.jsx)(C,{variant:r?`secondary`:`outline`,className:`shrink-0`,children:a}),c?(0,T.jsx)(c,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-label":o?.ariaLabel}):(0,T.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.providerId})]})]}),(0,T.jsx)(S,{disabled:f||m,primaryAction:v,secondaryActions:w,triggerLabel:`Choose replay speed`,mobileTitle:`Replay speed`}),(0,T.jsx)(i,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Delete replay capture`,title:`Delete replay capture`,disabled:d,onClick:()=>F.mutate(e.captureId),className:`size-6`,children:d?(0,T.jsx)(n,{name:`Spinner`,className:`size-3 animate-spin`}):(0,T.jsx)(n,{name:`Trash2`,className:`size-3`})})]}),u?(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:e.captureId}),(0,T.jsx)(x,{label:`Host`,valueClassName:`min-w-0 truncate`,children:P.get(e.hostId)??e.hostId}),(0,T.jsx)(x,{label:`Provider`,valueClassName:`min-w-0 truncate`,children:e.providerId}),(0,T.jsx)(x,{label:`Project`,valueClassName:`min-w-0`,children:(0,T.jsx)(h,{to:_(e.projectId),className:O,children:e.projectName??e.projectId})}),(0,T.jsx)(x,{label:`Thread`,valueClassName:`min-w-0`,children:(0,T.jsx)(h,{to:y({projectId:e.projectId,threadId:e.threadId}),className:s(O,!e.title&&`font-mono`),children:e.title??e.threadId})}),(0,T.jsx)(x,{label:`Captured`,valueClassName:`min-w-0 truncate`,children:A(e.capturedAt)}),(0,T.jsx)(x,{label:`Raw events`,valueClassName:`min-w-0 truncate`,children:e.eventCounts.rawProviderEvents})]}),p?(0,T.jsx)(`p`,{className:`text-xs text-destructive`,children:`Failed to start replay.`}):null]}):null]},`${e.hostId}:${e.captureId}`)})})]})})}export{j as InternalReplayListView};
@@ -1 +0,0 @@
1
- import{Bi as e,Bn as t,Hi as n,Hr as r,Ni as i,Ta as a,Ur as o,ja as s,na as c,t as l,ta as u}from"./page-shell-CaMV_G2I.js";import{c as d,f,h as p,n as m,u as h}from"./effective-hosts-BS3g3uzj.js";import{d as g}from"./chunk-JZWAC4HX-CmnT162V.js";import{a as _,i as v,o as y,r as b,s as x,t as S}from"./dialog-JFJupr8S.js";import{a as C}from"./mutation-cache-effects-BX02KjBd.js";import{C as w,S as T,f as E,o as D,r as O,t as k}from"./localhost-badge-BESHcXM2.js";import{$t as A,Qt as j,cn as M,sn as N}from"./index-DbhAkEqX.js";import{n as P,r as F,t as I}from"./settings-section-BgEyrMBV.js";import{t as L}from"./pill-Ds03GLze.js";var R=s(a(),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:e,pending:t,onDelete:n}){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 "${e.label}" from this project? This cannot be undone.`})]}),(0,z.jsx)(_,{children:(0,z.jsx)(i,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>n(e.id),children:`Remove source`})})]})}function H({source:t,isLocalhostSource:n,isLocalPathInvalid:r,hostName:a,isEditPending:o,isOnlySource:s,onEditLocalPath:c,onRemove:l}){return(0,z.jsxs)(I,{children:[(0,z.jsx)(e,{name:O,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:a}),n?(0,z.jsx)(`span`,{className:`self-center`,children:(0,z.jsx)(k,{})}):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)(i,{variant:`ghost`,size:`icon`,className:`h-7 w-7 shrink-0`,"aria-label":`Source actions`,children:(0,z.jsx)(e,{name:`MoreHorizontal`,className:`size-4`})})}),(0,z.jsxs)(h,{align:`end`,className:`w-40`,children:[n?(0,z.jsx)(f,{disabled:o,onSelect:e=>{e.preventDefault(),c(t)},children:`Edit local path`}):null,(0,z.jsx)(f,{className:`text-destructive focus:text-destructive`,disabled:s,onSelect:()=>l(t),children:`Remove`})]})]})]})}function U(e,t){return t.get(e.hostId)??e.hostId}function W(){let{projectId:e}=g(),a=w(),s=T({enabled:a.isSuccess||a.isError}),c=s.data,d=a.isFetching||s.isLoading,{data:f=[]}=m(),p=u(),[h,_]=(0,R.useState)(null),v=n({meta:{errorMessage:`Failed to remove source.`},mutationFn:({sourceId:n})=>e?t(e,n):Promise.resolve(),onSuccess:()=>{C({projectId:e,queryClient:p}),_(null)}}),y=D(),b=E(),x=c?.find(t=>t.id===e),S=x?.sources,O=(0,R.useMemo)(()=>S??[],[S]),k=(0,R.useMemo)(()=>new Map(f.map(e=>[e.id,e.name])),[f]),I=x?.name??``,L=y.isPending||b.isPending,V=A({isPending:L,submit:(0,R.useCallback)(({path:t,hostId:n,target:r,closeDialog:i})=>{if(e){if(r.kind===`add-source`)y.mutate({projectId:e,path:t,hostId:n},{onSuccess:i});else if(r.kind===`update`){let r=O.find(e=>o(e)&&e.hostId===n);if(!r)return;b.mutate({projectId:e,sourceId:r.id,path:t},{onSuccess:i})}}},[y,e,O,b])}),W=(0,R.useCallback)(()=>{e&&V.openPicker({kind:`add-source`,projectId:e,projectName:I})},[V,e,I]),G=(0,R.useCallback)(t=>{e&&V.openPicker({kind:`update`,projectId:e,projectName:I,currentPath:t.path})},[V,e,I]),K=V.localHostId,q=M((0,R.useMemo)(()=>K?O.filter(e=>o(e)&&e.hostId===K).map(e=>e.path):[],[K,O])),J=K!=null&&!r(O,K)?(0,z.jsx)(`div`,{className:`mt-2 flex gap-2`,children:(0,z.jsx)(i,{size:`sm`,variant:`outline`,disabled:y.isPending,onClick:W,children:`Add local path`})}):null;return(0,z.jsxs)(l,{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…`}):O.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:O.map(e=>{let t=o(e)&&K!=null&&e.hostId===K;return(0,z.jsx)(H,{source:e,isLocalhostSource:t,isLocalPathInvalid:t&&N(q,e.path),hostName:o(e)?k.get(e.hostId)??e.hostId:``,isEditPending:L,isOnlySource:O.length<=1,onEditLocalPath:G,onRemove:e=>_({id:e.id,label:U(e,k)})},e.id)})}),J]})})}),(0,z.jsx)(j,{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};