meshy-node 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dashboard/assets/{DashboardPage-TE6tsOBU.js → DashboardPage-D5cStRjL.js} +46 -51
- package/dashboard/assets/{DashboardShared-B6YLnjis.js → DashboardShared-Cl2J-iJd.js} +1 -1
- package/dashboard/assets/{DiffTab-B4hRGo1c.js → DiffTab-Bf9BAMpM.js} +1 -1
- package/dashboard/assets/{FilesTab-By5MpB3q.js → FilesTab-CH1lwzT9.js} +1 -1
- package/dashboard/assets/{MarkdownPreviewFrame-C094uLQB.js → MarkdownPreviewFrame-DEZT2HNE.js} +1 -1
- package/dashboard/assets/{PreviewTab-C_SvaL2_.js → PreviewTab-T_Y0AhqI.js} +5 -5
- package/dashboard/assets/{SharedConversationPage-8XehjzT5.js → SharedConversationPage-C2p4_D8K.js} +2 -2
- package/dashboard/assets/{file-C7Gl-F2G.js → file-By_WHjZd.js} +1 -1
- package/dashboard/assets/index-B75j0Sjk.js +351 -0
- package/dashboard/assets/index-BRrkswqR.css +1 -0
- package/dashboard/index.html +2 -2
- package/main.cjs +1799 -1057
- package/package.json +1 -1
- package/runtime-metadata.json +4 -4
- package/dashboard/assets/index-Cw9E6sQy.js +0 -341
- package/dashboard/assets/index-DPc1_Q2V.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as be,j as m,V as Fl,
|
|
1
|
+
import{c as be,j as m,V as Fl,ay as Ml,n as $e,W as Ol,Y as Rl,az as Bl,a5 as $l,c7 as Kr,T as Zr,y as Pt,c8 as Ul,c9 as Hl,ca as ql,cb as ei,r as fe,B as At,C as He,X as ti,a2 as Vl,N as Wl,L as Gl,_ as ni}from"./index-B75j0Sjk.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 _,j as n,n as j,r as l,
|
|
1
|
+
import{c as _,j as n,n as j,r as l,ch as Q,cc as X,N as B,x as V,a8 as Y,F as Z}from"./index-B75j0Sjk.js";import{A as ee,G as ne}from"./DashboardPage-D5cStRjL.js";import{F as te}from"./file-By_WHjZd.js";import"./DashboardShared-Cl2J-iJd.js";import"./MarkdownPreviewFrame-DEZT2HNE.js";import"./PreviewTab-T_Y0AhqI.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 fe,r as i,
|
|
1
|
+
import{c as fe,r as i,cc as je,cd as ke,ce as Ne,j as t,F as oe,B as P,M as le,X as Se,x as Ce,n as x,E as Fe}from"./index-B75j0Sjk.js";import{E as Ee,M as Pe,L as De}from"./MarkdownPreviewFrame-DEZT2HNE.js";import{F as L,G as Te,H as _e,J as Oe,K as ze,N as Re,O as $e}from"./DashboardShared-Cl2J-iJd.js";import{F as Ae}from"./file-By_WHjZd.js";/**
|
|
2
2
|
* @license lucide-react v1.7.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dashboard/assets/{MarkdownPreviewFrame-C094uLQB.js → MarkdownPreviewFrame-DEZT2HNE.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as st,r as Xt,j as C,n as z}from"./index-
|
|
1
|
+
import{c as st,r as Xt,j as C,n as z}from"./index-B75j0Sjk.js";import{P as Re,Q as ye,R as He,S as Fe,U as he,V as ae,W as Ne,X as Kt,Y as Vt,Z as w,_ as zt,$ as rt,a0 as pe,a1 as jt,a2 as Jt,a3 as $t}from"./DashboardShared-Cl2J-iJd.js";/**
|
|
2
2
|
* @license lucide-react v1.7.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as D,j as e,I as fe,B as p,aA as V,aT as ae,r as i,cf as xe,ce as pe,aX as I,V as he,W as ve,Y as we,cg as be,N as ge,C as je}from"./index-B75j0Sjk.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 ke=[["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"}]],Ne=
|
|
6
|
+
*/const ke=[["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"}]],Ne=D("maximize-2",ke);/**
|
|
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 ye=[["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"}]],Se=
|
|
11
|
+
*/const ye=[["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"}]],Se=D("minimize-2",ye);/**
|
|
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 Ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Ce=
|
|
16
|
+
*/const Ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Ce=D("play",Ee);/**
|
|
17
17
|
* @license lucide-react v1.7.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Me=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Pe=L("settings-2",Me),D="8314",Te={getOutput:pe,createPreviewSession:xe};function Fe({taskId:r,api:n=Te,allowPortPreview:a=!1,requestedEntryPath:l=null,requestedEntryRequestId:f=0}){const[c,g]=i.useState(null),[t,o]=i.useState(null),[d,m]=i.useState(null),[j,y]=i.useState(D),[h,S]=i.useState(!1),[M,k]=i.useState(!0),[E,v]=i.useState(null),[P,_]=i.useState(!1),[Q,x]=i.useState(!1),U=i.useRef(null),X=i.useRef(null),O=i.useRef(null),Z=i.useCallback(async()=>{k(!0),v(null),g(null),o(null),m(null),x(!1),U.current=null;try{const s=await n.getOutput(r);g(s),k(!1)}catch(s){v(s instanceof Error?s.message:"Failed to load output"),k(!1)}},[n,r]);i.useEffect(()=>{Z()},[Z]);const w=i.useCallback(async s=>{v(null);try{const u=await n.createPreviewSession(r,s?.path?{path:s.path}:void 0);o(u),S(!1),x(!1),s&&m(s),I("preview.created",{result:"success",previewType:s?.kind??"file"})}catch(u){v(u instanceof Error?u.message:"Failed to create preview session"),I("preview.failed",{result:"failed",previewType:s?.kind??"file"})}},[n,r]),z=i.useCallback(async s=>{const u=s??Number.parseInt(j.trim()||D,10);if(!Number.isInteger(u)||u<1||u>65535){v("Enter a port between 1 and 65535");return}v(null);try{const $=await n.createPreviewSession(r,{port:u});o($),m(null),y(String(u)),S(!0),x(!1),I("preview.created",{result:"success",previewType:"service-port"})}catch($){v($ instanceof Error?$.message:"Failed to create preview session"),I("preview.failed",{result:"failed",previewType:"service-port"})}},[n,j,r]),b=i.useMemo(()=>te(c),[c]),W=i.useMemo(()=>le(b,l),[b,l]);i.useEffect(()=>{if(!l||!c?.available||M||h)return;const s=`${f}:${l}`;if(U.current!==s){if(U.current=s,!W){o(null),m(null),v("File is not available for preview");return}o(null),w(W)}},[M,c?.available,W,l,f,h,w]),i.useEffect(()=>{if(h||l||!c?.available||b.length===0||t&&t.kind!=="service")return;const s=d??b[0];s&&w(s)},[d,c,b,l,h,t,w]);const N=i.useCallback(()=>{if(t?.kind==="service"&&typeof t.port=="number"){z(t.port);return}o(null);const s=d??te(c)[0];s&&w(s)},[d,c,t,z,w]);i.useEffect(()=>{if(!t)return;const s=t.expiresAt-Date.now()-5e3;if(s<=0){N();return}const u=window.setTimeout(N,s);return()=>window.clearTimeout(u)},[N,t]);const R=i.useCallback(()=>{_(!1)},[]),T=i.useCallback(()=>{O.current?.(),O.current=null},[]),H=i.useCallback(()=>{if(T(),!P)return;const s=Oe(X.current);if(s)try{O.current=B(s,R)}catch{O.current=null}},[T,R,P]);if(i.useEffect(()=>{if(!P){T();return}const s=B(window,R);return H(),()=>{s(),T()}},[H,T,R,P,t?.previewUrl,t?.openUrl]),M)return e.jsx(F,{children:"Loading preview..."});const C=a&&h;if(E&&t&&!C)return e.jsx(F,{children:e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"text-[11px] text-destructive",children:E}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(p,{variant:"outline",size:"sm",onClick:N,className:"rounded-sm",children:[e.jsx(V,{className:"h-3.5 w-3.5"}),"Retry"]})})]})});const q=!!c?.available;if(!q&&!a)return e.jsx(F,{children:"Task output is not available yet."});if(!t)return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"shrink-0 border-b border-border/60 px-3 py-1.5",children:e.jsx(Y,{session:null,serviceModeOpen:C,allowPortPreview:a,servicePort:j,previewEntries:b,activeEntry:d,filesMenuOpen:Q,onRefresh:N,onFullscreen:()=>_(!0),onServiceModeToggle:()=>{x(!1),S(s=>!s)},onServicePortChange:y,onServiceStart:()=>{z()},onFileMenuToggle:()=>x(s=>!s),onEntrySelect:s=>{x(!1),w(s)}})}),C?e.jsx(G,{serviceSession:null,error:E}):e.jsx(F,{children:E?e.jsx("span",{className:"text-[11px] text-destructive",children:E}):q?b.length>0?"Starting preview session...":"No HTML or Markdown files were found in this task output.":"Task output is not available yet."})]});const ee=ue(t),de=A(t),re=ce(t),se=oe(t),K=t.kind==="service"?t:null,me=C?K:t,ne=e.jsx("iframe",{src:re,className:"h-full w-full border-0",sandbox:se,title:"Task Preview"});return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"shrink-0 border-b border-border/60 px-3 py-1.5",children:e.jsx(Y,{session:me,serviceModeOpen:C,allowPortPreview:a,servicePort:j,previewEntries:b,activeEntry:d,filesMenuOpen:Q,onRefresh:N,onFullscreen:()=>_(!0),onServiceModeToggle:()=>{x(!1),S(s=>!s)},onServicePortChange:y,onServiceStart:()=>{z()},onFileMenuToggle:()=>x(s=>!s),onEntrySelect:s=>{x(!1),w(s)}})}),C?e.jsx(G,{serviceSession:K,error:E,children:K?ne:null}):e.jsx("div",{className:"min-h-0 flex-1 p-2",children:e.jsx("div",{className:"h-full overflow-hidden rounded-sm border border-border/60 bg-white shadow-none",children:ne})}),e.jsx(he,{open:P,onOpenChange:_,children:e.jsxs(ve,{className:"flex h-[95vh] max-w-[95vw] flex-col gap-0 overflow-hidden p-0",children:[e.jsxs(we,{className:"sr-only",children:["Preview: ",ee]}),e.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 px-3 py-1.5",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate text-[12px] font-semibold text-foreground",children:ee}),e.jsx("span",{className:"text-xs text-muted-foreground",children:J(t.expiresAt)})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",onClick:N,title:"Refresh",children:e.jsx(V,{className:"h-3.5 w-3.5"})}),e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:de,target:"_blank",rel:"noopener noreferrer",children:e.jsx(ae,{className:"h-3.5 w-3.5"})})}),e.jsx(be,{asChild:!0,children:e.jsxs(p,{variant:"outline",size:"sm",className:"h-6 rounded-sm px-2 text-[11px]",title:"Exit fullscreen",children:[e.jsx(Se,{className:"h-3.5 w-3.5"}),"Exit fullscreen"]})})]})]}),e.jsx("div",{className:"min-h-0 flex-1",children:e.jsx("iframe",{ref:X,src:re,className:"h-full w-full border-0",sandbox:se,title:"Task Preview Fullscreen",onLoad:H})})]})})]})}function B(r,n){const a=f=>{_e(f)&&n()},l={capture:!0};return r.addEventListener("keydown",a,l),()=>r.removeEventListener("keydown",a,l)}function _e(r){return"key"in r&&r.key==="Escape"}function Oe(r){try{return r?.contentWindow??null}catch{return null}}function te(r){const n=r?.summary?.htmlEntries??[],a=r?.summary?.markdownEntries??[];return[...n.map(l=>({...l,kind:"html"})),...a.map(l=>({...l,kind:"markdown"}))]}function le(r,n){if(!n)return null;const a=r.find(l=>l.path===n);return a||(/\.html?$/i.test(n)?{kind:"html",path:n,label:n}:/\.mdx?$/i.test(n)?{kind:"markdown",path:n,label:n}:null)}function ze({entries:r,activeEntry:n,open:a,onToggle:l,onEntrySelect:f}){const c=r[0];if(!c)return null;const g=n??c,t=ie(g);return e.jsxs("div",{className:"relative min-w-0",children:[e.jsxs("button",{type:"button","aria-expanded":a,"aria-haspopup":"menu","aria-label":"Preview files",onClick:l,className:"flex h-6 max-w-[min(24rem,calc(100vw-7rem))] items-center gap-1.5 rounded-sm px-1.5 text-left text-[12px] font-semibold text-foreground transition-colors hover:bg-background/70",children:[e.jsx("span",{className:"truncate",children:g.label}),e.jsx(ge,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"})]}),a&&e.jsx("div",{role:"menu","aria-label":"Preview files",className:"absolute left-0 top-full z-30 mt-1 max-h-64 min-w-[14rem] max-w-[min(28rem,calc(100vw-4rem))] overflow-y-auto rounded-sm border border-border/70 bg-popover/95 p-1 text-popover-foreground shadow-[0_16px_48px_-34px_rgba(0,0,0,0.45)] backdrop-blur-xl",children:r.map(o=>{const d=ie(o),m=d===t;return e.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":m,onClick:()=>f(o),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-[11px] leading-4 text-foreground transition-colors hover:bg-accent/75 hover:text-accent-foreground",children:[e.jsx("span",{className:"w-3.5 shrink-0 text-primary",children:m?e.jsx(je,{className:"h-3.5 w-3.5"}):null}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:o.label})]},d)})})]})}function ie(r){return`${r.kind}:${r.path}`}function Y({session:r,serviceModeOpen:n,allowPortPreview:a,servicePort:l,previewEntries:f=[],activeEntry:c=null,filesMenuOpen:g=!1,onRefresh:t,onFullscreen:o,onServiceModeToggle:d,onServicePortChange:m,onServiceStart:j,onFileMenuToggle:y,onEntrySelect:h}){const S=r?A(r):null,M=!n&&f.length>0&&y&&h;return e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("div",{className:"flex min-w-0 items-center gap-2",children:n&&m&&j?e.jsxs("form",{className:"flex min-w-0 items-center gap-1.5",onSubmit:k=>{k.preventDefault(),j()},children:[e.jsx("span",{className:"shrink-0 text-[12px] font-semibold text-foreground",children:"Preview service"}),e.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:["Port",e.jsx(fe,{type:"text",min:1,max:65535,inputMode:"numeric",value:l??"",onChange:k=>m(k.target.value),placeholder:D,"aria-label":"Service preview port",className:"h-6 w-20 rounded-sm border-0 bg-muted/55 px-2 text-[11px] shadow-none focus:bg-muted/55 focus:outline-none focus-visible:border-0 focus-visible:bg-muted/55 focus-visible:ring-0 focus-visible:ring-offset-0"})]}),e.jsxs(p,{type:"submit",variant:"ghost",size:"sm",className:"h-6 rounded-sm border-0 bg-primary/10 px-2 text-[11px] text-primary shadow-none hover:bg-primary/15 hover:text-primary",children:[e.jsx(Ce,{className:"h-3.5 w-3.5"}),"Preview"]}),r&&e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:J(r.expiresAt)})]}):e.jsxs(e.Fragment,{children:[M?e.jsx(ze,{entries:f,activeEntry:c,open:g,onToggle:y,onEntrySelect:h}):e.jsx("span",{className:"truncate text-[12px] font-semibold text-foreground",children:r?ue(r):"Preview"}),r&&e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:J(r.expiresAt)})]})}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[r&&e.jsxs(e.Fragment,{children:[e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",onClick:t,title:"Refresh",children:e.jsx(V,{className:"h-3.5 w-3.5"})}),e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:S??r.previewUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx(ae,{className:"h-3.5 w-3.5"})})}),e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",onClick:o,title:"Fullscreen",children:e.jsx(Ne,{className:"h-3.5 w-3.5"})})]}),a&&e.jsxs(p,{type:"button",variant:n?"secondary":"ghost",size:"sm","aria-pressed":n,onClick:d,className:"h-6 shrink-0 rounded-sm px-2 text-[11px]",children:[e.jsx(Pe,{className:"h-3.5 w-3.5"}),"Advanced"]})]})]})}function G({serviceSession:r,error:n,children:a}){return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n&&e.jsx("div",{className:"shrink-0 border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-xs text-destructive",children:n}),e.jsx("div",{className:"min-h-0 flex-1 p-2",children:r&&a?e.jsx("div",{className:"h-full overflow-hidden rounded-sm border border-border/60 bg-white shadow-none",children:a}):e.jsx(F,{children:"No service preview running."})})]})}function A(r){return r.openUrl??r.previewUrl}function ce(r){return r.kind==="service"?A(r):r.previewUrl}function oe(r){return r.kind==="service"?void 0:"allow-scripts allow-same-origin"}function ue(r){if(r.kind==="service"&&typeof r.port=="number"){const n=r.entryPath?`/${r.entryPath.replace(/^\/+/,"")}`:"";return`127.0.0.1:${r.port}${n}`}return r.entryPath}function F({children:r}){return e.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:r})}function J(r){const n=Math.max(0,Math.round((r-Date.now())/1e3));if(n<60)return`${n}s`;const a=Math.floor(n/60),l=n%60;return`${a}m ${l}s`}const $e=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_SERVICE_PREVIEW_PORT:D,PreviewHeader:Y,PreviewServicePanel:G,PreviewTab:Fe,bindPreviewFullscreenEscapeKey:B,getPreviewIframeSandbox:oe,getPreviewIframeSrc:ce,getPreviewOpenUrl:A,resolveRequestedPreviewEntry:le},Symbol.toStringTag,{value:"Module"}));export{D,Ce as P,oe as a,ce as b,$e as c,A as g};
|
|
21
|
+
*/const Me=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Pe=D("settings-2",Me),A="8314",Te={getOutput:pe,createPreviewSession:xe};function Fe({taskId:r,api:n=Te,allowPortPreview:a=!1,requestedEntryPath:l=null,requestedEntryRequestId:f=0}){const[c,g]=i.useState(null),[t,o]=i.useState(null),[d,m]=i.useState(null),[j,y]=i.useState(A),[h,S]=i.useState(!1),[M,k]=i.useState(!0),[E,v]=i.useState(null),[P,_]=i.useState(!1),[J,x]=i.useState(!1),U=i.useRef(null),Q=i.useRef(null),O=i.useRef(null),Z=i.useCallback(async()=>{k(!0),v(null),g(null),o(null),m(null),x(!1),U.current=null;try{const s=await n.getOutput(r);g(s),k(!1)}catch(s){v(s instanceof Error?s.message:"Failed to load output"),k(!1)}},[n,r]);i.useEffect(()=>{Z()},[Z]);const w=i.useCallback(async s=>{v(null);try{const u=await n.createPreviewSession(r,s?.path?{path:s.path}:void 0);o(u),S(!1),x(!1),s&&m(s),I("preview.created",{result:"success",previewType:s?.kind??"file"})}catch(u){v(u instanceof Error?u.message:"Failed to create preview session"),I("preview.failed",{result:"failed",previewType:s?.kind??"file"})}},[n,r]),z=i.useCallback(async s=>{const u=s??Number.parseInt(j.trim()||A,10);if(!Number.isInteger(u)||u<1||u>65535){v("Enter a port between 1 and 65535");return}v(null);try{const $=await n.createPreviewSession(r,{port:u});o($),m(null),y(String(u)),S(!0),x(!1),I("preview.created",{result:"success",previewType:"service-port"})}catch($){v($ instanceof Error?$.message:"Failed to create preview session"),I("preview.failed",{result:"failed",previewType:"service-port"})}},[n,j,r]),b=i.useMemo(()=>te(c),[c]),W=i.useMemo(()=>le(b,l),[b,l]);i.useEffect(()=>{if(!l||!c?.available||M||h)return;const s=`${f}:${l}`;if(U.current!==s){if(U.current=s,!W){o(null),m(null),v("File is not available for preview");return}o(null),w(W)}},[M,c?.available,W,l,f,h,w]),i.useEffect(()=>{if(h||l||!c?.available||b.length===0||t&&t.kind!=="service")return;const s=d??b[0];s&&w(s)},[d,c,b,l,h,t,w]);const N=i.useCallback(()=>{if(t?.kind==="service"&&typeof t.port=="number"){z(t.port);return}o(null);const s=d??te(c)[0];s&&w(s)},[d,c,t,z,w]);i.useEffect(()=>{if(!t)return;const s=t.expiresAt-Date.now()-5e3;if(s<=0){N();return}const u=window.setTimeout(N,s);return()=>window.clearTimeout(u)},[N,t]);const R=i.useCallback(()=>{_(!1)},[]),T=i.useCallback(()=>{O.current?.(),O.current=null},[]),H=i.useCallback(()=>{if(T(),!P)return;const s=Oe(Q.current);if(s)try{O.current=B(s,R)}catch{O.current=null}},[T,R,P]);if(i.useEffect(()=>{if(!P){T();return}const s=B(window,R);return H(),()=>{s(),T()}},[H,T,R,P,t?.previewUrl,t?.openUrl]),M)return e.jsx(F,{children:"Loading preview..."});const C=a&&h;if(E&&t&&!C)return e.jsx(F,{children:e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"text-[11px] text-destructive",children:E}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(p,{variant:"outline",size:"sm",onClick:N,className:"rounded-sm",children:[e.jsx(V,{className:"h-3.5 w-3.5"}),"Retry"]})})]})});const q=!!c?.available;if(!q&&!a)return e.jsx(F,{children:"Task output is not available yet."});if(!t)return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"shrink-0 border-b border-border/60 px-3 py-1.5",children:e.jsx(X,{session:null,serviceModeOpen:C,allowPortPreview:a,servicePort:j,previewEntries:b,activeEntry:d,filesMenuOpen:J,onRefresh:N,onFullscreen:()=>_(!0),onServiceModeToggle:()=>{x(!1),S(s=>!s)},onServicePortChange:y,onServiceStart:()=>{z()},onFileMenuToggle:()=>x(s=>!s),onEntrySelect:s=>{x(!1),w(s)}})}),C?e.jsx(Y,{serviceSession:null,error:E}):e.jsx(F,{children:E?e.jsx("span",{className:"text-[11px] text-destructive",children:E}):q?b.length>0?"Starting preview session...":"No HTML or Markdown files were found in this task output.":"Task output is not available yet."})]});const ee=ue(t),de=L(t),re=ce(t),se=oe(t),K=t.kind==="service"?t:null,me=C?K:t,ne=e.jsx("iframe",{src:re,className:"h-full w-full border-0",sandbox:se,title:"Task Preview"});return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"shrink-0 border-b border-border/60 px-3 py-1.5",children:e.jsx(X,{session:me,serviceModeOpen:C,allowPortPreview:a,servicePort:j,previewEntries:b,activeEntry:d,filesMenuOpen:J,onRefresh:N,onFullscreen:()=>_(!0),onServiceModeToggle:()=>{x(!1),S(s=>!s)},onServicePortChange:y,onServiceStart:()=>{z()},onFileMenuToggle:()=>x(s=>!s),onEntrySelect:s=>{x(!1),w(s)}})}),C?e.jsx(Y,{serviceSession:K,error:E,children:K?ne:null}):e.jsx("div",{className:"min-h-0 flex-1 p-2",children:e.jsx("div",{className:"h-full overflow-hidden rounded-sm border border-border/60 bg-white shadow-none",children:ne})}),e.jsx(he,{open:P,onOpenChange:_,children:e.jsxs(ve,{className:"flex h-[95vh] max-w-[95vw] flex-col gap-0 overflow-hidden p-0",children:[e.jsxs(we,{className:"sr-only",children:["Preview: ",ee]}),e.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 px-3 py-1.5",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate text-[12px] font-semibold text-foreground",children:ee}),e.jsx("span",{className:"text-xs text-muted-foreground",children:G(t.expiresAt)})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",onClick:N,title:"Refresh",children:e.jsx(V,{className:"h-3.5 w-3.5"})}),e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:de,target:"_blank",rel:"noopener noreferrer",children:e.jsx(ae,{className:"h-3.5 w-3.5"})})}),e.jsx(be,{asChild:!0,children:e.jsxs(p,{variant:"outline",size:"sm",className:"h-6 rounded-sm px-2 text-[11px]",title:"Exit fullscreen",children:[e.jsx(Se,{className:"h-3.5 w-3.5"}),"Exit fullscreen"]})})]})]}),e.jsx("div",{className:"min-h-0 flex-1",children:e.jsx("iframe",{ref:Q,src:re,className:"h-full w-full border-0",sandbox:se,title:"Task Preview Fullscreen",onLoad:H})})]})})]})}function B(r,n){const a=f=>{_e(f)&&n()},l={capture:!0};return r.addEventListener("keydown",a,l),()=>r.removeEventListener("keydown",a,l)}function _e(r){return"key"in r&&r.key==="Escape"}function Oe(r){try{return r?.contentWindow??null}catch{return null}}function te(r){const n=r?.summary?.htmlEntries??[],a=r?.summary?.markdownEntries??[];return[...n.map(l=>({...l,kind:"html"})),...a.map(l=>({...l,kind:"markdown"}))]}function le(r,n){if(!n)return null;const a=r.find(l=>l.path===n);return a||(/\.html?$/i.test(n)?{kind:"html",path:n,label:n}:/\.mdx?$/i.test(n)?{kind:"markdown",path:n,label:n}:null)}function ze({entries:r,activeEntry:n,open:a,onToggle:l,onEntrySelect:f}){const c=r[0];if(!c)return null;const g=n??c,t=ie(g);return e.jsxs("div",{className:"relative min-w-0",children:[e.jsxs("button",{type:"button","aria-expanded":a,"aria-haspopup":"menu","aria-label":"Preview files",onClick:l,className:"flex h-6 max-w-[min(24rem,calc(100vw-7rem))] items-center gap-1.5 rounded-sm px-1.5 text-left text-[12px] font-semibold text-foreground transition-colors hover:bg-background/70",children:[e.jsx("span",{className:"truncate",children:g.label}),e.jsx(ge,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"})]}),a&&e.jsx("div",{role:"menu","aria-label":"Preview files",className:"absolute left-0 top-full z-30 mt-1 max-h-64 min-w-[14rem] max-w-[min(28rem,calc(100vw-4rem))] overflow-y-auto rounded-sm border border-border/70 bg-popover/95 p-1 text-popover-foreground shadow-[0_16px_48px_-34px_rgba(0,0,0,0.45)] backdrop-blur-xl",children:r.map(o=>{const d=ie(o),m=d===t;return e.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":m,onClick:()=>f(o),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-[11px] leading-4 text-foreground transition-colors hover:bg-accent/75 hover:text-accent-foreground",children:[e.jsx("span",{className:"w-3.5 shrink-0 text-primary",children:m?e.jsx(je,{className:"h-3.5 w-3.5"}):null}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:o.label})]},d)})})]})}function ie(r){return`${r.kind}:${r.path}`}function X({session:r,serviceModeOpen:n,allowPortPreview:a,servicePort:l,previewEntries:f=[],activeEntry:c=null,filesMenuOpen:g=!1,onRefresh:t,onFullscreen:o,onServiceModeToggle:d,onServicePortChange:m,onServiceStart:j,onFileMenuToggle:y,onEntrySelect:h}){const S=r?L(r):null,M=!n&&f.length>0&&y&&h;return e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("div",{className:"flex min-w-0 items-center gap-2",children:n&&m&&j?e.jsxs("form",{className:"flex min-w-0 items-center gap-1.5",onSubmit:k=>{k.preventDefault(),j()},children:[e.jsx("span",{className:"shrink-0 text-[12px] font-semibold text-foreground",children:"Preview service"}),e.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:["Port",e.jsx(fe,{type:"text",min:1,max:65535,inputMode:"numeric",value:l??"",onChange:k=>m(k.target.value),placeholder:A,"aria-label":"Service preview port",className:"h-6 w-20 rounded-sm border-0 bg-muted/55 px-2 text-[11px] shadow-none focus:bg-muted/55 focus:outline-none focus-visible:border-0 focus-visible:bg-muted/55 focus-visible:ring-0 focus-visible:ring-offset-0"})]}),e.jsxs(p,{type:"submit",variant:"ghost",size:"sm",className:"h-6 rounded-sm border-0 bg-primary/10 px-2 text-[11px] text-primary shadow-none hover:bg-primary/15 hover:text-primary",children:[e.jsx(Ce,{className:"h-3.5 w-3.5"}),"Preview"]}),r&&e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:G(r.expiresAt)})]}):e.jsxs(e.Fragment,{children:[M?e.jsx(ze,{entries:f,activeEntry:c,open:g,onToggle:y,onEntrySelect:h}):e.jsx("span",{className:"truncate text-[12px] font-semibold text-foreground",children:r?ue(r):"Preview"}),r&&e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:G(r.expiresAt)})]})}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[r&&e.jsxs(e.Fragment,{children:[e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",onClick:t,title:"Refresh",children:e.jsx(V,{className:"h-3.5 w-3.5"})}),e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",asChild:!0,title:"Open in new tab",children:e.jsx("a",{href:S??r.previewUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx(ae,{className:"h-3.5 w-3.5"})})}),e.jsx(p,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-sm",onClick:o,title:"Fullscreen",children:e.jsx(Ne,{className:"h-3.5 w-3.5"})})]}),a&&e.jsxs(p,{type:"button",variant:n?"secondary":"ghost",size:"sm","aria-pressed":n,onClick:d,className:"h-6 shrink-0 rounded-sm px-2 text-[11px]",children:[e.jsx(Pe,{className:"h-3.5 w-3.5"}),"Advanced"]})]})]})}function Y({serviceSession:r,error:n,children:a}){return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n&&e.jsx("div",{className:"shrink-0 border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-xs text-destructive",children:n}),e.jsx("div",{className:"min-h-0 flex-1 p-2",children:r&&a?e.jsx("div",{className:"h-full overflow-hidden rounded-sm border border-border/60 bg-white shadow-none",children:a}):e.jsx(F,{children:"No service preview running."})})]})}function L(r){return r.openUrl??r.previewUrl}function ce(r){return r.kind==="service"?L(r):r.previewUrl}function oe(r){return r.kind==="service"?void 0:"allow-scripts allow-same-origin"}function ue(r){if(r.kind==="service"&&typeof r.port=="number"){const n=r.entryPath?`/${r.entryPath.replace(/^\/+/,"")}`:"";return`127.0.0.1:${r.port}${n}`}return r.entryPath}function F({children:r}){return e.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:r})}function G(r){const n=Math.max(0,Math.round((r-Date.now())/1e3));if(n<60)return`${n}s`;const a=Math.floor(n/60),l=n%60;return`${a}m ${l}s`}const $e=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_SERVICE_PREVIEW_PORT:A,PreviewHeader:X,PreviewServicePanel:Y,PreviewTab:Fe,bindPreviewFullscreenEscapeKey:B,getPreviewIframeSandbox:oe,getPreviewIframeSrc:ce,getPreviewOpenUrl:L,resolveRequestedPreviewEntry:le},Symbol.toStringTag,{value:"Module"}));export{A as D,Ce as P,oe as a,ce as b,$e as c,L as g};
|
package/dashboard/assets/{SharedConversationPage-8XehjzT5.js → SharedConversationPage-C2p4_D8K.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilesTab-
|
|
2
|
-
import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilesTab-CH1lwzT9.js","assets/index-B75j0Sjk.js","assets/index-BRrkswqR.css","assets/MarkdownPreviewFrame-DEZT2HNE.js","assets/DashboardShared-Cl2J-iJd.js","assets/file-By_WHjZd.js","assets/PreviewTab-T_Y0AhqI.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bD as S,r,j as e,L as T,a0 as C,c0 as P,a7 as E,a9 as M,ao as I,c1 as O,c2 as _,c3 as y,c4 as F,c5 as L,aj as N,c6 as q}from"./index-B75j0Sjk.js";import{B as A,E as R,y as D,x as z,m as B,C as G,o as w,v as U}from"./DashboardShared-Cl2J-iJd.js";const V=r.lazy(async()=>({default:(await N(()=>import("./FilesTab-CH1lwzT9.js"),__vite__mapDeps([0,1,2,3,4,5]))).FilesTab})),W=r.lazy(async()=>({default:(await N(()=>import("./PreviewTab-T_Y0AhqI.js").then(a=>a.c),__vite__mapDeps([6,1,2]))).PreviewTab})),H={getOutput:y,getOutputTree:_,getOutputContent:O},Z={getOutput:y,createPreviewSession:(t,a)=>q(t,typeof a=="string"?a:a?.path)};function X(){const{shareId:t}=S(),[a,d]=r.useState(null),[c,s]=r.useState([]),[u,m]=r.useState(!0),[b,l]=r.useState(null),x=r.useRef(null);return r.useEffect(()=>{if(!t){d(null),s([]),l("Shared conversation not found"),m(!1);return}let i=!1;x.current=t,m(!0),l(null);const h=async o=>{try{const[p,f]=await Promise.all([F(t),L(t)]);if(i||x.current!==t)return;d(p),s(n=>o?f.logs:U(n,f.logs)),l(null)}catch(p){if(i||x.current!==t)return;o&&(d(null),s([]),l(p instanceof Error?p.message:"Failed to load shared conversation"))}finally{!i&&x.current===t&&o&&m(!1)}};h(!0);const g=window.setInterval(()=>{h(!1)},2500);return()=>{i=!0,window.clearInterval(g)}},[t]),e.jsx($,{conversation:a,logs:c,loading:u,error:b})}function $({conversation:t,logs:a,loading:d,error:c}){const[s,u]=r.useState("transcript"),[m,b]=r.useState(null),[l,x]=r.useState(!1),i=r.useMemo(()=>{if(!t)return null;const n=A(t.payload.initialMessage);return n.length>0&&R(a,n)?null:n.length>0?D(n,new Date(t.createdAt).toISOString()):null},[t,a]),h=r.useMemo(()=>z([...i?[i]:[],...a]),[i,a]),g=r.useMemo(()=>B(h),[h]),o=t?.scope==="filesPreview",p=r.useCallback(n=>{o&&(b(v=>({path:n,requestId:(v?.requestId??0)+1})),u("files"))},[o]);r.useEffect(()=>{b(null)},[t?.shareId]);const f=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-4 sm:px-6",children:e.jsxs("div",{className:"mx-auto flex max-w-[72rem] flex-col gap-4 pb-16",children:[d&&e.jsxs("div",{className:"flex items-center gap-2 rounded-sm border border-border/60 bg-background/60 px-3 py-2 text-[11px] text-muted-foreground",children:[e.jsx(T,{className:"h-4 w-4 animate-spin"}),"Loading shared conversation..."]}),!d&&c&&e.jsxs("div",{className:"rounded-sm border border-destructive/20 bg-destructive/10 px-3 py-4 text-center text-destructive",children:[e.jsx("div",{className:"text-[12px] font-semibold",children:"Shared conversation unavailable"}),e.jsx("div",{className:"mt-1 text-[11px]",children:c})]}),!d&&!c&&h.length===0&&e.jsxs("div",{className:"rounded-sm border border-dashed border-border/70 bg-background/35 px-3 py-4 text-center",children:[e.jsx(C,{className:"mx-auto h-5 w-5 text-muted-foreground"}),e.jsx("div",{className:"mt-2 text-[12px] font-medium text-foreground",children:"No transcript output yet"})]}),!d&&!c&&g.map(({event:n,subItems:v},k)=>e.jsx(G,{event:n,agent:t?.agent,subItems:v,onOpenFilePath:p,questionResponseDisabled:!0},`shared-${k}`))]})});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-2 px-2 py-2 sm:px-3",children:[e.jsxs("aside",{className:"dashboard-panel dashboard-panel-muted animate-panel-settle hidden w-64 shrink-0 flex-col overflow-hidden rounded-sm px-3 py-3 lg:flex xl:w-72",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-border/70 bg-foreground text-[11px] font-semibold tracking-[0.24em] text-background shadow-none",children:"M"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-[12px] 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-4 text-[10px] font-medium uppercase tracking-[0.24em] text-muted-foreground",children:"Shared conversation"}),t&&e.jsxs("div",{className:"mt-2 space-y-2.5",children:[e.jsx("h1",{className:"max-h-24 overflow-hidden break-words text-[13px] 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(P,{status:t.status}),e.jsx(E,{priority:t.priority})]}),e.jsxs("div",{className:"space-y-1 text-[11px] text-muted-foreground",children:[e.jsxs("div",{children:["updated ",M(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:[l&&e.jsx("div",{className:"rounded-sm border border-border/70 bg-background/80 p-2.5 font-mono text-[11px] text-foreground shadow-none",children:"npx -y meshy-node@latest start"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:"https://github.com/gim-home/meshy",target:"_blank",rel:"noreferrer","aria-label":"Open Meshy on GitHub",className:"inline-flex h-8 w-8 items-center justify-center rounded-sm 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:()=>x(n=>!n),"aria-expanded":l,className:"inline-flex h-8 items-center gap-1.5 rounded-sm border border-border/70 bg-background/70 px-2.5 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(I,{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-sm",children:[e.jsxs("header",{className:"shrink-0 border-b border-border/55 bg-card/28 px-3 py-2 sm:px-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-sm border border-border/70 bg-foreground text-[11px] 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-sm font-semibold text-foreground",children:t?.title??"Shared conversation"})]})]}),o&&e.jsxs("div",{className:"mt-3 inline-flex h-7 rounded-sm border border-border/55 bg-background/35 p-0.5 text-muted-foreground",children:[e.jsx("button",{type:"button",onClick:()=>u("transcript"),"aria-current":s==="transcript"?"page":void 0,className:j(s==="transcript"),children:"Transcript"}),e.jsx("button",{type:"button",onClick:()=>u("files"),"aria-current":s==="files"?"page":void 0,className:j(s==="files"),children:"Files"}),e.jsx("button",{type:"button",onClick:()=>u("preview"),"aria-current":s==="preview"?"page":void 0,className:j(s==="preview"),children:"Preview"})]})]}),o&&t?e.jsxs(e.Fragment,{children:[s==="transcript"&&f,s==="files"&&e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(r.Suspense,{fallback:e.jsx(w,{label:"Loading files..."}),children:e.jsx(V,{taskId:t.shareId,api:H,requestedFilePath:m?.path??null,requestedFileRequestId:m?.requestId??0})})}),s==="preview"&&e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(r.Suspense,{fallback:e.jsx(w,{label:"Loading preview..."}),children:e.jsx(W,{taskId:t.shareId,api:Z,allowPortPreview:!1})})})]}):f]})]})]})}function j(t){return t?"inline-flex h-full items-center justify-center whitespace-nowrap rounded-sm border border-primary/30 bg-primary/10 px-2.5 text-[11px] font-medium text-primary shadow-none":"inline-flex h-full items-center justify-center whitespace-nowrap rounded-sm border border-transparent px-2.5 text-[11px] font-medium transition-colors hover:bg-muted/35 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{X as SharedConversationPage,$ as SharedConversationView};
|