@qredence/fleet 0.6.6 → 0.7.1
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 +12 -0
- package/dist/web/client/assets/{action-swap-roll-Dbquwd1Y.js → action-swap-roll-BfVrBOVd.js} +1 -1
- package/dist/web/client/assets/{alert-dialog-C6Dkg1x6.js → alert-dialog-FCppNafx.js} +1 -1
- package/dist/web/client/assets/{artifacts-panel-8a_tn7Yb.js → artifacts-panel-C69vz-oo.js} +1 -1
- package/dist/web/client/assets/{badge-BjFxrtmB.js → badge-DOGhnsYk.js} +7 -7
- package/dist/web/client/assets/button-BJyg7l5W.js +1 -0
- package/dist/web/client/assets/{chat-command-palette-DhidLnw7.js → chat-command-palette-wyZjTNa8.js} +1 -1
- package/dist/web/client/assets/{chunk-YOKDWASO-C8deEx7Z.js → chunk-YOKDWASO-Dego39cu.js} +4 -4
- package/dist/web/client/assets/{citations-BYiDBo21.js → citations-BhyqbxcZ.js} +1 -1
- package/dist/web/client/assets/{command-Cre9BsOI.js → command-Bo31U-UD.js} +1 -1
- package/dist/web/client/assets/create-project-dialog-SDyXTpl-.js +1 -0
- package/dist/web/client/assets/{dialog-0KDCsqw0.js → dialog-DLIPvl1s.js} +1 -1
- package/dist/web/client/assets/{dist-CZDnnosQ.js → dist-QgsZ1U9l.js} +1 -1
- package/dist/web/client/assets/ease-DKi-MOH5.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-BPSqUjKu.js → fork-picker-dialog-BDleMADF.js} +1 -1
- package/dist/web/client/assets/globals-DZbMyHfg.css +2 -0
- package/dist/web/client/assets/{highlighted-body-KPVGNVTW-CZcNaoxi.js → highlighted-body-KPVGNVTW-CSgDVUQp.js} +1 -1
- package/dist/web/client/assets/index-BARp0bjW.js +13 -0
- package/dist/web/client/assets/input-Ce8yLnXY.js +1 -0
- package/dist/web/client/assets/{input-group-Fky3fte_.js → input-group-BZLQiZOA.js} +1 -1
- package/dist/web/client/assets/is-ref-object-BD8OGh9C.js +1 -0
- package/dist/web/client/assets/{layout-constants-CC0ANQOP.js → layout-constants-Bl6XCvhY.js} +1 -1
- package/dist/web/client/assets/{markdown-code-BqFVdovL.js → markdown-code-DfJbKhL9.js} +1 -1
- package/dist/web/client/assets/{markdown-C-Y9gskI.js → markdown-yn-nhRzB.js} +2 -2
- package/dist/web/client/assets/mermaid-HWGCJPDP-BpEVCu9T.js +1 -0
- package/dist/web/client/assets/{message-queue-BUJK6bPQ.js → message-queue-CiptKSb6.js} +1 -1
- package/dist/web/client/assets/{model-selector-list-yOj8BeKr.js → model-selector-list-BHQ-Q8b9.js} +1 -1
- package/dist/web/client/assets/{notify-GSsGEKtR.js → notify-BC0a76VJ.js} +1 -1
- package/dist/web/client/assets/{openui-renderer-xe2-ekvP.js → openui-renderer-DrfHxs1t.js} +3 -3
- package/dist/web/client/assets/{preload-helper-Czpn1I53.js → preload-helper-BZ1Pz5am.js} +1 -1
- package/dist/web/client/assets/{prompt-input-BhVQxoyh.js → prompt-input-IwZOepG7.js} +1 -1
- package/dist/web/client/assets/{provider-label-BW_awXvw.js → provider-label-DNZOLldn.js} +1 -1
- package/dist/web/client/assets/{right-panel-registry-BpfG1iZV.js → right-panel-registry-CF7GLJrk.js} +2 -2
- package/dist/web/client/assets/routes-DCP1DP1g.js +16 -0
- package/dist/web/client/assets/select-COK0Kaq2.js +1 -0
- package/dist/web/client/assets/session-tool-renderer-Yu4G1165.js +1389 -0
- package/dist/web/client/assets/{session-tree-panel-BIEUJ1Zs.js → session-tree-panel-deGRKAhX.js} +1 -1
- package/dist/web/client/assets/settings-dialog-BU1Tw0CQ.js +2 -0
- package/dist/web/client/assets/{subagent-chat-panel-DA1GvHt8.js → subagent-chat-panel-bVnkDkgs.js} +1 -1
- package/dist/web/client/assets/{subagent-transcript-BGctBTbY.js → subagent-transcript-D_L-8PQi.js} +1 -1
- package/dist/web/client/assets/{subagent-utils-HbymlalM.js → subagent-utils-D7sXbLsS.js} +2 -2
- package/dist/web/client/assets/{subagents-panel-BJIdWRcV.js → subagents-panel-i5-12E1U.js} +1 -1
- package/dist/web/client/assets/surface-context-DWplCCcO.js +1 -0
- package/dist/web/client/assets/{switch-DIbInrPR.js → switch-DQETDDJT.js} +1 -1
- package/dist/web/client/assets/toast-BFeqSeaR.js +1 -0
- package/dist/web/client/assets/{tool-result-PSnAt_3f.js → tool-result-D7HtJ_yg.js} +2 -2
- package/dist/web/client/assets/{use-presence-D2YmRKr3.js → use-presence-rcUnm8Z7.js} +1 -1
- package/dist/web/client/assets/use-reduced-motion-BgG7f9xw.js +9 -0
- package/dist/web/client/assets/{workspace-panel-D3CMFw8W.js → workspace-panel-Clbmrdza.js} +1 -1
- package/dist/web/client/assets/{workspace-path-nav-DmxBrMV6.js → workspace-path-nav-eVT0rYvv.js} +2 -2
- package/dist/web/client/bundle-budget.json +5 -5
- package/dist/web/server/{_tanstack-start-manifest_v-MhCuqEzO-S6MEB7L5.js → _tanstack-start-manifest_v-CaT-3S-N-VAOGUHEJ.js} +26 -26
- package/dist/web/server/{artifacts-panel-BVfcZuA2-PB4RCSHV.js → artifacts-panel-BuAqeJzj-6DYYLKUW.js} +10 -10
- package/dist/web/server/{chat-command-palette-DlJDToBH-MVI6V743.js → chat-command-palette-Ca8gXVi2-P6EOQ43G.js} +6 -6
- package/dist/web/server/{chunk-KUBURZOL.js → chunk-35AFSKDX.js} +4 -4
- package/dist/web/server/{chunk-WBPESYPV.js → chunk-COWE2EJ6.js} +3 -3
- package/dist/web/server/{chunk-JT53AAM5.js → chunk-E4YWFQX5.js} +1442 -1063
- package/dist/web/server/{chunk-MM4HQ5EO.js → chunk-FPPKECLB.js} +7 -7
- package/dist/web/server/{chunk-VF3NJAD6.js → chunk-GCDOYNXR.js} +585 -634
- package/dist/web/server/{chunk-RWQWBZNI.js → chunk-ITKXE2Q5.js} +253 -215
- package/dist/web/server/{chunk-4QFOBBX5.js → chunk-J4Y2Z3XM.js} +2 -2
- package/dist/web/server/{chunk-SAIH5YPC.js → chunk-JFAUSHBI.js} +4 -4
- package/dist/web/server/{chunk-RQHQK66C.js → chunk-K4KN3QBT.js} +2 -2
- package/dist/web/server/{chunk-3VMFSSWK.js → chunk-M7BTY55G.js} +2 -2
- package/dist/web/server/{chunk-44MTKAFZ.js → chunk-PHHC52CO.js} +5 -5
- package/dist/web/server/{chunk-MSXGQVHG.js → chunk-UTV66W5H.js} +5 -5
- package/dist/web/server/{chunk-F5DJQ3PQ.js → chunk-WPSI5TBE.js} +1528 -2185
- package/dist/web/server/{create-project-dialog-UPz5_Ysf-FS6BL74M.js → create-project-dialog-DCvdysey-IZUGGDAN.js} +76 -15
- package/dist/web/server/{empty-plugin-adapters-Cqtvkauv-ILKI7W7V.js → empty-plugin-adapters-DOl-E2pL-RKRSN75W.js} +1 -1
- package/dist/web/server/{fork-picker-dialog-CZBpezXS-64KP23PO.js → fork-picker-dialog-QH00XmqX-6YLU5REF.js} +4 -4
- package/dist/web/server/{message-queue-D_Q3coUY-I3EJZXWR.js → message-queue-BzEFQR8k-2W53EW32.js} +4 -4
- package/dist/web/server/{model-selector-list-q6WkkOwQ-OT46QU5P.js → model-selector-list-BjoXmw92-TEKBPB3E.js} +6 -6
- package/dist/web/server/{openui-renderer-BqI6m6VI-HXEIYIYZ.js → openui-renderer-CJ7Q2zZ_-FPXKZPSO.js} +6 -6
- package/dist/web/server/{resources-panel-BKZ0M0RP-CMATPQQP.js → resources-panel-yVB4xF_K-OHFHXVU4.js} +5 -5
- package/dist/web/server/{router-BfuEp_JW-DNQ33L5J.js → router-UgU5vJxm-R33FGTXY.js} +3 -3
- package/dist/web/server/{routes-NdG3DsXJ-QKZT7TKM.js → routes-Cbbo-jh9-ZUPH4SJD.js} +37 -35
- package/dist/web/server/server.js +2410 -1672
- package/dist/web/server/{session-reasoning-panel-Dc-AnjdD-7KAZLD74.js → session-reasoning-panel-C50VbaQ8-4YLMVVY6.js} +5 -5
- package/dist/web/server/{session-tool-renderer-DaR8U5rb-TXWACWT7.js → session-tool-renderer-QcAkYD-V-6RXRKDH6.js} +6 -6
- package/dist/web/server/{session-tree-panel-V3l8WdmE-YBRDLHWU.js → session-tree-panel-CL49XSTK-4ZPK6AIV.js} +6 -6
- package/dist/web/server/{settings-dialog-C8U1VX75-6A2V6HSW.js → settings-dialog-DG9HEZeP-TWDRDGMN.js} +191 -120
- package/dist/web/server/{start-QK6aG02q-EMREW2SB.js → start-DEejK9Uj-FODAOTAO.js} +1 -1
- package/dist/web/server/{subagent-chat-panel-B9CtFTP5-6QDZ4RQY.js → subagent-chat-panel-Cg2CxshI-WWGFHTIF.js} +8 -8
- package/dist/web/server/{subagents-panel-Dw6yP5X4-BMN45GDD.js → subagents-panel-aC3Eo-MR-RNIPLCZQ.js} +9 -9
- package/dist/web/server/{workspace-panel-C246J-eO-2WGJWVE6.js → workspace-panel-DfdFkgHU-6HIOXRBX.js} +5 -5
- package/package.json +2 -2
- package/dist/web/client/assets/button-BrwYi6QP.js +0 -1
- package/dist/web/client/assets/create-project-dialog-DVOaxTzt.js +0 -1
- package/dist/web/client/assets/ease-2UPBQU5v.js +0 -1
- package/dist/web/client/assets/globals-CD6JXJJh.css +0 -2
- package/dist/web/client/assets/index-BEG-7vN-.js +0 -12
- package/dist/web/client/assets/input-tWLSIxES.js +0 -1
- package/dist/web/client/assets/is-ref-object-CEXqIz6L.js +0 -1
- package/dist/web/client/assets/mermaid-HWGCJPDP-CVNXPao6.js +0 -1
- package/dist/web/client/assets/routes-BIp_deev.js +0 -16
- package/dist/web/client/assets/select-Buvrx1fi.js +0 -1
- package/dist/web/client/assets/session-tool-renderer-CNcxpGsk.js +0 -1389
- package/dist/web/client/assets/settings-dialog-DAB6RL4u.js +0 -2
- package/dist/web/client/assets/surface-context-A-BjVzO_.js +0 -1
- package/dist/web/client/assets/toast-CS0pnDlS.js +0 -1
- package/dist/web/client/assets/use-reduced-motion-CaQBb3Qc.js +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 38b9e27: Bump the vendored `use-sync-external-store` dependency from 1.6.0 to 1.7.0. No user-facing behavior change is expected; this keeps Fleet aligned with the current React ecosystem patch.
|
|
8
|
+
|
|
9
|
+
## 0.7.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- aacd3b5: Redesigned control primitives and sidebar. Buttons move to a two-step size ladder (36px default / 28px compact, with legacy `sm`/`md`/`lg` values still accepted) with a press-collapse surface effect and loading spinners; scroll areas gain shape-system scrollbars with a native fallback on touch-primary devices; a new sidebar system adds fluid hover highlights, drag-resize with collapse-on-throw, peek overlays, and keyboard shortcuts (`[` / `]`). Sidebar rename/delete/fork dialogs share one unified dialog state, and resource panels are keyboard-resizable via a WAI-ARIA separator.
|
|
14
|
+
|
|
3
15
|
## 0.6.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/web/client/assets/{action-swap-roll-Dbquwd1Y.js → action-swap-roll-BfVrBOVd.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Dpy9ZFOr.js";import{c as i,d as a,i as o,r as s}from"./ease-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Dpy9ZFOr.js";import{c as i,d as a,i as o,r as s}from"./ease-DKi-MOH5.js";import{n as c,t as l}from"./use-reduced-motion-BgG7f9xw.js";import{t as u}from"./createLucideIcon-CQY2ECfR.js";var d={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};d.node;var f=u(d),p={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};p.node;var m=u(p),h={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};h.node;var g=u(h),_=n();function v({open:e,openHeight:t=`auto`,className:n,style:i,transition:o,...c}){let u=l()??!1;return(0,_.jsx)(a.div,{...c,"aria-hidden":!e,inert:!e,initial:!1,animate:u?{opacity:+!!e}:{opacity:+!!e,clipPath:e?`inset(0 0 0% 0)`:`inset(0 0 100% 0)`,y:e?0:-4},transition:o??{duration:u?0:e?.22:.14,ease:s},className:r(`overflow-hidden`,n),style:{...i,height:e?t:0,pointerEvents:e?void 0:`none`,transformOrigin:`top`}})}var y=e(t(),1),b={duration:.2,ease:`easeInOut`},x=i,S={duration:.14,ease:s},C=`blur(8px)`,w=`blur(3px)`,T=.025,E={initial:{opacity:0,y:`105%`,filter:w},animate:(e=0)=>({opacity:1,y:`0%`,filter:`blur(0px)`,transition:{...i,delay:e}}),exit:(e=0)=>({opacity:0,y:`-105%`,filter:w,transition:{duration:.16,ease:s,delay:e*.5}})},D={blur:{initial:{opacity:0,scale:.94,filter:C},animate:{opacity:1,scale:1,filter:`blur(0px)`,transition:b},exit:{opacity:0,scale:.94,filter:C,transition:b}},roll:{initial:{opacity:0,y:`90%`,filter:w},animate:{opacity:1,y:`0%`,filter:`blur(0px)`,transition:x},exit:{opacity:0,y:`-90%`,filter:w,transition:S}}};function O({value:e,children:t,animation:n=`blur`,className:i}){let s=l(),u=(0,y.useRef)(null),[d,f]=(0,y.useState)();(0,y.useLayoutEffect)(()=>{let e=u.current?.offsetWidth;e&&f(t=>t===e?t:e)});let p=typeof t==`string`?t:null,m=n===`cascade`&&p!==null&&!s,h=n===`cascade`?`roll`:n;return(0,_.jsxs)(`span`,{className:r(`relative inline-block overflow-hidden whitespace-nowrap align-bottom`,i),style:{width:d,transition:s?void 0:`width 220ms ${o}`},children:[(0,_.jsx)(`span`,{ref:u,"aria-hidden":!0,className:`invisible inline-block whitespace-nowrap`,children:t}),m?(0,_.jsx)(`span`,{className:`sr-only`,children:p}):null,(0,_.jsx)(c,{initial:!1,children:m?(0,_.jsx)(a.span,{"aria-hidden":!0,initial:`initial`,animate:`animate`,exit:`exit`,className:`absolute left-0 top-0 inline-block whitespace-pre`,children:p.split(``).map((e,t)=>(0,_.jsx)(a.span,{custom:t*T,variants:E,className:`inline-block whitespace-pre`,children:e},t))},`cascade-${e}`):(0,_.jsx)(a.span,{variants:D[h],initial:!s&&`initial`,animate:s?{opacity:1,filter:`blur(0px)`,scale:1,y:0}:`animate`,exit:s?void 0:`exit`,className:`absolute left-0 top-0 inline-block`,children:t},`${n}-${e}`)})]})}function k(e){return(0,_.jsx)(O,{...e,animation:`roll`})}export{f as a,m as i,v as n,g as r,k as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./button-
|
|
1
|
+
import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./button-BJyg7l5W.js";import{t as n}from"./utils-Dpy9ZFOr.js";import{S as r,a as i,b as a,i as o,l as s,n as c,r as l,s as u,t as d,x as f}from"./surface-context-DWplCCcO.js";function p(e){return i(`alert-dialog`,e)}var m=e(),h=4;function g({...e}){return(0,m.jsx)(p,{"data-slot":`alert-dialog`,...e})}function _({...e}){return(0,m.jsx)(u,{"data-slot":`alert-dialog-portal`,...e})}function v({className:e,...t}){return(0,m.jsx)(r,{"data-slot":`alert-dialog-backdrop`,className:n(`fixed inset-0 isolate z-[60] bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function y({className:e,children:t,...r}){let i=c(),a=Math.min(i+h,8);return(0,m.jsxs)(_,{children:[(0,m.jsx)(v,{}),(0,m.jsx)(s,{"data-slot":`alert-dialog-content`,className:n(`fixed top-1/2 left-1/2 z-[60] grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-6 text-sm text-popover-foreground outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,l(a),e),...r,children:(0,m.jsx)(d,{value:a,children:t})})]})}function b({className:e,...t}){return(0,m.jsx)(o,{"data-slot":`alert-dialog-title`,className:n(`font-heading text-base leading-none font-medium`,e),...t})}function x({className:e,...t}){return(0,m.jsx)(a,{"data-slot":`alert-dialog-description`,className:n(`text-sm text-pretty text-muted-foreground`,e),...t})}function S({className:e,...t}){return(0,m.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:n(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function C({...e}){return(0,m.jsx)(f,{"data-slot":`alert-dialog-cancel`,render:(0,m.jsx)(t,{variant:`outline`}),...e})}function w({...e}){return(0,m.jsx)(f,{"data-slot":`alert-dialog-action`,render:(0,m.jsx)(t,{variant:`destructive`}),...e})}export{x as a,y as i,w as n,S as o,C as r,b as s,g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./button-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./button-BJyg7l5W.js";import{t as i}from"./createLucideIcon-CQY2ECfR.js";import{i as a,n as o,r as s,t as c}from"./tool-result-D7HtJ_yg.js";import{t as l}from"./chevron-right-BPCB1mOg.js";import{t as u}from"./package-BkC-HSi-.js";import{r as d,t as f}from"./openui-renderer-DrfHxs1t.js";import{n as p}from"./prime-agent-artifacts-C-g1VPiW.js";import{Z as m}from"./badge-DOGhnsYk.js";import{n as h,r as g,t as _}from"./collapsible-DsbKpD_Y.js";var v={name:`layout-template`,size:24,node:[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]};v.node;var y=i(v),b=e(t(),1),x=n(),S=[];function C(e){if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function w(e){return e===`running`?`running`:e===`error`?`error`:e===`cancelled`?`cancelled`:`success`}function T(e){return e===`running`?`streaming`:e===`error`?`error`:e===`cancelled`?`cancelled`:`complete`}function E(e){let t=typeof e==`object`&&e?e:void 0;if(!t)return e===void 0?[]:[{label:`result`,text:C(e)}];let n=[];for(let e of[`stdout`,`stderr`,`result`,`error`])t[e]!==void 0&&t[e]!==``&&n.push({label:e,text:C(t[e])});let r=t.details??t.output??t.result;if(n.length===0&&r!==e&&n.push(...E(r)),n.length===0&&Array.isArray(t.content)){let e=t.content.flatMap(e=>typeof e==`string`?[e]:typeof e==`object`&&e&&`text`in e&&typeof e.text==`string`?[e.text]:[]).join(``);e&&n.push({label:t.isError===!0?`error`:`stdout`,text:e})}return n.length>0?n:[{label:`result`,text:C(e)}]}function D(e){let t=typeof e.input==`object`&&e.input!==null?e.input:void 0,n=t?.command??t?.code??t?.script;if(!(typeof n!=`string`||!n))return e.kind===`bash`?{code:n,language:`bash`,label:`Bash`}:e.kind===`ipython`?{code:n,language:/^\s*%%bash(?:\s|$)/im.test(n)?`bash`:`python`,label:`IPython`}:e.kind===`diff`?{code:n,language:`text`,label:`Text`}:{code:n,language:`json`,label:`JSON`}}function O(e){if(e.kind!==`openui-html`)return;let t=typeof e.output==`object`&&e.output!==null?e.output:void 0;if(typeof t?.title==`string`&&typeof t.document==`string`)return{title:t.title,document:t.document}}function k({artifact:e,selected:t}){let n=(0,b.useRef)(null);(0,b.useEffect)(()=>{t&&requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})})},[t]);let r=O(e);return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`min-w-0 rounded-md border border-border/60 bg-background p-2.5 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium`,title:e.title,children:e.title||`OpenUI artifact`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:e.status})]}),r?(0,x.jsx)(d,{artifact:r}):(0,x.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-xs text-destructive`,children:[(0,x.jsx)(`p`,{children:`OpenUI artifact data is unavailable.`}),(0,x.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-foreground/5 p-2 text-foreground/70`,children:C(e.output)})]})]})}function A({artifact:e,selected:t}){let n=(0,b.useRef)(null),r=t||e.status===`running`,[i,l]=(0,b.useState)(r);(0,b.useEffect)(()=>{t&&(l(!0),requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})}))},[t]);let u=D(e),d=E(e.output),f=e.kind===`diff`||e.kind===`refinement`?p(e):void 0;return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`rounded-md border border-border/60 bg-background px-2.5 py-2 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[f?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{file:f.file,lines:f.lines,status:T(e.status),defaultOpen:r,copyText:f.copyText,maxHeight:240}),d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]}):null,f?null:(0,x.jsx)(c,{tool:e.kind,title:e.title,status:w(e.status),open:i,onOpenChange:l,defaultOpen:r,kind:e.kind===`bash`||e.kind===`ipython`?`terminal`:`custom`,children:(0,x.jsxs)(`div`,{className:`space-y-3`,children:[u?(0,x.jsx)(a,{code:u.code,language:u.language,languageLabel:u.label,showStatus:!1,showLineNumbers:!1,wrap:!0}):null,d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]})})]})}function j({block:e,expanded:t,isStreaming:n,onOpenUIAction:i,onToggle:a}){return(0,x.jsxs)(_,{open:t,onOpenChange:a,children:[(0,x.jsxs)(g,{render:(0,x.jsx)(r,{variant:`ghost`,size:`compact`,className:`group w-full justify-start gap-1.5 text-left text-label font-normal text-foreground/65 transition-none hover:bg-foreground/5 hover:text-foreground/80`}),children:[(0,x.jsx)(l,{className:`size-3 shrink-0 text-foreground/35 transition-transform group-data-panel-open:rotate-90`}),(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/35`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.component,children:e.component}),(0,x.jsxs)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:[`#`,e.ordinal]})]}),(0,x.jsx)(h,{children:(0,x.jsx)(`div`,{className:`mb-1 mt-0.5 flex min-w-0 flex-col overflow-hidden rounded-md border border-border/60 bg-background px-2.5 py-2`,children:(0,x.jsx)(m,{resetKeys:[e.content],children:(0,x.jsx)(f,{content:e.content,isStreaming:n,messageId:e.blockId,onOpenUIAction:i})})})})]})}function M({openUIBlocks:e=[],onOpenUIAction:t,status:n,artifactRuns:r=S,selectedArtifactId:i}){let a=e,[o,s]=(0,b.useState)(null),c=n===`streaming`?a.at(-1)?.blockId:void 0,l=(0,b.useMemo)(()=>r.flatMap(e=>e.artifacts),[r]),d=(0,b.useMemo)(()=>l.filter(e=>e.kind===`openui-html`),[l]),f=(0,b.useMemo)(()=>l.filter(e=>e.kind!==`openui-html`&&e.kind!==`ipython`),[l]);return(0,x.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-2 overflow-hidden`,children:[d.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`OpenUI artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:d.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:d.map(e=>(0,x.jsx)(k,{artifact:e,selected:e.id===i},e.id))})]}):null,f.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(u,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Technical artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:f.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:f.map(e=>(0,x.jsx)(A,{artifact:e,selected:e.id===i},e.id))})]}):null,(0,x.jsxs)(`div`,{className:`flex min-h-0 flex-col`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Generative UI`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:a.length>0?`${a.length}`:`none yet`})]}),a.length===0?(0,x.jsx)(`p`,{className:`px-2 pb-1 text-caption leading-4 text-foreground/40`,children:`OpenUI interfaces the agent generates in this session appear here, and can be re-opened without scrolling the conversation.`}):(0,x.jsx)(`div`,{className:`flex min-h-0 flex-col gap-0.5 overflow-y-auto`,children:a.map(e=>(0,x.jsx)(j,{block:e,expanded:e.blockId===o,isStreaming:e.blockId===c,onOpenUIAction:t,onToggle:()=>s(t=>t===e.blockId?null:e.blockId)},e.blockId))})]})]})}export{M as ArtifactsPanelContent};
|