@qredence/fleet 0.5.1 → 0.5.5
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/CHANGELOG.md +7 -0
- package/bin/fleet-prime.mjs +6 -0
- package/dist/web/client/assets/action-swap-roll-DX5o_33Q.js +1 -0
- package/dist/web/client/assets/artifacts-panel-C3yewUBP.js +1 -0
- package/dist/web/client/assets/{chat-CsepBQwy.js → chat-W-yOMyG_.js} +1 -1
- package/dist/web/client/assets/chat-command-palette-D0xDK1j4.js +1 -0
- package/dist/web/client/assets/command-CQzrtjyj.js +2 -0
- package/dist/web/client/assets/{fleet-pi-tool-renderer-BD_ZAjlG.js → fleet-pi-tool-renderer-B0Y7ou0U.js} +16 -16
- package/dist/web/client/assets/generative-text-renderer-SS9c1kNX.js +6 -0
- package/dist/web/client/assets/globals-D_Hy9bT1.css +2 -0
- package/dist/web/client/assets/{index-DweoFRMs.js → index-C9FloFgj.js} +2 -2
- package/dist/web/client/assets/{ipython-tool-BfeIa0nK.js → ipython-tool-BrMePqD-.js} +1 -1
- package/dist/web/client/assets/{openui-renderer-DlUo6ehT.js → openui-renderer-CCfQqUfE.js} +5 -5
- package/dist/web/client/assets/{prime-agent-artifacts-CHGb5V_j.js → prime-agent-artifacts-C-g1VPiW.js} +1 -1
- package/dist/web/client/assets/range-65lubOFp.js +2 -0
- package/dist/web/client/assets/repl-panel-CCh4ly7J.js +1 -0
- package/dist/web/client/assets/routes-DSTyx_J0.js +16 -0
- package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +1 -0
- package/dist/web/client/assets/subagent-chat-panel-D-qw4uWb.js +1 -0
- package/dist/web/client/assets/subagent-transcript-C7oRwEEP.js +1 -0
- package/dist/web/client/assets/subagents-panel-aSMWZP9p.js +1 -0
- package/dist/web/client/assets/{tool-result-CBzwwUE9.js → tool-result-C2NvnN32.js} +3 -3
- package/dist/web/server/{_tanstack-start-manifest_v-bDUlyKY0-KFW35JRO.js → _tanstack-start-manifest_v-DZc7dwm7-6ZQLGXB7.js} +13 -13
- package/dist/web/server/{artifacts-panel-D9w1DHAN-FGRDCYU2.js → artifacts-panel-Bt7YUzm4-NCBMXJ25.js} +15 -15
- package/dist/web/server/{chat-command-palette-BaenPkCN-BHSOPGU4.js → chat-command-palette-Co1L3rUY-RQLNME4T.js} +33 -12
- package/dist/web/server/{chunk-KPNGZR2R.js → chunk-2V6B62OF.js} +204 -204
- package/dist/web/server/{chunk-44IVTHDV.js → chunk-3HUI75QM.js} +60 -60
- package/dist/web/server/{chunk-5AVQZ4AZ.js → chunk-4UBOIY2S.js} +2 -1
- package/dist/web/server/{chunk-Y6LJ4WBI.js → chunk-56HSKUBD.js} +699 -691
- package/dist/web/server/{chunk-RPROZ2JC.js → chunk-5RQ6QAZX.js} +133 -133
- package/dist/web/server/{chunk-PWK2HJIV.js → chunk-6D524OCJ.js} +175 -175
- package/dist/web/server/{chunk-FBOO3G67.js → chunk-AECEK3K7.js} +6 -6
- package/dist/web/server/{chunk-VHCAD46L.js → chunk-AWFOBHH4.js} +4 -4
- package/dist/web/server/{chunk-FVWDJNXR.js → chunk-BEMDNODD.js} +1 -1
- package/dist/web/server/{chunk-X2TUFLTP.js → chunk-BLVCDQ7E.js} +438 -438
- package/dist/web/server/{chunk-EIVNRYP3.js → chunk-FZRBAPUM.js} +2 -2
- package/dist/web/server/chunk-KOIPYBJF.js +3773 -0
- package/dist/web/server/{chunk-XYYNYFFD.js → chunk-LSIHVSUT.js} +2 -2
- package/dist/web/server/{chunk-H64JLONZ.js → chunk-PDRD2X5G.js} +2 -2
- package/dist/web/server/{chunk-FE4KN6T2.js → chunk-RX62LUDV.js} +4 -4
- package/dist/web/server/chunk-SR65ARVS.js +192 -0
- package/dist/web/server/{chunk-WK7CQS2N.js → chunk-SZ65K4CO.js} +48 -48
- package/dist/web/server/{chunk-DO3TVNGA.js → chunk-TO3YPLNZ.js} +6 -6
- package/dist/web/server/{chunk-3IKSPTYI.js → chunk-UKINNXJY.js} +2 -2
- package/dist/web/server/{chunk-M2FGGPNA.js → chunk-VGDP4YDU.js} +70 -45
- package/dist/web/server/{chunk-PCJ5EKFE.js → chunk-VRLTWOVJ.js} +11 -6
- package/dist/web/server/{chunk-HBZ6YKRB.js → chunk-WN77JNYY.js} +2 -2
- package/dist/web/server/{chunk-2U7PWSJX.js → chunk-WZNZQNI4.js} +231 -3633
- package/dist/web/server/{chunk-B2F6MLVZ.js → chunk-XFVL5ITL.js} +2246 -2228
- package/dist/web/server/{chunk-3GSFXWL5.js → chunk-XLCTCC4W.js} +3 -3
- package/dist/web/server/{chunk-AZZHUVJR.js → chunk-Y4MHIA7B.js} +18 -26
- package/dist/web/server/{fleet-pi-tool-renderer-lJvZWmBJ-4M5YI6VS.js → fleet-pi-tool-renderer-CE45vM6T-2UQN6RJM.js} +11 -9
- package/dist/web/server/{fork-picker-dialog-BZzfxdQd-Y725VJ7G.js → fork-picker-dialog-DCzuGelH-TN2Q5OXI.js} +5 -5
- package/dist/web/server/{openui-renderer-Cg4RSE9k-7BTJIYZJ.js → openui-renderer-c36_GYes-HX46N4M5.js} +11 -11
- package/dist/web/server/{repl-panel-BEQrC2ef-V3YEZ7EO.js → repl-panel-D9E8nkQy-L45ZNG2V.js} +4 -3
- package/dist/web/server/{router-CEahIUpn-SRG7XKIH.js → router-_ZpegqiQ-QIE44PIB.js} +1737 -1370
- package/dist/web/server/{routes-BznemByz-F4DJAYIM.js → routes-Ct81-8Tq-LHRMOS7R.js} +2882 -2330
- package/dist/web/server/server.js +3 -3
- package/dist/web/server/{session-insights-panel-JfeTHE0d-3HZB3ZWI.js → session-insights-panel-BHZyKDTo-LRMAMA3O.js} +4 -2
- package/dist/web/server/{settings-dialog-DgeBMORv-7SRSENPM.js → settings-dialog-B4uUS6f--AZ4I4ZOT.js} +142 -142
- package/dist/web/server/{start-CLAD7RcD-56S4BWMM.js → start-BYVnok_H-IA6TWGA3.js} +1 -1
- package/dist/web/server/subagent-chat-panel-C97S3WID-DLOAD5TG.js +63 -0
- package/dist/web/server/subagents-panel-iHpvMIZy-LI6XK66M.js +181 -0
- package/dist/web/server/{workspace-panel-y54P79_B-VPIYUXF6.js → workspace-panel-CHPoiXEo-YB4WS3MK.js} +2 -2
- package/package.json +5 -5
- package/dist/web/client/assets/artifacts-panel-CX62LQ13.js +0 -1
- package/dist/web/client/assets/chat-command-palette-C4sSf8Kg.js +0 -1
- package/dist/web/client/assets/collapsible-DmyYcezk.js +0 -1
- package/dist/web/client/assets/command-CB6emP8m.js +0 -2
- package/dist/web/client/assets/conversation-turns-ByFoWPXe.js +0 -6
- package/dist/web/client/assets/globals-CqqQdk2S.css +0 -2
- package/dist/web/client/assets/range-vSJ7Ux_5.js +0 -2
- package/dist/web/client/assets/repl-panel-DiGS6uCw.js +0 -1
- package/dist/web/client/assets/routes-CxlNCi_v.js +0 -16
- package/dist/web/client/assets/session-insights-panel-DwmwiikS.js +0 -1
- package/dist/web/client/assets/subagents-panel-DGnsK6Nx.js +0 -1
- package/dist/web/server/chunk-ZEVZFLIY.js +0 -334
- package/dist/web/server/subagents-panel-CzZe3co7-2VZ5JTWF.js +0 -332
|
@@ -2,4 +2,4 @@ function e(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=
|
|
|
2
2
|
`).map((n,i)=>({id:`${e}-${t}-${r}-${i}`,type:r,content:n}))}function o(e){let t=n(e.input),i=n(e.output);return r(t,`path`,`file_path`,`filePath`)??r(i,`path`,`file_path`,`filePath`)??e.title}function s(e){let t=n(e.input),i=n(e.output),a=n(i?.details);return r(i,`diff`,`patch`)??r(a,`diff`,`patch`)??r(t,`diff`,`patch`)}function c(e){let t=n(e.input),i=n(e.output);return(Array.isArray(t?.edits)?t.edits:Array.isArray(i?.edits)?i.edits:[]).flatMap((t,i)=>{let o=n(t);if(!o)return[];let s=r(o,`oldText`,`old_string`,`before`),c=r(o,`newText`,`new_string`,`after`,`content`);return[...s===void 0?[]:a(e.id,i,s,`removed`),...c===void 0?[]:a(e.id,i,c,`added`)]})}function l(e){let t=s(e);if(t?.trim()){let n=t.split(`
|
|
3
3
|
`).map((t,n)=>({id:`${e.id}-${n}`,type:t.startsWith(`+`)&&!t.startsWith(`+++`)?`added`:t.startsWith(`-`)&&!t.startsWith(`---`)?`removed`:`context`,content:t}));return{file:o(e),lines:n,copyText:t}}let r=c(e);if(r.length>0)return{file:o(e),lines:r,copyText:r.map(e=>`${e.type===`added`?`+`:e.type===`removed`?`-`:` `}${e.content}`).join(`
|
|
4
4
|
`)};let l=n(e.input),u=n(e.output);if(!(e.title.toLowerCase().includes(`write`)||l?.content!==void 0))return;let d=i(l?.content)??i(u?.content);if(d===void 0)return;let f=a(e.id,0,d,`added`);return{file:o(e),lines:f,copyText:f.map(e=>`+${e.content}`).join(`
|
|
5
|
-
`)}}function u(e){let t=e.toLowerCase();if(!(t.includes(`thinking`)||t.includes(`reasoning`)||t.includes(`question`)))return t.includes(`bash`)||t.includes(`shell`)?`bash`:t.includes(`ipython`)||t.includes(`python`)?`ipython`:t.includes(`mcp`)?`mcp`:t.includes(`edit`)||t.includes(`write`)||t.includes(`patch`)?`diff`:`generic`}function d(e,t){let n=typeof e.state==`string`?e.state:void 0;return n===`output-error`||n===`error`?`error`:n===`output-available`||n===`complete`||n===`success`?`success`:n===`cancelled`||n===`canceled`||n===`aborted`||n===`interrupted`?`cancelled`:e.error===void 0?e.output!==void 0||e.result!==void 0?`success`:t===`streaming`?`running`:`cancelled`:`error`}function f(t,n){let r=t.find(e=>e.runId===n.runId);if(!r){t.push({id:e(`artifact-run:${n.runId}`),runId:n.runId,artifacts:[n],startedAt:n.timestamp,...n.status===`running`?{}:{endedAt:n.timestamp}});return}let i=r.artifacts.findIndex(e=>e.id===n.id);i<0?r.artifacts.push(n):r.artifacts[i]=n,n.status!==`running`&&(r.endedAt=n.timestamp)}function p(r,i){let a=[];for(let o of r)for(let[r,s]of o.parts.entries()){let c=n(s);if(!c)continue;let l=c?.type;if(typeof l!=`string`||!l.startsWith(`tool-`))continue;let p=l.slice(5),m=u(p);if(!m)continue;let h=c.input??c.args,g=c.output??c.result;if(h===void 0&&g===void 0)continue;let _=typeof c.toolCallId==`string`&&c.toolCallId?c.toolCallId:`${o.id}:${r}`,v=typeof c.runId==`string`&&c.runId?c.runId:o.id,y=t(o);f(a,{id:e(`${v}:${_}:${m}`),runId:v,sourceMessageId:o.id,...typeof c.toolCallId==`string`?{sourceToolCallId:c.toolCallId}:{},kind:m,title:p,status:d(c,i),...h===void 0?{}:{input:h},...g===void 0?{}:{output:g},timestamp:y})}return a}function m(e,t,n){let r=(t?.artifactRuns??[]).map(e=>({...e,artifacts:e.artifacts.map(e=>({...e}))}));for(let t of p(e,n))for(let e of t.artifacts)f(r,e);return r}export{l as n,m as t};
|
|
5
|
+
`)}}function u(e){let t=e.toLowerCase();if(!(t.includes(`thinking`)||t.includes(`reasoning`)||t.includes(`question`)))return t.includes(`bash`)||t.includes(`shell`)?`bash`:t.includes(`ipython`)||t.includes(`python`)?`ipython`:t.includes(`mcp`)?`mcp`:t.includes(`edit`)||t.includes(`write`)||t.includes(`patch`)?`diff`:`generic`}function d(e,t){let n=typeof e.state==`string`?e.state:void 0;return n===`output-error`||n===`error`?`error`:n===`output-available`||n===`complete`||n===`success`?`success`:n===`cancelled`||n===`canceled`||n===`aborted`||n===`interrupted`?`cancelled`:e.error===void 0?e.output!==void 0||e.result!==void 0?`success`:t===`streaming`?`running`:`cancelled`:`error`}function f(t,n){let r=t.find(e=>e.runId===n.runId);if(!r){t.push({id:e(`artifact-run:${n.runId}`),runId:n.runId,artifacts:[n],startedAt:n.timestamp,...n.status===`running`?{}:{endedAt:n.timestamp}});return}let i=r.artifacts.findIndex(e=>e.id===n.id);i<0?r.artifacts.push(n):r.artifacts[i]=n,n.status!==`running`&&(r.endedAt=n.timestamp)}function p(r,i){let a=[];for(let o of r)for(let[r,s]of o.parts.entries()){let c=n(s);if(!c)continue;let l=c?.type;if(typeof l!=`string`||!l.startsWith(`tool-`))continue;let p=l.slice(5),m=u(p);if(!m)continue;let h=c.input??c.args,g=c.output??c.result;if(h===void 0&&g===void 0)continue;let _=typeof c.toolCallId==`string`&&c.toolCallId?c.toolCallId:`${o.id}:${r}`,v=typeof c.runId==`string`&&c.runId?c.runId:o.id,y=t(o);f(a,{id:e(`${v}:${_}:${m}`),runId:v,sourceMessageId:o.id,...typeof c.toolCallId==`string`?{sourceToolCallId:c.toolCallId}:{},kind:m,title:p,status:d(c,i),...h===void 0?{}:{input:h},...g===void 0?{}:{output:g},...typeof c.backgroundOutput==`string`?{backgroundOutput:c.backgroundOutput}:{},timestamp:y})}return a}function m(e,t,n){let r=(t?.artifactRuns??[]).map(e=>({...e,artifacts:e.artifacts.map(e=>({...e}))}));for(let t of p(e,n))for(let e of t.artifacts)f(r,e);return r}export{l as n,m as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-DG7pUdsX.js","assets/rolldown-runtime-hePW80VL.js","assets/bundle-mjs-DKHVkVWu.js","assets/jsx-runtime-NZYk81nU.js","assets/utils-Eg7xtNmV.js","assets/preload-helper-Czpn1I53.js","assets/chunk-BO2N2NFS-BnzHCiyQ.js","assets/react-dom-Bwxum3ti.js","assets/lib-ChrQ49PO.js","assets/cn-C8c0S2mI.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{d as r,m as i,o as a,p as o,r as s,u as c}from"./ease-vFBiNFNK.js";import{t as l}from"./utils-Eg7xtNmV.js";import{t as u}from"./createLucideIcon-DwxZHm0M.js";import{t as d}from"./chevron-down-BEVGmnSb.js";import{t as f}from"./safe-external-url-Bl_78dpZ.js";import{n as p}from"./action-swap-roll-DX5o_33Q.js";import{a as m}from"./sparkles-C5H3Jtgf.js";import{t as h}from"./preload-helper-Czpn1I53.js";var g=u(`book-open-text`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M16 13h2`,key:`weia3s`}],[`path`,{d:`M16 9h2`,key:`1n7gjm`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}],[`path`,{d:`M6 13h2`,key:`1cckiz`}],[`path`,{d:`M6 9h2`,key:`1k7j9f`}]]),_=u(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),v=u(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),y=u(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),b=u(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),x=u(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),S=e(t(),1);function C(){let[e,t]=(0,S.useState)(!1);return(0,S.useEffect)(()=>{if(typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(hover: hover) and (pointer: fine)`),n=()=>t(e.matches);return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[]),e}var w=n(),T=(0,S.lazy)(()=>h(async()=>{let{Markdown:e}=await import(`./markdown-DG7pUdsX.js`).then(e=>e.a);return{Markdown:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(({Markdown:e})=>({default:e})));function E(e){return(0,w.jsx)(S.Suspense,{fallback:(0,w.jsx)(`div`,{className:e.className?`${e.className} whitespace-pre-wrap`:`whitespace-pre-wrap`,children:e.content}),children:(0,w.jsx)(T,{...e})})}var D={};function O(e){try{return new URL(`/favicon.ico`,e).toString()}catch{return null}}function k(e,t){return`${e}-${t.replace(/[^a-zA-Z0-9_-]/g,`-`)}`}function A({url:e,className:t}){let n=e&&f(e)?O(e):null,[r,i]=(0,S.useState)(null);return(0,w.jsx)(`span`,{"aria-hidden":`true`,className:l(`grid size-5 shrink-0 place-items-center text-muted-foreground`,t),children:n&&r!==n?(0,w.jsx)(`img`,{src:n,alt:``,width:16,height:16,referrerPolicy:`no-referrer`,onError:()=>i(n),className:`size-4 rounded-sm object-contain`}):(0,w.jsx)(_,{className:`size-3.5`})})}function j({citations:e,limit:t=3,className:n}){return(0,w.jsx)(`span`,{"aria-hidden":`true`,className:l(`flex -space-x-1.5`,n),children:e.slice(0,t).map(e=>(0,w.jsx)(A,{url:e.url,className:`size-6 rounded-full bg-background ring-2 ring-background`},e.id))})}function M({citation:e,index:t,idPrefix:n}){let r=e.url&&f(e.url)?e.url:void 0,i=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(A,{url:e.url}),(0,w.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,w.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground/80 transition-colors group-hover/citation:text-foreground`,children:e.title}),e.domain?(0,w.jsx)(`span`,{className:`min-w-0 truncate text-xs text-muted-foreground/60`,children:e.domain}):null]}),(0,w.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,w.jsx)(`span`,{className:`grid size-5 place-items-center rounded-md bg-foreground/[0.05] text-[10px] font-semibold tabular-nums text-muted-foreground`,children:t}),r?(0,w.jsx)(m,{className:`size-3.5 text-muted-foreground/40 transition-colors group-hover/citation:text-muted-foreground`}):null]})]}),a=`group/citation flex items-center gap-2 rounded-md px-1.5 py-1 outline-none focus-visible:ring-2 focus-visible:ring-ring`,o=k(n,e.id);return r?(0,w.jsx)(`a`,{id:o,href:r,target:`_blank`,rel:`noreferrer noopener`,className:a,children:i}):(0,w.jsx)(`div`,{id:o,className:a,children:i})}function N({citations:e,idPrefix:t,className:n}){let c=o()??!1,u=(0,S.useId)(),d=t??`citation-list-${u.replace(/:/g,``)}`;return(0,w.jsx)(`div`,{className:l(`grid gap-0.5`,n),children:(0,w.jsx)(i,{mode:`popLayout`,children:e.map((e,t)=>(0,w.jsx)(r.div,{layout:`position`,initial:c?{opacity:1}:{opacity:0,y:6},animate:{opacity:1,y:0},exit:c?{opacity:0}:{opacity:0,y:-3},transition:c?{duration:0}:{opacity:{duration:.18,ease:s},y:a,layout:a},children:(0,w.jsx)(M,{citation:e,index:t+1,idPrefix:d})},e.id))})})}function P({citations:e,title:t=`Sources`,open:n,defaultOpen:i=!1,onOpenChange:a,idPrefix:s,className:u}){let f=o()??!1,m=(0,S.useId)(),h=`${m}-content`,_=s??`citation-${m.replace(/:/g,``)}`,[v,y]=(0,S.useState)(i),b=n??v,x=(0,S.useCallback)(e=>{n===void 0&&y(e),a?.(e)},[a,n]);return(0,w.jsxs)(`div`,{className:l(`w-full text-sm`,u),children:[(0,w.jsxs)(`button`,{type:`button`,"aria-expanded":b,"aria-controls":h,onClick:()=>x(!b),className:`group -ml-1 flex min-h-8 items-center gap-2 rounded-lg px-1 text-left text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,w.jsx)(g,{className:`size-4`}),(0,w.jsx)(`span`,{className:`font-medium`,children:t}),(0,w.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-semibold tabular-nums`,children:e.length}),(0,w.jsx)(r.span,{"aria-hidden":`true`,animate:{rotate:b?180:0},transition:f?{duration:0}:c,className:`text-muted-foreground/60`,children:(0,w.jsx)(d,{className:`size-3.5`})})]}),(0,w.jsx)(p,{id:h,open:b,children:(0,w.jsx)(N,{citations:e,idPrefix:_,className:`mt-1`})})]})}var F=`bg-background shadow-[0_1px_2px_rgba(0,0,0,0.04),0_12px_32px_-16px_rgba(0,0,0,0.12)] dark:bg-popover dark:shadow-none`,I=`bg-background shadow-[0_2px_8px_rgba(0,0,0,0.05),0_20px_48px_-16px_rgba(0,0,0,0.18)] dark:bg-popover dark:shadow-[0_20px_48px_-16px_rgba(0,0,0,0.55)]`,L=`bg-foreground/[0.04] dark:bg-foreground/[0.06]`,R=`col-start-1 row-start-1 flex w-max items-center gap-1.5 leading-none transition-[opacity,filter] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none`,z=`opacity-100 blur-none`,B=`pointer-events-none select-none opacity-0 blur-[2px]`,V=`h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] data-[ending-style]:h-0 data-[starting-style]:h-0 motion-reduce:transition-none`,H=`font-mono text-[11px] tracking-tight`;function U({active:e=!0,className:t,...n}){return(0,w.jsx)(`span`,{className:l(e&&`shimmer motion-reduce:animate-none`,t),...n})}function W({active:e,children:t,className:n}){let r=(0,S.useRef)(null),i=(0,S.useRef)(null),[a,o]=(0,S.useState)(null);return(0,S.useLayoutEffect)(()=>{let t=(e===0?r:i).current;if(!t)return;let n=()=>o(Math.ceil(t.getBoundingClientRect().width));n();let a=new ResizeObserver(n);return a.observe(t),()=>a.disconnect()},[e]),(0,w.jsxs)(`span`,{style:a===null?void 0:{width:a},className:l(`grid overflow-x-clip transition-[width] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none`,n),children:[(0,w.jsx)(`span`,{ref:r,"aria-hidden":e!==0,className:l(R,e===0?z:B),children:t[0]}),(0,w.jsx)(`span`,{ref:i,"aria-hidden":e!==1,className:l(R,e===1?z:B),children:t[1]})]})}function G(e,t,n){return Number.isNaN(e)?t:Math.min(n,Math.max(t,e))}function K(e,t){return e.slice(0,Math.floor(G(t,0,e.length)))}function q(e,t){return t>0?G(e/t*100,0,100):0}function J(e,t){return t>0?Math.floor(G(e,0,t)):0}export{g as S,x as _,W as a,v as b,I as c,N as d,j as f,C as g,E as h,U as i,H as l,D as m,J as n,V as o,P as p,K as r,L as s,q as t,F as u,b as v,_ as x,y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{o as r,t as i}from"./ipython-tool-BrMePqD-.js";import{t as a}from"./square-terminal-BYTN_I86.js";var o=e(t(),1),s=n(),c={running:{toolState:`input-streaming`,label:`Running`},error:{toolState:`output-error`,label:`Failed`},cancelled:{toolState:`aborted`,label:`Cancelled`},success:{toolState:`output-available`,label:`Completed`}};function l(e){return c[e].toolState}function u(e){return{type:`tool-IPython`,toolCallId:e.sourceToolCallId??e.id,state:l(e.status),input:e.input,output:e.output,backgroundOutput:e.backgroundOutput}}function d(e){return c[e].label}function f({artifact:e,index:t,selected:n}){let a=(0,o.useRef)(null);return(0,o.useEffect)(()=>{n&&requestAnimationFrame(()=>{a.current?.focus({preventScroll:!0}),a.current?.scrollIntoView({block:`nearest`})})},[e.id,n]),(0,s.jsxs)(`article`,{ref:a,tabIndex:-1,className:`overflow-hidden rounded-md border border-border/60 bg-background outline-none focus-visible:ring-2 focus-visible:ring-ring`,"data-repl-run-id":e.id,children:[(0,s.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 border-b border-border/50 px-2.5 py-1.5`,children:[(0,s.jsx)(r,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,s.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-[11px] font-medium text-foreground/70`,children:[`Cell `,t+1]}),(0,s.jsx)(`span`,{className:`shrink-0 text-[10px] text-foreground/40`,children:d(e.status)})]}),(0,s.jsx)(`div`,{className:`p-2`,children:(0,s.jsx)(i,{part:u(e)})})]})}function p({artifactRuns:e=[],selectedArtifactId:t}){let n=e.flatMap(e=>e.artifacts).filter(e=>e.kind===`ipython`);return(0,s.jsxs)(`section`,{"aria-label":`REPL runs`,className:`space-y-2 pb-1`,children:[(0,s.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,s.jsx)(a,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`IPython cells`}),(0,s.jsx)(`span`,{className:`shrink-0 text-[10px] text-foreground/40`,children:n.length>0?n.length:`none yet`})]}),n.length===0?(0,s.jsx)(`p`,{className:`px-2 text-[11px] leading-4 text-foreground/45`,children:`Executed IPython cells and their output will appear here.`}):(0,s.jsx)(`div`,{className:`space-y-2`,"data-testid":`repl-run-list`,children:n.map((e,n)=>(0,s.jsx)(f,{artifact:e,index:n,selected:e.id===t},e.id))})]})}export{p as ReplPanelContent};
|