@byfriends/vis-server 0.3.4
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/LICENSE +28 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +25 -0
- package/dist/public/assets/index-B-eI7eKY.js +5 -0
- package/dist/public/assets/index-C_tCz85D.css +1 -0
- package/dist/public/assets/vendor-react-CNwmIw-M.js +299 -0
- package/dist/public/assets/vendor-tanstack-CmEBlPtt.js +4 -0
- package/dist/public/index.html +42 -0
- package/dist/server-CqbNDUBH.mjs +1044 -0
- package/dist/server.d.mts +49 -0
- package/dist/server.mjs +2 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BYF PROPRIETARY LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-2027 ByronFinn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted to copy and redistribute this software in its
|
|
6
|
+
unmodified form, without charge. This permission does not extend to modified
|
|
7
|
+
versions of the software.
|
|
8
|
+
|
|
9
|
+
Local modification of this software for personal use is permitted, provided
|
|
10
|
+
that such modifications are not distributed to third parties.
|
|
11
|
+
|
|
12
|
+
Restrictions:
|
|
13
|
+
1. You may NOT redistribute modified versions of this software.
|
|
14
|
+
2. You may NOT use this software for commercial purposes.
|
|
15
|
+
3. You may NOT sublicense, sell, or offer this software as a service.
|
|
16
|
+
|
|
17
|
+
This software is source-available but NOT open source. The source code is
|
|
18
|
+
made publicly visible for review purposes only.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
For questions about licensing, contact: https://github.com/ByronFinn/byf/issues
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { a as resolvePort, i as resolveHost, o as resolveVisAuthToken, r as startVisServer, t as formatVisStartupBanner } from "./server-CqbNDUBH.mjs";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
async function main() {
|
|
4
|
+
const host = resolveHost();
|
|
5
|
+
const port = resolvePort();
|
|
6
|
+
const authToken = resolveVisAuthToken(host);
|
|
7
|
+
const handle = await startVisServer({
|
|
8
|
+
host,
|
|
9
|
+
port,
|
|
10
|
+
authToken
|
|
11
|
+
});
|
|
12
|
+
process.stdout.write(formatVisStartupBanner({
|
|
13
|
+
authToken,
|
|
14
|
+
host,
|
|
15
|
+
port: handle.port
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
await main();
|
|
20
|
+
} catch (error) {
|
|
21
|
+
process.stderr.write(`[vis-server] fatal: ${error instanceof Error ? error.stack ?? error.message : String(error)}\n`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{r as b,u as A,b as e,L as _,c as Ce,d as pe,R as We,e as G,f as Re,B as Te}from"./vendor-react-CNwmIw-M.js";import{u as M,a as de,b as _e,c as Ie,Q as $e,d as Ae}from"./vendor-tanstack-CmEBlPtt.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))t(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&t(a)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function t(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();const X="vis.theme";function Me(){return typeof window>"u"?"dark":window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function Le(){try{const s=localStorage.getItem(X);if(s==="light"||s==="dark"||s==="auto")return s}catch{}return"auto"}function Oe(s){const n=document.documentElement;n.dataset.theme=s;const r=document.querySelector('meta[name="theme-color"]');r&&(r.content=s==="light"?"#fafbfc":"#0b0d12")}function He(){const[s,n]=b.useState(()=>Le()),[r,t]=b.useState(()=>Me());b.useEffect(()=>{const l=window.matchMedia("(prefers-color-scheme: light)"),c=()=>{t(l.matches?"light":"dark")};return l.addEventListener("change",c),()=>{l.removeEventListener("change",c)}},[]);const o=s==="auto"?r:s;b.useEffect(()=>{Oe(o)},[o]);const i=b.useCallback(l=>{n(l);try{l==="auto"?localStorage.removeItem(X):localStorage.setItem(X,l)}catch{}},[]),a=b.useCallback(()=>{i(s==="auto"?"light":s==="light"?"dark":"auto")},[s,i]);return{choice:s,resolved:o,cycle:a,set:i}}const te="byf-vis-auth-token";function oe(s){const n=s.replace(/^[#?]/,"");if(n.length===0)return null;const r=new URLSearchParams(n);return r.get("token")??r.get("vis_token")}function ae(s){const n=s.has("token")||s.has("vis_token");return s.delete("token"),s.delete("vis_token"),n}function Je(){const s=new URL(window.location.href),n=ae(s.searchParams),r=s.hash.replace(/^#/,"");let t=!1;if(r.length>0){const o=new URLSearchParams(r);if(t=ae(o),t){const i=o.toString();s.hash=i.length>0?i:""}}(n||t)&&window.history.replaceState(null,"",s.toString())}function qe(){if(typeof window>"u")return null;const s=oe(window.location.hash),n=oe(window.location.search),r=s??n;return r!==null&&r.length>0?(window.localStorage.setItem(te,r),Je(),r):window.localStorage.getItem(te)}async function ee(s,n){const r={accept:"application/json"},t=qe();t!==null&&t.length>0&&(r.authorization=`Bearer ${t}`);const o=await fetch(s,{method:n,headers:r});if(!o.ok){let i=null;try{i=await o.json()}catch{}throw new Error(i?.error??`HTTP ${o.status} ${o.statusText}`)}return await o.json()}function $(s){return ee(s,"GET")}function ze(s){return ee(s,"POST")}function Ke(s){return ee(s,"DELETE")}const U=encodeURIComponent,C={listSessions:async()=>(await $("/api/sessions")).sessions,getSession:s=>$(`/api/sessions/${U(s)}`),getWire:(s,n)=>$(`/api/sessions/${U(s)}/wire?agent=${U(n)}`),getContext:(s,n)=>$(`/api/sessions/${U(s)}/context?agent=${U(n)}`),getAgentTree:s=>$(`/api/sessions/${U(s)}/agents`),deleteSession:s=>Ke(`/api/sessions/${U(s)}`),revealSession:s=>ze(`/api/sessions/${U(s)}/reveal`)};function Ne(){return M({queryKey:["sessions"],queryFn:()=>C.listSessions()})}function q(s){return M({queryKey:["session",s],queryFn:()=>C.getSession(s),enabled:!!s})}function Ye(){const s=de();return _e({mutationFn:n=>C.deleteSession(n),onSuccess:(n,r)=>{s.setQueryData(["sessions"],t=>t?.filter(o=>o.sessionId!==r)),s.removeQueries({queryKey:["session",r]}),s.invalidateQueries({queryKey:["sessions"]})}})}function se(s){if(!s||!Number.isFinite(s))return"—";const n=Date.now()-s;if(n<0)return"just now";const r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;const t=Math.floor(r/60);if(t<60)return`${t}m ago`;const o=Math.floor(t/60);if(o<24)return`${o}h ago`;const i=Math.floor(o/24);if(i<30)return`${i}d ago`;const a=Math.floor(i/30);return a<12?`${a}mo ago`:`${Math.floor(a/12)}y ago`}function xe(s){if(!s||!Number.isFinite(s))return"—";const n=new Date(s),r=t=>String(t).padStart(2,"0");return`${n.getFullYear()}-${r(n.getMonth()+1)}-${r(n.getDate())} ${r(n.getHours())}:${r(n.getMinutes())}:${r(n.getSeconds())}`}function Qe(s){if(!s||!Number.isFinite(s))return"--:--:--";const n=new Date(s),r=t=>String(t).padStart(2,"0");return`${r(n.getHours())}:${r(n.getMinutes())}:${r(n.getSeconds())}`}function le({session:s,onDelete:n,deleting:r}){const{sessionId:t}=A(),o=t===s.sessionId,i=s.workDir?s.workDir.split("/").slice(-2).join("/"):"(no workspace)",a=s.sessionId.replace(/^session_/,"").slice(0,10),l=s.title,c=Math.max(0,s.agentCount-1);function m(d){d.preventDefault(),d.stopPropagation(),n(s)}return e.jsxDEV("div",{className:["group relative border-b border-border transition-colors",o?"bg-surface-2":"hover:bg-surface-1"].join(" "),children:[o?e.jsxDEV("span",{className:"absolute inset-y-0 left-0 w-[2px] bg-[var(--color-cat-conversation)]"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:37,columnNumber:9},this):null,e.jsxDEV(_,{to:`/sessions/${s.sessionId}`,className:"block px-3 py-2 pr-10",children:[e.jsxDEV("div",{className:"flex items-center justify-between gap-2",children:[e.jsxDEV("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsxDEV("span",{className:"inline-block h-[7px] w-[7px] shrink-0 rounded-full",style:{backgroundColor:"var(--color-fg-3)"}},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:42,columnNumber:13},this),e.jsxDEV("span",{className:"shrink-0 font-mono text-[12px] text-fg-0",children:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:46,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:41,columnNumber:11},this),e.jsxDEV("span",{className:"shrink-0 font-mono text-[10.5px] text-fg-3 tabular",children:se(s.updatedAt)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:48,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:40,columnNumber:9},this),e.jsxDEV("div",{className:"mt-1 flex items-center gap-3 font-mono text-[10.5px] text-fg-2",children:[e.jsxDEV("span",{className:"truncate",title:s.workDir??"",children:i},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:53,columnNumber:11},this),e.jsxDEV("span",{className:"tabular text-fg-3",children:[s.mainWireRecordCount,"ev"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:56,columnNumber:11},this),c>0?e.jsxDEV("span",{className:"tabular text-[var(--color-cat-subagent)]",children:[c,"sub"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:58,columnNumber:13},this):null,s.health!=="ok"?e.jsxDEV("span",{className:"tabular text-[var(--color-sev-error)]",children:s.health},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:61,columnNumber:13},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:52,columnNumber:9},this),l?e.jsxDEV("div",{className:"mt-1 truncate font-mono text-[11px] text-fg-1",title:l,children:l},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:65,columnNumber:11},this):null,s.lastPrompt?e.jsxDEV("div",{className:"mt-1 truncate font-mono text-[10.5px] text-fg-3",title:s.lastPrompt,children:["prompt · ",s.lastPrompt]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:70,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:39,columnNumber:7},this),e.jsxDEV("button",{type:"button",onClick:m,disabled:r,className:"absolute right-2 top-2 flex h-5 w-5 items-center justify-center border border-transparent text-fg-3 transition-colors hover:border-[var(--color-sev-error)] hover:text-[var(--color-sev-error)] disabled:cursor-not-allowed disabled:opacity-40",title:`Delete session ${s.sessionId}`,"aria-label":`Delete session ${s.sessionId}`,children:e.jsxDEV(Ge,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:86,columnNumber:9},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:30,columnNumber:5},this)}function Ge(){return e.jsxDEV("svg",{width:"11",height:"11",viewBox:"0 0 12 12","aria-hidden":"true",children:[e.jsxDEV("path",{d:"M2 3 H10",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"square"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:95,columnNumber:7},this),e.jsxDEV("path",{d:"M4 3 V2 H8 V3",stroke:"currentColor",strokeWidth:"1.2",fill:"none"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:96,columnNumber:7},this),e.jsxDEV("path",{d:"M3 4 H9 L8.5 10 H3.5 Z",stroke:"currentColor",strokeWidth:"1.2",fill:"none"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:97,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionCard.tsx",lineNumber:94,columnNumber:5},this)}const Ze=[{value:"recent",label:"recent"},{value:"oldest",label:"oldest"},{value:"most_records",label:"most records"},{value:"most_subagents",label:"most subagents"}],Xe=[{value:"all",label:"any"},{value:"ok",label:"ok"},{value:"broken_state",label:"broken state"},{value:"broken_main_wire",label:"broken wire"},{value:"missing_main_wire",label:"no wire"},{value:"unsupported_protocol",label:"old proto"}];function es({search:s,onSearchChange:n,sortKey:r,onSortChange:t,healthFilter:o,onHealthChange:i,totalCount:a,filteredCount:l}){return e.jsxDEV("div",{className:"border-b border-border bg-surface-1 px-3 py-2",children:[e.jsxDEV("div",{className:"relative",children:e.jsxDEV("input",{type:"text",value:s,onChange:c=>{n(c.target.value)},placeholder:"search id / title / workspace",className:"w-full border border-border bg-surface-0 px-2 py-1 font-mono text-[12px] text-fg-0 placeholder:text-fg-3 focus:border-border-strong focus:outline-none"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:43,columnNumber:9},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:42,columnNumber:7},this),e.jsxDEV("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[e.jsxDEV("label",{className:"flex items-center gap-1.5 font-mono text-[10.5px] text-fg-2",children:[e.jsxDEV("span",{className:"text-fg-3",children:"sort"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:55,columnNumber:11},this),e.jsxDEV("select",{value:r,onChange:c=>{t(c.target.value)},className:"flex-1 border border-border bg-surface-0 px-1 py-0.5 text-fg-1 focus:border-border-strong focus:outline-none",children:Ze.map(c=>e.jsxDEV("option",{value:c.value,children:c.label},c.value,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:64,columnNumber:15},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:56,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:54,columnNumber:9},this),e.jsxDEV("label",{className:"flex items-center gap-1.5 font-mono text-[10.5px] text-fg-2",children:[e.jsxDEV("span",{className:"text-fg-3",children:"health"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:71,columnNumber:11},this),e.jsxDEV("select",{value:o,onChange:c=>{i(c.target.value)},className:"flex-1 border border-border bg-surface-0 px-1 py-0.5 text-fg-1 focus:border-border-strong focus:outline-none",children:Xe.map(c=>e.jsxDEV("option",{value:c.value,children:c.label},c.value,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:80,columnNumber:15},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:72,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:70,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:53,columnNumber:7},this),e.jsxDEV("div",{className:"mt-2 flex items-center justify-end",children:e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3 tabular",children:[l," / ",a]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:88,columnNumber:9},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:87,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionFilter.tsx",lineNumber:41,columnNumber:5},this)}function ss(s){return s.workDir?s.workDir.split("/").slice(-2).join("/"):"(no workspace)"}function ns(s,n){switch(n){case"recent":return s.toSorted((r,t)=>t.updatedAt-r.updatedAt);case"oldest":return s.toSorted((r,t)=>r.createdAt-t.createdAt);case"most_records":return s.toSorted((r,t)=>t.mainWireRecordCount-r.mainWireRecordCount);case"most_subagents":return s.toSorted((r,t)=>t.agentCount-1-(r.agentCount-1))}}function rs(){const{data:s,isLoading:n,error:r}=Ne(),t=Ye(),o=Ce(),{sessionId:i}=A(),[a,l]=b.useState(""),[c,m]=b.useState("recent"),[d,D]=b.useState("all"),j=b.useMemo(()=>{if(!s)return[];const v=a.trim().toLowerCase();return s.filter(f=>d!=="all"&&f.health!==d?!1:v?[f.sessionId,f.title??"",f.lastPrompt??"",f.workDir??""].join(" ").toLowerCase().includes(v):!0)},[s,a,d]),x=b.useMemo(()=>{if(c!=="recent")return null;const v=new Map;for(const f of j){const N=ss(f),E=v.get(N);E===void 0?v.set(N,[f]):E.push(f)}return[...v.entries()].map(([f,N])=>{const E=N.toSorted((H,Y)=>Y.updatedAt-H.updatedAt);return[f,E]}).toSorted(([,f],[,N])=>{const E=f[0]?.updatedAt??0;return(N[0]?.updatedAt??0)-E})},[j,c]),L=b.useMemo(()=>x===null?ns(j,c):null,[j,c,x]);async function O(v){const f=v.title??v.lastPrompt??v.sessionId;if(window.confirm(`Delete session "${f}"?
|
|
2
|
+
|
|
3
|
+
This removes its files from BYF_HOME.`))try{await t.mutateAsync(v.sessionId),i===v.sessionId&&o("/")}catch(N){window.alert(N instanceof Error?N.message:String(N))}}return e.jsxDEV("aside",{className:"flex h-full min-h-0 w-[320px] shrink-0 flex-col border-r border-border bg-surface-1",children:[e.jsxDEV(es,{search:a,onSearchChange:l,sortKey:c,onSortChange:m,healthFilter:d,onHealthChange:D,totalCount:s?.length??0,filteredCount:j.length},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:98,columnNumber:7},this),e.jsxDEV("div",{className:"min-h-0 flex-1 overflow-y-auto",children:n?e.jsxDEV("div",{className:"p-3 font-mono text-[11px] text-fg-3",children:"loading…"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:110,columnNumber:11},this):r?e.jsxDEV("div",{className:"p-3 font-mono text-[11px] text-[var(--color-sev-error)]",children:r.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:112,columnNumber:11},this):j.length===0?e.jsxDEV("div",{className:"p-3 font-mono text-[11px] text-fg-3",children:"no sessions match"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:116,columnNumber:11},this):x!==null?x.map(([v,f])=>e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"sticky top-0 z-10 border-b border-border bg-surface-1 px-3 py-1 font-mono text-[10px] uppercase tracking-[0.12em] text-fg-3",children:[v," ",e.jsxDEV("span",{className:"text-fg-3 tabular",children:["· ",f.length]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:121,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:120,columnNumber:15},this),f.map(N=>e.jsxDEV(le,{session:N,onDelete:E=>{O(E)},deleting:t.isPending&&t.variables===N.sessionId},N.sessionId,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:124,columnNumber:17},this))]},v,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:119,columnNumber:13},this)):L?.map(v=>e.jsxDEV(le,{session:v,onDelete:f=>{O(f)},deleting:t.isPending&&t.variables===v.sessionId},v.sessionId,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:137,columnNumber:13},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:108,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/sessions/SessionRail.tsx",lineNumber:97,columnNumber:5},this)}function is({children:s}){const n=de(),{choice:r,resolved:t,cycle:o}=He();return e.jsxDEV("div",{className:"flex h-full flex-col",children:[e.jsxDEV("header",{className:"flex h-10 shrink-0 items-center justify-between border-b border-border bg-surface-1 px-4",children:[e.jsxDEV(_,{to:"/",className:"flex items-center gap-2",children:[e.jsxDEV(os,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:20,columnNumber:11},this),e.jsxDEV("span",{className:"font-mono text-[12px] uppercase tracking-[0.12em] text-fg-0",children:["byf ",e.jsxDEV("span",{className:"text-fg-2",children:"vis"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:22,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:21,columnNumber:11},this),e.jsxDEV("span",{className:"ml-2 font-mono text-[10px] uppercase tracking-[0.12em] text-fg-3",children:"debug · local files"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:24,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:19,columnNumber:9},this),e.jsxDEV("div",{className:"flex items-center gap-2 text-[11px] text-fg-2",children:[e.jsxDEV(ts,{choice:r,resolved:t,onCycle:o},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:29,columnNumber:11},this),e.jsxDEV("button",{onClick:()=>{n.invalidateQueries()},className:"flex items-center gap-1.5 border border-border px-2 py-0.5 font-mono text-[11px] text-fg-1 transition-colors hover:border-border-strong hover:text-fg-0",title:"Refresh — re-read all session data from disk",children:[e.jsxDEV(as,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:37,columnNumber:13},this),"refresh"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:30,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:28,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:18,columnNumber:7},this),e.jsxDEV("div",{className:"flex min-h-0 flex-1",children:[e.jsxDEV(rs,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:43,columnNumber:9},this),e.jsxDEV("main",{className:"flex min-h-0 flex-1 flex-col",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:44,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:42,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:17,columnNumber:5},this)}function ts({choice:s,resolved:n,onCycle:r}){const t=s==="auto"?`auto · ${n}`:s,o=`Theme: ${t}. Click to cycle (auto → light → dark → auto).`;return e.jsxDEV("button",{onClick:r,className:"flex items-center gap-1.5 border border-border px-2 py-0.5 font-mono text-[11px] text-fg-1 transition-colors hover:border-border-strong hover:text-fg-0",title:o,"aria-label":`Theme ${t}`,children:[s==="auto"?e.jsxDEV(ms,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:68,columnNumber:28},this):n==="light"?e.jsxDEV(ls,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:68,columnNumber:66},this):e.jsxDEV(cs,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:68,columnNumber:80},this),e.jsxDEV("span",{className:"tabular",children:t},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:69,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:62,columnNumber:5},this)}function os(){return e.jsxDEV("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[e.jsxDEV("rect",{x:"1",y:"1",width:"6",height:"6",fill:"var(--color-cat-conversation)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:77,columnNumber:7},this),e.jsxDEV("rect",{x:"9",y:"1",width:"6",height:"6",fill:"var(--color-cat-subagent)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:78,columnNumber:7},this),e.jsxDEV("rect",{x:"1",y:"9",width:"6",height:"6",fill:"var(--color-cat-ephemeral)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:79,columnNumber:7},this),e.jsxDEV("rect",{x:"9",y:"9",width:"6",height:"6",fill:"var(--color-cat-approval)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:80,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:76,columnNumber:5},this)}function as(){return e.jsxDEV("svg",{width:"10",height:"10",viewBox:"0 0 12 12","aria-hidden":"true",children:[e.jsxDEV("path",{d:"M10 3 A5 5 0 1 0 10.8 7",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"square"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:88,columnNumber:7},this),e.jsxDEV("path",{d:"M7 1 L10 3 L7 5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"square",strokeLinejoin:"miter"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:95,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:87,columnNumber:5},this)}function ls(){return e.jsxDEV("svg",{width:"11",height:"11",viewBox:"0 0 12 12","aria-hidden":"true",children:[e.jsxDEV("circle",{cx:"6",cy:"6",r:"2",fill:"currentColor"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:110,columnNumber:7},this),e.jsxDEV("g",{stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",children:[e.jsxDEV("line",{x1:"6",y1:"0.5",x2:"6",y2:"2"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:112,columnNumber:9},this),e.jsxDEV("line",{x1:"6",y1:"10",x2:"6",y2:"11.5"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:113,columnNumber:9},this),e.jsxDEV("line",{x1:"0.5",y1:"6",x2:"2",y2:"6"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:114,columnNumber:9},this),e.jsxDEV("line",{x1:"10",y1:"6",x2:"11.5",y2:"6"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:115,columnNumber:9},this),e.jsxDEV("line",{x1:"2",y1:"2",x2:"3",y2:"3"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:116,columnNumber:9},this),e.jsxDEV("line",{x1:"9",y1:"9",x2:"10",y2:"10"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:117,columnNumber:9},this),e.jsxDEV("line",{x1:"10",y1:"2",x2:"9",y2:"3"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:118,columnNumber:9},this),e.jsxDEV("line",{x1:"3",y1:"9",x2:"2",y2:"10"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:119,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:111,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:109,columnNumber:5},this)}function cs(){return e.jsxDEV("svg",{width:"11",height:"11",viewBox:"0 0 12 12","aria-hidden":"true",children:e.jsxDEV("path",{d:"M9 7.5 A4.5 4.5 0 1 1 4.5 3 A3.6 3.6 0 0 0 9 7.5 Z",fill:"currentColor"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:128,columnNumber:7},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:127,columnNumber:5},this)}function ms(){return e.jsxDEV("svg",{width:"11",height:"11",viewBox:"0 0 12 12","aria-hidden":"true",children:[e.jsxDEV("path",{d:"M6 1 A5 5 0 1 1 6 11 Z",fill:"currentColor"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:136,columnNumber:7},this),e.jsxDEV("circle",{cx:"6",cy:"6",r:"4.5",fill:"none",stroke:"currentColor",strokeWidth:"1"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:137,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/AppShell.tsx",lineNumber:135,columnNumber:5},this)}function bs(s,n){return M({queryKey:["context",s,n],queryFn:()=>C.getContext(s,n),enabled:s.length>0&&n.length>0})}const us={conversation:"--color-cat-conversation",config:"--color-cat-config",lifecycle:"--color-cat-lifecycle",subagent:"--color-cat-subagent",approval:"--color-cat-approval",ephemeral:"--color-cat-ephemeral",meta:"--color-cat-meta",tools:"--color-cat-tools",user:"--color-user",assistant:"--color-assistant",tool:"--color-tool",compaction:"--color-compaction",turn:"--color-turn",info:"--color-sev-info",success:"--color-sev-success",warning:"--color-sev-warning",error:"--color-sev-error",neutral:"--color-fg-2"};function p({tone:s="neutral",variant:n="soft",children:r,title:t,className:o=""}){const i=`var(${us[s]})`,a=n==="solid"?{backgroundColor:i,color:"var(--color-on-accent)"}:n==="outline"?{border:`1px solid ${i}`,color:i}:{backgroundColor:`color-mix(in oklab, ${i} 18%, transparent)`,color:i};return e.jsxDEV("span",{className:`pill ${o}`,style:a,title:t,children:r},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/Pill.tsx",lineNumber:70,columnNumber:5},this)}function fs({message:s}){const n=ps(s);return e.jsxDEV("div",{className:"my-3 flex flex-col gap-2",children:[e.jsxDEV("div",{className:"flex items-center gap-3",children:[e.jsxDEV("span",{className:"h-px flex-1 bg-[var(--color-compaction)] opacity-50"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/CompactionRibbon.tsx",lineNumber:19,columnNumber:9},this),e.jsxDEV("span",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-[var(--color-compaction)]",children:["prior context compacted · line ",s.lineNo]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/CompactionRibbon.tsx",lineNumber:20,columnNumber:9},this),e.jsxDEV("span",{className:"h-px flex-1 bg-[var(--color-compaction)] opacity-50"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/CompactionRibbon.tsx",lineNumber:23,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/CompactionRibbon.tsx",lineNumber:18,columnNumber:7},this),n.length>0?e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12px] text-fg-2",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/CompactionRibbon.tsx",lineNumber:26,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/CompactionRibbon.tsx",lineNumber:17,columnNumber:5},this)}function ps(s){for(const n of s.message.content)if(n.type==="text")return n.text;return""}function k({value:s,label:n="copy",className:r=""}){const[t,o]=b.useState("idle");return e.jsxDEV("button",{onClick:i=>{i.stopPropagation(),navigator.clipboard.writeText(s).then(()=>{o("ok")}).catch(()=>{o("err")}).finally(()=>setTimeout(()=>{o("idle")},1200))},className:`font-mono text-[10px] text-fg-3 transition-colors hover:text-fg-1 ${r}`,title:`Copy ${s}`,children:t==="idle"?n:t==="ok"?"✓ copied":"✗ err"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/CopyButton.tsx",lineNumber:13,columnNumber:5},this)}function ve({url:s,label:n="image_url"}){const[r,t]=b.useState(!1),[o,i]=b.useState(!1),a=s.startsWith("data:image/")||/^https?:\/\//.test(s),l=s.startsWith("data:image/")?`${s.length.toLocaleString()} chars`:new URL(s,window.location.href).hostname;return a?e.jsxDEV("div",{className:"border border-border bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"mb-1 flex items-center justify-between gap-2",children:[e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3",children:[n,e.jsxDEV("span",{className:"ml-2 text-fg-3",children:["· ",l]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:36,columnNumber:9},this),e.jsxDEV("span",{className:"flex items-center gap-2",children:[e.jsxDEV(k,{value:s,label:"copy url"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:41,columnNumber:11},this),e.jsxDEV("a",{href:s,target:"_blank",rel:"noreferrer",className:"font-mono text-[10px] text-fg-3 hover:text-fg-1",children:"open in tab ↗"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:42,columnNumber:11},this),e.jsxDEV("button",{type:"button",onClick:()=>{t(c=>!c)},className:"font-mono text-[10px] text-fg-3 hover:text-fg-1",children:r?"shrink":"expand"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:40,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:35,columnNumber:7},this),o?e.jsxDEV("div",{className:"font-mono text-[11px] text-[var(--color-sev-error)]",children:"failed to load image"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:62,columnNumber:9},this):e.jsxDEV("img",{src:s,alt:"content image",loading:"lazy",onError:()=>{i(!0)},className:"block max-w-full object-contain "+(r?"max-h-[80vh]":"max-h-[220px]")},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:66,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:34,columnNumber:5},this):e.jsxDEV("div",{className:"border border-border bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"mb-1 font-mono text-[10px] text-fg-3",children:[n," (unsupported scheme)"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:27,columnNumber:9},this),e.jsxDEV("span",{className:"break-all font-mono text-[12px] text-fg-1",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:28,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/ImagePreview.tsx",lineNumber:26,columnNumber:7},this)}function ds({message:s}){const n=s.message.role;return n==="user"?e.jsxDEV(Ns,{m:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:13,columnNumber:31},this):n==="assistant"?e.jsxDEV(xs,{m:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:14,columnNumber:36},this):n==="tool"?e.jsxDEV(vs,{m:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:15,columnNumber:31},this):e.jsxDEV(hs,{m:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:16,columnNumber:10},this)}function z(){return"relative flex max-w-full min-w-0 flex-col border-l-[3px] bg-surface-1 px-3 py-2"}function Ns({m:s}){const r=s.message.origin?.kind,t=r==="system_trigger"||r==="injection"||r==="hook_result";return e.jsxDEV("article",{className:z(),style:{borderLeftColor:"var(--color-user)"},children:[e.jsxDEV("header",{className:"mb-1 flex items-center gap-2",children:[e.jsxDEV(p,{tone:"user",variant:"solid",children:"user"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:31,columnNumber:9},this),e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3 tabular",children:["line ",s.lineNo]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:34,columnNumber:9},this),t?e.jsxDEV(p,{tone:"meta",variant:"outline",children:r},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:36,columnNumber:11},this):null,s.message.isError?e.jsxDEV(p,{tone:"error",variant:"outline",children:"error"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:41,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:30,columnNumber:7},this),e.jsxDEV(K,{parts:s.message.content},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:46,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:29,columnNumber:5},this)}function xs({m:s}){const n=s.message.content.find(i=>i.type==="think"),r=n&&n.type==="think"?n.think:void 0,t=s.message.content.filter(i=>i.type!=="think"),o=s.message.toolCalls;return e.jsxDEV("article",{className:z(),style:{borderLeftColor:"var(--color-assistant)"},children:[e.jsxDEV("header",{className:"mb-1 flex items-center gap-2",children:[e.jsxDEV(p,{tone:"assistant",variant:"solid",children:"assistant"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:59,columnNumber:9},this),e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3 tabular",children:["line ",s.lineNo]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:62,columnNumber:9},this),r?e.jsxDEV(p,{tone:"config",variant:"outline",children:"think"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:64,columnNumber:11},this):null,o.length>0?e.jsxDEV(p,{tone:"tools",variant:"outline",children:[o.length," tool call",o.length>1?"s":""]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:69,columnNumber:11},this):null,s.message.partial?e.jsxDEV(p,{tone:"warning",variant:"outline",children:"partial"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:74,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:58,columnNumber:7},this),r?e.jsxDEV(he,{text:r},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:79,columnNumber:16},this):null,e.jsxDEV(K,{parts:t},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:80,columnNumber:7},this),o.length>0?e.jsxDEV("div",{className:"mt-2 space-y-1",children:o.map(i=>e.jsxDEV(ys,{call:i},i.id,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:84,columnNumber:13},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:82,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:57,columnNumber:5},this)}function vs({m:s}){const[n,r]=b.useState(s.message.isError===!0),t=s.message.content.reduce((i,a)=>a.type==="text"?i+a.text.length:i,0),o=ws(s.message.content);return e.jsxDEV("article",{className:z(),style:{borderLeftColor:"var(--color-tool)"},children:[e.jsxDEV("button",{type:"button",onClick:()=>{r(i=>!i)},className:"flex w-full items-center gap-2 text-left",children:[e.jsxDEV("span",{className:"text-fg-3",children:n?"▾":"▸"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:111,columnNumber:9},this),e.jsxDEV(p,{tone:"tool",variant:"solid",children:"tool"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:112,columnNumber:9},this),s.message.toolCallId?e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-1",children:["call ",s.message.toolCallId.slice(0,12)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:116,columnNumber:11},this):null,e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3 tabular",children:["line ",s.lineNo]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:120,columnNumber:9},this),s.message.isError?e.jsxDEV(p,{tone:"error",variant:"outline",children:"error"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:122,columnNumber:11},this):null,n?null:e.jsxDEV("span",{className:"ml-1 flex min-w-0 flex-1 items-center gap-2 font-mono text-[11px] text-fg-3",children:[e.jsxDEV("span",{className:"truncate",children:o},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:128,columnNumber:13},this),e.jsxDEV("span",{className:"shrink-0 tabular",children:["· ",t.toLocaleString()," chars"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:129,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:127,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:104,columnNumber:7},this),n?e.jsxDEV("div",{className:"mt-2 max-h-[60vh] overflow-auto",children:e.jsxDEV(K,{parts:s.message.content},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:135,columnNumber:11},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:134,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:103,columnNumber:5},this)}function hs({m:s}){return e.jsxDEV("article",{className:z(),style:{borderLeftColor:"var(--color-cat-config)"},children:[e.jsxDEV("header",{className:"mb-1 flex items-center gap-2",children:[e.jsxDEV(p,{tone:"config",variant:"solid",children:"system"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:146,columnNumber:9},this),e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3 tabular",children:["line ",s.lineNo]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:149,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:145,columnNumber:7},this),e.jsxDEV(K,{parts:s.message.content},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:151,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:144,columnNumber:5},this)}function he({text:s}){const[n,r]=b.useState(!1);return e.jsxDEV("div",{className:"mb-2 border border-border bg-surface-0",children:[e.jsxDEV("button",{onClick:()=>{r(t=>!t)},className:"flex w-full items-center gap-2 px-2 py-1 text-left font-mono text-[11px] text-fg-2 hover:text-fg-1",children:[e.jsxDEV("span",{className:"text-fg-3",children:n?"▾":"▸"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:166,columnNumber:9},this),e.jsxDEV("span",{className:"uppercase tracking-[0.08em]",children:"thinking"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:167,columnNumber:9},this),e.jsxDEV("span",{className:"text-fg-3 tabular",children:[s.length,"ch"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:160,columnNumber:7},this),n?e.jsxDEV("pre",{className:"border-t border-border px-2 py-1 whitespace-pre-wrap break-words font-mono text-[12px] text-fg-1",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:171,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:159,columnNumber:5},this)}function ys({call:s}){const[n,r]=b.useState(!1),t=s.arguments??"";return e.jsxDEV("div",{className:"border border-border bg-surface-0",children:[e.jsxDEV("button",{onClick:()=>{r(o=>!o)},className:"flex w-full items-center gap-2 px-2 py-1 text-left font-mono text-[11px] hover:bg-surface-2",children:[e.jsxDEV("span",{className:"text-fg-3",children:n?"▾":"▸"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:190,columnNumber:9},this),e.jsxDEV(p,{tone:"tools",variant:"soft",children:"call"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:191,columnNumber:9},this),e.jsxDEV("span",{className:"text-fg-0",children:s.name},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:194,columnNumber:9},this),e.jsxDEV("span",{className:"truncate text-fg-3",children:ye(t,80)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:195,columnNumber:9},this),e.jsxDEV("span",{className:"ml-auto text-fg-3 tabular text-[10px]",children:s.id.slice(0,10)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:196,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:184,columnNumber:7},this),n?e.jsxDEV("pre",{className:"border-t border-border px-2 py-1 whitespace-pre-wrap break-words font-mono text-[12px] text-fg-1",children:js(t)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:199,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:183,columnNumber:5},this)}function K({parts:s}){return e.jsxDEV("div",{className:"space-y-2",children:s.map((n,r)=>n.type==="text"?e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-[1.55] text-fg-0",children:n.text},r,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:213,columnNumber:13},this):n.type==="think"?e.jsxDEV(he,{text:n.think},r,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:222,columnNumber:18},this):n.type==="image_url"?e.jsxDEV(ve,{url:n.imageUrl.url},r,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:225,columnNumber:18},this):n.type==="audio_url"?e.jsxDEV("div",{className:"font-mono text-[11px] text-fg-2",children:["[audio: ",n.audioUrl.url,"]"]},r,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:229,columnNumber:13},this):n.type==="video_url"?e.jsxDEV("div",{className:"font-mono text-[11px] text-fg-2",children:["[video: ",n.videoUrl.url??"—","]"]},r,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:236,columnNumber:13},this):e.jsxDEV("div",{className:"font-mono text-[11px] text-fg-3",children:["[",n.type,"]"]},r,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:243,columnNumber:11},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/MessageBubble.tsx",lineNumber:209,columnNumber:5},this)}function ye(s,n){return s.length<=n?s:s.slice(0,n)+"…"}function ws(s){for(const n of s){if(n.type==="text"&&n.text.length>0){const r=n.text.split(`
|
|
4
|
+
`,1)[0]??"";return ye(r,100)}if(n.type==="image_url")return"[image]";if(n.type==="audio_url")return"[audio]";if(n.type==="video_url")return"[video]"}return"(empty)"}function js(s){try{return JSON.stringify(JSON.parse(s),null,2)}catch{return s}}function we({sessionId:s,initialAgentId:n="main"}){const[r,t]=b.useState(n);b.useEffect(()=>{t(n)},[s,n]);const{data:o}=q(s),{data:i,isLoading:a,error:l}=bs(s,r),c=o?.agents??[],m=i?.messages??[],d=i?.usage.byScope.session??gs,D=i?.config??{},j=i?.permission.mode??null;return e.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxDEV("div",{className:"flex shrink-0 items-center gap-3 border-b border-border bg-surface-1 px-3 py-2",children:[e.jsxDEV("label",{className:"flex items-center gap-2 font-mono text-[11px] text-fg-2",children:[e.jsxDEV("span",{className:"text-fg-3",children:"agent"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:37,columnNumber:11},this),e.jsxDEV("select",{value:r,onChange:x=>{t(x.target.value)},className:"border border-border bg-surface-0 px-2 py-1 font-mono text-[12px] text-fg-0 focus:border-border-strong focus:outline-none",children:[c.length===0?e.jsxDEV("option",{value:r,children:r},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:45,columnNumber:36},this):null,c.map(x=>e.jsxDEV("option",{value:x.agentId,children:[x.agentId," (",x.type,x.parentAgentId?` ← ${x.parentAgentId}`:"",")"]},x.agentId,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:47,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:36,columnNumber:9},this),e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-2",children:[e.jsxDEV("span",{className:"tabular text-fg-0",children:m.length},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:55,columnNumber:11},this),e.jsxDEV("span",{className:"ml-1 text-fg-3",children:"messages"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:56,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:54,columnNumber:9},this),D.modelAlias?e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-2",children:[e.jsxDEV("span",{className:"text-fg-3",children:"model"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:60,columnNumber:13},this)," ",e.jsxDEV("span",{className:"text-fg-0",children:D.modelAlias},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:59,columnNumber:11},this):null,e.jsxDEV("div",{className:"ml-auto flex items-center gap-2",children:j?e.jsxDEV(p,{tone:"approval",variant:"outline",children:["permission: ",j]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:66,columnNumber:13},this):null},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:64,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:35,columnNumber:7},this),e.jsxDEV(Ds,{usage:d},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:74,columnNumber:7},this),e.jsxDEV("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsxDEV("div",{className:"flex flex-col gap-3 px-3 py-4",children:[D.systemPrompt?e.jsxDEV(Ps,{text:D.systemPrompt},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:79,columnNumber:34},this):null,a?e.jsxDEV("div",{className:"px-3 py-2 font-mono text-[12px] text-fg-3",children:"loading context…"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:81,columnNumber:13},this):l?e.jsxDEV("div",{className:"px-3 py-2 font-mono text-[12px] text-[var(--color-sev-error)]",children:l.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:83,columnNumber:13},this):m.length===0?e.jsxDEV("div",{className:"px-3 py-2 font-mono text-[12px] text-fg-3",children:"no messages — session has only lifecycle/config records so far."},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:87,columnNumber:13},this):m.map(x=>x.source==="compaction_summary"?e.jsxDEV(fs,{message:x},x.lineNo,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:93,columnNumber:24},this):e.jsxDEV(ds,{message:x},x.lineNo,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:95,columnNumber:22},this))]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:78,columnNumber:9},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:77,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:33,columnNumber:5},this)}const gs={inputOther:0,output:0,inputCacheRead:0,inputCacheCreation:0},J={inputCacheRead:"var(--color-sev-success)",inputOther:"var(--color-sev-info)",output:"var(--color-assistant)",inputCacheCreation:"var(--color-sev-warning)"};function Ds({usage:s}){const n=s.inputOther+s.output+s.inputCacheRead+s.inputCacheCreation;if(n===0)return e.jsxDEV("div",{className:"h-[2px] shrink-0 bg-border"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:127,columnNumber:12},this);const r=t=>t/n*100;return e.jsxDEV("div",{className:"flex h-[3px] w-full shrink-0",title:`cache_read ${s.inputCacheRead.toLocaleString()} · input ${s.inputOther.toLocaleString()} · output ${s.output.toLocaleString()} · cache_create ${s.inputCacheCreation.toLocaleString()}`,children:[s.inputCacheRead>0?e.jsxDEV("div",{style:{width:`${r(s.inputCacheRead)}%`,backgroundColor:J.inputCacheRead}},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:141,columnNumber:9},this):null,s.inputOther>0?e.jsxDEV("div",{style:{width:`${r(s.inputOther)}%`,backgroundColor:J.inputOther}},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:149,columnNumber:9},this):null,s.output>0?e.jsxDEV("div",{style:{width:`${r(s.output)}%`,backgroundColor:J.output}},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:154,columnNumber:9},this):null,s.inputCacheCreation>0?e.jsxDEV("div",{style:{width:`${r(s.inputCacheCreation)}%`,backgroundColor:J.inputCacheCreation}},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:157,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:131,columnNumber:5},this)}function Ps({text:s}){const[n,r]=b.useState(!1);return e.jsxDEV("article",{className:"relative flex max-w-full min-w-0 flex-col border-l-[3px] bg-surface-1",style:{borderLeftColor:"var(--color-cat-config)"},children:[e.jsxDEV("button",{type:"button",onClick:()=>{r(t=>!t)},className:"flex w-full items-center justify-between gap-3 px-3 py-2 text-left hover:bg-surface-2",children:[e.jsxDEV("span",{className:"flex items-center gap-2",children:[e.jsxDEV(p,{tone:"config",variant:"solid",children:"system"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:183,columnNumber:11},this),e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3 tabular",children:[s.length.toLocaleString()," chars"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:186,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:182,columnNumber:9},this),e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-1",children:n?"▾ collapse":"▸ show full"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:190,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:175,columnNumber:7},this),e.jsxDEV("div",{className:"relative min-w-0 px-3 pb-2",children:[e.jsxDEV("pre",{className:["min-w-0 whitespace-pre-wrap [overflow-wrap:anywhere] font-mono text-[12.5px] text-fg-0",n?"":"max-h-[9em] overflow-hidden"].join(" "),children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:195,columnNumber:9},this),n?null:e.jsxDEV("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-14",style:{background:"linear-gradient(to bottom, transparent 0%, var(--color-surface-1) 85%)"}},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:204,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:194,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/context/ContextTab.tsx",lineNumber:171,columnNumber:5},this)}function je({tabs:s,defaultTab:n}){const[r,t]=pe(),o=r.get("tab")??n;return e.jsxDEV("div",{className:"flex h-9 shrink-0 items-stretch border-b border-border bg-surface-1",children:s.map(i=>{const a=i.id===o;return e.jsxDEV("button",{onClick:()=>{const l=new URLSearchParams(r);l.set("tab",i.id),t(l,{replace:!0})},className:["relative flex items-center gap-2 px-4 font-mono text-[11px] uppercase tracking-[0.08em] transition-colors",a?"text-fg-0":"text-fg-2 hover:text-fg-1"].join(" "),children:[i.label,i.count!==null&&i.count!==void 0?e.jsxDEV("span",{className:"font-mono text-[10px] text-fg-3 tabular",children:i.count},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/TabBar.tsx",lineNumber:37,columnNumber:15},this):null,a?e.jsxDEV("span",{className:"absolute inset-x-0 bottom-[-1px] h-[2px] bg-[var(--color-cat-conversation)]"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/TabBar.tsx",lineNumber:40,columnNumber:15},this):null]},i.id,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/TabBar.tsx",lineNumber:23,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/layout/TabBar.tsx",lineNumber:19,columnNumber:5},this)}function ge(s){const[n]=pe();return n.get("tab")??s}const ce=200;function B({value:s,defaultOpenDepth:n=2}){return e.jsxDEV("div",{className:"font-mono text-[12px] leading-[1.5]",children:e.jsxDEV(Bs,{value:s,depth:0,defaultOpenDepth:n,keyPath:""},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:18,columnNumber:7},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:17,columnNumber:5},this)}const Bs=b.memo(function s({value:n,depth:r,defaultOpenDepth:t,keyPath:o,keyLabel:i,isLast:a}){const[l,c]=b.useState(r<t);if(n===null)return e.jsxDEV(S,{keyLabel:i,repr:"null",color:"text-fg-3",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:43,columnNumber:12},this);if(n===void 0)return e.jsxDEV(S,{keyLabel:i,repr:"undefined",color:"text-fg-3",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:45,columnNumber:12},this);if(typeof n=="boolean")return e.jsxDEV(S,{keyLabel:i,repr:String(n),color:"text-[var(--color-cat-config)]",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:48,columnNumber:7},this);if(typeof n=="number")return e.jsxDEV(S,{keyLabel:i,repr:String(n),color:"text-[var(--color-sev-info)]",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:57,columnNumber:7},this);if(typeof n=="string")return n.length<=ce?e.jsxDEV(S,{keyLabel:i,repr:JSON.stringify(n),color:"text-[var(--color-cat-ephemeral)]",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:67,columnNumber:9},this):e.jsxDEV("div",{children:[e.jsxDEV("button",{onClick:()=>{c(m=>!m)},className:"flex items-baseline gap-1 text-left hover:text-fg-0",children:[e.jsxDEV("span",{className:"text-fg-3 w-3 shrink-0 inline-block",children:l?"▾":"▸"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:83,columnNumber:11},this),i!==void 0?e.jsxDEV(e.Fragment,{children:[e.jsxDEV("span",{className:"text-fg-1",children:i},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:86,columnNumber:15},this),e.jsxDEV("span",{className:"text-fg-3",children:":"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:87,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:85,columnNumber:13},this):null,e.jsxDEV("span",{className:"truncate text-[var(--color-cat-ephemeral)]",children:`"${n.slice(0,ce)}…"`},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:90,columnNumber:11},this),e.jsxDEV("span",{className:"text-fg-3 shrink-0",children:["(",n.length.toLocaleString()," chars)"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:93,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:77,columnNumber:9},this),l?e.jsxDEV("div",{className:"ml-[5px] my-1 border-l border-border pl-3",children:e.jsxDEV("div",{className:"relative border border-border bg-surface-0",children:[e.jsxDEV("div",{className:"absolute top-1 right-1 z-10",children:e.jsxDEV(k,{value:n,className:"border border-border bg-surface-1 px-1.5 py-0.5"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:99,columnNumber:17},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:98,columnNumber:15},this),e.jsxDEV("pre",{className:"max-h-[60vh] overflow-auto whitespace-pre-wrap break-words p-2 pr-16 font-mono text-[12px] leading-[1.55] text-fg-0",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:104,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:97,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:96,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:76,columnNumber:7},this);if(Array.isArray(n))return n.length===0?e.jsxDEV(S,{keyLabel:i,repr:"[]",color:"text-fg-3",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:115,columnNumber:14},this):e.jsxDEV("div",{children:[e.jsxDEV("button",{onClick:()=>{c(m=>!m)},className:"flex items-baseline gap-1 text-left hover:text-fg-0",children:[e.jsxDEV("span",{className:"text-fg-3 w-3 shrink-0 inline-block",children:l?"▾":"▸"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:124,columnNumber:11},this),i!==void 0?e.jsxDEV("span",{className:"text-fg-1",children:i},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:125,columnNumber:37},this):null,i!==void 0?e.jsxDEV("span",{className:"text-fg-3",children:":"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:126,columnNumber:37},this):null,e.jsxDEV("span",{className:"text-fg-3",children:["[",n.length,"]"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:127,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:118,columnNumber:9},this),l?e.jsxDEV("div",{className:"border-l border-border ml-[5px] pl-3",children:n.map((m,d)=>e.jsxDEV(s,{value:m,depth:r+1,defaultOpenDepth:t,keyPath:`${o}[${d}]`,keyLabel:d,isLast:d===n.length-1},d,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:132,columnNumber:15},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:130,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:117,columnNumber:7},this);if(typeof n=="object"){const m=Object.entries(n);return m.length===0?e.jsxDEV(S,{keyLabel:i,repr:"{}",color:"text-fg-3",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:150,columnNumber:14},this):e.jsxDEV("div",{children:[e.jsxDEV("button",{onClick:()=>{c(d=>!d)},className:"flex items-baseline gap-1 text-left hover:text-fg-0",children:[e.jsxDEV("span",{className:"text-fg-3 w-3 shrink-0 inline-block",children:l?"▾":"▸"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:159,columnNumber:11},this),i!==void 0?e.jsxDEV("span",{className:"text-fg-1",children:i},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:160,columnNumber:37},this):null,i!==void 0?e.jsxDEV("span",{className:"text-fg-3",children:":"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:161,columnNumber:37},this):null,e.jsxDEV("span",{className:"text-fg-3",children:["{",m.length,"}"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:162,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:153,columnNumber:9},this),l?e.jsxDEV("div",{className:"border-l border-border ml-[5px] pl-3",children:m.map(([d,D],j)=>e.jsxDEV(s,{value:D,depth:r+1,defaultOpenDepth:t,keyPath:`${o}.${d}`,keyLabel:d,isLast:j===m.length-1},d,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:171,columnNumber:15},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:169,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:152,columnNumber:7},this)}return e.jsxDEV(S,{keyLabel:i,repr:typeof n,color:"text-fg-3",isLast:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:186,columnNumber:10},this)});function S({keyLabel:s,repr:n,color:r}){return e.jsxDEV("div",{className:"flex items-baseline gap-1",children:[e.jsxDEV("span",{className:"w-3 shrink-0"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:201,columnNumber:7},this),s!==void 0?e.jsxDEV(e.Fragment,{children:[e.jsxDEV("span",{className:"text-fg-1",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:204,columnNumber:11},this),e.jsxDEV("span",{className:"text-fg-3",children:":"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:205,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:203,columnNumber:9},this):null,e.jsxDEV("span",{className:r,children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:208,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/JsonViewer.tsx",lineNumber:200,columnNumber:5},this)}function Es({state:s}){const n=b.useMemo(()=>s??{},[s]),r=be(n.createdAt),t=be(n.updatedAt),o=n.agents!==void 0?Object.keys(n.agents):[],i=n.custom?.imported_from_byf_cli===!0;return e.jsxDEV("div",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:[e.jsxDEV("div",{className:"flex items-center justify-between",children:[e.jsxDEV("div",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-fg-3",children:"state.json"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:41,columnNumber:9},this),e.jsxDEV(k,{value:JSON.stringify(n,null,2),label:"copy json"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:44,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:40,columnNumber:7},this),i?e.jsxDEV("div",{className:"mt-3 border border-[var(--color-sev-warning)] bg-[color-mix(in_oklab,var(--color-sev-warning)_10%,transparent)] px-3 py-2 font-mono text-[11px] text-[var(--color-sev-warning)]",children:["warning · this session is marked",e.jsxDEV("code",{className:"mx-1 px-1 bg-surface-0",children:"imported_from_byf_cli"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:50,columnNumber:11},this),"and would normally be filtered out of the list."]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:48,columnNumber:9},this):null,e.jsxDEV("div",{className:"mt-3 grid grid-cols-1 gap-2 md:grid-cols-2",children:[e.jsxDEV(T,{label:"title",children:[n.title!==void 0&&n.title!==""?e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-0",children:['"',n.title,'"']},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:59,columnNumber:13},this):e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-3",children:"(none)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:61,columnNumber:13},this),n.isCustomTitle===!0?e.jsxDEV(p,{tone:"config",variant:"outline",children:"custom"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:64,columnNumber:13},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:57,columnNumber:9},this),e.jsxDEV(T,{label:"forkedFrom",children:n.forkedFrom!==void 0&&n.forkedFrom!==""?e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-0 break-all",children:n.forkedFrom},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:72,columnNumber:13},this):e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-3",children:"(none)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:74,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:70,columnNumber:9},this),e.jsxDEV(T,{label:"createdAt",children:e.jsxDEV(me,{ms:r,raw:n.createdAt},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:79,columnNumber:11},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:78,columnNumber:9},this),e.jsxDEV(T,{label:"updatedAt",children:e.jsxDEV(me,{ms:t,raw:n.updatedAt},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:83,columnNumber:11},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:82,columnNumber:9},this),e.jsxDEV(T,{label:"lastPrompt",children:n.lastPrompt!==void 0&&n.lastPrompt!==""?e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-0 line-clamp-3",title:n.lastPrompt,children:n.lastPrompt},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:88,columnNumber:13},this):e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-3",children:"(none)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:92,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:86,columnNumber:9},this),e.jsxDEV(T,{label:`agents (${o.length})`,children:o.length===0?e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-3",children:"(none)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:98,columnNumber:13},this):e.jsxDEV("span",{className:"flex flex-wrap items-center gap-1",children:o.map(a=>e.jsxDEV("span",{className:"border border-border bg-surface-1 px-1.5 py-0.5 font-mono text-[11px] text-fg-1",children:a},a,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:102,columnNumber:17},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:100,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:96,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:56,columnNumber:7},this),e.jsxDEV("section",{className:"mt-6",children:[e.jsxDEV("h3",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-fg-3",children:"custom"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:116,columnNumber:9},this),e.jsxDEV("div",{className:"mt-2 border border-border bg-surface-0 p-3",children:n.custom===void 0||Object.keys(n.custom).length===0?e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-3",children:"(empty)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:119,columnNumber:13},this):e.jsxDEV(B,{value:n.custom,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:121,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:117,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:115,columnNumber:7},this),e.jsxDEV("section",{className:"mt-6",children:[e.jsxDEV("h3",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-fg-3",children:"raw state.json"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:128,columnNumber:9},this),e.jsxDEV("div",{className:"mt-2 border border-border bg-surface-0 p-3",children:e.jsxDEV(B,{value:n,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:132,columnNumber:11},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:131,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:127,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:39,columnNumber:5},this)}function T({label:s,children:n}){return e.jsxDEV("div",{className:"border border-border bg-surface-0 px-3 py-2",children:[e.jsxDEV("div",{className:"font-mono text-[10px] uppercase tracking-[0.1em] text-fg-3",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:142,columnNumber:7},this),e.jsxDEV("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:143,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:141,columnNumber:5},this)}function me({ms:s,raw:n}){return s===null?n!==void 0&&n!==""?e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-3 break-all",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:151,columnNumber:7},this):e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-3",children:"(none)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:153,columnNumber:7},this):e.jsxDEV("span",{className:"flex flex-wrap items-center gap-2",children:[e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-0 tabular",children:xe(s)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:158,columnNumber:7},this),e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-3",children:["(",se(s),")"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:159,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/state/StateTab.tsx",lineNumber:157,columnNumber:5},this)}function be(s){if(s===void 0||s==="")return null;const n=Date.parse(s);return Number.isFinite(n)?n:null}function Vs(s,n=!0){return M({queryKey:["session",s,"agents"],queryFn:()=>C.getAgentTree(s),enabled:!!s&&n})}const Fs={main:"conversation",sub:"subagent",independent:"tools"};function De({node:s,sessionId:n}){const{agentId:r}=A(),t=r===s.agentId,o=!s.wireExists;return e.jsxDEV("div",{className:"my-1",children:[e.jsxDEV(_,{to:`/sessions/${n}/agents/${s.agentId}`,className:["relative flex items-start gap-3 border border-border bg-surface-0 px-3 py-2 transition-colors hover:bg-surface-1",t?"border-[var(--color-cat-subagent)]":""].join(" "),children:e.jsxDEV("div",{className:"min-w-0 flex-1",children:[e.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxDEV(p,{tone:Fs[s.type],variant:"soft",children:s.type},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:33,columnNumber:13},this),e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-0",children:s.agentId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:36,columnNumber:13},this),s.parentAgentId!==null?e.jsxDEV("span",{className:"font-mono text-[10.5px] text-fg-3",children:["← ",s.parentAgentId]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:38,columnNumber:15},this):null,o?e.jsxDEV(p,{tone:"warning",variant:"outline",children:"no wire"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:41,columnNumber:15},this):null,e.jsxDEV("span",{className:"ml-auto font-mono text-[10.5px] text-fg-3 tabular",children:[s.wireRecordCount," rec",s.wireRecordCount===1?"":"s",s.wireProtocolVersion!==null?` · v${s.wireProtocolVersion}`:""]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:45,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:32,columnNumber:11},this),e.jsxDEV("div",{className:"mt-1 truncate font-mono text-[10.5px] text-fg-3",title:s.homedir,children:s.homedir},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:31,columnNumber:9},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:24,columnNumber:7},this),s.children.length>0?e.jsxDEV("div",{className:"mt-1 border-l border-border pl-3 ml-3",children:s.children.map(i=>e.jsxDEV(De,{node:i,sessionId:n},i.agentId,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:58,columnNumber:13},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:56,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentNode.tsx",lineNumber:23,columnNumber:5},this)}function Us({tree:s,sessionId:n}){return s.length===0?e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-fg-3",children:"no agents found in state.json"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentTree.tsx",lineNumber:11,columnNumber:12},this):e.jsxDEV("div",{className:"p-3",children:s.map(r=>e.jsxDEV(De,{node:r,sessionId:n},r.agentId,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentTree.tsx",lineNumber:16,columnNumber:9},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentTree.tsx",lineNumber:14,columnNumber:5},this)}function Ss({sessionId:s}){const{data:n,isLoading:r,error:t}=Vs(s);return r?e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-fg-3",children:"loading agents…"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentsTab.tsx",lineNumber:12,columnNumber:12},this):t?e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-[var(--color-sev-error)]",children:t.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentsTab.tsx",lineNumber:16,columnNumber:7},this):n?e.jsxDEV("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsxDEV(Us,{tree:n.tree,sessionId:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentsTab.tsx",lineNumber:23,columnNumber:7},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/subagents/SubagentsTab.tsx",lineNumber:22,columnNumber:5},this):null}function ks(s,n,r=!0){return M({queryKey:["session",s,"wire",n],queryFn:()=>C.getWire(s,n),enabled:!!s&&!!n&&r})}const ue={error:0,warning:1,info:2};function Cs(s,n){const r=[],t=new Map,o=new Map;let i=null;for(const a of s){const l=a.data,c=a.lineNo;switch(l.type){case"context.append_loop_event":{const m=l.event;m.type==="tool.call"?t.set(m.toolCallId,{lineNo:c,name:m.name}):m.type==="tool.result"?t.get(m.toolCallId)!==void 0?t.delete(m.toolCallId):r.push({severity:"warning",kind:"missing_tool_result",lineNo:c,summary:`orphan tool.result for #${m.toolCallId.slice(-8)}`,detail:"no preceding tool.call seen"}):m.type==="step.begin"?o.set(m.uuid,{lineNo:c,step:m.step,turnId:m.turnId}):m.type==="step.end"&&o.delete(m.uuid);break}case"full_compaction.begin":i={lineNo:c,source:l.source};break;case"full_compaction.complete":case"full_compaction.cancel":i=null;break;case"permission.record_approval_result":l.result.decision==="rejected"&&r.push({severity:"info",kind:"rejected_approval",lineNo:c,summary:`${l.toolName}#${l.toolCallId.slice(-8)} rejected`,detail:l.result.feedback});break}}for(const[a,l]of t)r.push({severity:"warning",kind:"orphan_tool_call",lineNo:l.lineNo,summary:`${l.name}#${a.slice(-8)} has no tool.result`,detail:"tool.call recorded but no matching tool.result found"});for(const[a,l]of o)r.push({severity:"warning",kind:"incomplete_step",lineNo:l.lineNo,summary:`step ${l.step} (turn ${l.turnId}) has no step.end`,detail:`uuid ${a.slice(-8)}`});i!==null&&r.push({severity:"warning",kind:"incomplete_compaction",lineNo:i.lineNo,summary:`${i.source} compaction never completed`});for(const a of n)r.push({severity:"info",kind:"wire_warning",lineNo:null,summary:Rs(a)});return r.sort((a,l)=>{const c=ue[a.severity]-ue[l.severity];if(c!==0)return c;const m=a.lineNo??Number.POSITIVE_INFINITY,d=l.lineNo??Number.POSITIVE_INFINITY;return m-d}),r}function Ws(s){if(s.length===0)return null;for(const n of s)if(n.severity==="error")return"error";for(const n of s)if(n.severity==="warning")return"warning";return"info"}function Rs(s){const n=s.trim(),r=n.indexOf(`
|
|
5
|
+
`),t=r===-1?n:n.slice(0,r);return t.length>120?t.slice(0,120)+"…":t}const Ts={error:"var(--color-sev-error)",warning:"var(--color-sev-warning)",info:"var(--color-sev-info)"},_s={orphan_tool_call:"orphan tool.call",missing_tool_result:"missing tool.result",incomplete_step:"incomplete step",incomplete_compaction:"incomplete compaction",rejected_approval:"approval rejected",wire_warning:"wire warning"};function Is({issues:s,onClose:n,onJumpTo:r,isLineVisible:t}){return b.useEffect(()=>{const o=i=>{i.key==="Escape"&&n()};return window.addEventListener("keydown",o),()=>{window.removeEventListener("keydown",o)}},[n]),e.jsxDEV(e.Fragment,{children:[e.jsxDEV("button",{type:"button","aria-label":"close issues",onClick:n,className:"absolute inset-0 z-10 bg-black/20"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:44,columnNumber:7},this),e.jsxDEV("aside",{className:"absolute right-0 top-0 bottom-0 z-20 flex w-[360px] flex-col border-l border-border bg-surface-1 shadow-[-8px_0_32px_rgba(0,0,0,0.25)]",role:"dialog","aria-label":"issues",children:[e.jsxDEV("header",{className:"flex shrink-0 items-center justify-between border-b border-border px-3 py-2 font-mono text-[12px] text-fg-0",children:[e.jsxDEV("span",{children:["Issues ",e.jsxDEV("span",{className:"text-fg-3",children:"·"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:57,columnNumber:20},this)," ",e.jsxDEV("span",{className:"tabular text-fg-2",children:s.length},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:58,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:56,columnNumber:11},this),e.jsxDEV("button",{type:"button",onClick:n,className:"font-mono text-[14px] text-fg-3 hover:text-fg-0",title:"close (ESC)",children:"×"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:60,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:55,columnNumber:9},this),e.jsxDEV("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s.length===0?e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-fg-3",children:"no issues detected"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:71,columnNumber:13},this):e.jsxDEV("ul",{className:"divide-y divide-border",children:s.map((o,i)=>e.jsxDEV($s,{issue:o,onJumpTo:r,onClose:n,isLineVisible:t},`${o.kind}-${o.lineNo??"w"}-${i}`,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:75,columnNumber:17},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:73,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:50,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:43,columnNumber:5},this)}function $s({issue:s,onJumpTo:n,onClose:r,isLineVisible:t}){const o=Ts[s.severity],i=s.lineNo,a=i!==null&&t!==void 0&&!t(i),l=i!==null&&n!==void 0&&!a;return e.jsxDEV("li",{className:"px-3 py-2 hover:bg-surface-2",children:[e.jsxDEV("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[e.jsxDEV("span",{className:"inline-block h-[8px] w-[8px] shrink-0 rounded-full",style:{backgroundColor:o},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:109,columnNumber:9},this),e.jsxDEV("span",{className:"text-fg-1",children:_s[s.kind]},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:114,columnNumber:9},this),i!==null?e.jsxDEV(e.Fragment,{children:[e.jsxDEV("span",{className:"text-fg-3",children:"·"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:117,columnNumber:13},this),e.jsxDEV("span",{className:"tabular text-fg-3",children:["line ",i]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:118,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:116,columnNumber:11},this):null,a?e.jsxDEV("span",{className:"text-fg-3",children:"(filtered out)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:121,columnNumber:19},this):null,i!==null?e.jsxDEV("button",{type:"button",disabled:!l,onClick:()=>{l&&n?.(i),r()},className:"ml-auto text-fg-3 hover:text-fg-0 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:text-fg-3",title:a?"record is filtered out":"scroll to + expand",children:"jump →"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:123,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:108,columnNumber:7},this),e.jsxDEV("div",{className:"mt-1 break-words font-mono text-[12px] text-fg-0",children:s.summary},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:137,columnNumber:7},this),s.detail!==void 0?e.jsxDEV("div",{className:"mt-0.5 break-words font-mono text-[10.5px] text-fg-3",children:s.detail},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:139,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/IssuesDrawer.tsx",lineNumber:107,columnNumber:5},this)}const As={metadata:"meta","config.update":"config","turn.prompt":"turn","turn.steer":"turn","turn.cancel":"warning","context.append_message":"assistant","context.append_loop_event":"meta","context.mark_last_user_prompt_blocked":"warning","context.observation_masking":"warning","context.output_offloaded":"meta","context.pruning":"warning","context.clear":"warning","context.apply_compaction":"compaction","tools.register_user_tool":"tools","tools.unregister_user_tool":"tools","tools.set_active_tools":"tools","tools.update_store":"meta","permission.set_mode":"approval","permission.record_approval_result":"approval","usage.record":"meta","full_compaction.begin":"compaction","full_compaction.cancel":"warning","full_compaction.complete":"success","background.stop":"warning"},Ms={metadata:"meta","config.update":"config","turn.prompt":"prompt","turn.steer":"steer","turn.cancel":"cancel","context.append_message":"message","context.append_loop_event":"loop","context.mark_last_user_prompt_blocked":"blocked","context.observation_masking":"mask","context.output_offloaded":"offload","context.pruning":"pruned","context.clear":"clear","context.apply_compaction":"compacted","tools.register_user_tool":"tool+","tools.unregister_user_tool":"tool-","tools.set_active_tools":"tools","tools.update_store":"store","permission.set_mode":"perm","permission.record_approval_result":"approval","usage.record":"usage","full_compaction.begin":"compact↻","full_compaction.cancel":"compact×","full_compaction.complete":"compact✓","background.stop":"bg-stop"};function Ls({type:s}){const n=Ms[s]??s,r=As[s]??"neutral";return e.jsxDEV(p,{tone:r,variant:"soft",title:s,children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/TypeBadge.tsx",lineNumber:15,columnNumber:5},this)}function Pe({label:s="payload",sizeBytes:n,preview:r,children:t,defaultOpen:o=!1}){const[i,a]=b.useState(o),l=Be(n);return e.jsxDEV("div",{className:"my-1 border border-border bg-surface-0",children:[e.jsxDEV("button",{onClick:()=>{a(c=>!c)},className:"flex w-full items-center justify-between gap-2 px-2 py-1 font-mono text-[11px] text-fg-2 hover:bg-surface-2 hover:text-fg-1",children:[e.jsxDEV("span",{className:"flex items-center gap-2",children:[e.jsxDEV("span",{className:"text-fg-3",children:i?"▾":"▸"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:33,columnNumber:11},this),e.jsxDEV("span",{className:"uppercase tracking-[0.08em]",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:34,columnNumber:11},this),e.jsxDEV("span",{className:"text-fg-3 tabular",children:l},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:35,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:32,columnNumber:9},this),!i&&r?e.jsxDEV("span",{className:"truncate text-fg-3 font-mono text-[11px]",children:[r.slice(0,120),r.length>120?"…":""]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:38,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:26,columnNumber:7},this),i?e.jsxDEV("div",{className:"border-t border-border px-2 py-1 font-mono text-[12px]",children:t},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:45,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/shared/SizePreview.tsx",lineNumber:25,columnNumber:5},this)}function Be(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function Z(s,n){let r;if(s==null)r="";else if(typeof s=="string")r=s;else if(typeof s=="number"||typeof s=="boolean"||typeof s=="bigint")r=String(s);else try{r=JSON.stringify(s)}catch{return"[unserializable]"}return r.length<=n?r:r.slice(0,n)+"…"}function Os(s){for(const n of s)if(n.type==="text"&&typeof n.text=="string")return n.text;return"(non-text)"}function Hs(s){switch(s.type){case"step.begin":return`step ${s.step} (turn ${s.turnId})`;case"step.end":return`step ${s.step} → ${s.finishReason??"?"}`;case"content.part":{const n=s.part.type==="text"?s.part.text.length:s.part.type==="think"?s.part.think.length:0;return`${s.part.type}${n?` (${n}b)`:""}`}case"tool.call":return`${s.name}#${s.toolCallId.slice(-8)}`;case"tool.result":return`result#${s.toolCallId.slice(-8)}${s.result.isError===!0?" (error)":""}`;default:return s.type??"unknown"}}function Js(s){switch(s.type){case"metadata":return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(P,{children:["protocol v",s.protocol_version]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:74,columnNumber:13},this),e.jsxDEV(y,{children:"·"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:75,columnNumber:13},this),e.jsxDEV(P,{children:["created ",new Date(s.created_at).toLocaleString()]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:76,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:73,columnNumber:11},this)};case"config.update":{const n=[];return s.profileName!==void 0&&n.push(`profile=${s.profileName}`),s.modelAlias!==void 0&&n.push(`model=${s.modelAlias}`),s.cwd!==void 0&&n.push(`cwd=${s.cwd}`),s.thinkingLevel!==void 0&&n.push(`thinking=${s.thinkingLevel}`),s.systemPrompt!==void 0&&n.push(`system(${s.systemPrompt.length}b)`),{main:e.jsxDEV("span",{className:"truncate text-fg-0",children:n.length===0?e.jsxDEV(y,{children:"(no fields)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:91,columnNumber:35},this):n.join(" · ")},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:90,columnNumber:11},this)}}case"turn.prompt":case"turn.steer":{const n=Os(s.input);return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(p,{tone:"turn",variant:"soft",children:s.origin.kind},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:103,columnNumber:13},this),e.jsxDEV("span",{className:"truncate text-fg-1",children:["→ ",Z(n,80)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:106,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:102,columnNumber:11},this)}}case"turn.cancel":return{main:e.jsxDEV(P,{children:s.turnId!==void 0?`turn ${s.turnId}`:"(latest)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:114,columnNumber:15},this)};case"context.append_message":{const n=s.message,r=n.toolCalls.length>0?`${n.toolCalls.length} tool_call(s)`:"";return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(p,{tone:n.role==="user"?"user":n.role==="assistant"?"assistant":n.role==="tool"?"tool":"meta",variant:"soft",children:n.role},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:123,columnNumber:13},this),e.jsxDEV(y,{children:["(",n.content.length," part",n.content.length===1?"":"s",")"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:137,columnNumber:13},this),r?e.jsxDEV(y,{children:["· ",r]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:140,columnNumber:19},this):null,n.origin?.kind?e.jsxDEV(y,{children:["· origin=",n.origin.kind]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:141,columnNumber:31},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:122,columnNumber:11},this),right:n.isError===!0?e.jsxDEV(p,{tone:"error",variant:"solid",children:"error"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:146,columnNumber:13},this):void 0}}case"context.append_loop_event":return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(P,{children:s.event.type},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:157,columnNumber:13},this),e.jsxDEV(y,{className:"truncate",children:Hs(s.event)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:158,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:156,columnNumber:11},this)};case"context.mark_last_user_prompt_blocked":return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(p,{tone:"warning",variant:"soft",children:"blocked"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:167,columnNumber:13},this),e.jsxDEV(y,{children:["hook: ",s.hookEvent]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:170,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:166,columnNumber:11},this)};case"context.clear":return{main:e.jsxDEV(y,{children:"context cleared"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:176,columnNumber:22},this)};case"context.apply_compaction":return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(p,{tone:"compaction",variant:"soft",children:"compacted"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:182,columnNumber:13},this),e.jsxDEV(y,{children:["summary ",s.summary.length,"b · ",s.tokensBefore,"→",s.tokensAfter," tok ·"," ",s.compactedCount," msgs"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:185,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:181,columnNumber:11},this)};case"tools.set_active_tools":{const n=s.names.slice(0,3).join(", "),r=s.names.length>3?` +${s.names.length-3} more`:"";return{main:e.jsxDEV(P,{className:"truncate",children:[n,r]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:198,columnNumber:11},this),right:e.jsxDEV(y,{children:[s.names.length," tools"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:203,columnNumber:16},this)}}case"tools.register_user_tool":return{main:e.jsxDEV("span",{className:"flex items-center gap-2",children:e.jsxDEV(P,{className:"text-[var(--color-cat-tools)]",children:["+ ",s.name]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:211,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:210,columnNumber:11},this)};case"tools.unregister_user_tool":return{main:e.jsxDEV("span",{className:"flex items-center gap-2",children:e.jsxDEV(P,{className:"text-[var(--color-sev-warning)]",children:["- ",s.name]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:220,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:219,columnNumber:11},this)};case"tools.update_store":{const n=typeof s.value=="object"&&s.value!==null?"(object)":Z(String(s.value),60);return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(P,{children:s.key},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:233,columnNumber:13},this),e.jsxDEV(y,{children:["= ",n]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:234,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:232,columnNumber:11},this)}}case"permission.set_mode":return{main:e.jsxDEV("span",{className:"flex items-center gap-2",children:[e.jsxDEV(y,{children:"mode →"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:244,columnNumber:13},this),e.jsxDEV(p,{tone:"approval",variant:"soft",children:s.mode},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:245,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:243,columnNumber:11},this)};case"permission.record_approval_result":{const n=s.result.decision==="approved"?"success":s.result.decision==="rejected"?"error":"neutral";return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(P,{children:[s.toolName,"#",s.toolCallId.slice(-8)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:262,columnNumber:13},this),e.jsxDEV(p,{tone:n,variant:"soft",children:s.result.decision},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:265,columnNumber:13},this),s.result.scope?e.jsxDEV(y,{children:["(",s.result.scope,")"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:268,columnNumber:31},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:261,columnNumber:11},this)}}case"usage.record":return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(P,{children:s.model},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:278,columnNumber:13},this),e.jsxDEV(y,{children:["in ",s.usage.inputOther," / out ",s.usage.output," / cache r",s.usage.inputCacheRead," w",s.usage.inputCacheCreation]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:279,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:277,columnNumber:11},this),right:s.usageScope?e.jsxDEV(p,{tone:"meta",variant:"outline",children:s.usageScope},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:286,columnNumber:11},this):void 0};case"full_compaction.begin":return{main:e.jsxDEV("span",{className:"flex items-center gap-2 min-w-0",children:[e.jsxDEV(p,{tone:"compaction",variant:"soft",children:s.source},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:296,columnNumber:13},this),s.instruction?e.jsxDEV(y,{className:"truncate",children:['"',Z(s.instruction,40),'"']},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:299,columnNumber:30},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:295,columnNumber:11},this)};case"full_compaction.cancel":return{main:e.jsxDEV(y,{children:"cancelled"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:305,columnNumber:22},this)};case"full_compaction.complete":return{main:e.jsxDEV("span",{className:"flex items-center gap-2",children:[e.jsxDEV(y,{children:[s.compactedCount," msgs · ",s.tokensBefore,"→",s.tokensAfter," tok"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:311,columnNumber:13},this),e.jsxDEV(y,{children:["· summary ",Be(s.summary.length)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:314,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:310,columnNumber:11},this)};case"background.stop":return{main:e.jsxDEV("span",{className:"flex items-center gap-2",children:[e.jsxDEV(P,{children:"task"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:323,columnNumber:13},this),e.jsxDEV(P,{children:s.taskId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:324,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:322,columnNumber:11},this)}}return{main:e.jsxDEV(y,{children:["(unknown record type: ",s.type,")"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:334,columnNumber:11},this)}}function P({children:s,className:n=""}){return e.jsxDEV("span",{className:`font-mono text-[12px] text-fg-0 ${n}`,children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:340,columnNumber:10},this)}function y({children:s,className:n=""}){return e.jsxDEV("span",{className:`font-mono text-[11px] text-fg-3 ${n}`,children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireHeadline.tsx",lineNumber:344,columnNumber:10},this)}function qs({entry:s}){const[n,r]=b.useState("none"),t=!zs(s.raw,s.data);return e.jsxDEV("div",{className:"pl-[120px] pr-2 py-1 font-mono text-[12px]",children:[Ks(s.data),e.jsxDEV("div",{className:"mt-2 flex items-center justify-end gap-3",children:[e.jsxDEV(k,{value:JSON.stringify(s.raw,null,2),label:"copy raw"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:35,columnNumber:9},this),t?e.jsxDEV(k,{value:JSON.stringify(s.data,null,2),label:"copy projected"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:37,columnNumber:11},this):null,e.jsxDEV("button",{onClick:()=>{r(o=>o==="raw"?"none":"raw")},className:`font-mono text-[10px] ${n==="raw"?"text-fg-0":"text-fg-3 hover:text-fg-1"}`,title:"What this line looks like on disk (no vis-side transforms)",children:n==="raw"?"[ hide raw ]":"[ {…} raw ]"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:39,columnNumber:9},this),t?e.jsxDEV("button",{onClick:()=>{r(o=>o==="projected"?"none":"projected")},className:`font-mono text-[10px] ${n==="projected"?"text-fg-0":"text-fg-3 hover:text-fg-1"}`,title:"Same line after vis applied the agent-core migration chain",children:n==="projected"?"[ hide projected ]":"[ {…} projected ]"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:51,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:34,columnNumber:7},this),n!=="none"?e.jsxDEV("div",{className:"mt-2 border border-border bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"mb-1 font-mono text-[10px] uppercase tracking-[0.08em] text-fg-3",children:[n==="raw"?"as written on disk":"after vis migration",t&&n==="raw"?e.jsxDEV("span",{className:"ml-2 text-[var(--color-sev-warning)]",children:"— differs from projected"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:69,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:66,columnNumber:11},this),e.jsxDEV(B,{value:n==="raw"?s.raw:s.data,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:72,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:65,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:32,columnNumber:5},this)}function zs(s,n){try{return JSON.stringify(s)===JSON.stringify(n)}catch{return!1}}function Ks(s){switch(s.type){case"context.append_message":return e.jsxDEV(Ys,{message:s.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:91,columnNumber:14},this);case"context.append_loop_event":return e.jsxDEV(Gs,{event:s.event},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:93,columnNumber:14},this);case"turn.prompt":case"turn.steer":return e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV("div",{className:"grid grid-cols-[140px_1fr] gap-x-3 gap-y-[2px]",children:e.jsxDEV(w,{label:"origin",wide:!0,children:e.jsxDEV(B,{value:s.origin,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:100,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:99,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:98,columnNumber:11},this),e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-1 text-fg-2",children:["input (",s.input.length," part",s.input.length===1?"":"s",")"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:104,columnNumber:13},this),e.jsxDEV("div",{className:"space-y-1",children:s.input.map((n,r)=>e.jsxDEV(ne,{part:n},r,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:109,columnNumber:17},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:107,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:103,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:97,columnNumber:9},this);case"context.apply_compaction":case"full_compaction.complete":return e.jsxDEV("div",{className:"grid grid-cols-[140px_1fr] gap-x-3 gap-y-[2px]",children:[e.jsxDEV(w,{label:"summary",wide:!0,children:e.jsxDEV(Pe,{label:"summary",sizeBytes:s.summary.length,preview:s.summary,children:e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words text-fg-1",children:s.summary},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:121,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:120,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:119,columnNumber:11},this),e.jsxDEV(w,{label:"compactedCount",children:e.jsxDEV("span",{className:"text-[var(--color-sev-info)]",children:s.compactedCount},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:125,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:124,columnNumber:11},this),e.jsxDEV(w,{label:"tokensBefore",children:e.jsxDEV("span",{className:"text-[var(--color-sev-info)]",children:s.tokensBefore},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:128,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:127,columnNumber:11},this),e.jsxDEV(w,{label:"tokensAfter",children:e.jsxDEV("span",{className:"text-[var(--color-sev-info)]",children:s.tokensAfter},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:131,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:130,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:118,columnNumber:9},this);default:return e.jsxDEV(B,{value:s,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:136,columnNumber:14},this)}}function Ys({message:s}){return e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV("div",{className:"grid grid-cols-[140px_1fr] gap-x-3 gap-y-[2px]",children:[e.jsxDEV(w,{label:"role",children:e.jsxDEV("span",{className:"text-[var(--color-cat-ephemeral)]",children:['"',s.role,'"']},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:144,columnNumber:11},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:143,columnNumber:9},this),s.toolCallId?e.jsxDEV(w,{label:"toolCallId",children:e.jsxDEV(V,{children:s.toolCallId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:148,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:147,columnNumber:11},this):null,s.origin?e.jsxDEV(w,{label:"origin",wide:!0,children:e.jsxDEV(B,{value:s.origin,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:153,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:152,columnNumber:11},this):null,s.isError===!0?e.jsxDEV(w,{label:"isError",children:e.jsxDEV("span",{className:"text-[var(--color-sev-error)]",children:"true"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:158,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:157,columnNumber:11},this):null,s.partial===!0?e.jsxDEV(w,{label:"partial",children:e.jsxDEV("span",{className:"text-[var(--color-sev-warning)]",children:"true"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:163,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:162,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:142,columnNumber:7},this),s.content.length>0?e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-1 text-fg-2",children:["content (",s.content.length," part",s.content.length===1?"":"s",")"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:170,columnNumber:11},this),e.jsxDEV("div",{className:"space-y-1",children:s.content.map((n,r)=>e.jsxDEV(ne,{part:n},r,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:175,columnNumber:15},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:173,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:169,columnNumber:9},this):null,s.toolCalls.length>0?e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-1 text-fg-2",children:["toolCalls (",s.toolCalls.length,")"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:183,columnNumber:11},this),e.jsxDEV("div",{className:"space-y-1",children:s.toolCalls.map(n=>e.jsxDEV(Qs,{call:n},n.id,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:186,columnNumber:15},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:184,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:182,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:141,columnNumber:5},this)}function ne({part:s}){switch(s.type){case"text":return e.jsxDEV("div",{className:"border border-border bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"mb-1 text-fg-3",children:["text · ",s.text.length,"b"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:200,columnNumber:11},this),e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words text-fg-1",children:s.text},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:201,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:199,columnNumber:9},this);case"think":return e.jsxDEV("div",{className:"border border-[var(--color-cat-config)]/40 bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"mb-1 text-[var(--color-cat-config)]",children:["think · ",s.think.length,"b"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:207,columnNumber:11},this),e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words text-fg-1",children:s.think},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:208,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:206,columnNumber:9},this);case"image_url":return e.jsxDEV(ve,{url:s.imageUrl.url},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:212,columnNumber:14},this);case"audio_url":return e.jsxDEV("div",{className:"border border-border bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"mb-1 text-fg-3",children:"audio_url"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:216,columnNumber:11},this),e.jsxDEV(V,{className:"break-all",children:s.audioUrl.url},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:217,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:215,columnNumber:9},this);case"video_url":return e.jsxDEV("div",{className:"border border-border bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"mb-1 text-fg-3",children:"video_url"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:223,columnNumber:11},this),e.jsxDEV(V,{className:"break-all",children:s.videoUrl.url},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:224,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:222,columnNumber:9},this);default:return e.jsxDEV(B,{value:s,defaultOpenDepth:1},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:228,columnNumber:14},this)}}function Qs({call:s}){const n=s.arguments??"";let r=null;if(typeof n=="string"&&n.length>0)try{r=JSON.parse(n)}catch{r=null}return e.jsxDEV("div",{className:"border border-[var(--color-cat-tools)]/40 bg-surface-0 p-2",children:[e.jsxDEV("div",{className:"flex items-center justify-between gap-2",children:[e.jsxDEV(V,{className:"text-[var(--color-cat-tools)]",children:s.name},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:245,columnNumber:9},this),e.jsxDEV(V,{className:"text-fg-3 text-[10px]",children:["#",s.id]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:246,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:244,columnNumber:7},this),e.jsxDEV("div",{className:"mt-1",children:r!==null?e.jsxDEV(B,{value:r,defaultOpenDepth:1},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:250,columnNumber:11},this):e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words text-fg-1",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:252,columnNumber:11},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:248,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:243,columnNumber:5},this)}function Gs({event:s}){switch(s.type){case"tool.call":{let n=s.args;if(typeof s.args=="string")try{n=JSON.parse(s.args)}catch{n=s.args}return e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV("div",{className:"grid grid-cols-[140px_1fr] gap-x-3 gap-y-[2px]",children:[e.jsxDEV(w,{label:"name",children:e.jsxDEV(V,{className:"text-[var(--color-cat-tools)]",children:s.name},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:274,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:273,columnNumber:13},this),e.jsxDEV(w,{label:"toolCallId",children:e.jsxDEV(V,{children:s.toolCallId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:277,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:276,columnNumber:13},this),e.jsxDEV(w,{label:"step",children:e.jsxDEV("span",{className:"text-[var(--color-sev-info)]",children:s.step},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:280,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:279,columnNumber:13},this),e.jsxDEV(w,{label:"turnId",children:e.jsxDEV(V,{children:s.turnId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:283,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:282,columnNumber:13},this),s.description?e.jsxDEV(w,{label:"description",wide:!0,children:e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words text-fg-1",children:s.description},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:287,columnNumber:17},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:286,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:272,columnNumber:11},this),e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-1 text-fg-2",children:"args"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:292,columnNumber:13},this),e.jsxDEV(B,{value:n,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:293,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:291,columnNumber:11},this),s.display?e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-1 text-fg-2",children:"display"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:297,columnNumber:15},this),e.jsxDEV(B,{value:s.display,defaultOpenDepth:1},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:298,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:296,columnNumber:13},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:271,columnNumber:9},this)}case"tool.result":{const n=s.result.isError===!0,r=s.result.output;return e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV("div",{className:"grid grid-cols-[140px_1fr] gap-x-3 gap-y-[2px]",children:[e.jsxDEV(w,{label:"toolCallId",children:e.jsxDEV(V,{children:s.toolCallId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:311,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:310,columnNumber:13},this),e.jsxDEV(w,{label:"parentUuid",children:e.jsxDEV(V,{children:s.parentUuid},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:314,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:313,columnNumber:13},this),e.jsxDEV(w,{label:"isError",children:e.jsxDEV("span",{className:n?"text-[var(--color-sev-error)]":"text-[var(--color-sev-success)]",children:String(n)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:317,columnNumber:15},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:316,columnNumber:13},this),s.result.message!==void 0?e.jsxDEV(w,{label:"message",wide:!0,children:e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words text-fg-1",children:s.result.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:327,columnNumber:17},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:326,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:309,columnNumber:11},this),e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-1 text-fg-2",children:"output"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:334,columnNumber:13},this),typeof r=="string"?e.jsxDEV(Pe,{label:"output",sizeBytes:r.length,preview:r,children:e.jsxDEV("pre",{className:"whitespace-pre-wrap break-words text-fg-1",children:r},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:337,columnNumber:17},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:336,columnNumber:15},this):e.jsxDEV("div",{className:"space-y-1",children:r.map((t,o)=>e.jsxDEV(ne,{part:t},o,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:342,columnNumber:19},this))},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:340,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:333,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:308,columnNumber:9},this)}case"step.begin":case"step.end":case"content.part":return e.jsxDEV(B,{value:s,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:353,columnNumber:14},this);default:return e.jsxDEV(B,{value:s,defaultOpenDepth:2},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:355,columnNumber:14},this)}}function V({children:s,className:n=""}){return e.jsxDEV("span",{className:`font-mono text-[12px] text-fg-0 ${n}`,children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:360,columnNumber:10},this)}function w({label:s,children:n,wide:r=!1}){return r?e.jsxDEV("div",{className:"col-span-2 flex items-baseline gap-3",children:[e.jsxDEV("span",{className:"w-[140px] shrink-0 font-mono text-[11px] text-fg-2 text-right",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:375,columnNumber:9},this),e.jsxDEV("div",{className:"flex-1 min-w-0",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:378,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:374,columnNumber:7},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-2 text-right",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:384,columnNumber:7},this),e.jsxDEV("div",{className:"font-mono text-[12px] text-fg-0 min-w-0 break-words",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:385,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRowDetail.tsx",lineNumber:383,columnNumber:5},this)}const Zs=b.memo(function({entry:n,expanded:r,onToggle:t,onJumpTo:o,pair:i,highlighted:a,onHoverPair:l}){const c=n.data,m=Js(c),d=en(c.time),D=b.useCallback(()=>{i!==void 0&&l!==void 0&&l(i.toolCallId)},[i,l]),j=b.useCallback(()=>{i!==void 0&&l!==void 0&&l(null)},[i,l]);return e.jsxDEV("div",{onMouseEnter:D,onMouseLeave:j,className:["flex items-stretch border-b border-border",a?"bg-[color-mix(in_oklab,var(--color-cat-tools)_18%,transparent)]":r?"bg-surface-1":"bg-surface-0 hover:bg-surface-1"].join(" "),children:e.jsxDEV("div",{className:"min-w-0 flex-1",children:[e.jsxDEV("button",{onClick:t,className:"flex w-full items-center gap-3 px-2 py-[5px] text-left min-h-[28px]",children:[e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-3 tabular w-[52px] shrink-0 text-right",children:n.lineNo},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:76,columnNumber:11},this),e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-3 tabular w-[68px] shrink-0",title:d,children:c.time!==void 0?Qe(c.time):"--:--:--"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:79,columnNumber:11},this),e.jsxDEV("span",{className:"shrink-0",children:e.jsxDEV(Ls,{type:c.type},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:86,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:85,columnNumber:11},this),e.jsxDEV("span",{className:"flex-1 min-w-0 flex items-center gap-2",children:m.main},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:88,columnNumber:11},this),e.jsxDEV("span",{className:"flex items-center gap-2 shrink-0",children:[m.right,i!==void 0?e.jsxDEV(Xs,{pair:i,onJumpTo:o},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:91,columnNumber:35},this):null,e.jsxDEV(sn,{open:r},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:92,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:89,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:72,columnNumber:9},this),r?e.jsxDEV("div",{className:"border-t border-border bg-surface-1 px-2 pb-2 pt-1",children:e.jsxDEV(qs,{entry:n,onJumpTo:o},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:97,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:96,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:71,columnNumber:7},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:59,columnNumber:5},this)});function Xs({pair:s,onJumpTo:n}){const r=s.kind==="call",t=r?s.resultLineNo:s.callLineNo,o=r?"→":"←",i=t===null,a=i?`${o} ?`:`${o} #${t}`,l=i?r?"no matching tool.result yet":"no preceding tool.call seen":r?`jump to tool.result on line ${t}`:`jump to tool.call on line ${t}`,c=`font-mono text-[10px] tabular ${i?"text-[var(--color-sev-error)]":"text-[var(--color-cat-tools)] hover:text-fg-0"}`;return i||t===null||n===void 0?e.jsxDEV("span",{className:c,title:l,children:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:131,columnNumber:7},this):e.jsxDEV("span",{role:"link",tabIndex:0,className:`${c} cursor-pointer`,title:l,onClick:m=>{m.stopPropagation(),n(t)},onKeyDown:m=>{m.key==="Enter"&&(m.stopPropagation(),n(t))},children:a},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:137,columnNumber:5},this)}function en(s){if(s===void 0||!Number.isFinite(s))return"missing time";const n=new Date(s);return Number.isFinite(n.getTime())?n.toISOString():"invalid time"}function sn({open:s}){return e.jsxDEV("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:`text-fg-3 transition-transform ${s?"rotate-90":""}`,"aria-hidden":"true",children:e.jsxDEV("path",{d:"M3 2 L7 5 L3 8",stroke:"currentColor",strokeWidth:"1",fill:"none"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:174,columnNumber:7},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireRow.tsx",lineNumber:167,columnNumber:5},this)}function nn(s){const n=new Map,r=t=>{const o=n.get(t);if(o)return o;const i={callLineNo:null,resultLineNo:null};return n.set(t,i),i};for(const t of s){if(t.data.type!=="context.append_loop_event")continue;const o=t.data.event;o.type==="tool.call"?r(o.toolCallId).callLineNo=t.lineNo:o.type==="tool.result"&&(r(o.toolCallId).resultLineNo=t.lineNo)}return n}function rn(s,n){if(s.type!=="context.append_loop_event")return;const r=s.event;if(r.type!=="tool.call"&&r.type!=="tool.result")return;const t=n.get(r.toolCallId);if(t!==void 0)return{toolCallId:r.toolCallId,kind:r.type==="tool.call"?"call":"result",callLineNo:t.callLineNo,resultLineNo:t.resultLineNo}}function Ee({sessionId:s,initialAgentId:n="main"}){const[r,t]=b.useState(n);b.useEffect(()=>{t(n)},[s,n]);const{data:o}=q(s),{data:i,isLoading:a,error:l}=ks(s,r),c=b.useRef(null),[m,d]=b.useState(""),[D,j]=b.useState(new Set),[x,L]=b.useState(!1),[O,v]=b.useState(null),f=b.useMemo(()=>i?.records??[],[i?.records]),N=i?.warnings??[],E=b.useMemo(()=>nn(f),[f]),H=b.useMemo(()=>{const u=new Map;for(const h of f){const g=rn(h.data,E);g!==void 0&&u.set(h.lineNo,g)}return u},[f,E]),Y=b.useCallback(u=>{v(u)},[]),F=b.useMemo(()=>{if(m.length===0)return f;const u=m.toLowerCase();return f.filter(h=>{if(h.data.type.toLowerCase().includes(u))return!0;try{return JSON.stringify(h.data).toLowerCase().includes(u)}catch{return!1}})},[f,m]),W=b.useMemo(()=>Cs(f,N),[f,N]),R=Ws(W),I=Ie({count:F.length,getScrollElement:()=>c.current,estimateSize:()=>28,overscan:10,getItemKey:u=>F[u]?.lineNo??u}),Fe=b.useCallback(u=>{j(h=>{const g=new Set(h);return g.has(u)?g.delete(u):g.add(u),g})},[]),Q=b.useMemo(()=>{const u=new Map;for(let h=0;h<F.length;h+=1){const g=F[h];g!==void 0&&u.set(g.lineNo,h)}return u},[F]),re=b.useCallback(u=>{const h=Q.get(u);h!==void 0&&(I.scrollToIndex(h,{align:"center"}),j(g=>g.has(u)?g:new Set(g).add(u)))},[Q,I]),Ue=()=>{j(new Set(F.map(u=>u.lineNo)))},Se=()=>{j(new Set)},ie=o?.agents??[];return e.jsxDEV("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[e.jsxDEV("div",{className:"flex shrink-0 items-center gap-3 border-b border-border bg-surface-1 px-3 py-2",children:[e.jsxDEV("label",{className:"flex items-center gap-2 font-mono text-[11px] text-fg-2",children:[e.jsxDEV("span",{className:"text-fg-3",children:"agent"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:166,columnNumber:11},this),e.jsxDEV("select",{value:r,onChange:u=>{t(u.target.value)},className:"border border-border bg-surface-0 px-2 py-1 font-mono text-[12px] text-fg-0 focus:border-border-strong focus:outline-none",children:[ie.length===0?e.jsxDEV("option",{value:r,children:r},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:174,columnNumber:36},this):null,ie.map(u=>e.jsxDEV("option",{value:u.agentId,children:[u.agentId," (",u.type,u.parentAgentId?` ← ${u.parentAgentId}`:"",")"]},u.agentId,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:176,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:167,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:165,columnNumber:9},this),e.jsxDEV("input",{type:"text",placeholder:"search records (substring)",value:m,onChange:u=>{d(u.target.value)},className:"w-80 border border-border bg-surface-0 px-2 py-1 font-mono text-[12px] text-fg-0 placeholder:text-fg-3 focus:border-border-strong focus:outline-none"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:183,columnNumber:9},this),e.jsxDEV("div",{className:"ml-auto flex items-center gap-3 font-mono text-[11px] text-fg-2",children:[e.jsxDEV("span",{className:"tabular",children:[F.length," / ",f.length," ev"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:193,columnNumber:11},this),W.length>0&&R!==null?e.jsxDEV("button",{onClick:()=>{L(!0)},title:`${W.length} issue${W.length>1?"s":""} — click to inspect`,className:"flex items-center gap-1 border px-2 py-0.5",style:{borderColor:`var(--color-sev-${R})`,color:`var(--color-sev-${R})`,backgroundColor:`color-mix(in oklab, var(--color-sev-${R}) 10%, transparent)`},children:[e.jsxDEV("span",{children:R==="error"||R==="warning"?"⚠":"ℹ"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:209,columnNumber:15},this),e.jsxDEV("span",{className:"tabular",children:W.length},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:212,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:197,columnNumber:13},this):null,e.jsxDEV("button",{onClick:Ue,className:"border border-border px-2 py-0.5 text-fg-2 hover:border-border-strong hover:text-fg-0",children:"expand all"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:215,columnNumber:11},this),e.jsxDEV("button",{onClick:Se,className:"border border-border px-2 py-0.5 text-fg-2 hover:border-border-strong hover:text-fg-0",children:"collapse"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:221,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:192,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:164,columnNumber:7},this),N.length>0?e.jsxDEV("div",{className:"shrink-0 border-b border-[var(--color-sev-warning)] bg-[color-mix(in_oklab,var(--color-sev-warning)_8%,transparent)] px-3 py-1 font-mono text-[11px] text-[var(--color-sev-warning)]",children:[N.length," warning",N.length>1?"s":""," · first: ",N[0]]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:231,columnNumber:9},this):null,a?e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-fg-3",children:"loading wire…"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:237,columnNumber:9},this):l?e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-[var(--color-sev-error)]",children:l.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:239,columnNumber:9},this):e.jsxDEV("div",{ref:c,className:"min-h-0 flex-1 overflow-y-auto",children:F.length===0?e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-fg-3",children:"no records match the current filter"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:245,columnNumber:13},this):e.jsxDEV("div",{style:{height:I.getTotalSize(),position:"relative"},children:I.getVirtualItems().map(u=>{const h=F[u.index];if(!h)return null;const g=H.get(h.lineNo),ke=g!==void 0&&O===g.toolCallId;return e.jsxDEV("div",{"data-index":u.index,ref:I.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${u.start}px)`},children:e.jsxDEV(Zs,{entry:h,expanded:D.has(h.lineNo),onToggle:()=>{Fe(h.lineNo)},onJumpTo:re,pair:g,highlighted:ke,onHoverPair:Y},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:273,columnNumber:21},this)},u.key,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:261,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:249,columnNumber:13},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:243,columnNumber:9},this),x?e.jsxDEV(Is,{issues:W,onClose:()=>{L(!1)},onJumpTo:re,isLineVisible:u=>Q.has(u)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:293,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/components/wire/WireTab.tsx",lineNumber:162,columnNumber:5},this)}function tn(){const{sessionId:s}=A(),n=ge("wire"),{data:r,isLoading:t,error:o}=q(s);if(!s)return e.jsxDEV("div",{className:"p-6 text-fg-3",children:"(no session id)"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:21,columnNumber:26},this);if(t)return e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-fg-3",children:"loading session…"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:23,columnNumber:12},this);if(o)return e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-[var(--color-sev-error)]",children:o.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:27,columnNumber:7},this);if(!r)return null;const i=r.state??null,a=r.agents.find(m=>m.agentId==="main")??null,l=r.agents.filter(m=>m.agentId!=="main").length,c=a?.wireRecordCount??null;return e.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxDEV("div",{className:"shrink-0 border-b border-border bg-surface-1 px-4 py-3",children:[e.jsxDEV("div",{className:"flex items-center gap-3",children:[e.jsxDEV("span",{className:"font-mono text-[14px] text-fg-0",children:r.sessionId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:47,columnNumber:11},this),e.jsxDEV(k,{value:r.sessionId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:48,columnNumber:11},this),i?.title?e.jsxDEV("span",{className:"font-mono text-[12px] text-fg-1",children:['"',i.title,'"']},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:50,columnNumber:13},this):null,e.jsxDEV("span",{className:"ml-auto flex items-center gap-2",children:[e.jsxDEV(on,{sessionId:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:53,columnNumber:13},this),e.jsxDEV(k,{value:r.sessionDir,label:"copy path"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:54,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:52,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:46,columnNumber:9},this),e.jsxDEV("div",{className:"mt-1 flex items-center gap-3 font-mono text-[11px] text-fg-2",children:[i?.updatedAt?e.jsxDEV("span",{className:"text-fg-3 tabular",children:["updated ",se(Date.parse(i.updatedAt))," ·"," ",xe(Date.parse(i.updatedAt))]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:59,columnNumber:13},this):null,r.workDir?e.jsxDEV("span",{className:"text-fg-3 truncate",title:r.workDir,children:["· ",r.workDir]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:65,columnNumber:13},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:57,columnNumber:9},this),e.jsxDEV("div",{className:"mt-1 truncate font-mono text-[10px] text-fg-3",title:r.sessionDir,children:r.sessionDir},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:70,columnNumber:9},this),i?.lastPrompt?e.jsxDEV("div",{className:"mt-1 truncate font-mono text-[11px] text-fg-3",title:i.lastPrompt,children:["prompt · ",i.lastPrompt]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:74,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:45,columnNumber:7},this),e.jsxDEV(je,{defaultTab:"wire",tabs:[{id:"wire",label:"Wire",count:c},{id:"context",label:"Context",count:null},{id:"agents",label:"Agents",count:l},{id:"state",label:"State",count:null}]},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:80,columnNumber:7},this),e.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col",children:[n==="wire"?e.jsxDEV(Ee,{sessionId:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:91,columnNumber:30},this):null,n==="context"?e.jsxDEV(we,{sessionId:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:92,columnNumber:33},this):null,n==="agents"?e.jsxDEV(Ss,{sessionId:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:93,columnNumber:32},this):null,n==="state"?e.jsxDEV(Es,{state:r.state},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:94,columnNumber:31},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:90,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:43,columnNumber:5},this)}function on({sessionId:s}){const[n,r]=b.useState("idle"),[t,o]=b.useState(null);return e.jsxDEV("button",{type:"button",onClick:()=>{r("opening"),o(null),C.revealSession(s).then(()=>{r("idle")}).catch(i=>{r("err"),o(i instanceof Error?i.message:String(i)),setTimeout(()=>{r("idle"),o(null)},2500)})},className:`border border-border px-2 py-0.5 font-mono text-[11px] ${n==="err"?"text-[var(--color-sev-error)]":"text-fg-2 hover:border-border-strong hover:text-fg-0"}`,title:n==="err"&&t?t:"reveal session folder in OS file manager",children:n==="opening"?"opening…":n==="err"?"✗ failed":"↗ open folder"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionDetailPage.tsx",lineNumber:104,columnNumber:5},this)}function an(){const{data:s}=Ne(),n=s?.length??0;return e.jsxDEV("div",{className:"flex h-full items-center justify-center",children:e.jsxDEV("div",{className:"max-w-md px-8 text-center",children:[e.jsxDEV("div",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-3",children:"byf vis"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:10,columnNumber:9},this),e.jsxDEV("div",{className:"mt-3 font-mono text-[13px] text-fg-1",children:"select a session from the left rail to begin inspecting"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:11,columnNumber:9},this),e.jsxDEV("div",{className:"mt-6 flex items-center justify-center gap-6 font-mono text-[11px] text-fg-2",children:e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"tabular text-[22px] text-fg-0",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:16,columnNumber:13},this),e.jsxDEV("div",{className:"text-fg-3",children:"sessions"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:17,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:15,columnNumber:11},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:14,columnNumber:9},this),e.jsxDEV("div",{className:"mt-10 space-y-1 text-left font-mono text-[10.5px] text-fg-3",children:[e.jsxDEV("div",{children:[e.jsxDEV("kbd",{className:"mr-2 border border-border px-1 text-fg-2",children:"/"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:22,columnNumber:13},this),"focus search"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:21,columnNumber:11},this),e.jsxDEV("div",{children:[e.jsxDEV("kbd",{className:"mr-2 border border-border px-1 text-fg-2",children:"esc"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:26,columnNumber:13},this),"close drawers"]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:25,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:20,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:9,columnNumber:7},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SessionListPage.tsx",lineNumber:8,columnNumber:5},this)}const ln={main:"conversation",sub:"subagent",independent:"tools"};function cn(){const{sessionId:s,agentId:n}=A(),r=ge("wire"),{data:t,isLoading:o,error:i}=q(s);if(!s||!n)return null;if(o)return e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-fg-3",children:"loading agent…"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:25,columnNumber:12},this);if(i)return e.jsxDEV("div",{className:"p-6 font-mono text-[12px] text-[var(--color-sev-error)]",children:i.message},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:29,columnNumber:7},this);if(!t)return null;const a=t.agents.find(l=>l.agentId===n)??null;return e.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxDEV("div",{className:"shrink-0 border-b border-border bg-surface-1 px-4 py-3",children:[e.jsxDEV("div",{className:"flex items-center gap-2 font-mono text-[11px] text-fg-2",children:[e.jsxDEV(_,{to:`/sessions/${s}?tab=agents`,className:"hover:text-fg-0",children:"‹ back to agents"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:41,columnNumber:11},this),e.jsxDEV("span",{className:"text-fg-3",children:"·"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:44,columnNumber:11},this),e.jsxDEV(_,{to:`/sessions/${s}`,className:"hover:text-fg-0",children:"session"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:45,columnNumber:11},this),e.jsxDEV("span",{className:"text-fg-3",children:"›"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:48,columnNumber:11},this),e.jsxDEV("span",{className:"text-fg-0",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:49,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:40,columnNumber:9},this),e.jsxDEV("div",{className:"mt-2 flex flex-wrap items-center gap-3",children:[e.jsxDEV("span",{className:"font-mono text-[14px] text-fg-0",children:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:52,columnNumber:11},this),a!==null?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(p,{tone:ln[a.type],variant:"soft",children:a.type},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:55,columnNumber:15},this),a.parentAgentId!==null?e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-3",children:["parent ·"," ",e.jsxDEV(_,{to:`/sessions/${s}/agents/${a.parentAgentId}`,className:"text-fg-1 hover:text-fg-0",children:a.parentAgentId},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:61,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:59,columnNumber:17},this):null,e.jsxDEV("span",{className:"font-mono text-[11px] text-fg-3 tabular",children:[a.wireRecordCount," record",a.wireRecordCount===1?"":"s",a.wireProtocolVersion!==null?` · v${a.wireProtocolVersion}`:""]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:69,columnNumber:15},this),a.wireExists?null:e.jsxDEV(p,{tone:"warning",variant:"outline",children:"no wire"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:75,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:54,columnNumber:13},this):e.jsxDEV(p,{tone:"error",variant:"outline",children:"agent not found"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:81,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:51,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:39,columnNumber:7},this),e.jsxDEV(je,{defaultTab:"wire",tabs:[{id:"wire",label:"Wire",count:a?.wireRecordCount??null},{id:"context",label:"Context",count:null}]},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:88,columnNumber:7},this),e.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col",children:[r==="wire"?a===null||!a.wireExists?e.jsxDEV(fe,{children:"no wire records for this agent"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:99,columnNumber:13},this):e.jsxDEV(Ee,{sessionId:s,initialAgentId:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:101,columnNumber:13},this):null,r==="context"?a===null||!a.wireExists?e.jsxDEV(fe,{children:"no context for this agent"},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:107,columnNumber:13},this):e.jsxDEV(we,{sessionId:s,initialAgentId:n},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:109,columnNumber:13},this):null]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:96,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:37,columnNumber:5},this)}function fe({children:s}){return e.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-6 font-mono text-[12px] text-fg-3",children:s},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/pages/SubagentDetailPage.tsx",lineNumber:119,columnNumber:5},this)}function mn(){return e.jsxDEV(is,{children:e.jsxDEV(We,{children:[e.jsxDEV(G,{path:"/",element:e.jsxDEV(an,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:12,columnNumber:34},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:12,columnNumber:9},this),e.jsxDEV(G,{path:"/sessions/:sessionId",element:e.jsxDEV(tn,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:13,columnNumber:53},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:13,columnNumber:9},this),e.jsxDEV(G,{path:"/sessions/:sessionId/agents/:agentId",element:e.jsxDEV(cn,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:14,columnNumber:69},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:14,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:11,columnNumber:7},this)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/App.tsx",lineNumber:10,columnNumber:5},this)}const bn=new $e({defaultOptions:{queries:{staleTime:1/0,gcTime:1800*1e3,retry:!1,refetchOnWindowFocus:!1}}}),Ve=document.querySelector("#root");if(!Ve)throw new Error("#root not found");Re.createRoot(Ve).render(e.jsxDEV(b.StrictMode,{children:e.jsxDEV(Ae,{client:bn,children:e.jsxDEV(Te,{children:e.jsxDEV(mn,{},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/main.tsx",lineNumber:27,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/main.tsx",lineNumber:26,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/main.tsx",lineNumber:25,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/baifan/Projects/ByronFinn/byf/apps/vis/web/src/main.tsx",lineNumber:24,columnNumber:3},void 0));
|