moi-computer 0.3.1-next.1 → 0.4.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +85 -12
  2. package/bin/moi.mjs +11 -0
  3. package/client/api/workspace-keys.ts +1 -0
  4. package/client/app/AppRouter.tsx +5 -1
  5. package/client/app/routes/WorkspaceRoute.tsx +9 -5
  6. package/client/app/shell/SidebarLayout.tsx +9 -7
  7. package/client/components/shared/BottomPanel.tsx +24 -5
  8. package/client/components/shared/Composer.tsx +1 -1
  9. package/client/components/shared/PanelHeader.tsx +1 -1
  10. package/client/components/ui/button.tsx +5 -5
  11. package/client/components/ui/dropdown-menu.tsx +6 -6
  12. package/client/components/ui/hover-card.tsx +1 -1
  13. package/client/components/ui/input.tsx +1 -1
  14. package/client/components/ui/popover.tsx +1 -1
  15. package/client/components/ui/skeleton.tsx +1 -1
  16. package/client/components/ui/textarea.tsx +1 -1
  17. package/client/components/ui/tooltip.tsx +1 -1
  18. package/client/features/applets/applet-cache.ts +20 -1
  19. package/client/features/applets/applet-log.ts +10 -30
  20. package/client/features/applets/applet-runtime.ts +272 -0
  21. package/client/features/applets/useApplet.ts +36 -10
  22. package/client/features/chat/ChatComposer.tsx +1 -1
  23. package/client/features/chat/ChatEmptyState.tsx +186 -0
  24. package/client/features/chat/ChatPanel.tsx +95 -54
  25. package/client/features/chat/ChatPopup.tsx +3 -13
  26. package/client/features/chat/ChatPromptBubbles.tsx +74 -0
  27. package/client/features/chat/MarkdownContent.tsx +15 -3
  28. package/client/features/chat/ModelPicker.tsx +1 -1
  29. package/client/features/chat/TurnView.tsx +6 -17
  30. package/client/features/chat/chat-send.ts +26 -1
  31. package/client/features/chat/tool-group/CodeBlock.tsx +1 -1
  32. package/client/features/chat/tool-group/ReadImagePreview.tsx +1 -1
  33. package/client/features/chat/tool-group/SubagentCard.tsx +1 -1
  34. package/client/features/chat/tool-group/TimelineRow.tsx +4 -4
  35. package/client/features/chat/tool-group/ToolCallGroup.tsx +12 -5
  36. package/client/features/chat/tool-group/ToolOutput.tsx +2 -2
  37. package/client/features/chat/tool-group/format.ts +25 -4
  38. package/client/features/chat/useAppletChatMessage.ts +69 -0
  39. package/client/features/chat/useChat.ts +49 -14
  40. package/client/features/chat/useStickToBottom.ts +11 -1
  41. package/client/features/connectors/McpServerCards.tsx +3 -3
  42. package/client/features/dev/HarnessDebugPage.tsx +213 -77
  43. package/client/features/dev/PixelPainter.tsx +1 -1
  44. package/client/features/dev/PlaygroundPage.tsx +1 -1
  45. package/client/features/dev/ToolCallsPage.tsx +2 -2
  46. package/client/features/home/HomePage.tsx +17 -14
  47. package/client/features/home/WorkspacePreview.tsx +12 -13
  48. package/client/features/home/api.ts +8 -5
  49. package/client/features/home/workspace-presentation.tsx +1 -1
  50. package/client/features/home/workspace-setup/CreateWorkspaceDialog.tsx +1 -1
  51. package/client/features/home/workspace-setup/WorkspaceAgentStep.tsx +21 -8
  52. package/client/features/scratchpad/Scratchpad.tsx +41 -2
  53. package/client/features/scratchpad/ScratchpadControls.tsx +13 -13
  54. package/client/features/scratchpad/useScratchpadSnapshot.tsx +1 -1
  55. package/client/features/settings/EnvironmentSettings.tsx +1 -1
  56. package/client/features/settings/IconPicker.tsx +11 -11
  57. package/client/features/settings/SettingsLayout.tsx +1 -1
  58. package/client/features/settings/WorkspaceSettings.tsx +2 -2
  59. package/client/features/settings/api.ts +33 -1
  60. package/client/features/widgets/HiddenPanel.tsx +4 -3
  61. package/client/features/widgets/Widgets.tsx +1 -0
  62. package/client/features/workspace/CustomizePanel.tsx +96 -82
  63. package/client/features/workspace/WorkspaceScreen.tsx +129 -107
  64. package/client/features/workspace/WorkspaceSkillUpdateBanner.tsx +91 -0
  65. package/client/features/workspace/WorkspaceTabs.tsx +1 -1
  66. package/client/features/workspace/api.ts +52 -0
  67. package/client/features/workspace/moi-context.ts +63 -17
  68. package/client/features/workspace/tab-resolution.ts +75 -0
  69. package/client/features/workspace/useWorkspaceNavigation.ts +128 -0
  70. package/client/features/workspace/useWorkspaceSkillUpdates.ts +160 -0
  71. package/client/index.css +10 -15
  72. package/client/lib/app-icon-registry.ts +77 -70
  73. package/client/lib/rate-limit.ts +77 -0
  74. package/client/main.tsx +10 -2
  75. package/client/runtime/useWorkspaceEvents.ts +15 -2
  76. package/client/runtime/workspace-theme.ts +115 -0
  77. package/client/store/ui.ts +42 -17
  78. package/client/theme.css +20 -15
  79. package/dist/{chunk-1dfbr7n2.js → chunk-3m1xe1j3.js} +94 -94
  80. package/dist/chunk-5vaevt8z.js +2 -0
  81. package/dist/chunk-7bzpmtxp.js +50 -0
  82. package/dist/chunk-h0hk61pm.js +9 -0
  83. package/dist/{chunk-vkvb3hjm.js → chunk-h3evrtyp.js} +1 -1
  84. package/dist/chunk-k5sjx9s5.js +1 -0
  85. package/dist/{chunk-jen6xcm1.js → chunk-m9qja0nx.js} +1 -1
  86. package/dist/chunk-s7za1qsv.css +1 -0
  87. package/dist/{chunk-sxbfh73c.js → chunk-tcfa3vt3.js} +1 -1
  88. package/dist/chunk-v797g6ap.js +51 -0
  89. package/dist/chunk-xyrw8318.js +27 -0
  90. package/dist/index.html +1 -1
  91. package/lib/app-icons.ts +73 -0
  92. package/lib/moi-context.ts +104 -3
  93. package/lib/themes.ts +83 -45
  94. package/lib/types.ts +44 -9
  95. package/lib/workspace-tabs.ts +48 -0
  96. package/package.json +4 -1
  97. package/server/api.ts +57 -5
  98. package/server/app-settings.ts +65 -0
  99. package/server/applets.ts +132 -22
  100. package/server/bundler/build-applet.ts +74 -16
  101. package/server/cli.ts +144 -17
  102. package/server/control.ts +53 -7
  103. package/server/data-dir.ts +1 -1
  104. package/server/events.ts +1 -1
  105. package/server/functions-worker.ts +15 -1
  106. package/server/functions.ts +51 -6
  107. package/server/harness/claude-code/index.ts +2 -1
  108. package/server/harness/codex/adapter.ts +100 -9
  109. package/server/harness/codex/client.ts +34 -1
  110. package/server/harness/codex/index.ts +2 -1
  111. package/server/harness/codex/session.ts +32 -8
  112. package/server/layout.ts +9 -14
  113. package/server/moi-scaffold.ts +37 -3
  114. package/server/registry.ts +1 -1
  115. package/server/skill-update.ts +47 -0
  116. package/server/skill-version.ts +2 -11
  117. package/server/tabs.ts +59 -0
  118. package/server/theme.ts +8 -14
  119. package/server/view-builders.ts +6 -2
  120. package/workspace/.claude/skills/moi-workspace/DESIGN.md +265 -107
  121. package/workspace/.claude/skills/moi-workspace/SKILL.md +85 -11
  122. package/client/features/workspace/useWorkspaceTheme.ts +0 -82
  123. package/dist/chunk-339jds4x.js +0 -15
  124. package/dist/chunk-3xsvsnhr.css +0 -1
  125. package/dist/chunk-6c8cwpzc.js +0 -1
  126. package/dist/chunk-anqmsbjt.js +0 -2
  127. package/dist/chunk-hbvfb6sk.js +0 -63
  128. package/dist/chunk-qwm5f6qk.js +0 -48
  129. package/dist/chunk-yp4srgqt.js +0 -10
  130. package/workspace/.claude/skills/moi-workspace/VIEW-DESIGN.md +0 -22
@@ -0,0 +1,2 @@
1
+ import{$ as N1,Ca as v0,O as _0,T as L0,U as o,V as r,X as c,Y as n,_ as I0,aa as z0,ba as b0,ca as H1,da as y0,ea as U0,fa as f,ga as N0,ha as G0,ia as J0,ja as D0}from"/chunk-h0hk61pm.js";import{Mc as X0,Nc as A0}from"/chunk-h3evrtyp.js";var D1=A0((t1,h0)=>{h0.exports=globalThis.__esm["react-dom/client"]});var w0=A0((qG,x0)=>{x0.exports=globalThis.__esm["react-dom"]});var E0=new Map;function e1(G,J){if(J)E0.set(G,J);else E0.delete(G)}function GG(G){return E0.get(G)}var V0=X0(_0(),1);var K0=new Set,t=null,H0=!1;function u0(){if(t||H0)return;H0=!0;let G=new WebSocket(v0("/api/workspaces/ws"));G.onopen=()=>{t=G,H0=!1},G.onmessage=(J)=>{try{let K=JSON.parse(J.data);for(let Q of K0)Q(K)}catch{}},G.onclose=()=>{if(t=null,H0=!1,K0.size>0)setTimeout(u0,2000)},G.onerror=()=>{G.close()}}function QG(G){let J=V0.useRef(G);J.current=G,V0.useEffect(()=>{let K=(Q)=>J.current(Q);return K0.add(K),u0(),()=>{if(K0.delete(K),K0.size===0&&t)t.close(),t=null}},[])}var m0=["top","right","bottom","left"];var{min:p,max:S,round:Z0,floor:q0}=Math,x=(G)=>({x:G,y:G}),b1={left:"right",right:"left",bottom:"top",top:"bottom"};function j0(G,J,K){return S(G,p(J,K))}function m(G,J){return typeof G==="function"?G(J):G}function d(G){return G.split("-")[0]}function i(G){return G.split("-")[1]}function Y0(G){return G==="x"?"y":"x"}function T0(G){return G==="y"?"height":"width"}function w(G){let J=G[0];return J==="t"||J==="b"?"y":"x"}function B0(G){return Y0(w(G))}function d0(G,J,K){if(K===void 0)K=!1;let Q=i(G),Z=B0(G),q=T0(Z),U=Z==="x"?Q===(K?"end":"start")?"right":"left":Q==="start"?"bottom":"top";if(J.reference[q]>J.floating[q])U=Q0(U);return[U,Q0(U)]}function c0(G){let J=Q0(G);return[W0(G),J,W0(J)]}function W0(G){return G.includes("start")?G.replace("start","end"):G.replace("end","start")}var g0=["left","right"],p0=["right","left"],y1=["top","bottom"],S1=["bottom","top"];function O1(G,J,K){switch(G){case"top":case"bottom":if(K)return J?p0:g0;return J?g0:p0;case"left":case"right":return J?y1:S1;default:return[]}}function f0(G,J,K,Q){let Z=i(G),q=O1(d(G),K==="start",Q);if(Z){if(q=q.map((U)=>U+"-"+Z),J)q=q.concat(q.map(W0))}return q}function Q0(G){let J=d(G);return b1[J]+G.slice(J.length)}function P1(G){return{top:0,right:0,bottom:0,left:0,...G}}function $0(G){return typeof G!=="number"?P1(G):{top:G,right:G,bottom:G,left:G}}function s(G){let{x:J,y:K,width:Q,height:Z}=G;return{width:Q,height:Z,top:K,left:J,right:J+Q,bottom:K+Z,x:J,y:K}}function r0(G,J,K){let{reference:Q,floating:Z}=G,q=w(J),U=B0(J),N=T0(U),V=d(J),j=q==="y",H=Q.x+Q.width/2-Z.width/2,W=Q.y+Q.height/2-Z.height/2,Y=Q[N]/2-Z[N]/2,X;switch(V){case"top":X={x:H,y:Q.y-Z.height};break;case"bottom":X={x:H,y:Q.y+Q.height};break;case"right":X={x:Q.x+Q.width,y:W};break;case"left":X={x:Q.x-Z.width,y:W};break;default:X={x:Q.x,y:Q.y}}switch(i(J)){case"start":X[U]-=Y*(K&&j?-1:1);break;case"end":X[U]+=Y*(K&&j?-1:1);break}return X}async function n0(G,J){var K;if(J===void 0)J={};let{x:Q,y:Z,platform:q,rects:U,elements:N,strategy:V}=G,{boundary:j="clippingAncestors",rootBoundary:H="viewport",elementContext:W="floating",altBoundary:Y=!1,padding:X=0}=m(J,G),T=$0(X),I=N[Y?W==="floating"?"reference":"floating":W],L=s(await q.getClippingRect({element:((K=await(q.isElement==null?void 0:q.isElement(I)))!=null?K:!0)?I:I.contextElement||await(q.getDocumentElement==null?void 0:q.getDocumentElement(N.floating)),boundary:j,rootBoundary:H,strategy:V})),M=W==="floating"?{x:Q,y:Z,width:U.floating.width,height:U.floating.height}:U.reference,F=await(q.getOffsetParent==null?void 0:q.getOffsetParent(N.floating)),z=await(q.isElement==null?void 0:q.isElement(F))?await(q.getScale==null?void 0:q.getScale(F))||{x:1,y:1}:{x:1,y:1},k=s(q.convertOffsetParentRelativeRectToViewportRelativeRect?await q.convertOffsetParentRelativeRectToViewportRelativeRect({elements:N,rect:M,offsetParent:F,strategy:V}):M);return{top:(L.top-k.top+T.top)/z.y,bottom:(k.bottom-L.bottom+T.bottom)/z.y,left:(L.left-k.left+T.left)/z.x,right:(k.right-L.right+T.right)/z.x}}var R1=50,i0=async(G,J,K)=>{let{placement:Q="bottom",strategy:Z="absolute",middleware:q=[],platform:U}=K,N=U.detectOverflow?U:{...U,detectOverflow:n0},V=await(U.isRTL==null?void 0:U.isRTL(J)),j=await U.getElementRects({reference:G,floating:J,strategy:Z}),{x:H,y:W}=r0(j,Q,V),Y=Q,X=0,T={};for(let B=0;B<q.length;B++){let I=q[B];if(!I)continue;let{name:L,fn:M}=I,{x:F,y:z,data:k,reset:E}=await M({x:H,y:W,initialPlacement:Q,placement:Y,strategy:Z,middlewareData:T,rects:j,platform:N,elements:{reference:G,floating:J}});if(H=F!=null?F:H,W=z!=null?z:W,T[L]={...T[L],...k},E&&X<R1){if(X++,typeof E==="object"){if(E.placement)Y=E.placement;if(E.rects)j=E.rects===!0?await U.getElementRects({reference:G,floating:J,strategy:Z}):E.rects;({x:H,y:W}=r0(j,Y,V))}B=-1}}return{x:H,y:W,placement:Y,strategy:Z,middlewareData:T}},s0=(G)=>({name:"arrow",options:G,async fn(J){let{x:K,y:Q,placement:Z,rects:q,platform:U,elements:N,middlewareData:V}=J,{element:j,padding:H=0}=m(G,J)||{};if(j==null)return{};let W=$0(H),Y={x:K,y:Q},X=B0(Z),T=T0(X),B=await U.getDimensions(j),I=X==="y",L=I?"top":"left",M=I?"bottom":"right",F=I?"clientHeight":"clientWidth",z=q.reference[T]+q.reference[X]-Y[X]-q.floating[T],k=Y[X]-q.reference[X],E=await(U.getOffsetParent==null?void 0:U.getOffsetParent(j)),$=E?E[F]:0;if(!$||!await(U.isElement==null?void 0:U.isElement(E)))$=N.floating[F]||q.floating[T];let O=z/2-k/2,v=$/2-B[T]/2-1,y=p(W[L],v),u=p(W[M],v),A=y,P=$-B[T]-u,D=$/2-B[T]/2+O,g=j0(A,D,P),b=!V.arrow&&i(Z)!=null&&D!==g&&q.reference[T]/2-(D<A?y:u)-B[T]/2<0,R=b?D<A?D-A:D-P:0;return{[X]:Y[X]+R,data:{[X]:g,centerOffset:D-g-R,...b&&{alignmentOffset:R}},reset:b}}});var a0=function(G){if(G===void 0)G={};return{name:"flip",options:G,async fn(J){var K,Q;let{placement:Z,middlewareData:q,rects:U,initialPlacement:N,platform:V,elements:j}=J,{mainAxis:H=!0,crossAxis:W=!0,fallbackPlacements:Y,fallbackStrategy:X="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:B=!0,...I}=m(G,J);if((K=q.arrow)!=null&&K.alignmentOffset)return{};let L=d(Z),M=w(N),F=d(N)===N,z=await(V.isRTL==null?void 0:V.isRTL(j.floating)),k=Y||(F||!B?[Q0(N)]:c0(N)),E=T!=="none";if(!Y&&E)k.push(...f0(N,B,T,z));let $=[N,...k],O=await V.detectOverflow(J,I),v=[],y=((Q=q.flip)==null?void 0:Q.overflows)||[];if(H)v.push(O[L]);if(W){let D=d0(Z,U,z);v.push(O[D[0]],O[D[1]])}if(y=[...y,{placement:Z,overflows:v}],!v.every((D)=>D<=0)){var u,A;let D=(((u=q.flip)==null?void 0:u.index)||0)+1,g=$[D];if(g){if(!(W==="alignment"?M!==w(g):!1)||y.every((_)=>w(_.placement)===M?_.overflows[0]>0:!0))return{data:{index:D,overflows:y},reset:{placement:g}}}let b=(A=y.filter((R)=>R.overflows[0]<=0).sort((R,_)=>R.overflows[1]-_.overflows[1])[0])==null?void 0:A.placement;if(!b)switch(X){case"bestFit":{var P;let R=(P=y.filter((_)=>{if(E){let h=w(_.placement);return h===M||h==="y"}return!0}).map((_)=>[_.placement,_.overflows.filter((h)=>h>0).reduce((h,l)=>h+l,0)]).sort((_,h)=>_[1]-h[1])[0])==null?void 0:P[0];if(R)b=R;break}case"initialPlacement":b=N;break}if(Z!==b)return{reset:{placement:b}}}return{}}}};function l0(G,J){return{top:G.top-J.height,right:G.right-J.width,bottom:G.bottom-J.height,left:G.left-J.width}}function o0(G){return m0.some((J)=>G[J]>=0)}var t0=function(G){if(G===void 0)G={};return{name:"hide",options:G,async fn(J){let{rects:K,platform:Q}=J,{strategy:Z="referenceHidden",...q}=m(G,J);switch(Z){case"referenceHidden":{let U=await Q.detectOverflow(J,{...q,elementContext:"reference"}),N=l0(U,K.reference);return{data:{referenceHiddenOffsets:N,referenceHidden:o0(N)}}}case"escaped":{let U=await Q.detectOverflow(J,{...q,altBoundary:!0}),N=l0(U,K.floating);return{data:{escapedOffsets:N,escaped:o0(N)}}}default:return{}}}}};var e0=new Set(["left","top"]);async function A1(G,J){let{placement:K,platform:Q,elements:Z}=G,q=await(Q.isRTL==null?void 0:Q.isRTL(Z.floating)),U=d(K),N=i(K),V=w(K)==="y",j=e0.has(U)?-1:1,H=q&&V?-1:1,W=m(J,G),{mainAxis:Y,crossAxis:X,alignmentAxis:T}=typeof W==="number"?{mainAxis:W,crossAxis:0,alignmentAxis:null}:{mainAxis:W.mainAxis||0,crossAxis:W.crossAxis||0,alignmentAxis:W.alignmentAxis};if(N&&typeof T==="number")X=N==="end"?T*-1:T;return V?{x:X*H,y:Y*j}:{x:Y*j,y:X*H}}var G1=function(G){if(G===void 0)G=0;return{name:"offset",options:G,async fn(J){var K,Q;let{x:Z,y:q,placement:U,middlewareData:N}=J,V=await A1(J,G);if(U===((K=N.offset)==null?void 0:K.placement)&&(Q=N.arrow)!=null&&Q.alignmentOffset)return{};return{x:Z+V.x,y:q+V.y,data:{...V,placement:U}}}}},J1=function(G){if(G===void 0)G={};return{name:"shift",options:G,async fn(J){let{x:K,y:Q,placement:Z,platform:q}=J,{mainAxis:U=!0,crossAxis:N=!1,limiter:V={fn:(L)=>{let{x:M,y:F}=L;return{x:M,y:F}}},...j}=m(G,J),H={x:K,y:Q},W=await q.detectOverflow(J,j),Y=w(d(Z)),X=Y0(Y),T=H[X],B=H[Y];if(U){let L=X==="y"?"top":"left",M=X==="y"?"bottom":"right",F=T+W[L],z=T-W[M];T=j0(F,T,z)}if(N){let L=Y==="y"?"top":"left",M=Y==="y"?"bottom":"right",F=B+W[L],z=B-W[M];B=j0(F,B,z)}let I=V.fn({...J,[X]:T,[Y]:B});return{...I,data:{x:I.x-K,y:I.y-Q,enabled:{[X]:U,[Y]:N}}}}}},K1=function(G){if(G===void 0)G={};return{options:G,fn(J){let{x:K,y:Q,placement:Z,rects:q,middlewareData:U}=J,{offset:N=0,mainAxis:V=!0,crossAxis:j=!0}=m(G,J),H={x:K,y:Q},W=w(Z),Y=Y0(W),X=H[Y],T=H[W],B=m(N,J),I=typeof B==="number"?{mainAxis:B,crossAxis:0}:{mainAxis:0,crossAxis:0,...B};if(V){let F=Y==="y"?"height":"width",z=q.reference[Y]-q.floating[F]+I.mainAxis,k=q.reference[Y]+q.reference[F]-I.mainAxis;if(X<z)X=z;else if(X>k)X=k}if(j){var L,M;let F=Y==="y"?"width":"height",z=e0.has(d(Z)),k=q.reference[W]-q.floating[F]+(z?((L=U.offset)==null?void 0:L[W])||0:0)+(z?0:I.crossAxis),E=q.reference[W]+q.reference[F]+(z?0:((M=U.offset)==null?void 0:M[W])||0)-(z?I.crossAxis:0);if(T<k)T=k;else if(T>E)T=E}return{[Y]:X,[W]:T}}}},Q1=function(G){if(G===void 0)G={};return{name:"size",options:G,async fn(J){var K,Q;let{placement:Z,rects:q,platform:U,elements:N}=J,{apply:V=()=>{},...j}=m(G,J),H=await U.detectOverflow(J,j),W=d(Z),Y=i(Z),X=w(Z)==="y",{width:T,height:B}=q.floating,I,L;if(W==="top"||W==="bottom")I=W,L=Y===(await(U.isRTL==null?void 0:U.isRTL(N.floating))?"start":"end")?"left":"right";else L=W,I=Y==="end"?"top":"bottom";let M=B-H.top-H.bottom,F=T-H.left-H.right,z=p(B-H[I],M),k=p(T-H[L],F),E=!J.middlewareData.shift,$=z,O=k;if((K=J.middlewareData.shift)!=null&&K.enabled.x)O=F;if((Q=J.middlewareData.shift)!=null&&Q.enabled.y)$=M;if(E&&!Y){let y=S(H.left,0),u=S(H.right,0),A=S(H.top,0),P=S(H.bottom,0);if(X)O=T-2*(y!==0||u!==0?y+u:S(H.left,H.right));else $=B-2*(A!==0||P!==0?A+P:S(H.top,H.bottom))}await V({...J,availableWidth:O,availableHeight:$});let v=await U.getDimensions(N.floating);if(T!==v.width||B!==v.height)return{reset:{rects:!0}};return{}}}};function X1(G){let J=f(G),K=parseFloat(J.width)||0,Q=parseFloat(J.height)||0,Z=n(G),q=Z?G.offsetWidth:K,U=Z?G.offsetHeight:Q,N=Z0(K)!==q||Z0(Q)!==U;if(N)K=q,Q=U;return{width:K,height:Q,$:N}}function S0(G){return!c(G)?G.contextElement:G}function e(G){let J=S0(G);if(!n(J))return x(1);let K=J.getBoundingClientRect(),{width:Q,height:Z,$:q}=X1(J),U=(q?Z0(K.width):K.width)/Q,N=(q?Z0(K.height):K.height)/Z;if(!U||!Number.isFinite(U))U=1;if(!N||!Number.isFinite(N))N=1;return{x:U,y:N}}var h1=x(0);function V1(G){let J=o(G);if(!y0()||!J.visualViewport)return h1;return{x:J.visualViewport.offsetLeft,y:J.visualViewport.offsetTop}}function v1(G,J,K){if(J===void 0)J=!1;if(!K||J&&K!==o(G))return!1;return J}function a(G,J,K,Q){if(J===void 0)J=!1;if(K===void 0)K=!1;let Z=G.getBoundingClientRect(),q=S0(G),U=x(1);if(J)if(Q){if(c(Q))U=e(Q)}else U=e(G);let N=v1(q,K,Q)?V1(q):x(0),V=(Z.left+N.x)/U.x,j=(Z.top+N.y)/U.y,H=Z.width/U.x,W=Z.height/U.y;if(q){let Y=o(q),X=Q&&c(Q)?o(Q):Q,T=Y,B=D0(T);while(B&&Q&&X!==T){let I=e(B),L=B.getBoundingClientRect(),M=f(B),F=L.left+(B.clientLeft+parseFloat(M.paddingLeft))*I.x,z=L.top+(B.clientTop+parseFloat(M.paddingTop))*I.y;V*=I.x,j*=I.y,H*=I.x,W*=I.y,V+=F,j+=z,T=o(B),B=D0(T)}}return s({width:H,height:W,x:V,y:j})}function F0(G,J){let K=N0(G).scrollLeft;if(!J)return a(r(G)).left+K;return J.left+K}function W1(G,J){let K=G.getBoundingClientRect(),Q=K.left+J.scrollLeft-F0(G,K),Z=K.top+J.scrollTop;return{x:Q,y:Z}}function u1(G){let{elements:J,rect:K,offsetParent:Q,strategy:Z}=G,q=Z==="fixed",U=r(Q),N=J?z0(J.floating):!1;if(Q===U||N&&q)return K;let V={scrollLeft:0,scrollTop:0},j=x(1),H=x(0),W=n(Q);if(W||!W&&!q){if(L0(Q)!=="body"||I0(U))V=N0(Q);if(W){let X=a(Q);j=e(Q),H.x=X.x+Q.clientLeft,H.y=X.y+Q.clientTop}}let Y=U&&!W&&!q?W1(U,V):x(0);return{width:K.width*j.x,height:K.height*j.y,x:K.x*j.x-V.scrollLeft*j.x+H.x+Y.x,y:K.y*j.y-V.scrollTop*j.y+H.y+Y.y}}function x1(G){return Array.from(G.getClientRects())}function w1(G){let J=r(G),K=N0(G),Q=G.ownerDocument.body,Z=S(J.scrollWidth,J.clientWidth,Q.scrollWidth,Q.clientWidth),q=S(J.scrollHeight,J.clientHeight,Q.scrollHeight,Q.clientHeight),U=-K.scrollLeft+F0(G),N=-K.scrollTop;if(f(Q).direction==="rtl")U+=S(J.clientWidth,Q.clientWidth)-Z;return{width:Z,height:q,x:U,y:N}}var Z1=25;function g1(G,J){let K=o(G),Q=r(G),Z=K.visualViewport,q=Q.clientWidth,U=Q.clientHeight,N=0,V=0;if(Z){q=Z.width,U=Z.height;let H=y0();if(!H||H&&J==="fixed")N=Z.offsetLeft,V=Z.offsetTop}let j=F0(Q);if(j<=0){let H=Q.ownerDocument,W=H.body,Y=getComputedStyle(W),X=H.compatMode==="CSS1Compat"?parseFloat(Y.marginLeft)+parseFloat(Y.marginRight)||0:0,T=Math.abs(Q.clientWidth-W.clientWidth-X);if(T<=Z1)q-=T}else if(j<=Z1)q+=j;return{width:q,height:U,x:N,y:V}}function p1(G,J){let K=a(G,!0,J==="fixed"),Q=K.top+G.clientTop,Z=K.left+G.clientLeft,q=n(G)?e(G):x(1),U=G.clientWidth*q.x,N=G.clientHeight*q.y,V=Z*q.x,j=Q*q.y;return{width:U,height:N,x:V,y:j}}function q1(G,J,K){let Q;if(J==="viewport")Q=g1(G,K);else if(J==="document")Q=w1(r(G));else if(c(J))Q=p1(J,K);else{let Z=V1(G);Q={x:J.x-Z.x,y:J.y-Z.y,width:J.width,height:J.height}}return s(Q)}function j1(G,J){let K=G0(G);if(K===J||!c(K)||U0(K))return!1;return f(K).position==="fixed"||j1(K,J)}function m1(G,J){let K=J.get(G);if(K)return K;let Q=J0(G,[],!1).filter((N)=>c(N)&&L0(N)!=="body"),Z=null,q=f(G).position==="fixed",U=q?G0(G):G;while(c(U)&&!U0(U)){let N=f(U),V=b0(U);if(!V&&N.position==="fixed")Z=null;if(q?!V&&!Z:!V&&N.position==="static"&&!!Z&&(Z.position==="absolute"||Z.position==="fixed")||I0(U)&&!V&&j1(G,U))Q=Q.filter((H)=>H!==U);else Z=N;U=G0(U)}return J.set(G,Q),Q}function d1(G){let{element:J,boundary:K,rootBoundary:Q,strategy:Z}=G,U=[...K==="clippingAncestors"?z0(J)?[]:m1(J,this._c):[].concat(K),Q],N=q1(J,U[0],Z),V=N.top,j=N.right,H=N.bottom,W=N.left;for(let Y=1;Y<U.length;Y++){let X=q1(J,U[Y],Z);V=S(X.top,V),j=p(X.right,j),H=p(X.bottom,H),W=S(X.left,W)}return{width:j-W,height:H-V,x:W,y:V}}function c1(G){let{width:J,height:K}=X1(G);return{width:J,height:K}}function f1(G,J,K){let Q=n(J),Z=r(J),q=K==="fixed",U=a(G,!0,q,J),N={scrollLeft:0,scrollTop:0},V=x(0);function j(){V.x=F0(Z)}if(Q||!Q&&!q){if(L0(J)!=="body"||I0(Z))N=N0(J);if(Q){let X=a(J,!0,q,J);V.x=X.x+J.clientLeft,V.y=X.y+J.clientTop}else if(Z)j()}if(q&&!Q&&Z)j();let H=Z&&!Q&&!q?W1(Z,N):x(0),W=U.left+N.scrollLeft-V.x-H.x,Y=U.top+N.scrollTop-V.y-H.y;return{x:W,y:Y,width:U.width,height:U.height}}function C0(G){return f(G).position==="static"}function U1(G,J){if(!n(G)||f(G).position==="fixed")return null;if(J)return J(G);let K=G.offsetParent;if(r(G)===K)K=K.ownerDocument.body;return K}function Y1(G,J){let K=o(G);if(z0(G))return K;if(!n(G)){let Z=G0(G);while(Z&&!U0(Z)){if(c(Z)&&!C0(Z))return Z;Z=G0(Z)}return K}let Q=U1(G,J);while(Q&&N1(Q)&&C0(Q))Q=U1(Q,J);if(Q&&U0(Q)&&C0(Q)&&!b0(Q))return K;return Q||H1(G)||K}var r1=async function(G){let J=this.getOffsetParent||Y1,K=this.getDimensions,Q=await K(G.floating);return{reference:f1(G.reference,await J(G.floating),G.strategy),floating:{x:0,y:0,width:Q.width,height:Q.height}}};function l1(G){return f(G).direction==="rtl"}var T1={convertOffsetParentRelativeRectToViewportRelativeRect:u1,getDocumentElement:r,getClippingRect:d1,getOffsetParent:Y1,getElementRects:r1,getClientRects:x1,getDimensions:c1,getScale:e,isElement:c,isRTL:l1};function B1(G,J){return G.x===J.x&&G.y===J.y&&G.width===J.width&&G.height===J.height}function o1(G,J){let K=null,Q,Z=r(G);function q(){var N;clearTimeout(Q),(N=K)==null||N.disconnect(),K=null}function U(N,V){if(N===void 0)N=!1;if(V===void 0)V=1;q();let j=G.getBoundingClientRect(),{left:H,top:W,width:Y,height:X}=j;if(!N)J();if(!Y||!X)return;let T=q0(W),B=q0(Z.clientWidth-(H+Y)),I=q0(Z.clientHeight-(W+X)),L=q0(H),F={rootMargin:-T+"px "+-B+"px "+-I+"px "+-L+"px",threshold:S(0,p(1,V))||1},z=!0;function k(E){let $=E[0].intersectionRatio;if($!==V){if(!z)return U();if(!$)Q=setTimeout(()=>{U(!1,0.0000001)},1000);else U(!1,$)}if($===1&&!B1(j,G.getBoundingClientRect()))U();z=!1}try{K=new IntersectionObserver(k,{...F,root:Z.ownerDocument})}catch(E){K=new IntersectionObserver(k,F)}K.observe(G)}return U(!0),q}function n1(G,J,K,Q){if(Q===void 0)Q={};let{ancestorScroll:Z=!0,ancestorResize:q=!0,elementResize:U=typeof ResizeObserver==="function",layoutShift:N=typeof IntersectionObserver==="function",animationFrame:V=!1}=Q,j=S0(G),H=Z||q?[...j?J0(j):[],...J?J0(J):[]]:[];H.forEach((L)=>{Z&&L.addEventListener("scroll",K,{passive:!0}),q&&L.addEventListener("resize",K)});let W=j&&N?o1(j,K):null,Y=-1,X=null;if(U){if(X=new ResizeObserver((L)=>{let[M]=L;if(M&&M.target===j&&X&&J)X.unobserve(J),cancelAnimationFrame(Y),Y=requestAnimationFrame(()=>{var F;(F=X)==null||F.observe(J)});K()}),j&&!V)X.observe(j);if(J)X.observe(J)}let T,B=V?a(G):null;if(V)I();function I(){let L=a(G);if(B&&!B1(B,L))K();B=L,T=requestAnimationFrame(I)}return K(),()=>{var L;if(H.forEach((M)=>{Z&&M.removeEventListener("scroll",K),q&&M.removeEventListener("resize",K)}),W==null||W(),(L=X)==null||L.disconnect(),X=null,V)cancelAnimationFrame(T)}}var L1=G1;var I1=J1,z1=a0,F1=Q1,M1=t0,O0=s0;var k1=K1,P0=(G,J,K)=>{let Q=new Map,Z={platform:T1,...K},q={...Z.platform,_c:Q};return i0(G,J,{...Z,platform:q})};var C=X0(_0(),1),_1=X0(_0(),1),$1=X0(w0(),1),i1=typeof document<"u",s1=function(){},M0=i1?_1.useLayoutEffect:s1;function k0(G,J){if(G===J)return!0;if(typeof G!==typeof J)return!1;if(typeof G==="function"&&G.toString()===J.toString())return!0;let K,Q,Z;if(G&&J&&typeof G==="object"){if(Array.isArray(G)){if(K=G.length,K!==J.length)return!1;for(Q=K;Q--!==0;)if(!k0(G[Q],J[Q]))return!1;return!0}if(Z=Object.keys(G),K=Z.length,K!==Object.keys(J).length)return!1;for(Q=K;Q--!==0;)if(!{}.hasOwnProperty.call(J,Z[Q]))return!1;for(Q=K;Q--!==0;){let q=Z[Q];if(q==="_owner"&&G.$$typeof)continue;if(!k0(G[q],J[q]))return!1}return!0}return G!==G&&J!==J}function C1(G){if(typeof window>"u")return 1;return(G.ownerDocument.defaultView||window).devicePixelRatio||1}function E1(G,J){let K=C1(G);return Math.round(J*K)/K}function R0(G){let J=C.useRef(G);return M0(()=>{J.current=G}),J}function EG(G){if(G===void 0)G={};let{placement:J="bottom",strategy:K="absolute",middleware:Q=[],platform:Z,elements:{reference:q,floating:U}={},transform:N=!0,whileElementsMounted:V,open:j}=G,[H,W]=C.useState({x:0,y:0,strategy:K,placement:J,middlewareData:{},isPositioned:!1}),[Y,X]=C.useState(Q);if(!k0(Y,Q))X(Q);let[T,B]=C.useState(null),[I,L]=C.useState(null),M=C.useCallback((_)=>{if(_!==E.current)E.current=_,B(_)},[]),F=C.useCallback((_)=>{if(_!==$.current)$.current=_,L(_)},[]),z=q||T,k=U||I,E=C.useRef(null),$=C.useRef(null),O=C.useRef(H),v=V!=null,y=R0(V),u=R0(Z),A=R0(j),P=C.useCallback(()=>{if(!E.current||!$.current)return;let _={placement:J,strategy:K,middleware:Y};if(u.current)_.platform=u.current;P0(E.current,$.current,_).then((h)=>{let l={...h,isPositioned:A.current!==!1};if(D.current&&!k0(O.current,l))O.current=l,$1.flushSync(()=>{W(l)})})},[Y,J,K,u,A]);M0(()=>{if(j===!1&&O.current.isPositioned)O.current.isPositioned=!1,W((_)=>({..._,isPositioned:!1}))},[j]);let D=C.useRef(!1);M0(()=>{return D.current=!0,()=>{D.current=!1}},[]),M0(()=>{if(z)E.current=z;if(k)$.current=k;if(z&&k){if(y.current)return y.current(z,k,P);P()}},[z,k,P,y,v]);let g=C.useMemo(()=>({reference:E,floating:$,setReference:M,setFloating:F}),[M,F]),b=C.useMemo(()=>({reference:z,floating:k}),[z,k]),R=C.useMemo(()=>{let _={position:K,left:0,top:0};if(!b.floating)return _;let h=E1(b.floating,H.x),l=E1(b.floating,H.y);if(N)return{..._,transform:"translate("+h+"px, "+l+"px)",...C1(b.floating)>=1.5&&{willChange:"transform"}};return{position:K,left:h,top:l}},[K,N,b.floating,H.x,H.y]);return C.useMemo(()=>({...H,update:P,refs:g,elements:b,floatingStyles:R}),[H,P,g,b,R])}var a1=(G)=>{function J(K){return{}.hasOwnProperty.call(K,"current")}return{name:"arrow",options:G,fn(K){let{element:Q,padding:Z}=typeof G==="function"?G(K):G;if(Q&&J(Q)){if(Q.current!=null)return O0({element:Q.current,padding:Z}).fn(K);return{}}if(Q)return O0({element:Q,padding:Z}).fn(K);return{}}}},_G=(G,J)=>{let K=L1(G);return{name:K.name,fn:K.fn,options:[G,J]}},$G=(G,J)=>{let K=I1(G);return{name:K.name,fn:K.fn,options:[G,J]}},CG=(G,J)=>{return{fn:k1(G).fn,options:[G,J]}},DG=(G,J)=>{let K=z1(G);return{name:K.name,fn:K.fn,options:[G,J]}},bG=(G,J)=>{let K=F1(G);return{name:K.name,fn:K.fn,options:[G,J]}};var yG=(G,J)=>{let K=M1(G);return{name:K.name,fn:K.fn,options:[G,J]}};var SG=(G,J)=>{let K=a1(G);return{name:K.name,fn:K.fn,options:[G,J]}};
2
+ export{w0 as b,D1 as c,Z0 as d,q0 as e,j0 as f,m as g,d as h,i,T0 as j,w as k,B0 as l,$0 as m,n1 as n,EG as o,_G as p,$G as q,CG as r,DG as s,bG as t,yG as u,SG as v,e1 as w,GG as x,QG as y};
@@ -0,0 +1,50 @@
1
+ import{E as Vz,F as j,H as Sz,I as yz,N as Xz}from"/chunk-v797g6ap.js";import{Ba as P,Ca as Mz,Gc as A,O as w,P as W,Xa as Dz,db as Nz}from"/chunk-h0hk61pm.js";import{Mc as G}from"/chunk-h3evrtyp.js";var Q=G(w(),1);var K=G(W(),1),nz=[{label:"Trivial",prompt:"Reply with exactly: pong"},{label:"Reasoning",prompt:"Think carefully: a farmer has 17 sheep, all but 9 run away, then he buys twice as many as remain. How many sheep now? Reason it out before answering."},{label:"Command",prompt:"Run `ls -la` and summarize what you see in one sentence."},{label:"File edit",prompt:"Create or overwrite scratch.txt with three random words, one per line."},{label:"Plan",prompt:"Make a 3-step plan (use your plan tool) for adding a README to this folder, then execute it."},{label:"Subagent",prompt:"Spawn a subagent (collab/agent tool) to count the files in this directory and report back its answer."},{label:"Web search",prompt:"Search the web for the current Bun version and tell me what you find."},{label:"Slow (interrupt me)",prompt:"Run this exact command: sleep 30 && echo done. Nothing else."}];function iz(Z,Y=110){let _=JSON.stringify(Z);if(!_)return"";return _.length>Y?_.slice(0,Y)+"…":_}function p(Z){let Y=Z;if(typeof Y?.method==="string")return"id"in Y?`${Y.method} #${Y.id}`:Y.method;if("id"in(Y??{}))return`response #${Y.id}`;if(typeof Y?.kind==="string")return`${Y.kind}`;if(typeof Y?.type==="string")return`${Y.type}`;return"?"}function e(Z){return new Date(Z).toLocaleTimeString("en-GB",{hour12:!1})+"."+String(Z%1000).padStart(3,"0")}function s({time:Z,badge:Y,badgeClass:_,label:q,body:$}){return K.jsxs("details",{className:"group border-b border-border/40 px-2 py-1 text-[11px] leading-tight",children:[K.jsxs("summary",{className:"flex cursor-pointer items-baseline gap-2 font-mono whitespace-nowrap",children:[K.jsx("span",{className:"text-muted-foreground/60 tabular-nums",children:e(Z)}),K.jsx("span",{className:P("rounded px-1 font-semibold",_),children:Y}),K.jsx("span",{className:"shrink-0 font-semibold",children:q}),K.jsx("span",{className:"truncate text-muted-foreground",children:iz($)})]}),K.jsx("pre",{className:"mt-1 max-h-80 overflow-auto rounded bg-muted p-2 font-mono text-[10px] whitespace-pre-wrap",children:JSON.stringify($,null,2)})]})}function Oz({title:Z,hint:Y,controls:_,onCopy:q,onClear:$,children:I}){let O=Q.useRef(null),[F,N]=Q.useState(!0),[C,B]=Q.useState(!1),S=Q.useCallback(()=>{q?.(),B(!0),setTimeout(()=>B(!1),1500)},[q]);return Q.useEffect(()=>{if(F&&O.current)O.current.scrollTop=O.current.scrollHeight}),K.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col rounded-xl border border-border bg-background",children:[K.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-2 py-1",children:[typeof Z==="string"?K.jsx("span",{className:"text-xs font-semibold",children:Z}):Z,Y&&K.jsx("span",{className:"truncate text-[10px] text-muted-foreground",children:Y}),K.jsx("span",{className:"grow"}),_,K.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[K.jsx("input",{type:"checkbox",checked:F,onChange:(J)=>N(J.target.checked)}),"follow"]}),q&&K.jsx(A,{type:"button",variant:"ghost",size:"icon-sm",onClick:S,"aria-label":"Copy log",title:"Copy log",children:C?K.jsx(Dz,{stroke:1.75,className:"text-muted-foreground"}):K.jsx(Nz,{stroke:1.75})}),$&&K.jsx(A,{type:"button",variant:"ghost",size:"sm",onClick:$,children:"Clear"})]}),K.jsx("div",{ref:O,className:"min-h-0 flex-1 overflow-y-auto",children:I})]})}function Bz(){let[Z,Y]=Vz(),[_,q]=Q.useState([]),[$,I]=Q.useState(()=>Z.get("workspace")??""),[O,F]=Q.useState([]),[N,C]=Q.useState(""),[B,S]=Q.useState(""),[J,U]=Q.useState(!0),[V,M]=Q.useState(()=>crypto.randomUUID()),[b,R]=Q.useState(!0),[qz,Hz]=Q.useState(""),[x,bz]=Q.useState(null),[d,u]=Q.useState([]),[f,Uz]=Q.useState([]),[g,c]=Q.useState(null),[l,hz]=Q.useState(!1),[E,Az]=Q.useState("frames"),[gz,mz]=Q.useState(60),n=Q.useRef(null),i=Q.useRef(0),k=Q.useRef(null),pz=Q.useRef(0),h=Q.useRef(V);h.current=V,Q.useEffect(()=>{fetch("/api/workspaces").then((z)=>z.json()).then((z)=>{q(z),I((X)=>X&&z.some((H)=>H.id===X)?X:z[0]?.id??"")}).catch(()=>{})},[]);let wz=Q.useCallback((z)=>{I(z),Y((X)=>{return X.set("workspace",z),X},{replace:!0})},[Y]),m=_.find((z)=>z.id===$)?.type??"claude-code";Q.useEffect(()=>{if(!$)return;fetch(`/api/workspaces/${$}/models`).then((z)=>z.json()).then((z)=>F(z.models)).catch(()=>F([]))},[$]),Q.useEffect(()=>{M(crypto.randomUUID()),R(!0),c(null)},[$]),Q.useEffect(()=>{if(!$)return;i.current=0,u([]);let z=setInterval(async()=>{try{let X=await fetch(`/api/workspaces/${$}/harness/debug?sinceWire=${i.current}&sinceBroadcast=-1`);if(!X.ok)return;let H=await X.json();if(bz(H.process),H.wire.length)i.current=H.wire[H.wire.length-1].seq,u((t)=>[...t,...H.wire].slice(-1000))}catch{}},1000);return()=>clearInterval(z)},[$]),Q.useEffect(()=>{if(!$)return;let z=new WebSocket(Mz("/ws"));return k.current=z,z.onmessage=(X)=>{try{let H=JSON.parse(String(X.data));if(H.workspaceId&&H.workspaceId!==$)return;if(H.type==="session_renamed"&&H.from===h.current)M(H.to),R(!1);Uz((t)=>[...t,{seq:++pz.current,ts:Date.now(),frame:H}].slice(-1000))}catch{}},()=>{k.current=null,z.close()}},[$]);let Gz=Q.useCallback((z)=>{if(!z.trim()||!k.current||k.current.readyState!==WebSocket.OPEN)return;k.current.send(JSON.stringify({type:"chat",workspaceId:$,sessionId:h.current,isNew:b,content:z,optimisticId:crypto.randomUUID(),...N?{model:N}:{},...B?{effort:B}:{},stream:J})),R(!1)},[$,b,N,B,J]),jz=Q.useCallback(()=>{k.current?.send(JSON.stringify({type:"stop",workspaceId:$,sessionId:h.current}))},[$]),xz=Q.useCallback(()=>{M(crypto.randomUUID()),R(!0),c(null)},[]),dz=Q.useCallback(async()=>{let z=await fetch(`/api/workspaces/${$}/sessions/${h.current}/events`);c(z.ok?await z.json():[])},[$]),uz=Q.useMemo(()=>O.find((z)=>z.value===N)?.supportedEffortLevels??[],[O,N]),[a,fz]=Q.useState(""),r=Q.useMemo(()=>{let z=a.trim().toLowerCase();return z?d.filter((X)=>p(X.frame).toLowerCase().includes(z)):d},[d,a]),o=Q.useMemo(()=>l?f.filter((z)=>z.frame.type!=="preview"):f,[f,l]),cz=Q.useCallback(()=>{navigator.clipboard.writeText(r.map((z)=>`${e(z.ts)} ${z.dir==="send"?"→":"←"} ${JSON.stringify(z.frame)}`).join(`
2
+ `))},[r]),lz=Q.useCallback(()=>{navigator.clipboard.writeText(E==="frames"?o.map((z)=>`${e(z.ts)} ws ${JSON.stringify(z.frame)}`).join(`
3
+ `):JSON.stringify(g??[],null,2))},[E,o,g]);return K.jsxs("div",{className:"flex h-dvh flex-col gap-2 bg-muted p-2",children:[K.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-xl border border-border bg-background px-2 py-1.5 text-xs",children:[K.jsx("span",{className:"font-semibold tracking-widest text-muted-foreground uppercase",children:"Harness debug"}),K.jsxs("select",{className:"rounded border border-border bg-background px-1 py-0.5",value:$,onChange:(z)=>wz(z.target.value),children:[_.length===0&&K.jsx("option",{value:"",children:"no workspaces"}),_.map((z)=>K.jsx("option",{value:z.id,children:`${z.name??z.displayPath??z.path} · ${z.type??"claude-code"}`},z.id))]}),K.jsxs("select",{className:"rounded border border-border bg-background px-1 py-0.5",value:N,onChange:(z)=>C(z.target.value),children:[K.jsx("option",{value:"",children:"default model"}),O.map((z)=>K.jsx("option",{value:z.value,children:z.displayName},z.value))]}),K.jsxs("select",{className:"rounded border border-border bg-background px-1 py-0.5",value:B,onChange:(z)=>S(z.target.value),children:[K.jsx("option",{value:"",children:"default effort"}),uz.map((z)=>K.jsx("option",{value:z,children:z},z))]}),K.jsxs("label",{className:"flex items-center gap-1",children:[K.jsx("input",{type:"checkbox",checked:J,onChange:(z)=>U(z.target.checked)}),"stream"]}),K.jsx("span",{className:"grow"}),m==="codex"&&K.jsx("span",{className:P("rounded px-1.5 py-0.5 font-mono text-[10px]",x?.running?"bg-green-500/15 text-green-600":"bg-muted text-muted-foreground"),children:x?.running?`app-server pid ${x.pid}`:"app-server not running"}),K.jsxs("span",{className:"max-w-56 truncate font-mono text-[10px] text-muted-foreground",children:["thread ",V]}),K.jsx(A,{type:"button",size:"sm",variant:"outline",onClick:xz,children:"New thread"}),K.jsx(A,{type:"button",size:"sm",variant:"outline",onClick:jz,children:"Stop"})]}),K.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 rounded-xl border border-border bg-background px-2 py-1.5",children:[nz.map((z)=>K.jsx(A,{type:"button",size:"sm",variant:"secondary",onClick:()=>Gz(z.prompt),children:z.label},z.label)),K.jsx("input",{className:"min-w-48 grow rounded border border-border bg-background px-2 py-1 text-xs",placeholder:"or type a custom prompt and hit Enter…",value:qz,onChange:(z)=>Hz(z.target.value),onKeyDown:(z)=>{if(z.key==="Enter")Gz(qz),Hz("")}})]}),K.jsxs("div",{ref:n,className:"flex min-h-0 flex-1 gap-1",children:[K.jsx("div",{className:"flex min-w-0",style:{width:`${gz}%`},children:K.jsx(Oz,{title:m==="codex"?"App-server wire":"Harness wire",hint:m==="codex"?"raw JSON-RPC, both directions":m==="openclaw"?"no wire tap for OpenClaw yet":"raw Agent SDK messages + enqueued inputs",controls:K.jsx("input",{className:"w-36 rounded border border-border bg-background px-1.5 py-0.5 font-mono text-[10px]",placeholder:"filter types…",value:a,onChange:(z)=>fz(z.target.value)}),onCopy:cz,onClear:()=>u([]),children:r.map((z)=>K.jsx(s,{time:z.ts,badge:z.dir==="send"?"→":"←",badgeClass:z.dir==="send"?"bg-blue-500/15 text-blue-600":"bg-amber-500/15 text-amber-600",label:p(z.frame),body:z.frame},z.seq))})}),K.jsx("div",{className:"w-1.5 shrink-0 cursor-col-resize touch-none rounded-full hover:bg-border active:bg-border",onPointerDown:(z)=>{z.preventDefault(),z.currentTarget.setPointerCapture(z.pointerId)},onPointerMove:(z)=>{if(!z.currentTarget.hasPointerCapture(z.pointerId)||!n.current)return;let X=n.current.getBoundingClientRect(),H=(z.clientX-X.left)/X.width*100;mz(Math.min(80,Math.max(20,H)))}}),K.jsx(Oz,{title:K.jsxs("span",{className:"flex items-center gap-1",children:[K.jsx("button",{type:"button",className:P("rounded px-1.5 py-0.5 text-xs",E==="frames"?"bg-muted font-medium":"text-muted-foreground"),onClick:()=>Az("frames"),children:"Client frames"}),K.jsx("button",{type:"button",className:P("rounded px-1.5 py-0.5 text-xs",E==="events"?"bg-muted font-medium":"text-muted-foreground"),onClick:()=>Az("events"),children:"Durable events"})]}),hint:E==="frames"?"what the browser receives on /ws":"GET /sessions/:id/events replay",onCopy:lz,onClear:E==="frames"?()=>Uz([]):void 0,children:E==="frames"?K.jsxs(K.Fragment,{children:[K.jsx("div",{className:"border-b border-border/40 px-2 py-1",children:K.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[K.jsx("input",{type:"checkbox",checked:l,onChange:(z)=>hz(z.target.checked)}),"hide preview frames"]})}),o.map((z)=>K.jsx(s,{time:z.ts,badge:"ws",badgeClass:"bg-purple-500/15 text-purple-600",label:p(z.frame),body:z.frame},z.seq))]}):K.jsxs(K.Fragment,{children:[K.jsx("div",{className:"border-b border-border/40 px-2 py-1",children:K.jsx(A,{type:"button",size:"sm",variant:"secondary",onClick:dz,children:"Fetch events"})}),g?.map((z,X)=>K.jsx(s,{time:Date.now(),badge:"ev",badgeClass:"bg-teal-500/15 text-teal-600",label:p(z),body:z},X)),g?.length===0&&K.jsx("div",{className:"p-2 text-[11px] text-muted-foreground",children:"no events"})]})})]})]})}var zz=G(w(),1);var y=G(w(),1);var L=G(W(),1),az=5,rz=5,Wz=[".....","####.","#.#.#","#.#.#","#.#.#"];function Lz(Z){return Z.map((Y)=>[...Y].map((_)=>_==="#"))}function oz(){return Array.from({length:rz},()=>Array.from({length:az},()=>!1))}function Tz(){let[Z,Y]=y.useState(()=>Lz(Wz)),[_,q]=y.useState(!1),$=y.useRef(!0),[I,O]=y.useState(!1);y.useEffect(()=>{let J=()=>q(!1);return window.addEventListener("mouseup",J),()=>window.removeEventListener("mouseup",J)},[]);function F(J,U,V){Y((M)=>{if(M[J][U]===V)return M;let b=M.map((R)=>R.slice());return b[J][U]=V,b})}function N(J,U){let V=!Z[J][U];$.current=V,q(!0),F(J,U,V)}function C(J,U){if(_)F(J,U,$.current)}let B=Z.map((J)=>J.map((U)=>U?"#":".").join("")).join(`
4
+ `);async function S(){await navigator.clipboard.writeText(B),O(!0),setTimeout(()=>O(!1),1200)}return L.jsxs("div",{className:"flex flex-col items-center gap-4",children:[L.jsx("div",{className:"grid w-fit grid-cols-[repeat(5,28px)] gap-px bg-border p-px select-none",children:Z.map((J,U)=>J.map((V,M)=>L.jsx("div",{onMouseDown:()=>N(U,M),onMouseEnter:()=>C(U,M),className:P("size-7 cursor-pointer",V?"bg-foreground":"bg-background")},`${U}-${M}`)))}),L.jsx("pre",{className:"rounded-lg border border-border bg-card px-3 py-2 text-center font-mono text-sm leading-snug text-card-foreground",children:B}),L.jsxs("div",{className:"flex gap-2",children:[L.jsx(A,{type:"button",size:"sm",onClick:S,children:I?"Copied!":"Copy"}),L.jsx(A,{type:"button",variant:"secondary",size:"sm",onClick:()=>Y(oz()),children:"Clear"}),L.jsx(A,{type:"button",variant:"secondary",size:"sm",onClick:()=>Y(Lz(Wz)),children:"Reset"})]})]})}var D=G(W(),1),tz=[{value:"moi",label:"M"},{value:"moi-full",label:"moi"}],sz=[{value:"none",label:"None"},{value:"wave",label:"Wave"},{value:"chaos",label:"Random"}];function Fz({options:Z,value:Y,onChange:_}){return D.jsx("div",{className:"flex gap-1 rounded-xl bg-accent p-1",children:Z.map((q)=>D.jsx(A,{type:"button",variant:Y===q.value?"default":"ghost",size:"sm",onClick:()=>_(q.value),children:q.label},String(q.value)))})}function Ez(){let[Z,Y]=zz.useState("moi"),[_,q]=zz.useState("none");return D.jsxs("div",{className:"relative flex min-h-dvh flex-col items-center justify-center gap-8 bg-muted",children:[D.jsx("span",{className:"absolute top-5 left-5 text-[11px] font-medium tracking-widest text-muted-foreground uppercase",children:"Playground"}),D.jsx(Tz,{}),D.jsx(yz,{sprite:Z,effect:_==="none"?void 0:_,pixelSize:3,gap:0.5}),D.jsxs("div",{className:"flex flex-col items-center gap-2",children:[D.jsx(Fz,{options:tz,value:Z,onChange:Y}),D.jsx(Fz,{options:sz,value:_,onChange:q})]})]})}var vz=G(w(),1);var Qz="/Users/kim/git/confetti",Pz={toolCallId:"toolu_fixture_tool_search",name:"ToolSearch",caller:"model",provider:"claude-code",state:"success",input:{query:"select:mcp__notion__notion-search,mcp__notion__notion-get-teams,mcp__notion__notion-get-users",max_results:3},output:`mcp__notion__notion-search
5
+ mcp__notion__notion-get-teams
6
+ mcp__notion__notion-get-users`},Iz={toolCallId:"toolu_fixture_notion_search",name:"mcp__notion__notion-search",caller:"model",provider:"claude-code",state:"success",input:{query:"project notes docs overview",query_type:"internal",page_size:25},output:'{"results":[{"id":"3f1c9a72-0d62-4511-9dc9-5b7f38409a22","title":"Reading List","url":"https://app.notion.com/p/3f1c9a720d6245119dc95b7f38409a22?pvs=1","type":"page","highlight":"Reading List","timestamp":"2024-10-17T13:51:00.000Z"},{"id":"8b2d17aa-6741-4993-88bc-5adf2dabb8da","title":"To-Do","url":"https://app.notion.com/p/8b2d17aa6741499388bc5adf2dabb8da?pvs=1","type":"page","highlight":"canvas-confetti performance notes and particle pooling","timestamp":"2026-06-15T13:14:00.000Z"},{"id":"244536fd-e65b-433f-92bf-aa95efa91f35","title":"Plans & Notes","url":"https://app.notion.com/p/244536fde65b433f92bfaa95efa91f35?pvs=1","type":"database","highlight":"Plans & Notes","timestamp":"2024-02-06T10:02:00.000Z"},{"id":"5a668c31-b678-4035-b58e-d33e3ce86f5e","title":"Animation Research","url":"https://app.notion.com/p/5a668c31b6784035b58ed33e3ce86f5e?pvs=1","type":"page","highlight":"spring easings vs. bezier — generate N particle bursts in parallel and compare frame budgets","timestamp":"2025-11-03T08:07:00.000Z"},{"id":"41c28e19-b678-40df-ade3-dd8cec63de64","title":"Roadmap","url":"https://app.notion.com/p/41c28e19b67840dfade3dd8cec63de64?pvs=1","type":"database","highlight":"Roadmap","timestamp":"2026-06-09T08:00:00.000Z"},{"id":"6d9e2f44-b678-423e-9795-01de5d5f6734","title":"Meeting notes","url":"https://app.notion.com/p/6d9e2f44b678423e979501de5d5f6734?pvs=1","type":"database","highlight":"Meeting notes","timestamp":"2025-11-06T15:22:00.000Z"},{"id":"7fa31c55-b678-401d-948f-c47118e21516","title":"illustrations","url":"https://app.notion.com/p/7fa31c55b678401d948fc47118e21516?pvs=1","type":"page","highlight":"illustrations","timestamp":"2026-06-09T18:01:00.000Z"},{"id":"92e4b5c8-8d50-4938-8808-716a4e89dba6","title":"Weekly Update: March 4","url":"https://app.notion.com/p/92e4b5c88d5049388808716a4e89dba6?pvs=1","type":"page","highlight":"add backlog project for migrating v1 users","timestamp":"2022-07-30T18:34:00.000Z"},{"id":"1c778a02-b678-407b-9340-e1e830e38c50","title":"demo site","url":"https://app.notion.com/p/1c778a02b678407b9340e1e830e38c50?pvs=1","type":"page","highlight":"Interactive playground (CodeSandbox style)","timestamp":"2026-06-15T08:15:00.000Z"},{"id":"e3558d21-b678-406b-9a90-efaac9d864cf","title":"Feature Requests","url":"https://app.notion.com/p/e3558d21b678406b9a90efaac9d864cf?pvs=1","type":"database","highlight":"Feature Requests","timestamp":"2026-03-09T13:03:00.000Z"},{"id":"a91f4c6e-ce16-4002-bcb1-ead4923b9963","title":"Beta feedback","url":"https://app.notion.com/p/a91f4c6ece164002bcb1ead4923b9963?pvs=1","type":"database","highlight":"Beta feedback","timestamp":"2026-04-22T11:56:00.000Z"},{"id":"b0537e88-b678-40f3-8f04-cc7fef16e055","title":"confetti-v2","url":"https://app.notion.com/p/b0537e88b67840f38f04cc7fef16e055?pvs=1","type":"page","highlight":"WebGL renderer spike — offscreen canvas + worker, fall back to 2d context","timestamp":"2026-04-21T09:42:00.000Z"},{"id":"c6b19d34-b678-4145-9023-ffb37c04037d","title":"Physics Notes","url":"https://app.notion.com/p/c6b19d34b67841459023ffb37c04037d?pvs=1","type":"page","highlight":"Physics Notes","timestamp":"2026-04-21T13:07:00.000Z"},{"id":"d84a6f10-b678-41ea-845c-d7cc7c2ad2c4","title":"Docs Outline","url":"https://app.notion.com/p/d84a6f10b67841ea845cd7cc7c2ad2c4?pvs=1","type":"page","highlight":"\uD83D\uDCD8 Getting started — full walkthrough (install, first burst, presets)","timestamp":"2026-06-09T08:44:00.000Z"},{"id":"f2c07b45-b678-402c-a8e7-d897826cf96d","title":"old","url":"https://app.notion.com/p/f2c07b45b678402ca8e7d897826cf96d?pvs=1","type":"page","highlight":"Notes:","timestamp":"2026-03-06T16:31:00.000Z"},{"id":"09d6e2a7-9908-4d54-be46-a974ac5019da","title":"Weekly Update: Jan 28","url":"https://app.notion.com/p/09d6e2a799084d54be46a974ac5019da'},ez={toolCallId:"toolu_fixture_notion_fetch_oss",name:"mcp__notion__notion-fetch",caller:"model",provider:"claude-code",state:"success",input:{id:"55e1c208-1f0f-47cd-9422-bd7dbc54d536"},output:'{"metadata":{"type":"page"},"title":"\uD83D\uDEE5 Open-Source","url":"https://app.notion.com/p/55e1c2081f0f47cd9422bd7dbc54d536","text":"Here is the result of \\"view\\" for the Page with URL https://app.notion.com/p/55e1c2081f0f47cd9422bd7dbc54d536 as of 2026-05-29T13:08:56.275Z:\\n<page url=\\"https://app.notion.com/p/55e1c2081f0f47cd9422bd7dbc54d536\\" icon=\\"\uD83D\uDEE5\\">\\n<ancestor-path></ancestor-path>\\n<properties>\\n{\\"title\\":\\"Open-Source\\"}\\n</properties>\\n<content>\\n<page url=\\"https://app.notion.com/p/71a2b39c6438406fac456aeef33a046d\\">tinyrouter</page>\\n<page url=\\"https://app.notion.com/p/83b4c5de45af40c28a19f635332f9c4c\\">confetti</page>\\n<page url=\\"https://app.notion.com/p/95c6d7f0210d42e0888168401a40345e\\">mdnav</page>\\n<page url=\\"https://app.notion.com/p/07d8e912111a4df295726341c22decbc\\">pixelpad</page>\\n<page url=\\"https://app.notion.com/p/19e0fb3405c743628f0c0b864b4182ee\\">`use-sparkle`</page>\\n<page url=\\"https://app.notion.com/p/2bf21c561e5d4e888f6cdb86e5adcb9d\\">use-hotkey</page>\\n<empty-block/>\\n<empty-block/>\\n</content>\\n</page>"}'},zK={toolCallId:"toolu_fixture_notion_fetch_confetti",name:"mcp__notion__notion-fetch",caller:"model",provider:"claude-code",state:"success",input:{id:"83b4c5de-45af-40c2-8a19-f635332f9c4c"},output:'{"metadata":{"type":"page"},"title":"confetti","url":"https://app.notion.com/p/83b4c5de45af40c28a19f635332f9c4c","text":"Here is the result of \\"view\\" for the Page with URL https://app.notion.com/p/83b4c5de45af40c28a19f635332f9c4c as of 2024-04-19T10:05:10.098Z:\\n<page url=\\"https://app.notion.com/p/83b4c5de45af40c28a19f635332f9c4c\\">\\n<ancestor-path>\\n<parent-page url=\\"https://app.notion.com/p/55e1c2081f0f47cd9422bd7dbc54d536\\" title=\\"Open-Source\\"/>\\n</ancestor-path>\\n<properties>\\n{\\"title\\":\\"confetti\\"}\\n</properties>\\n<content>\\n- [x] Split the physics step from the render step\\n- [x] Basic React API\\n\\t- [x] Controlled/uncontrolled\\n\\t- [x] SSR: ok! No canvas until mount\\n\\t- [x] Detach on unmount\\n\\t- [x] `asChild` prop\\n\\t- [x] Block elements and `tagName`\\n\\t- [x] Fire on `click`\\n\\t- [x] Pass particle options\\n\\t- [x] asChild types\\n\\t- [x] Reduced-motion fallback\\n- [x] Pause bursts when the tab is hidden (VisibilityObserver)\\n- [x] Default burst has no trail. Needs a wrapper that disables the selector via `:has` — but then how do block elements animate? And `asChild` breaks.\\n- [x] Dark/light theme, none, auto, accent color\\n- [x] Demo: light/dark theme\\n- [x] `useIsomorphicLayoutEffect`\\n- [x] Particle pooling (no per-frame allocs)\\n- [x] Build and package\\n- [x] Publish a canary and dogfood it on the demo site\\n- [x] Fallback for Safari + Firefox: pre-rendered sprite sheet, three layers offset by primes 3, 5, 7 — loop four frames\\n- [x] data-active\\n- [x] pixelRatio for the fallback\\n- [x] How should styles load? Ship them separately.\\n- [x] Simple README\\n- [x] Get the easing curve right\\n- [ ] Use inline style in SSR\\n<empty-block/>\\n```javascript\\n// Default confetti: uncontrolled, light theme, fires on click, creates an\\n// inline <span> wrapper, no trail, does not follow the pointer\\n\\n/**\\n * Elements \\n */\\n<Confetti>Party!</Confetti> // <span>Party!</span>\\n<Confetti className=\\"custom\\">Party!</Confetti>\\n\\n// block elements \\n<Confetti block><img /></Confetti> // <div><img /></div>\\n<Confetti tagName=\\"div\\"><img /></Confetti> // alias\\n\\n// advanced\\n<Confetti asChild><button aria-label=\\"celebrate\\" /></Confetti>\\n\\n/**\\n * Controlled/uncontrolled component \\n */\\n\\n<Confetti /> // fires on click, uncontrolled\\n<Confetti fireOn=\\"click\\" />\\n<Confetti fireOn=\\"hover\\" />\\n<Confetti defaultActive={false} onChange={(value) => change} />\\n\\n// when `active` is provided, it becomes controlled and\\n// `fireOn` and `defaultActive` have no effect \\n<Confetti active={true}>Always bursting</Confetti> // controlled\\n<Confetti active={value} onClick={() => setValue()}</Confetti> // controlled\\n\\n/** \\n * Theming \\n */\\n\\n<Confetti /> // default theme is `light`\\n<Confetti theme=\\"dark\\" />\\n<Confetti theme=\\"auto\\" /> // system-defined\\n<Confetti theme=\\"dark\\" accentColor=\\"red\\" /> // use `colord` here\\n\\n/**\\n * Particle options\\n */\\n<Confetti count={120} gravity={0.8} spread={60}>Boom</Confetti>\\n<Confetti preset=\\"fireworks\\">Boom</Confetti>\\n\\n/** \\n * Styling \\n */\\n\\nimport { Confetti } from \\"confetti\\"\\n\\nimport { Confetti } from \\"confetti/unstyled\\"\\nimport \\"confetti/styles.css\\"\\n```\\n<empty-block/>\\n<empty-block/>\\n<page url=\\"https://app.notion.com/p/3dc43e781e5d4e888f6cdb86e5adcb00\\">Confetti: website</page>\\n</content>\\n</page>"}'},Rz={toolCallId:"toolu_fixture_bash_pwd",name:"Bash",caller:"model",provider:"claude-code",state:"success",input:{command:'pwd && echo "---" && ls -la && echo "--- git ---" && git rev-parse --is-inside-work-tree 2>/dev/null && git remote -v 2>/dev/null',description:"Show current directory and git info"},output:`/Users/kim/git/confetti
7
+ ---
8
+ total 232
9
+ drwxr-xr-x 19 kim staff 608 Jun 9 19:41 .
10
+ drwxr-xr-x 52 kim staff 1664 Jun 15 10:32 ..
11
+ drwx------ 3 kim staff 96 Nov 17 2025 .claude
12
+ drwxr-xr-x 15 kim staff 480 May 23 09:30 .git
13
+ -rw-r--r-- 1 kim staff 294 May 23 08:52 .gitignore
14
+ drwxr-xr-x@ 3 kim staff 96 Jun 9 19:41 .moi
15
+ -rw-r--r-- 1 kim staff 95 Nov 13 2025 .prettierrc
16
+ -rw-r--r-- 1 kim staff 73126 May 23 09:29 bun.lock
17
+ drwxr-xr-x@ 8 kim staff 256 May 23 09:31 esm
18
+ -rw-r--r-- 1 kim staff 1210 Nov 13 2025 LICENSE
19
+ drwxr-xr-x 160 kim staff 5120 May 23 09:30 node_modules
20
+ -rw-r--r-- 1 kim staff 2072 May 23 08:52 package.json
21
+ -rw-r--r--@ 1 kim staff 4600 May 5 21:49 README.md
22
+ drwxr-xr-x 16 kim staff 512 May 5 21:49 src
23
+ -rw-r--r-- 1 kim staff 605 Nov 13 2025 tsconfig.json
24
+ -rw-r--r-- 1 kim staff 233 Nov 13 2025 tsconfig.node.json
25
+ -rw-r--r-- 1 kim staff 1582 May 23 08:52 vite.config.ts
26
+ drwxr-xr-x 11 kim staff 352 May 5 21:49 web
27
+ --- git ---
28
+ true
29
+ origin git@github.com:acme/confetti.git (fetch)
30
+ origin git@github.com:acme/confetti.git (push)`},KK={toolCallId:"toolu_fixture_read_readme",name:"Read",caller:"model",provider:"claude-code",state:"success",input:{file_path:"/Users/kim/git/confetti/docs/open-source/README.md"},output:` 1 # \uD83D\uDEE5 Open-Source
31
+ 2
32
+ 3 Working notes, specs, and ideas for my open-source projects.
33
+ 4
34
+ 5 | Project | What it is |
35
+ 6 |---------|------------|
36
+ 7 | tinyrouter | Minimalist hooks-based router for React |
37
+ 8 | confetti | <Confetti> burst effect for React |
38
+ `},QK={toolCallId:"toolu_fixture_github_get_me",name:"mcp__github__get_me",caller:"model",provider:"claude-code",state:"success",input:{},output:'{"login":"octocat","id":583231,"profile_url":"https://github.com/octocat","avatar_url":"https://avatars.githubusercontent.com/u/583231?v=4","details":{"name":"The Octocat","blog":"https://github.blog","location":"San Francisco","hireable":true,"twitter_username":"github","public_repos":8,"public_gists":8,"followers":700,"following":9,"created_at":"2011-01-25T18:44:36Z","updated_at":"2026-06-13T09:04:50Z"}}'},kz={type:"reasoning",text:`The user is greeting me casually with "Hey bro". This is a friendly greeting and they're not asking me to do anything specific yet. I should respond in a friendly, casual way and let them know I'm ready to help with whatever they need.`},YK={toolCallId:"toolu_fixture_skill_widgets",name:"Skill",caller:"model",provider:"claude-code",state:"success",input:{skill:"widgets"},skill:{skillName:"widgets"},output:"Launching skill: widgets"},Yz=[{type:"tool-call",call:Rz}],Zz=[kz,{type:"tool-call",call:Pz},{type:"tool-call",call:YK},{type:"tool-call",call:Iz},{type:"tool-call",call:ez},{type:"tool-call",call:KK},{type:"tool-call",call:Rz},{type:"tool-call",call:zK},{type:"tool-call",call:QK}],ZK={toolCallId:"toolu_fixture_running_bash",name:"Bash",caller:"model",provider:"claude-code",state:"running",input:{command:"bun test --coverage",description:"Run the test suite"}},_z=[kz,{type:"tool-call",call:Pz},{type:"tool-call",call:Iz},{type:"tool-call",call:ZK},{type:"reasoning",text:"The test run is still going. Once it passes I will write the summary into docs/ and open a PR."}],Kz={toolCallId:"toolu_fixture_subagent",name:"Agent",caller:"subagent",provider:"claude-code",state:"running",input:{description:"Explore mdnav-demo repo structure and purpose",subagent_type:"Explore",prompt:"Explore the mdnav-demo repository to understand what it is. Look at the repo structure, what mdnav is, example markdown, and the purpose. Give a comprehensive overview citing specific files."},output:"",subagent:{taskId:"task_explore_mdnav",description:"Explore mdnav-demo repo structure and purpose",status:"running",usage:{totalTokens:18407,toolUses:8,durationMs:10725},progress:["Reading ~/git/mdnav-demo","Reading README.md","Reading package.json","Reading CLAUDE.md","Running ls -la /Users/kim/git/mdnav-demo/","Finding **/*.md","Finding **/*.{js,ts,jsx,tsx}","Running head -100 /Users/kim/git/mdnav-demo/moby-dick.md"],transcript:[{id:"sub-1",role:"assistant",origin:{kind:"user-input"},parts:[{type:"reasoning",text:"Let me map the repo: list the markdown files, read the README, then see what the mdnav binary does."},{type:"tool-call",call:{toolCallId:"sub-glob",name:"Glob",caller:"model",provider:"claude-code",state:"success",input:{pattern:"**/*.md"},output:`README.md
39
+ docs/moby-dick.md
40
+ docs/sections/01-introduction.md
41
+ docs/sections/02-findings.md`}},{type:"tool-call",call:{toolCallId:"sub-bash",name:"Bash",caller:"model",provider:"claude-code",state:"success",input:{command:"mdnav --help"},output:`mdnav — navigate large markdown
42
+
43
+ USAGE: mdnav <file> <command>
44
+
45
+ COMMANDS:
46
+ toc print the table of contents
47
+ read read a section (fuzzy/regex/path selector)
48
+ search full-text search`}}]},{id:"sub-2",role:"assistant",origin:{kind:"user-input"},parts:[{type:"text",text:`## Comprehensive Overview of mdnav-demo
49
+
50
+ **mdnav-demo** showcases **mdnav**, a CLI for large markdown documents, using the full text of Moby-Dick as a large-document fixture.`}]}]}},_K={...Kz,toolCallId:"toolu_fixture_subagent_done",state:"success",output:"mdnav-demo showcases **mdnav**, a CLI for navigating large markdown documents. The repo is a demo harness: a single `moby-dick.md` fixture plus a thin CLI (`toc`/`read`/`search`) that fuzzy-selects sections. README and CLAUDE.md frame it as a worked example, not a library.",subagent:{...Kz.subagent,taskId:"task_explore_mdnav_done",status:"completed"}},$z=[{type:"reasoning",text:"This needs a deeper look — let me spin up an Explore subagent to map the repo while I keep going."},{type:"tool-call",call:Kz}],Jz=[{type:"reasoning",text:"This needs a deeper look — let me spin up an Explore subagent to map the repo while I keep going."},{type:"tool-call",call:_K}];var T=G(W(),1),$K=[{value:"single",label:"Single"},{value:"multiple",label:"Multiple"},{value:"live",label:"Live"},{value:"subagent",label:"Subagent"},{value:"subagent-done",label:"Subagent done"}];function JK({value:Z,onChange:Y}){return T.jsx("div",{className:"flex gap-1 rounded-xl bg-accent p-1",children:$K.map((_)=>T.jsx(A,{type:"button",variant:Z===_.value?"default":"ghost",size:"sm",onClick:()=>Y(_.value),children:_.label},_.value))})}var XK={single:Yz,multiple:Zz,live:_z,subagent:$z,"subagent-done":Jz};function Cz(){let[Z,Y]=vz.useState("multiple");return T.jsxs("div",{className:"flex min-h-dvh flex-col items-center gap-6 bg-muted px-4 py-16",children:[T.jsx("span",{className:"text-[11px] font-medium tracking-widest text-muted-foreground uppercase",children:"Playground / Tool calls"}),T.jsx(JK,{value:Z,onChange:Y}),T.jsx("div",{className:"w-full max-w-(--column-w) rounded-xl border border-border bg-background p-5 font-sans text-foreground shadow-sm",children:T.jsx(Xz,{parts:XK[Z],cwd:Qz,processing:Z==="live"})})]})}var v=G(W(),1);function qK(){return v.jsxs(Sz,{children:[v.jsx(j,{path:"/dev/harness",component:Bz}),v.jsx(j,{path:"/dev/tool-calls",component:Cz}),v.jsx(j,{path:"/dev",component:Ez})]})}export{qK as default};