meshy-node 0.7.9 → 0.7.10

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,4 +1,4 @@
1
- import{c as ye,j as m,L as hl,bm as Fr,T as Or,l as mn,bn as Rr,r as ce,B as bt,C as Re,b as wt,X as Br,bo as ml,v as dl,H as $r,N as gl}from"./index-DgZ5OoIh.js";/**
1
+ import{c as ye,j as m,L as hl,bm as Fr,T as Or,l as mn,bn as Rr,r as ce,B as bt,C as Re,b as wt,X as Br,bo as ml,v as dl,H as $r,N as gl}from"./index-7UNu_8ex.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{r as l,bv as P,bp as O,j as e,N as g,b as N,v as $,k as T,i as R}from"./index-DgZ5OoIh.js";import{G as _}from"./DashboardPage-c2nLQVBa.js";import{F as B}from"./file-xEF5For3.js";import"./DashboardShared-DqfSf6DJ.js";import"./play-Cxb0Wagx.js";function D(r,t){if(!(r!=null&&r.trim()))return[];const s=r.split(`
1
+ import{r as l,bv as P,bp as O,j as e,N as g,b as N,v as $,k as T,i as R}from"./index-7UNu_8ex.js";import{G as _}from"./DashboardPage-YfNqtMsA.js";import{F as B}from"./file-CEVc1lRa.js";import"./DashboardShared-Ojg-bGGQ.js";import"./play--trDjvtr.js";function D(r,t){if(!(r!=null&&r.trim()))return[];const s=r.split(`
2
2
  `),n=[];let a=[];const d=()=>{if(a.length===0)return;const c=a.join(`
3
3
  `).trim();if(!c){a=[];return}const i=J(a);if(!i){a=[];return}n.push({id:`${t}:${i}`,path:i,section:t,patch:c}),a=[]};for(const c of s)c.startsWith("diff --git ")&&a.length>0&&d(),a.push(c);return d(),n}function I(r){const t=[];for(const s of[...r].sort((n,a)=>n.path.localeCompare(a.path))){const n=s.path.split("/").filter(Boolean);let a=t,d="";n.forEach((c,i)=>{d=d?`${d}/${c}`:c;const h=i===n.length-1;let u=a.find(b=>b.name===c);u||(u=h?{type:"file",name:c,path:d,item:s}:{type:"folder",name:c,path:d,children:[]},a.push(u)),h||(u.children??(u.children=[]),a=u.children)})}return t}function G(r){const t=[];let s="";for(const n of r.split("/").filter(Boolean).slice(0,-1))s=s?`${s}/${n}`:n,t.push(s);return t}function A(r){return r.filter(t=>t&&!t.endsWith("/")).map(t=>({id:`untracked:${t}`,path:t,section:"untracked"}))}function J(r){var d,c;const t=(d=r.find(i=>i.startsWith("+++ ")))==null?void 0:d.slice(4).trim();if(t&&t!=="/dev/null")return y(t);const s=(c=r.find(i=>i.startsWith("--- ")))==null?void 0:c.slice(4).trim();if(s&&s!=="/dev/null")return y(s);const n=r.find(i=>i.startsWith("diff --git "));if(!n)return null;const a=n.match(/^diff --git a\/(.+?) b\/(.+)$/);return a?y(a[2]||a[1]||""):null}function y(r){return r.replace(/^[ab]\//,"")}const w={staged:"Staged",unstaged:"Unstaged",untracked:"Untracked"};function re({taskId:r}){const[t,s]=l.useState(null),[n,a]=l.useState(!0),[d,c]=l.useState(null),[i,h]=l.useState(null),[u,b]=l.useState(null),[L,v]=l.useState(!1),[M,k]=l.useState(null),S=l.useCallback(async()=>{a(!0),c(null),s(null);try{const o=await P(r);s(o)}catch(o){c(o instanceof Error?o.message:"Failed to load diff")}finally{a(!1)}},[r]);l.useEffect(()=>{S()},[S]);const E=l.useMemo(()=>D(t==null?void 0:t.staged,"staged"),[t==null?void 0:t.staged]),F=l.useMemo(()=>D(t==null?void 0:t.unstaged,"unstaged"),[t==null?void 0:t.unstaged]),C=l.useMemo(()=>A((t==null?void 0:t.untrackedFiles)??[]),[t==null?void 0:t.untrackedFiles]),j=l.useMemo(()=>[{section:"staged",items:E},{section:"unstaged",items:F},{section:"untracked",items:C}],[E,F,C]),p=l.useMemo(()=>j.flatMap(o=>o.items),[j]),m=l.useMemo(()=>p.find(o=>o.id===i)??p[0]??null,[p,i]);return l.useEffect(()=>{var o;(!i||!p.some(x=>x.id===i))&&h(((o=p[0])==null?void 0:o.id)??null)},[p,i]),l.useEffect(()=>{if(b(null),k(null),v(!1),!m||m.section!=="untracked")return;if(m.path.endsWith("/")){k("This untracked path is a directory. Open the Files tab to inspect its contents.");return}let o=!1;return v(!0),O(r,m.path).then(x=>{o||b(x)}).catch(x=>{o||k(x instanceof Error?x.message:"Failed to load file content")}).finally(()=>{o||v(!1)}),()=>{o=!0}},[m,r]),n?e.jsx(f,{tone:"muted",children:"Loading diff..."}):d?e.jsx(f,{tone:"destructive",children:d}):t!=null&&t.available?p.length>0?e.jsxs("div",{className:"grid h-full min-h-0 grid-cols-1 lg:grid-cols-[16rem_minmax(0,1fr)]",children:[e.jsxs("aside",{className:"flex min-h-0 flex-col border-b border-border/60 bg-background/30 lg:border-b-0 lg:border-r",children:[e.jsxs("div",{className:"shrink-0 border-b border-border/60 px-2.5 py-2",children:[e.jsx("div",{className:"text-[9px] font-medium uppercase tracking-[0.2em] text-muted-foreground",children:"Repository diff"}),e.jsx("div",{className:"mt-1 flex items-start justify-between gap-1.5",children:e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1 text-[10px] font-semibold text-foreground",children:[e.jsx(_,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"truncate",children:t.branch??"detached HEAD"})]}),t.repoRoot&&e.jsx("div",{className:"mt-0.5 truncate font-mono text-[9px] text-muted-foreground",children:t.repoRoot})]})}),e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:j.map(o=>e.jsxs(g,{variant:"outline",className:"rounded-sm border-border/70 bg-background/60 px-1.5 py-0 text-[9px]",children:[w[o.section]," ",o.items.length]},o.section))})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-1",children:e.jsx("div",{className:"space-y-1",children:j.map(({section:o,items:x})=>e.jsx(V,{section:o,items:x,selectedId:(m==null?void 0:m.id)??null,onSelect:h},o))})})]}),e.jsx("section",{className:"min-h-0 flex flex-col bg-card/10",children:m?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"shrink-0 border-b border-border/60 px-2.5 py-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx(g,{variant:"outline",className:"rounded-sm border-border/70 bg-background/60 px-1.5 py-0 text-[9px]",children:w[m.section]}),m.section==="untracked"?e.jsx(g,{variant:"secondary",className:"rounded-sm px-1.5 py-0 text-[9px]",children:"File content"}):e.jsx(g,{variant:"secondary",className:"rounded-sm px-1.5 py-0 text-[9px]",children:"Diff patch"})]}),e.jsx("div",{className:"mt-1 break-all font-mono text-[9px] text-muted-foreground",children:m.path})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-auto p-1.5",children:m.section==="untracked"?e.jsx(q,{loading:L,error:M,content:u}):e.jsx(H,{patch:m.patch??""})})]}):e.jsx(f,{tone:"muted",children:"Select a file to inspect."})})]}):e.jsx(f,{tone:"muted",children:"Working tree is clean."}):e.jsx(f,{tone:"muted",children:"Task working directory is not inside a Git repository."})}function V({section:r,items:t,selectedId:s,onSelect:n}){const a=l.useMemo(()=>I(t),[t]),d=l.useMemo(()=>t.find(u=>u.id===s)??null,[t,s]),c=l.useMemo(()=>new Set(d?G(d.path):[]),[d]),[i,h]=l.useState(!0);return e.jsxs("section",{className:"rounded-sm border border-border/60 bg-background/35",children:[e.jsxs("button",{type:"button",onClick:()=>h(u=>!u),"aria-expanded":i,className:N("flex w-full items-center justify-between gap-1.5 px-2 py-1 text-left transition-colors hover:bg-background/55",i?"border-b border-border/60":""),children:[e.jsxs("div",{className:"flex items-center gap-1",children:[i?e.jsx($,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):e.jsx(T,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"text-[10px] font-medium text-foreground",children:w[r]})]}),e.jsx(g,{variant:"outline",className:"rounded-sm border-border/70 bg-background/60 px-1.5 py-0 text-[9px]",children:t.length})]}),i&&e.jsx("div",{className:"p-1",children:a.length>0?e.jsx("div",{className:"space-y-0.5",children:a.map(u=>e.jsx(U,{node:u,depth:0,selectedId:s,expandedAncestorPaths:c,onSelect:n},`${r}:${u.path}`))}):e.jsx("div",{className:"rounded-sm border border-dashed border-border/70 bg-background/30 px-2 py-1 text-[10px] text-muted-foreground",children:"No files."})})]})}function U({node:r,depth:t,selectedId:s,expandedAncestorPaths:n,onSelect:a}){var d;return r.type==="folder"?e.jsx(z,{node:r,depth:t,selectedId:s,expandedAncestorPaths:n,onSelect:a}):e.jsxs("button",{type:"button",onClick:()=>{r.item&&a(r.item.id)},className:N("flex w-full cursor-pointer items-center gap-1 rounded-sm px-1 py-0.5 text-left transition-colors",((d=r.item)==null?void 0:d.id)===s?"bg-primary/10 text-foreground":"text-foreground/90 hover:bg-background/55"),style:{paddingLeft:`${t*10+5}px`},children:[e.jsx(B,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"truncate text-[10px] leading-4",children:r.name})]})}function z({node:r,depth:t,selectedId:s,expandedAncestorPaths:n,onSelect:a}){const[d,c]=l.useState(!0);return l.useEffect(()=>{n.has(r.path)&&c(!0)},[n,r.path]),e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:()=>c(i=>!i),"aria-expanded":d,className:"flex w-full cursor-pointer select-none items-center gap-1 rounded-sm px-1 py-0.5 text-left text-[10px] leading-4 text-muted-foreground transition-colors hover:bg-background/55 hover:text-foreground",style:{paddingLeft:`${t*10+5}px`},children:[d?e.jsx($,{className:"h-3 w-3 shrink-0"}):e.jsx(T,{className:"h-3 w-3 shrink-0"}),e.jsx(R,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"truncate",children:r.name})]}),d&&e.jsx("div",{className:"space-y-0.5",children:(r.children??[]).map(i=>e.jsx(U,{node:i,depth:t+1,selectedId:s,expandedAncestorPaths:n,onSelect:a},i.path))})]})}function H({patch:r}){const t=r.split(`
4
4
  `);return e.jsxs("div",{className:"rounded-sm border border-border/60 bg-background/55",children:[e.jsxs("div",{className:"border-b border-border/60 px-2.5 py-1.5",children:[e.jsx("div",{className:"text-[10px] font-medium text-foreground",children:"File diff"}),e.jsxs("div",{className:"mt-0.5 text-[9px] text-muted-foreground",children:[t.length," lines"]})]}),e.jsx("div",{className:"font-mono text-[10px] leading-4",children:t.map((s,n)=>e.jsxs("div",{className:N("grid grid-cols-[36px_minmax(0,1fr)] gap-2 px-2.5 py-px",K(s)),children:[e.jsx("span",{className:"select-none text-right text-muted-foreground/55",children:n+1}),e.jsx("span",{className:"whitespace-pre-wrap break-all text-foreground",children:s||" "})]},`${n}-${s}`))})]})}function q({loading:r,error:t,content:s}){if(r)return e.jsx(f,{tone:"muted",children:"Loading file content..."});if(t)return e.jsx(f,{tone:"destructive",children:t});if(!s)return e.jsx(f,{tone:"muted",children:"Select an untracked file to preview its content."});if(s.kind==="image"){const n=s.content?`data:${s.mimeType};base64,${s.content}`:s.downloadUrl;return n?e.jsx("div",{className:"flex min-h-[18rem] items-center justify-center rounded-sm border border-border/60 bg-background/55 p-3",children:e.jsx("img",{src:n,alt:s.path,className:"max-h-full max-w-full rounded-sm object-contain shadow-[0_24px_90px_-52px_rgba(0,0,0,0.65)]"})}):e.jsx(f,{tone:"muted",children:"Image preview is not available."})}if(s.kind==="pdf"&&s.downloadUrl)return e.jsx("div",{className:"h-full min-h-[22rem] overflow-hidden rounded-sm border border-border/60 bg-background/55",children:e.jsx("iframe",{src:s.downloadUrl,title:s.path,className:"h-full w-full border-0"})});if(s.kind==="json"){let n=s.content;try{n=JSON.stringify(JSON.parse(s.content),null,2)}catch{}return e.jsx(W,{content:n,truncated:s.truncated})}return s.kind==="markdown"||s.kind==="text"||s.kind==="html"?e.jsx(W,{content:s.content,truncated:s.truncated}):e.jsx(f,{tone:"muted",children:"This file cannot be previewed inline."})}function W({content:r,truncated:t}){return e.jsxs("div",{className:"rounded-sm border border-border/60 bg-background/55",children:[e.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap px-2.5 py-2 font-mono text-[10px] leading-4 text-foreground",children:r}),t&&e.jsx("div",{className:"border-t border-border/60 px-2.5 py-1.5 text-[10px] text-muted-foreground",children:"Content truncated. Open the Files tab to inspect the full artifact."})]})}function f({children:r,tone:t}){return e.jsx("div",{className:N("flex h-full min-h-[10rem] items-center justify-center rounded-sm text-[10px]",t==="muted"?"text-muted-foreground":"text-destructive"),children:r})}function K(r){return r.startsWith("@@")?"bg-sky-500/10":r.startsWith("+")&&!r.startsWith("+++")?"bg-emerald-500/10":r.startsWith("-")&&!r.startsWith("---")?"bg-destructive/10":r.startsWith("diff ")||r.startsWith("index ")||r.startsWith("---")||r.startsWith("+++")?"bg-muted/45":""}export{re as DiffTab};
@@ -1,4 +1,4 @@
1
- import{c as p,r as o,bp as P,bq as H,br as J,j as e,N as j,B as m,i as V,k as q,b as x}from"./index-DgZ5OoIh.js";import{F as K}from"./file-xEF5For3.js";import{w as W}from"./DashboardShared-DqfSf6DJ.js";/**
1
+ import{c as p,r as o,bp as P,bq as H,br as J,j as e,N as j,B as m,i as V,k as q,b as x}from"./index-7UNu_8ex.js";import{F as K}from"./file-CEVc1lRa.js";import{w as W}from"./DashboardShared-Ojg-bGGQ.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,j as e,I as W,B as u,bs as T,ak as B,r as a,bt as X,br as Y,z as Z,A as ee,E as se,bu as re,N as _}from"./index-DgZ5OoIh.js";import{P as te}from"./play-Cxb0Wagx.js";/**
1
+ import{c as O,j as e,I as W,B as u,bs as T,ak as B,r as a,bt as X,br as Y,z as Z,A as ee,E as se,bu as re,N as _}from"./index-7UNu_8ex.js";import{P as te}from"./play--trDjvtr.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,7 +1,7 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilesTab-M37autPE.js","assets/index-DgZ5OoIh.js","assets/index-U0SxgYQO.css","assets/file-xEF5For3.js","assets/DashboardShared-DqfSf6DJ.js","assets/PreviewTab-BDYKANVc.js","assets/play-Cxb0Wagx.js"])))=>i.map(i=>d[i]);
2
- import{c as N,aW as k,r as s,j as e,O as S,P as T,U as C,a8 as P,bg as M,bh as _,bi as j,bj as E,bk as L,a3 as w,bl as O}from"./index-DgZ5OoIh.js";import{u as A,q as I,p as z,h as F,L as R,C as q,T as v,m as D}from"./DashboardShared-DqfSf6DJ.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilesTab-Cnj859gV.js","assets/index-7UNu_8ex.js","assets/index-DVZdJrwy.css","assets/file-CEVc1lRa.js","assets/DashboardShared-Ojg-bGGQ.js","assets/PreviewTab-DquI9ttJ.js","assets/play--trDjvtr.js"])))=>i.map(i=>d[i]);
2
+ import{c as N,aW as k,r as s,j as e,O as S,P as T,U as C,a8 as P,bg as M,bh as _,bi as j,bj as E,bk as L,a3 as w,bl as O}from"./index-7UNu_8ex.js";import{u as A,q as I,p as z,h as F,L as R,C as q,T as v,m as D}from"./DashboardShared-Ojg-bGGQ.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 V=[["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"}]],B=N("message-square-text",V),G=s.lazy(async()=>({default:(await w(()=>import("./FilesTab-M37autPE.js"),__vite__mapDeps([0,1,2,3,4]))).FilesTab})),U=s.lazy(async()=>({default:(await w(()=>import("./PreviewTab-BDYKANVc.js"),__vite__mapDeps([5,1,2,6]))).PreviewTab})),W={getOutput:j,getOutputTree:_,getOutputContent:M},H={getOutput:j,createPreviewSession:(t,r)=>O(t,typeof r=="string"?r:r==null?void 0:r.path)};function Q(){const{shareId:t}=k(),[r,d]=s.useState(null),[o,a]=s.useState([]),[x,c]=s.useState(!0),[g,i]=s.useState(null),l=s.useRef(null);return s.useEffect(()=>{if(!t){d(null),a([]),i("Shared conversation not found"),c(!1);return}let u=!1;l.current=t,c(!0),i(null);const h=async n=>{try{const[m,f]=await Promise.all([E(t),L(t)]);if(u||l.current!==t)return;d(m),a(y=>n?f.logs:D(y,f.logs)),i(null)}catch(m){if(u||l.current!==t)return;n&&(d(null),a([]),i(m instanceof Error?m.message:"Failed to load shared conversation"))}finally{!u&&l.current===t&&n&&c(!1)}};h(!0);const p=window.setInterval(()=>{h(!1)},2500);return()=>{u=!0,window.clearInterval(p)}},[t]),e.jsx(Z,{conversation:r,logs:o,loading:x,error:g})}function Z({conversation:t,logs:r,loading:d,error:o}){const[a,x]=s.useState("transcript"),[c,g]=s.useState(!1),i=s.useMemo(()=>{if(!t)return null;const n=A(t.payload.initialMessage);return n.length>0?I(n,new Date(t.createdAt).toISOString()):null},[t]),l=s.useMemo(()=>z([...i?[i]:[],...r]),[i,r]),u=s.useMemo(()=>F(l),[l]),h=(t==null?void 0:t.scope)==="filesPreview",p=e.jsx("section",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain scroll-pb-16 bg-gradient-to-b from-background/15 via-transparent to-background/35 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:[d&&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..."]}),!d&&o&&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:o})]}),!d&&!o&&l.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(B,{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"})]}),!d&&!o&&u.map(({event:n,subItems:m},f)=>e.jsx(q,{event:n,agent:t==null?void 0:t.agent,subItems:m,questionResponseDisabled:!0},`shared-${f}`))]})});return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background text-foreground",children:[e.jsx("div",{className:"mesh-grid pointer-events-none absolute inset-0"}),e.jsxs("div",{className:"relative z-10 flex h-full min-h-0 gap-3 px-3 py-3 sm:px-5 lg:px-6",children:[e.jsxs("aside",{className:"dashboard-panel dashboard-panel-muted animate-panel-settle hidden w-64 shrink-0 flex-col overflow-hidden rounded-xl 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-lg 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-sm border border-border/70 bg-background/70 text-muted-foreground transition-colors hover:text-foreground",children:e.jsx($,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:()=>g(n=>!n),"aria-expanded":c,className:"inline-flex h-9 items-center gap-2 rounded-sm border border-border/70 bg-background/70 px-3 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(P,{className:"h-4 w-4"}),"Try it"]})]})]})]}),e.jsxs("main",{className:"dashboard-panel animate-panel-settle flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl",children:[e.jsxs("header",{className:"shrink-0 border-b border-border/55 bg-card/28 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-sm 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"})]})]}),h&&e.jsxs("div",{className:"mt-3 inline-flex h-auto rounded-sm bg-muted/70 p-0.5 text-muted-foreground",children:[e.jsx("button",{type:"button",onClick:()=>x("transcript"),className:b(a==="transcript"),children:"Transcript"}),e.jsx("button",{type:"button",onClick:()=>x("files"),className:b(a==="files"),children:"Files"}),e.jsx("button",{type:"button",onClick:()=>x("preview"),className:b(a==="preview"),children:"Preview"})]})]}),h&&t?e.jsxs(e.Fragment,{children:[a==="transcript"&&p,a==="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:W})})}),a==="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(U,{taskId:t.shareId,api:H,allowPortPreview:!1})})})]}):p]})]})]})}function b(t){return t?"inline-flex items-center justify-center whitespace-nowrap rounded-sm bg-background px-2.5 py-0.5 text-[11px] font-medium text-foreground shadow-sm":"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-2.5 py-0.5 text-[11px] font-medium transition-colors hover:text-foreground"}function $({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{Q as SharedConversationPage,Z as SharedConversationView};
7
+ */const V=[["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"}]],B=N("message-square-text",V),G=s.lazy(async()=>({default:(await w(()=>import("./FilesTab-Cnj859gV.js"),__vite__mapDeps([0,1,2,3,4]))).FilesTab})),U=s.lazy(async()=>({default:(await w(()=>import("./PreviewTab-DquI9ttJ.js"),__vite__mapDeps([5,1,2,6]))).PreviewTab})),W={getOutput:j,getOutputTree:_,getOutputContent:M},H={getOutput:j,createPreviewSession:(t,r)=>O(t,typeof r=="string"?r:r==null?void 0:r.path)};function Q(){const{shareId:t}=k(),[r,d]=s.useState(null),[o,a]=s.useState([]),[x,c]=s.useState(!0),[g,i]=s.useState(null),l=s.useRef(null);return s.useEffect(()=>{if(!t){d(null),a([]),i("Shared conversation not found"),c(!1);return}let u=!1;l.current=t,c(!0),i(null);const h=async n=>{try{const[m,f]=await Promise.all([E(t),L(t)]);if(u||l.current!==t)return;d(m),a(y=>n?f.logs:D(y,f.logs)),i(null)}catch(m){if(u||l.current!==t)return;n&&(d(null),a([]),i(m instanceof Error?m.message:"Failed to load shared conversation"))}finally{!u&&l.current===t&&n&&c(!1)}};h(!0);const p=window.setInterval(()=>{h(!1)},2500);return()=>{u=!0,window.clearInterval(p)}},[t]),e.jsx(Z,{conversation:r,logs:o,loading:x,error:g})}function Z({conversation:t,logs:r,loading:d,error:o}){const[a,x]=s.useState("transcript"),[c,g]=s.useState(!1),i=s.useMemo(()=>{if(!t)return null;const n=A(t.payload.initialMessage);return n.length>0?I(n,new Date(t.createdAt).toISOString()):null},[t]),l=s.useMemo(()=>z([...i?[i]:[],...r]),[i,r]),u=s.useMemo(()=>F(l),[l]),h=(t==null?void 0:t.scope)==="filesPreview",p=e.jsx("section",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain scroll-pb-16 bg-gradient-to-b from-background/15 via-transparent to-background/35 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:[d&&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..."]}),!d&&o&&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:o})]}),!d&&!o&&l.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(B,{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"})]}),!d&&!o&&u.map(({event:n,subItems:m},f)=>e.jsx(q,{event:n,agent:t==null?void 0:t.agent,subItems:m,questionResponseDisabled:!0},`shared-${f}`))]})});return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background text-foreground",children:[e.jsx("div",{className:"mesh-grid pointer-events-none absolute inset-0"}),e.jsxs("div",{className:"relative z-10 flex h-full min-h-0 gap-3 px-3 py-3 sm:px-5 lg:px-6",children:[e.jsxs("aside",{className:"dashboard-panel dashboard-panel-muted animate-panel-settle hidden w-64 shrink-0 flex-col overflow-hidden rounded-xl 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-lg 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-sm border border-border/70 bg-background/70 text-muted-foreground transition-colors hover:text-foreground",children:e.jsx($,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:()=>g(n=>!n),"aria-expanded":c,className:"inline-flex h-9 items-center gap-2 rounded-sm border border-border/70 bg-background/70 px-3 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(P,{className:"h-4 w-4"}),"Try it"]})]})]})]}),e.jsxs("main",{className:"dashboard-panel animate-panel-settle flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl",children:[e.jsxs("header",{className:"shrink-0 border-b border-border/55 bg-card/28 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-sm 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"})]})]}),h&&e.jsxs("div",{className:"mt-3 inline-flex h-auto rounded-sm bg-muted/70 p-0.5 text-muted-foreground",children:[e.jsx("button",{type:"button",onClick:()=>x("transcript"),className:b(a==="transcript"),children:"Transcript"}),e.jsx("button",{type:"button",onClick:()=>x("files"),className:b(a==="files"),children:"Files"}),e.jsx("button",{type:"button",onClick:()=>x("preview"),className:b(a==="preview"),children:"Preview"})]})]}),h&&t?e.jsxs(e.Fragment,{children:[a==="transcript"&&p,a==="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:W})})}),a==="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(U,{taskId:t.shareId,api:H,allowPortPreview:!1})})})]}):p]})]})]})}function b(t){return t?"inline-flex items-center justify-center whitespace-nowrap rounded-sm bg-background px-2.5 py-0.5 text-[11px] font-medium text-foreground shadow-sm":"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-2.5 py-0.5 text-[11px] font-medium transition-colors hover:text-foreground"}function $({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{Q as SharedConversationPage,Z as SharedConversationView};
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-DgZ5OoIh.js";/**
1
+ import{c as a}from"./index-7UNu_8ex.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.