meshy-node 0.3.2 → 0.3.3

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.
@@ -1,16 +1,16 @@
1
- import{c as b,r as n,aD as O,aC as L,j as e,i as o,a2 as P,B as M,M as D,D as _,g as F,aE as H}from"./index-CSVyG8lh.js";/**
1
+ import{c as b,r as n,aY as O,aX as L,j as e,i as o,a3 as P,B as M,A as _,D,g as A,aZ as F}from"./index-D2dDklXI.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const R=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],$=b("maximize-2",R);/**
6
+ */const H=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],R=b("maximize-2",H);/**
7
7
  * @license lucide-react v1.7.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const A=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],U=b("minimize-2",A);/**
11
+ */const $=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],U=b("minimize-2",$);/**
12
12
  * @license lucide-react v1.7.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const B=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],g=b("refresh-cw",B),q={getOutput:L,createPreviewSession:O};function V({taskId:i,api:l=q}){var E;const[r,x]=n.useState(null),[t,v]=n.useState(null),[f,j]=n.useState(null),[S,w]=n.useState(!0),[N,p]=n.useState(null),[z,y]=n.useState(!1),k=n.useCallback(async()=>{w(!0),p(null),x(null),v(null),j(null);try{const s=await l.getOutput(i);x(s),w(!1)}catch(s){p(s instanceof Error?s.message:"Failed to load output"),w(!1)}},[l,i]);n.useEffect(()=>{k()},[k]);const d=n.useCallback(async s=>{p(null);try{const a=await l.createPreviewSession(i,s);v(a),j(a.entryPath)}catch(a){p(a instanceof Error?a.message:"Failed to create preview session")}},[l,i]);n.useEffect(()=>{var a,u;if(!(r!=null&&r.available)||!((a=r.summary)!=null&&a.htmlEntries.length)||t)return;const s=f??((u=r.summary.htmlEntries[0])==null?void 0:u.path);s&&d(s)},[r,f,t,d]);const c=n.useCallback(()=>{var a,u;v(null);const s=(t==null?void 0:t.entryPath)??f??((u=(a=r==null?void 0:r.summary)==null?void 0:a.htmlEntries[0])==null?void 0:u.path);s&&d(s)},[r,f,t,d]);if(n.useEffect(()=>{if(!t)return;const s=t.expiresAt-Date.now()-5e3;if(s<=0){c();return}const a=window.setTimeout(c,s);return()=>window.clearTimeout(a)},[c,t]),S)return e.jsx(m,{children:"Loading preview..."});if(!(r!=null&&r.available))return e.jsx(m,{children:"Task output is not available yet."});const h=((E=r.summary)==null?void 0:E.htmlEntries)??[];if(h.length===0)return e.jsx(m,{children:"No HTML files were found in this task output."});if(N)return e.jsx(m,{children:e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"text-sm text-destructive",children:N}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(o,{variant:"outline",size:"sm",onClick:c,className:"rounded-full",children:[e.jsx(g,{className:"h-3.5 w-3.5"}),"Retry"]})})]})});if(!t)return e.jsx(m,{children:"Starting preview session..."});const T=e.jsx("iframe",{src:t.previewUrl,className:"h-full w-full border-0",sandbox:"allow-scripts allow-same-origin",title:"HTML Preview"});return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsxs("div",{className:"shrink-0 border-b border-border/60 px-4 py-2.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("span",{className:"truncate text-sm font-semibold text-foreground",children:t.entryPath}),e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:C(t.expiresAt)})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",onClick:c,title:"Refresh",children:e.jsx(g,{className:"h-3.5 w-3.5"})}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:t.previewUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx(P,{className:"h-3.5 w-3.5"})})}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",onClick:()=>y(!0),title:"Fullscreen",children:e.jsx($,{className:"h-3.5 w-3.5"})})]})]}),h.length>1&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:h.map(s=>e.jsx("button",{type:"button",onClick:()=>{j(s.path),d(s.path)},className:t.entryPath===s.path?"rounded-full border border-primary/40 bg-primary/10 px-3 py-1 text-xs font-medium text-primary":"rounded-full border border-border/70 bg-background/55 px-3 py-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:s.label},s.path))}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsxs(M,{variant:"outline",className:"rounded-full border-border/70 bg-background/60",children:[h.length," ",h.length===1?"entry":"entries"]}),e.jsx(M,{variant:"outline",className:"rounded-full border-border/70 bg-background/60",children:"Sandboxed iframe"})]})]}),e.jsx("div",{className:"min-h-0 flex-1 p-2",children:e.jsx("div",{className:"h-full overflow-hidden rounded-2xl border border-border/60 bg-white shadow-sm",children:T})}),e.jsx(D,{open:z,onOpenChange:y,children:e.jsxs(_,{className:"flex h-[95vh] max-w-[95vw] flex-col gap-0 overflow-hidden p-0",children:[e.jsxs(F,{className:"sr-only",children:["Preview: ",t.entryPath]}),e.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:t.entryPath}),e.jsx("span",{className:"text-xs text-muted-foreground",children:C(t.expiresAt)})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",onClick:c,title:"Refresh",children:e.jsx(g,{className:"h-3.5 w-3.5"})}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:t.previewUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx(P,{className:"h-3.5 w-3.5"})})}),e.jsx(H,{asChild:!0,children:e.jsxs(o,{variant:"outline",size:"sm",className:"rounded-full",title:"Exit fullscreen",children:[e.jsx(U,{className:"h-3.5 w-3.5"}),"Exit fullscreen"]})})]})]}),e.jsx("div",{className:"min-h-0 flex-1",children:e.jsx("iframe",{src:t.previewUrl,className:"h-full w-full border-0",sandbox:"allow-scripts allow-same-origin",title:"HTML Preview Fullscreen"})})]})})]})}function m({children:i}){return e.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:i})}function C(i){const l=Math.max(0,Math.round((i-Date.now())/1e3));if(l<60)return`${l}s`;const r=Math.floor(l/60),x=l%60;return`${r}m ${x}s`}export{V as PreviewTab};
16
+ */const B=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],g=b("refresh-cw",B),q={getOutput:L,createPreviewSession:O};function V({taskId:i,api:l=q}){var E;const[r,x]=n.useState(null),[t,v]=n.useState(null),[f,j]=n.useState(null),[C,w]=n.useState(!0),[N,p]=n.useState(null),[z,y]=n.useState(!1),k=n.useCallback(async()=>{w(!0),p(null),x(null),v(null),j(null);try{const s=await l.getOutput(i);x(s),w(!1)}catch(s){p(s instanceof Error?s.message:"Failed to load output"),w(!1)}},[l,i]);n.useEffect(()=>{k()},[k]);const d=n.useCallback(async s=>{p(null);try{const a=await l.createPreviewSession(i,s);v(a),j(a.entryPath)}catch(a){p(a instanceof Error?a.message:"Failed to create preview session")}},[l,i]);n.useEffect(()=>{var a,u;if(!(r!=null&&r.available)||!((a=r.summary)!=null&&a.htmlEntries.length)||t)return;const s=f??((u=r.summary.htmlEntries[0])==null?void 0:u.path);s&&d(s)},[r,f,t,d]);const c=n.useCallback(()=>{var a,u;v(null);const s=(t==null?void 0:t.entryPath)??f??((u=(a=r==null?void 0:r.summary)==null?void 0:a.htmlEntries[0])==null?void 0:u.path);s&&d(s)},[r,f,t,d]);if(n.useEffect(()=>{if(!t)return;const s=t.expiresAt-Date.now()-5e3;if(s<=0){c();return}const a=window.setTimeout(c,s);return()=>window.clearTimeout(a)},[c,t]),C)return e.jsx(m,{children:"Loading preview..."});if(!(r!=null&&r.available))return e.jsx(m,{children:"Task output is not available yet."});const h=((E=r.summary)==null?void 0:E.htmlEntries)??[];if(h.length===0)return e.jsx(m,{children:"No HTML files were found in this task output."});if(N)return e.jsx(m,{children:e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"text-sm text-destructive",children:N}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(o,{variant:"outline",size:"sm",onClick:c,className:"rounded-full",children:[e.jsx(g,{className:"h-3.5 w-3.5"}),"Retry"]})})]})});if(!t)return e.jsx(m,{children:"Starting preview session..."});const T=e.jsx("iframe",{src:t.previewUrl,className:"h-full w-full border-0",sandbox:"allow-scripts allow-same-origin",title:"HTML Preview"});return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsxs("div",{className:"shrink-0 border-b border-border/60 px-4 py-2.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("span",{className:"truncate text-sm font-semibold text-foreground",children:t.entryPath}),e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:S(t.expiresAt)})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",onClick:c,title:"Refresh",children:e.jsx(g,{className:"h-3.5 w-3.5"})}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:t.previewUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx(P,{className:"h-3.5 w-3.5"})})}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",onClick:()=>y(!0),title:"Fullscreen",children:e.jsx(R,{className:"h-3.5 w-3.5"})})]})]}),h.length>1&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:h.map(s=>e.jsx("button",{type:"button",onClick:()=>{j(s.path),d(s.path)},className:t.entryPath===s.path?"rounded-full border border-primary/40 bg-primary/10 px-3 py-1 text-xs font-medium text-primary":"rounded-full border border-border/70 bg-background/55 px-3 py-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:s.label},s.path))}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsxs(M,{variant:"outline",className:"rounded-full border-border/70 bg-background/60",children:[h.length," ",h.length===1?"entry":"entries"]}),e.jsx(M,{variant:"outline",className:"rounded-full border-border/70 bg-background/60",children:"Sandboxed iframe"})]})]}),e.jsx("div",{className:"min-h-0 flex-1 p-2",children:e.jsx("div",{className:"h-full overflow-hidden rounded-2xl border border-border/60 bg-white shadow-sm",children:T})}),e.jsx(_,{open:z,onOpenChange:y,children:e.jsxs(D,{className:"flex h-[95vh] max-w-[95vw] flex-col gap-0 overflow-hidden p-0",children:[e.jsxs(A,{className:"sr-only",children:["Preview: ",t.entryPath]}),e.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:t.entryPath}),e.jsx("span",{className:"text-xs text-muted-foreground",children:S(t.expiresAt)})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",onClick:c,title:"Refresh",children:e.jsx(g,{className:"h-3.5 w-3.5"})}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-full",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:t.previewUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx(P,{className:"h-3.5 w-3.5"})})}),e.jsx(F,{asChild:!0,children:e.jsxs(o,{variant:"outline",size:"sm",className:"rounded-full",title:"Exit fullscreen",children:[e.jsx(U,{className:"h-3.5 w-3.5"}),"Exit fullscreen"]})})]})]}),e.jsx("div",{className:"min-h-0 flex-1",children:e.jsx("iframe",{src:t.previewUrl,className:"h-full w-full border-0",sandbox:"allow-scripts allow-same-origin",title:"HTML Preview Fullscreen"})})]})})]})}function m({children:i}){return e.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:i})}function S(i){const l=Math.max(0,Math.round((i-Date.now())/1e3));if(l<60)return`${l}s`;const r=Math.floor(l/60),x=l%60;return`${r}m ${x}s`}export{V as PreviewTab};
@@ -1,12 +1,12 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilesTab-CSpNGxJl.js","assets/index-CSVyG8lh.js","assets/index-CnhngBZ-.css","assets/folder-D2R8g5cx.js","assets/file-DCzQQ4U3.js","assets/PreviewTab-CEFgpX6R.js"])))=>i.map(i=>d[i]);
2
- import{c as j,ad as k,r as s,j as e,Q as S,U as T,at as C,au as M,av as w,aw as _,ax as P,ay as E,$ as y}from"./index-CSVyG8lh.js";import{K as L,H as A,G as I,L as O,g as F,f as R,i as v,u as z}from"./DashboardShared-BSmoDCJG.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilesTab-8j_HSIrt.js","assets/index-D2dDklXI.js","assets/index-XG2bTevi.css","assets/folder-5L-FBUD2.js","assets/file-DgdB9H7_.js","assets/PreviewTab-CcfSJBUg.js"])))=>i.map(i=>d[i]);
2
+ import{c as v,as as k,r as s,j as e,J as S,P as T,M as C,aN as M,aO as P,aP as w,aQ as _,aR as E,aS as L,_ as y}from"./index-D2dDklXI.js";import{n as O,j as A,i as I,L as R,C as F,T as j,m as z}from"./DashboardShared-C9XLT05J.js";/**
3
3
  * @license lucide-react v1.7.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
- */const D=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],V=j("message-square-text",D);/**
7
+ */const D=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],V=v("message-square-text",D);/**
8
8
  * @license lucide-react v1.7.0 - ISC
9
9
  *
10
10
  * This source code is licensed under the ISC license.
11
11
  * See the LICENSE file in the root directory of this source tree.
12
- */const q=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],B=j("terminal",q),G=s.lazy(async()=>({default:(await y(()=>import("./FilesTab-CSpNGxJl.js"),__vite__mapDeps([0,1,2,3,4]))).FilesTab})),H=s.lazy(async()=>({default:(await y(()=>import("./PreviewTab-CEFgpX6R.js"),__vite__mapDeps([5,1,2]))).PreviewTab})),U={getOutput:w,getOutputTree:M,getOutputContent:C},$={getOutput:w,createPreviewSession:_};function J(){const{shareId:t}=k(),[h,a]=s.useState(null),[l,r]=s.useState([]),[u,c]=s.useState(!0),[p,n]=s.useState(null),o=s.useRef(null);return s.useEffect(()=>{if(!t){a(null),r([]),n("Shared conversation not found"),c(!1);return}let i=!1;o.current=t,c(!0),n(null);const x=async m=>{try{const[f,b]=await Promise.all([P(t),E(t)]);if(i||o.current!==t)return;a(f),r(N=>m?b.logs:z(N,b.logs)),n(null)}catch(f){if(i||o.current!==t)return;m&&(a(null),r([]),n(f instanceof Error?f.message:"Failed to load shared conversation"))}finally{!i&&o.current===t&&m&&c(!1)}};x(!0);const d=window.setInterval(()=>{x(!1)},2500);return()=>{i=!0,window.clearInterval(d)}},[t]),e.jsx(W,{conversation:h,logs:l,loading:u,error:p})}function W({conversation:t,logs:h,loading:a,error:l}){const[r,u]=s.useState("transcript"),[c,p]=s.useState(!1),n=s.useMemo(()=>{if(!t)return null;const d=L(t.payload.initialMessage);return d.length>0?A(d,new Date(t.createdAt).toISOString()):null},[t]),o=s.useMemo(()=>I([...n?[n]:[],...h]),[n,h]),i=(t==null?void 0:t.scope)==="filesPreview",x=e.jsx("section",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain scroll-pb-16 px-4 py-5 sm:px-6",children:e.jsxs("div",{className:"mx-auto flex max-w-[72rem] flex-col gap-5 pb-16",children:[a&&e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border/60 bg-background/60 px-4 py-3 text-sm text-muted-foreground",children:[e.jsx(O,{className:"h-4 w-4 animate-spin"}),"Loading shared conversation..."]}),!a&&l&&e.jsxs("div",{className:"rounded-lg border border-destructive/20 bg-destructive/10 px-5 py-8 text-center text-destructive",children:[e.jsx("div",{className:"text-base font-semibold",children:"Shared conversation unavailable"}),e.jsx("div",{className:"mt-2 text-sm",children:l})]}),!a&&!l&&o.length===0&&e.jsxs("div",{className:"rounded-lg border border-dashed border-border/70 bg-background/35 px-5 py-8 text-center",children:[e.jsx(V,{className:"mx-auto h-6 w-6 text-muted-foreground"}),e.jsx("div",{className:"mt-3 text-sm font-medium text-foreground",children:"No transcript output yet"})]}),!a&&!l&&o.map((d,m)=>e.jsx(F,{event:d,questionResponseDisabled:!0},`shared-${m}`))]})});return e.jsxs("div",{className:"relative flex h-full min-h-0 overflow-hidden bg-background text-foreground",children:[e.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-r border-border/60 bg-muted/20 px-4 py-5 lg:flex xl:w-72",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/70 bg-foreground text-xs font-semibold tracking-[0.24em] text-background shadow-sm",children:"M"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-sm font-semibold text-foreground",children:"Meshy Workspace"}),e.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.24em] text-muted-foreground",children:"Shared view"})]})]}),e.jsx("div",{className:"mt-7 text-[11px] font-medium uppercase tracking-[0.28em] text-muted-foreground",children:"Shared conversation"}),t&&e.jsxs("div",{className:"mt-3 space-y-3",children:[e.jsx("h1",{className:"max-h-28 overflow-hidden break-words text-base font-semibold leading-5 text-foreground [overflow-wrap:anywhere]",title:t.title,children:t.title}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(S,{status:t.status}),e.jsx(T,{priority:t.priority})]}),e.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[e.jsxs("div",{children:["updated ",R(t.updatedAt)]}),e.jsx("div",{className:"font-mono",children:t.id.slice(0,8)})]})]}),e.jsxs("div",{className:"mt-auto space-y-2 pt-6",children:[c&&e.jsx("div",{className:"rounded-xl border border-border/70 bg-background/80 p-3 font-mono text-[11px] text-foreground shadow-sm",children:"npx -y meshy-node@latest start"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:"https://github.com/ai-microsoft/meshy",target:"_blank",rel:"noreferrer","aria-label":"Open Meshy on GitHub",className:"inline-flex h-9 w-9 items-center justify-center rounded-full border border-border/70 bg-background/70 text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(K,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:()=>p(d=>!d),"aria-expanded":c,className:"inline-flex h-9 items-center gap-2 rounded-full border border-border/70 bg-background/70 px-3 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(B,{className:"h-4 w-4"}),"Try it"]})]})]})]}),e.jsxs("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"shrink-0 border-b border-border/60 bg-background/85 px-4 py-3 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-border/70 bg-foreground text-xs font-semibold tracking-[0.24em] text-background lg:hidden",children:"M"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[11px] font-medium uppercase tracking-[0.28em] text-muted-foreground",children:"Meshy Workspace"}),e.jsx("div",{className:"truncate text-base font-semibold text-foreground",children:(t==null?void 0:t.title)??"Shared conversation"})]})]}),i&&e.jsxs("div",{className:"mt-3 inline-flex h-auto rounded-full bg-muted/70 p-1 text-muted-foreground",children:[e.jsx("button",{type:"button",onClick:()=>u("transcript"),className:g(r==="transcript"),children:"Transcript"}),e.jsx("button",{type:"button",onClick:()=>u("files"),className:g(r==="files"),children:"Files"}),e.jsx("button",{type:"button",onClick:()=>u("preview"),className:g(r==="preview"),children:"Preview"})]})]}),i&&t?e.jsxs(e.Fragment,{children:[r==="transcript"&&x,r==="files"&&e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(s.Suspense,{fallback:e.jsx(v,{label:"Loading files..."}),children:e.jsx(G,{taskId:t.shareId,api:U})})}),r==="preview"&&e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(s.Suspense,{fallback:e.jsx(v,{label:"Loading preview..."}),children:e.jsx(H,{taskId:t.shareId,api:$})})})]}):x]})]})}function g(t){return t?"inline-flex items-center justify-center whitespace-nowrap rounded-full bg-background px-3 py-1.5 text-sm font-medium text-foreground shadow-sm":"inline-flex items-center justify-center whitespace-nowrap rounded-full px-3 py-1.5 text-sm font-medium transition-colors hover:text-foreground"}function K({className:t}){return e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.58 2 12.23c0 4.51 2.87 8.34 6.84 9.7.5.1.68-.22.68-.49 0-.24-.01-.88-.01-1.73-2.78.62-3.37-1.37-3.37-1.37-.45-1.18-1.11-1.49-1.11-1.49-.91-.64.07-.63.07-.63 1 .07 1.53 1.06 1.53 1.06.89 1.56 2.34 1.11 2.91.85.09-.66.35-1.11.63-1.37-2.22-.26-4.55-1.14-4.55-5.05 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.31.1-2.71 0 0 .84-.27 2.75 1.05A9.3 9.3 0 0 1 12 6.96c.85 0 1.71.12 2.51.34 1.91-1.32 2.75-1.05 2.75-1.05.55 1.4.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.92-2.34 4.79-4.57 5.05.36.32.68.94.68 1.9 0 1.37-.01 2.47-.01 2.81 0 .27.18.59.69.49A10.05 10.05 0 0 0 22 12.23C22 6.58 17.52 2 12 2Z"})})}export{J as SharedConversationPage,W as SharedConversationView};
12
+ */const q=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],B=v("terminal",q),G=s.lazy(async()=>({default:(await y(()=>import("./FilesTab-8j_HSIrt.js"),__vite__mapDeps([0,1,2,3,4]))).FilesTab})),H=s.lazy(async()=>({default:(await y(()=>import("./PreviewTab-CcfSJBUg.js"),__vite__mapDeps([5,1,2]))).PreviewTab})),U={getOutput:w,getOutputTree:P,getOutputContent:M},W={getOutput:w,createPreviewSession:_};function K(){const{shareId:t}=k(),[h,a]=s.useState(null),[l,r]=s.useState([]),[u,c]=s.useState(!0),[p,n]=s.useState(null),o=s.useRef(null);return s.useEffect(()=>{if(!t){a(null),r([]),n("Shared conversation not found"),c(!1);return}let i=!1;o.current=t,c(!0),n(null);const x=async m=>{try{const[f,b]=await Promise.all([E(t),L(t)]);if(i||o.current!==t)return;a(f),r(N=>m?b.logs:z(N,b.logs)),n(null)}catch(f){if(i||o.current!==t)return;m&&(a(null),r([]),n(f instanceof Error?f.message:"Failed to load shared conversation"))}finally{!i&&o.current===t&&m&&c(!1)}};x(!0);const d=window.setInterval(()=>{x(!1)},2500);return()=>{i=!0,window.clearInterval(d)}},[t]),e.jsx($,{conversation:h,logs:l,loading:u,error:p})}function $({conversation:t,logs:h,loading:a,error:l}){const[r,u]=s.useState("transcript"),[c,p]=s.useState(!1),n=s.useMemo(()=>{if(!t)return null;const d=O(t.payload.initialMessage);return d.length>0?A(d,new Date(t.createdAt).toISOString()):null},[t]),o=s.useMemo(()=>I([...n?[n]:[],...h]),[n,h]),i=(t==null?void 0:t.scope)==="filesPreview",x=e.jsx("section",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain scroll-pb-16 px-4 py-5 sm:px-6",children:e.jsxs("div",{className:"mx-auto flex max-w-[72rem] flex-col gap-5 pb-16",children:[a&&e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border/60 bg-background/60 px-4 py-3 text-sm text-muted-foreground",children:[e.jsx(R,{className:"h-4 w-4 animate-spin"}),"Loading shared conversation..."]}),!a&&l&&e.jsxs("div",{className:"rounded-lg border border-destructive/20 bg-destructive/10 px-5 py-8 text-center text-destructive",children:[e.jsx("div",{className:"text-base font-semibold",children:"Shared conversation unavailable"}),e.jsx("div",{className:"mt-2 text-sm",children:l})]}),!a&&!l&&o.length===0&&e.jsxs("div",{className:"rounded-lg border border-dashed border-border/70 bg-background/35 px-5 py-8 text-center",children:[e.jsx(V,{className:"mx-auto h-6 w-6 text-muted-foreground"}),e.jsx("div",{className:"mt-3 text-sm font-medium text-foreground",children:"No transcript output yet"})]}),!a&&!l&&o.map((d,m)=>e.jsx(F,{event:d,questionResponseDisabled:!0},`shared-${m}`))]})});return e.jsxs("div",{className:"relative flex h-full min-h-0 overflow-hidden bg-background text-foreground",children:[e.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-r border-border/60 bg-muted/20 px-4 py-5 lg:flex xl:w-72",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border/70 bg-foreground text-xs font-semibold tracking-[0.24em] text-background shadow-sm",children:"M"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-sm font-semibold text-foreground",children:"Meshy Workspace"}),e.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.24em] text-muted-foreground",children:"Shared view"})]})]}),e.jsx("div",{className:"mt-7 text-[11px] font-medium uppercase tracking-[0.28em] text-muted-foreground",children:"Shared conversation"}),t&&e.jsxs("div",{className:"mt-3 space-y-3",children:[e.jsx("h1",{className:"max-h-28 overflow-hidden break-words text-base font-semibold leading-5 text-foreground [overflow-wrap:anywhere]",title:t.title,children:t.title}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(S,{status:t.status}),e.jsx(T,{priority:t.priority})]}),e.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[e.jsxs("div",{children:["updated ",C(t.updatedAt)]}),e.jsx("div",{className:"font-mono",children:t.id.slice(0,8)})]})]}),e.jsxs("div",{className:"mt-auto space-y-2 pt-6",children:[c&&e.jsx("div",{className:"rounded-xl border border-border/70 bg-background/80 p-3 font-mono text-[11px] text-foreground shadow-sm",children:"npx -y meshy-node@latest start"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:"https://github.com/ai-microsoft/meshy",target:"_blank",rel:"noreferrer","aria-label":"Open Meshy on GitHub",className:"inline-flex h-9 w-9 items-center justify-center rounded-full border border-border/70 bg-background/70 text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(J,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:()=>p(d=>!d),"aria-expanded":c,className:"inline-flex h-9 items-center gap-2 rounded-full border border-border/70 bg-background/70 px-3 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(B,{className:"h-4 w-4"}),"Try it"]})]})]})]}),e.jsxs("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"shrink-0 border-b border-border/60 bg-background/85 px-4 py-3 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-border/70 bg-foreground text-xs font-semibold tracking-[0.24em] text-background lg:hidden",children:"M"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[11px] font-medium uppercase tracking-[0.28em] text-muted-foreground",children:"Meshy Workspace"}),e.jsx("div",{className:"truncate text-base font-semibold text-foreground",children:(t==null?void 0:t.title)??"Shared conversation"})]})]}),i&&e.jsxs("div",{className:"mt-3 inline-flex h-auto rounded-full bg-muted/70 p-1 text-muted-foreground",children:[e.jsx("button",{type:"button",onClick:()=>u("transcript"),className:g(r==="transcript"),children:"Transcript"}),e.jsx("button",{type:"button",onClick:()=>u("files"),className:g(r==="files"),children:"Files"}),e.jsx("button",{type:"button",onClick:()=>u("preview"),className:g(r==="preview"),children:"Preview"})]})]}),i&&t?e.jsxs(e.Fragment,{children:[r==="transcript"&&x,r==="files"&&e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(s.Suspense,{fallback:e.jsx(j,{label:"Loading files..."}),children:e.jsx(G,{taskId:t.shareId,api:U})})}),r==="preview"&&e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(s.Suspense,{fallback:e.jsx(j,{label:"Loading preview..."}),children:e.jsx(H,{taskId:t.shareId,api:W})})})]}):x]})]})}function g(t){return t?"inline-flex items-center justify-center whitespace-nowrap rounded-full bg-background px-3 py-1.5 text-sm font-medium text-foreground shadow-sm":"inline-flex items-center justify-center whitespace-nowrap rounded-full px-3 py-1.5 text-sm font-medium transition-colors hover:text-foreground"}function J({className:t}){return e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.58 2 12.23c0 4.51 2.87 8.34 6.84 9.7.5.1.68-.22.68-.49 0-.24-.01-.88-.01-1.73-2.78.62-3.37-1.37-3.37-1.37-.45-1.18-1.11-1.49-1.11-1.49-.91-.64.07-.63.07-.63 1 .07 1.53 1.06 1.53 1.06.89 1.56 2.34 1.11 2.91.85.09-.66.35-1.11.63-1.37-2.22-.26-4.55-1.14-4.55-5.05 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.31.1-2.71 0 0 .84-.27 2.75 1.05A9.3 9.3 0 0 1 12 6.96c.85 0 1.71.12 2.51.34 1.91-1.32 2.75-1.05 2.75-1.05.55 1.4.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.92-2.34 4.79-4.57 5.05.36.32.68.94.68 1.9 0 1.37-.01 2.47-.01 2.81 0 .27.18.59.69.49A10.05 10.05 0 0 0 22 12.23C22 6.58 17.52 2 12 2Z"})})}export{K as SharedConversationPage,$ as SharedConversationView};
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-CSVyG8lh.js";/**
1
+ import{c as a}from"./index-D2dDklXI.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CSVyG8lh.js";/**
1
+ import{c as o}from"./index-D2dDklXI.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.