@qredence/fleet 0.5.10 → 0.5.11

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.
Files changed (103) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/web/client/assets/agent-activity-CwMDU7aP.js +1 -0
  3. package/dist/web/client/assets/artifacts-panel-CQmFEF_H.js +1 -0
  4. package/dist/web/client/assets/{chat-command-palette-DfYSPPXI.js → chat-command-palette-CmHTS3rs.js} +1 -1
  5. package/dist/web/client/assets/{chat-C8XDWWXz.js → chat-yh02zgA7.js} +1 -1
  6. package/dist/web/client/assets/{citations-BQ_pr_9_.js → citations-C_tPOJE_.js} +1 -1
  7. package/dist/web/client/assets/{fleet-message-queue-zWM5-y18.js → fleet-message-queue-DUz6Hfrf.js} +1 -1
  8. package/dist/web/client/assets/{fleet-pi-tool-renderer-AJoMbXBa.js → fleet-pi-tool-renderer-BEDIO3al.js} +4 -4
  9. package/dist/web/client/assets/fleet-reasoning-panel-CbkO7u-v.js +1 -0
  10. package/dist/web/client/assets/{fleet-subagent-list-BnRnrWKS.js → fleet-subagent-list-iKUtLJKZ.js} +1 -1
  11. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +1 -0
  12. package/dist/web/client/assets/{fork-picker-dialog-CkcSekBl.js → fork-picker-dialog-ByBOGVsa.js} +1 -1
  13. package/dist/web/client/assets/globals-B_I1Eq1u.css +2 -0
  14. package/dist/web/client/assets/horizontal-resize-qK6eRhIG.js +1 -0
  15. package/dist/web/client/assets/{index-DlnHLDpx.js → index-C1zOjrMK.js} +3 -3
  16. package/dist/web/client/assets/{ipython-tool-BrMePqD-.js → ipython-tool-ldJ9F1Cw.js} +1 -1
  17. package/dist/web/client/assets/model-selector-list-DsKTuAgS.js +1 -0
  18. package/dist/web/client/assets/{openui-renderer-DwYFJdbe.js → openui-renderer-J3dhPpL4.js} +5 -5
  19. package/dist/web/client/assets/prompt-input-qPIXZ-Rb.js +1 -0
  20. package/dist/web/client/assets/prompt-suggestions-Cc--lSNR.js +1 -0
  21. package/dist/web/client/assets/{provider-label-BCJh04J5.js → provider-label-Dpr7djG9.js} +1 -1
  22. package/dist/web/client/assets/repl-panel-DsPX04Xr.js +1 -0
  23. package/dist/web/client/assets/{resources-panel-Bo8dfUdm.js → resources-panel-D867-goy.js} +1 -1
  24. package/dist/web/client/assets/right-panel-registry-DewpBWHM.js +2 -0
  25. package/dist/web/client/assets/routes-vNkVToAF.js +16 -0
  26. package/dist/web/client/assets/safe-storage-s25GrfpH.js +1 -0
  27. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +1 -0
  28. package/dist/web/client/assets/settings-dialog-B-v4me3Y.js +1 -0
  29. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +1 -0
  30. package/dist/web/client/assets/{subagent-chat-panel-DseoO31p.js → subagent-chat-panel-DkVUumrP.js} +1 -1
  31. package/dist/web/client/assets/subagent-transcript-D8wmQxXe.js +1 -0
  32. package/dist/web/client/assets/subagents-panel-BMp2Ego0.js +1 -0
  33. package/dist/web/client/assets/{surfaces-cW-gp56p.js → surfaces-DI-U-_2a.js} +1 -1
  34. package/dist/web/client/assets/tool-result-DfnPN0FQ.js +4 -0
  35. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +1 -0
  36. package/dist/web/client/assets/virtualized-turn-list-DMJENRY0.js +6 -0
  37. package/dist/web/client/assets/{workspace-panel-DI1W3ce9.js → workspace-panel-G6yMpKJ8.js} +1 -1
  38. package/dist/web/client/bundle-budget.json +6 -6
  39. package/dist/web/server/{_tanstack-start-manifest_v-Cdx6hy2i-I7A5YJRU.js → _tanstack-start-manifest_v-po4woX6g-AUGCOEZ2.js} +14 -13
  40. package/dist/web/server/{agent-activity-B-JMvecd-SLE3GGY2.js → agent-activity-CS2rbF_C-A3R26CYH.js} +2 -2
  41. package/dist/web/server/{artifacts-panel-DLMK1O8P-42T45JMA.js → artifacts-panel-8GGUCtOd-X5TNKTY2.js} +12 -12
  42. package/dist/web/server/{chat-command-palette-CdYwoTMe-4LBAZF7K.js → chat-command-palette-Dgl5tqWn-72LLEWUD.js} +2 -2
  43. package/dist/web/server/{chunk-K5ESTT4A.js → chunk-7MDZVLIY.js} +11 -3
  44. package/dist/web/server/{chunk-EBCYJSBR.js → chunk-7SD2ZSEA.js} +3 -3
  45. package/dist/web/server/{chunk-M564UIEY.js → chunk-ABBWBBSS.js} +8 -8
  46. package/dist/web/server/{chunk-KNJUSMBT.js → chunk-BXWAUTTH.js} +2 -2
  47. package/dist/web/server/{chunk-54II5QXQ.js → chunk-ETTDO4UO.js} +6 -3
  48. package/dist/web/server/{chunk-EHNIN245.js → chunk-GETSIVNU.js} +5 -5
  49. package/dist/web/server/{chunk-NRDG2ISJ.js → chunk-GGT2ZKDB.js} +49 -49
  50. package/dist/web/server/{chunk-X2R5YPQZ.js → chunk-IJPCV6DH.js} +3 -2
  51. package/dist/web/server/{chunk-AJJ2S5FF.js → chunk-JQDLJ7KI.js} +20 -20
  52. package/dist/web/server/{chunk-VHBFU4TG.js → chunk-JUROEEWM.js} +43 -14
  53. package/dist/web/server/{chunk-TCH3U26B.js → chunk-MIW4LJTV.js} +2 -2
  54. package/dist/web/server/{chunk-2TRF62K5.js → chunk-N6NOTURM.js} +3 -3
  55. package/dist/web/server/{chunk-5XX7RKJ6.js → chunk-NXJ32VFR.js} +5 -5
  56. package/dist/web/server/{chunk-EOVMHQ2H.js → chunk-O4OTWWPF.js} +7 -7
  57. package/dist/web/server/{chunk-OB5OSYJK.js → chunk-RNOJACWQ.js} +53 -29
  58. package/dist/web/server/chunk-SZJUXVWG.js +40 -0
  59. package/dist/web/server/{chunk-6AW2XFTZ.js → chunk-WILCIZYU.js} +194 -10
  60. package/dist/web/server/{chunk-FED63ZHU.js → chunk-WKV2Z4KO.js} +10 -5
  61. package/dist/web/server/{chunk-ANL4B775.js → chunk-XLNCWZMZ.js} +2 -2
  62. package/dist/web/server/{chunk-GM32R7JW.js → chunk-YKVGQBZA.js} +10 -8
  63. package/dist/web/server/{chunk-3PIUR75R.js → chunk-YXXRP3NS.js} +9 -9
  64. package/dist/web/server/{fleet-message-queue-BxycG26e-2XLOTCLP.js → fleet-message-queue-j0DCU5Xy-5HKBHMPV.js} +2 -2
  65. package/dist/web/server/{fleet-pi-tool-renderer-RIeVlM9J-D6MISCQC.js → fleet-pi-tool-renderer-umKunT3K-O4GBH35V.js} +5 -5
  66. package/dist/web/server/{fleet-reasoning-panel-D_K48UOT-GN2PA6KT.js → fleet-reasoning-panel-BxC2COxi-GPLMQSTT.js} +9 -9
  67. package/dist/web/server/{fleet-subagent-list-5luKtpds-3OTVFHJQ.js → fleet-subagent-list-CpSYzCIq-JDH2LHSS.js} +1 -1
  68. package/dist/web/server/{fleet-tool-timeline-DwRqQgOj-HUFLGMDV.js → fleet-tool-timeline-IB36_PB2-XJENTO6I.js} +1 -1
  69. package/dist/web/server/{fork-picker-dialog-B9yGc8Au-IL63F2DN.js → fork-picker-dialog-DlINz9UQ-UWIXFDJX.js} +3 -3
  70. package/dist/web/server/{model-selector-list-cb2-ewoA-KIVU6LD3.js → model-selector-list-OYnzNbyu-HBGCNF2L.js} +5 -5
  71. package/dist/web/server/{openui-renderer-Czy5Vo2L-BLXPJD65.js → openui-renderer-Cj7kfqyL-EKJ6JTTQ.js} +4 -4
  72. package/dist/web/server/{prompt-suggestions-BOmHi4-J-C563CHFU.js → prompt-suggestions-D4AEEY7K-RZSP7PWV.js} +3 -3
  73. package/dist/web/server/{repl-panel-yyxhwe4c-7U6HXYPS.js → repl-panel-D5KsoJik-BQKO53JO.js} +9 -9
  74. package/dist/web/server/{resources-panel-j4fAIi9g-5C267IXV.js → resources-panel-CE5pD4vy-V5FXBTYC.js} +2 -2
  75. package/dist/web/server/{router-CgSWrAYc-5UBYSZTJ.js → router-Ci1wxI7I-E2AYMNON.js} +253 -76
  76. package/dist/web/server/{routes-CP_BBhD0-BAWQYGKY.js → routes-CRpm9-Sa-IYK6MUJO.js} +705 -537
  77. package/dist/web/server/server.js +2 -2
  78. package/dist/web/server/{session-insights-panel-BHZyKDTo-LRMAMA3O.js → session-insights-panel-CUhdgvRt-VB2HUCQP.js} +4 -4
  79. package/dist/web/server/{settings-dialog-CxHe8nym-KKXDPTIW.js → settings-dialog-BvkgNflv-GPJ6COQO.js} +14 -10
  80. package/dist/web/server/{subagent-chat-panel-DlSsM59d-DBW7DI3T.js → subagent-chat-panel-CMuvW9Sd-M5TEEGQW.js} +11 -11
  81. package/dist/web/server/{subagents-panel-Txzk8oDb-NRKLASYN.js → subagents-panel-DgfB6_Yy-4INEPE3Y.js} +13 -13
  82. package/dist/web/server/{workspace-panel-BOs-58Cv-SWQBMZSB.js → workspace-panel-bpwj-Veu-Q2CEJMN4.js} +4 -3
  83. package/package.json +1 -1
  84. package/dist/web/client/assets/agent-activity-CDcDNVC6.js +0 -1
  85. package/dist/web/client/assets/artifacts-panel-CObI-DMt.js +0 -1
  86. package/dist/web/client/assets/fleet-reasoning-panel-MtbSdoCv.js +0 -1
  87. package/dist/web/client/assets/fleet-tool-timeline-COzPrwr8.js +0 -1
  88. package/dist/web/client/assets/generative-text-renderer-CDKHv-v_.js +0 -6
  89. package/dist/web/client/assets/globals-DisQPFtV.css +0 -2
  90. package/dist/web/client/assets/horizontal-resize-Bl3AyBJg.js +0 -1
  91. package/dist/web/client/assets/model-selector-list-DQaPFUYt.js +0 -1
  92. package/dist/web/client/assets/prompt-input-DZ4cho_e.js +0 -1
  93. package/dist/web/client/assets/prompt-suggestions-CXM6knMK.js +0 -1
  94. package/dist/web/client/assets/repl-panel-BDQ5MEgV.js +0 -1
  95. package/dist/web/client/assets/right-panel-registry-VVRPktV3.js +0 -2
  96. package/dist/web/client/assets/routes-DAikUNzO.js +0 -16
  97. package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +0 -1
  98. package/dist/web/client/assets/settings-dialog-DS64KmwC.js +0 -1
  99. package/dist/web/client/assets/skeleton-loaders-DjGv9LLA.js +0 -1
  100. package/dist/web/client/assets/subagent-transcript-cxVKYnh9.js +0 -1
  101. package/dist/web/client/assets/subagents-panel-CHC96I68.js +0 -1
  102. package/dist/web/client/assets/tool-result-Baj3CdL_.js +0 -4
  103. package/dist/web/client/assets/ui-preferences-DUEFuJFj.js +0 -1
@@ -1,3 +1,3 @@
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{t as r}from"./utils-Eg7xtNmV.js";import{t as i}from"./createLucideIcon-DwxZHm0M.js";import"./cn-C8c0S2mI.js";var a=i(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),o=e(t(),1),s=n();function c({children:e,as:t=`p`,className:n,duration:i=2,spread:a=100,delay:o=0}){let c={"--an-shimmer-duration":`${i}s`,"--an-shimmer-spread":`${a}px`,animationDelay:o>0?`${o}s`:void 0,animationDuration:`${i}s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`};return(0,s.jsx)(t,{className:r(`an-text-shimmer`,`an-text-shimmer--active`,n),style:c,children:e})}var l=o.memo(c);function u(e,t,n){let r=(0,o.useRef)(n);(0,o.useEffect)(()=>{r.current=n},[n]),(0,o.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>r.current(),t);return()=>clearTimeout(n)},[e,t])}function d(e){let t=0,n=0;for(let r of e)if(r.lines)for(let e of r.lines)e.startsWith(`+`)?t++:e.startsWith(`-`)&&n++;if(t===0&&n===0)return;let r=[];return t>0&&r.push(`+${t}`),n>0&&r.push(`-${n}`),r.join(` `)}function f(e){let t=[];for(let n of e)if(n.lines)for(let e of n.lines)e.startsWith(`+`)?t.push({type:`add`,content:e.slice(1)}):e.startsWith(`-`)?t.push({type:`remove`,content:e.slice(1)}):e.startsWith(` `)&&t.push({type:`context`,content:e.slice(1)});return t}function p(e){return e===`result`?`complete`:`animating`}function m(e){let t=e.toLowerCase();if(t===`thinking`||t===`reasoning`)return`thinking`;if(t===`websearch`||t===`web_search`||t===`grep`||t===`glob`||t===`webfetch`||t===`web_fetch`)return`search`}function h(e,t){switch(e){case`Bash`:return t?.command?String(t.command).slice(0,80):``;case`Edit`:case`Write`:case`Read`:return t?.file_path?String(t.file_path).split(`/`).pop()??``:``;case`Grep`:return t?.pattern?String(t.pattern):``;case`Glob`:return t?.pattern?String(t.pattern):``;case`WebSearch`:case`web_search`:return t?.query?String(t.query):``;case`WebFetch`:case`web_fetch`:return t?.url?String(t.url).slice(0,60):``;default:return``}}function g(e,t){let{toolName:n,args:r={},result:i}=t,a={id:e,type:`tool-call`,toolName:n===`PlanWrite`?`Plan`:n===`TodoWrite`?`Todo`:n,toolDetail:h(n,r),duration:2**53-1,toolVariant:m(n)};if(n===`Bash`&&(a.bashCommand=r?.command?String(r.command):void 0,t.state===`result`&&i)){if(typeof i==`string`)a.bashOutput=i,a.bashSuccess=!0;else if(typeof i==`object`){let e=typeof i?.stdout==`string`?i.stdout:typeof i?.output==`string`?i.output:``,t=typeof i?.stderr==`string`?i.stderr:``;a.bashOutput=[e,t].filter(Boolean).join(e&&t?`
2
2
  `:``);let n=i?.exitCode??i?.exit_code;a.bashSuccess=n===void 0||n===0}else a.bashOutput=JSON.stringify(i),a.bashSuccess=!0}if((n===`Edit`||n===`Write`||n===`Read`)&&(a.filePath=r?.file_path?String(r.file_path):void 0),n===`Write`){let e=typeof i?.content==`string`?i.content:typeof r?.content==`string`?r.content:``;if(e){let t=e.split(`
3
- `);a.diffStats=`+${t.length}`,a.diffLines=t.map(e=>({type:`add`,content:e}))}}if(n===`Edit`&&Array.isArray(i?.structuredPatch)&&(a.diffStats=d(i.structuredPatch),a.diffLines=f(i.structuredPatch)),(n===`WebSearch`||n===`web_search`||n===`Grep`||n===`Glob`)&&(a.searchQuery=r?.query??r?.pattern?String(r?.query??r?.pattern):void 0,a.searchSource=n===`WebSearch`||n===`web_search`?`web`:`code`),n.toLowerCase()===`thinking`||n.toLowerCase()===`reasoning`){let e=typeof r?.thought==`string`?r.thought:typeof r?.text==`string`?r.text:void 0,t=typeof i==`string`?i:i&&typeof i==`object`&&typeof i.text==`string`?i.text:typeof i==`object`&&i&&typeof i.thought==`string`?i.thought:void 0;a.thoughtContent=e??t}return a}function _(e){return e===`output-available`?`result`:e===`input-streaming`?`partial-call`:`call`}function v(e,t){let n=_(e.state);return{step:g(e.toolCallId??e.id??t.toLowerCase(),{toolName:t,args:e.input??e.args??{},state:n,result:e.output??e.result}),stepState:p(n)}}var y=(0,o.memo)(function({isPending:e,approveLabel:t,rejectLabel:n,onApprove:r,onReject:i}){let[a,c]=(0,o.useState)(null),l=a===`approved`?`Approved`:t??`Next`,u=a===`rejected`?`Skipped`:n??`Skip`,d=()=>{a||(c(`approved`),r?.())},f=()=>{a||(c(`rejected`),i?.())},p=(0,o.useMemo)(()=>a===`approved`?{label:`Waiting`,dots:!0}:a===`rejected`?{label:`Canceled`,dots:!1}:e?{label:`Starting`,dots:!0}:null,[a,e]);return(0,s.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border bg-an-tool-background py-1 pr-2 pl-3`,children:[p?(0,s.jsxs)(`span`,{className:`text-xs text-an-tool-color-muted`,children:[p.label,p.dots&&(0,s.jsxs)(`span`,{className:`inline-flex`,"aria-hidden":`true`,children:[(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.2s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.4s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.6s] text-an-tool-color-muted`,children:`.`})]})]}):(0,s.jsx)(`span`,{"aria-hidden":`true`}),(0,s.jsxs)(`div`,{className:`flex gap-1`,children:[(0,s.jsx)(`button`,{type:`button`,onClick:f,disabled:!!a,className:`h-5 rounded-[4px] px-1.5 text-xs text-muted-foreground transition-[background-color,color,transform] duration-150 hover:bg-muted/50 hover:text-an-tool-color active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100`,children:u}),(0,s.jsx)(`button`,{type:`button`,onClick:d,disabled:!!a,className:`h-5 rounded-[4px] bg-an-primary-color px-1.5 text-xs font-medium text-an-send-button-color transition-[background-color,transform] duration-150 hover:bg-an-primary-color/90 active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-an-primary-color disabled:active:scale-100`,children:l})]})]})});function b(e){let t=e.input??e.args??{};return typeof t.code==`string`?t.code:``}function x(e){let t=e.output??e.result;if(!(!t||typeof t!=`object`))return t}function S(...e){for(let t of e)if(t&&t.trim())return t;return``}function C({isPending:e,isBashCell:t,hasError:n,kernelRestarted:r}){return(0,s.jsxs)(`div`,{className:`flex h-7 items-center justify-between pr-2 pl-2.5`,children:[(0,s.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden`,children:[(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px] leading-none text-muted-foreground uppercase`,children:[(0,s.jsx)(a,{className:`h-3 w-3`}),t?`shell`:`python`]}),e?(0,s.jsx)(l,{as:`span`,duration:1.2,className:`m-0 inline-flex h-full items-center truncate text-xs leading-none`,children:`Running cell`}):(0,s.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[n?`Cell failed`:`Ran cell`,r&&` · kernel restarted`]})]}),e&&(0,s.jsx)(`svg`,{className:`h-3 w-3 shrink-0 animate-spin text-muted-foreground`,viewBox:`0 0 16 16`,fill:`none`,children:(0,s.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`28`,strokeDashoffset:`7`,strokeLinecap:`round`})})]})}function w({output:e}){return(0,s.jsxs)(`div`,{className:`mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-[11px] leading-[15px]`,children:[(0,s.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90`,children:`Unattributed background output:`}),(0,s.jsx)(`div`,{className:`mt-0.5 max-h-[140px] overflow-auto whitespace-pre-wrap rounded bg-muted/40 p-1.5 text-muted-foreground`,children:e})]})}function T({step:e,state:t,onComplete:n,approval:r,cellIndex:i,part:a}){u(t===`animating`,e.duration,n);let o=t===`animating`,c=b(a),l=x(a),d=typeof a.backgroundOutput==`string`&&a.backgroundOutput.trim()?a.backgroundOutput:typeof l?.backgroundOutput==`string`&&l.backgroundOutput.trim()?l.backgroundOutput:void 0,f=c.trimStart().startsWith(`%%bash`),p=i===void 0?`IPython`:`In [${i}]`,m=S(l?.result,l?.stdout,l?.stderr,l?.error?.evalue),h=!!l?.error||!!l?.errorEname||l?.status===`error`;return(0,s.jsxs)(`div`,{className:`overflow-hidden rounded-an-tool-border-radius border border-border bg-an-tool-background`,children:[(0,s.jsx)(C,{isPending:o,isBashCell:f,hasError:h,kernelRestarted:l?.kernelRestarted}),(0,s.jsxs)(`div`,{className:`overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-[12px] leading-[16px]`,children:[(0,s.jsxs)(`div`,{className:`break-all whitespace-pre-wrap`,children:[(0,s.jsxs)(`span`,{className:`mr-2 text-cyan-600 select-none dark:text-cyan-400`,children:[p,`:`]}),(0,s.jsx)(`span`,{className:`text-foreground`,children:c})]}),!o&&m&&(0,s.jsx)(`div`,{className:`mt-1 max-h-[160px] overflow-hidden whitespace-pre-line ${h?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:m}),d&&(0,s.jsx)(w,{output:d})]}),r&&(0,s.jsx)(y,{isPending:o,...r})]})}var E=new Map,D=0;function O(e){if(!e)return++D;let t=E.get(e);if(t)return t;let n=++D;return E.set(e,n),n}var k=(0,o.memo)(function({part:e}){let t=e.input?.approval??e.args?.approval,{step:n,stepState:r}=v(e,`IPython`),i=O(e.toolCallId);return(0,s.jsx)(T,{step:n,state:r,onComplete:()=>{},approval:t,cellIndex:i,part:e})});export{l as a,u as i,y as n,a as o,v as r,k as t};
3
+ `);a.diffStats=`+${t.length}`,a.diffLines=t.map(e=>({type:`add`,content:e}))}}if(n===`Edit`&&Array.isArray(i?.structuredPatch)&&(a.diffStats=d(i.structuredPatch),a.diffLines=f(i.structuredPatch)),(n===`WebSearch`||n===`web_search`||n===`Grep`||n===`Glob`)&&(a.searchQuery=r?.query??r?.pattern?String(r?.query??r?.pattern):void 0,a.searchSource=n===`WebSearch`||n===`web_search`?`web`:`code`),n.toLowerCase()===`thinking`||n.toLowerCase()===`reasoning`){let e=typeof r?.thought==`string`?r.thought:typeof r?.text==`string`?r.text:void 0,t=typeof i==`string`?i:i&&typeof i==`object`&&typeof i.text==`string`?i.text:typeof i==`object`&&i&&typeof i.thought==`string`?i.thought:void 0;a.thoughtContent=e??t}return a}function _(e){return e===`output-available`?`result`:e===`input-streaming`?`partial-call`:`call`}function v(e,t){let n=_(e.state);return{step:g(e.toolCallId??e.id??t.toLowerCase(),{toolName:t,args:e.input??e.args??{},state:n,result:e.output??e.result}),stepState:p(n)}}var y=(0,o.memo)(function({isPending:e,approveLabel:t,rejectLabel:n,onApprove:r,onReject:i}){let[a,c]=(0,o.useState)(null),l=a===`approved`?`Approved`:t??`Next`,u=a===`rejected`?`Skipped`:n??`Skip`,d=()=>{a||(c(`approved`),r?.())},f=()=>{a||(c(`rejected`),i?.())},p=(0,o.useMemo)(()=>a===`approved`?{label:`Waiting`,dots:!0}:a===`rejected`?{label:`Canceled`,dots:!1}:e?{label:`Starting`,dots:!0}:null,[a,e]);return(0,s.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border bg-an-tool-background py-1 pr-2 pl-3`,children:[p?(0,s.jsxs)(`span`,{className:`text-xs text-an-tool-color-muted`,children:[p.label,p.dots&&(0,s.jsxs)(`span`,{className:`inline-flex`,"aria-hidden":`true`,children:[(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.2s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.4s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.6s] text-an-tool-color-muted`,children:`.`})]})]}):(0,s.jsx)(`span`,{"aria-hidden":`true`}),(0,s.jsxs)(`div`,{className:`flex gap-1`,children:[(0,s.jsx)(`button`,{type:`button`,onClick:f,disabled:!!a,className:`h-5 rounded-[4px] px-1.5 text-xs text-muted-foreground transition-[background-color,color,transform] duration-150 hover:bg-muted/50 hover:text-an-tool-color active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100`,children:u}),(0,s.jsx)(`button`,{type:`button`,onClick:d,disabled:!!a,className:`h-5 rounded-[4px] bg-an-primary-color px-1.5 text-xs font-medium text-an-send-button-color transition-[background-color,transform] duration-150 hover:bg-an-primary-color/90 active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-an-primary-color disabled:active:scale-100`,children:l})]})]})});function b(e){let t=e.input??e.args??{};return typeof t.code==`string`?t.code:``}function x(e){let t=e.output??e.result;if(!(!t||typeof t!=`object`))return t}function S(...e){for(let t of e)if(t&&t.trim())return t;return``}function C({isPending:e,isBashCell:t,hasError:n,kernelRestarted:r}){return(0,s.jsxs)(`div`,{className:`flex h-7 items-center justify-between pr-2 pl-2.5`,children:[(0,s.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden`,children:[(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.625rem] leading-none text-muted-foreground uppercase`,children:[(0,s.jsx)(a,{className:`h-3 w-3`}),t?`shell`:`python`]}),e?(0,s.jsx)(l,{as:`span`,duration:1.2,className:`m-0 inline-flex h-full items-center truncate text-xs leading-none`,children:`Running cell`}):(0,s.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[n?`Cell failed`:`Ran cell`,r&&` · kernel restarted`]})]}),e&&(0,s.jsx)(`svg`,{className:`h-3 w-3 shrink-0 animate-spin text-muted-foreground`,viewBox:`0 0 16 16`,fill:`none`,children:(0,s.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`28`,strokeDashoffset:`7`,strokeLinecap:`round`})})]})}function w({output:e}){return(0,s.jsxs)(`div`,{className:`mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-[0.6875rem] leading-[15px]`,children:[(0,s.jsx)(`span`,{className:`text-[0.625rem] font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90`,children:`Unattributed background output:`}),(0,s.jsx)(`div`,{className:`mt-0.5 max-h-[140px] overflow-auto whitespace-pre-wrap rounded bg-muted/40 p-1.5 text-muted-foreground`,children:e})]})}function T({step:e,state:t,onComplete:n,approval:r,cellIndex:i,part:a}){u(t===`animating`,e.duration,n);let o=t===`animating`,c=b(a),l=x(a),d=typeof a.backgroundOutput==`string`&&a.backgroundOutput.trim()?a.backgroundOutput:typeof l?.backgroundOutput==`string`&&l.backgroundOutput.trim()?l.backgroundOutput:void 0,f=c.trimStart().startsWith(`%%bash`),p=i===void 0?`IPython`:`In [${i}]`,m=S(l?.result,l?.stdout,l?.stderr,l?.error?.evalue),h=!!l?.error||!!l?.errorEname||l?.status===`error`;return(0,s.jsxs)(`div`,{className:`overflow-hidden rounded-an-tool-border-radius border border-border bg-an-tool-background`,children:[(0,s.jsx)(C,{isPending:o,isBashCell:f,hasError:h,kernelRestarted:l?.kernelRestarted}),(0,s.jsxs)(`div`,{className:`overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-[0.75rem] leading-[16px]`,children:[(0,s.jsxs)(`div`,{className:`break-all whitespace-pre-wrap`,children:[(0,s.jsxs)(`span`,{className:`mr-2 text-cyan-600 select-none dark:text-cyan-400`,children:[p,`:`]}),(0,s.jsx)(`span`,{className:`text-foreground`,children:c})]}),!o&&m&&(0,s.jsx)(`div`,{className:`mt-1 max-h-[160px] overflow-hidden whitespace-pre-line ${h?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:m}),d&&(0,s.jsx)(w,{output:d})]}),r&&(0,s.jsx)(y,{isPending:o,...r})]})}var E=new Map,D=0;function O(e){if(!e)return++D;let t=E.get(e);if(t)return t;let n=++D;return E.set(e,n),n}var k=(0,o.memo)(function({part:e}){let t=e.input?.approval??e.args?.approval,{step:n,stepState:r}=v(e,`IPython`),i=O(e.toolCallId);return(0,s.jsx)(T,{step:n,state:r,onComplete:()=>{},approval:t,cellIndex:i,part:e})});export{l as a,u as i,y as n,a as o,v as r,k as t};
@@ -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{a as r,d as i}from"./ease-u56MhKYS.js";import{t as a}from"./utils-Eg7xtNmV.js";import{t as o}from"./check-JjHKAZas.js";import{t as s}from"./gauge-DNpstbBn.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./command-DPfiaYUL.js";var m=e(t(),1),h=n();function g(e,t,n){return Math.min(n,Math.max(t,e))}function _({value:e,onChange:t,min:n=0,max:o=100,step:s=1,label:c,formatValue:l=String,disabled:u=!1,className:d,...f}){let p=(0,m.useId)(),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=Math.max(n,o),S=Math.max(2**-52,s),C=g(e,n,x),w=x===n?0:(C-n)/(x-n),T=w*100,E=w===0?8:0,D=`calc(${T}% + ${20-20*w-E*2.5}px)`,O=`calc(${T}% + ${11-24*w}px)`,k=20-20*w-E*2.5,A=`linear-gradient(to right, transparent calc(${T}% + ${k}px), black calc(${T}% + ${k+2}px))`,j=(0,m.useMemo)(()=>{let e=Math.floor((x-n)/S),t=Array.from({length:e+1},(e,t)=>n+t*S);return t.at(-1)!==x&&t.push(x),t},[n,x,S]),M=l(C),N=l(x),P=(e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0||x===n)return n;let i=n+g((e-r.left)/r.width,0,1)*(x-n);return g(n+Math.round((i-n)/S)*S,n,x)},F=e=>{let r=!0,i=e.key===`ArrowRight`||e.key===`ArrowUp`?1:e.key===`ArrowLeft`||e.key===`ArrowDown`?-1:0;i===0?e.key===`Home`?(e.preventDefault(),t(n)):e.key===`End`?(e.preventDefault(),t(x)):r=!1:(e.preventDefault(),t(g(C+i*S,n,x))),r&&e.stopPropagation()};return(0,h.jsx)(`div`,{className:a(`relative w-full touch-none`,u&&`opacity-50`,d),...f,children:(0,h.jsxs)(`div`,{className:a(`relative h-8 w-full select-none touch-none overflow-hidden rounded-md border border-border bg-background outline-offset-2 transition-colors duration-150`,y&&!u&&`border-foreground/25`,_&&`border-foreground/40 ring-2 ring-ring/60 ring-offset-1 ring-offset-background`),onPointerEnter:()=>b(!0),onPointerLeave:()=>b(!1),onPointerDown:e=>{u||t(P(e.clientX,e.currentTarget))},children:[(0,h.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 z-[1] flex items-center justify-between px-3 pointer-events-none`,style:{WebkitMaskImage:A,maskImage:A},children:j.map(e=>(0,h.jsx)(i.span,{className:`relative flex size-[5px] items-center justify-center rounded-full`,animate:{backgroundColor:e===C?`var(--foreground)`:`var(--muted-foreground)`,opacity:e===C?1:.3},transition:r},e))}),(0,h.jsx)(i.div,{"aria-hidden":`true`,className:`absolute inset-y-0 left-0 z-[3] pointer-events-none bg-foreground/[0.08]`,layout:`size`,style:{width:D},transition:r}),(0,h.jsx)(i.div,{"aria-hidden":`true`,className:a(`absolute z-[3] w-0.5 rounded-full pointer-events-none`),layout:!0,style:{left:O,top:y||_?7:8,bottom:y||_?7:8},animate:{backgroundColor:_?`var(--foreground)`:y?`color-mix(in srgb, var(--foreground) 50%, transparent)`:`color-mix(in srgb, var(--foreground) 25%, transparent)`},transition:r}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-[2] flex items-center px-2`,children:[c?(0,h.jsx)(`span`,{className:`px-2 text-[0.8125rem] text-transparent select-none`,"aria-hidden":`true`,children:c}):null,(0,h.jsx)(`span`,{className:`ml-auto px-2 text-[0.8125rem] text-transparent tabular-nums select-none`,style:{minWidth:`${N.length}ch`},"aria-hidden":`true`,children:N})]}),(0,h.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-[4] flex items-center px-2 text-[0.8125rem]`,children:[c?(0,h.jsx)(i.span,{className:`px-2`,animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:r,children:c}):null,(0,h.jsx)(i.span,{className:`ml-auto px-2 tabular-nums`,style:{minWidth:`${N.length}ch`,textAlign:`right`},animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:r,children:M})]}),(0,h.jsx)(`input`,{id:p,type:`range`,min:n,max:x,step:S,value:C,disabled:u,"aria-label":c??`Slider`,"aria-valuetext":M,onChange:e=>t(Number(e.currentTarget.value)),onFocus:()=>v(!0),onBlur:()=>v(!1),onKeyDown:F,className:`absolute inset-0 z-20 m-0 h-full w-full cursor-ew-resize opacity-0 disabled:cursor-not-allowed`})]})})}function v(e){let t=new Map;for(let n of e){let e=t.get(n.provider)??[];e.push(n),t.set(n.provider,e)}return[...t.entries()]}function y({models:e,selectedModel:t,selectedEffort:n,effortLabel:r,onModelChange:i,onEffortChange:a}){let g=(0,m.useMemo)(()=>v(e),[e]);return(0,h.jsxs)(p,{className:`min-h-0 max-h-[min(55vh,28rem)] bg-transparent`,shouldFilter:!0,children:[(0,h.jsx)(c,{placeholder:`Search models…`,"aria-label":`Search models`}),(0,h.jsxs)(f,{className:`min-h-0 flex-1 p-1.5`,children:[(0,h.jsx)(d,{children:`No matching models`}),g.map(([e,n])=>(0,h.jsx)(l,{heading:n[0]?.providerLabel??e,children:n.map(e=>{let n=[e.id,e.name,e.provider,e.providerLabel,e.modelId,...e.keywords??[]].filter(Boolean).join(` `),r=e.id===t?.id;return(0,h.jsxs)(u,{value:n,disabled:e.disabled,onSelect:()=>{e.disabled||i?.(e.id)},className:`items-start gap-2 rounded-lg px-2.5 py-2`,children:[(0,h.jsx)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground`,children:e.icon??(0,h.jsx)(s,{"aria-hidden":`true`,className:`size-4`})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),e.disabled?(0,h.jsx)(`span`,{className:`shrink-0 text-[0.625rem] uppercase tracking-wide text-muted-foreground`,children:`Unavailable`}):null]}),(0,h.jsxs)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground`,children:[e.modelId??e.id,e.reasoning?` · reasoning`:``]}),e.description?(0,h.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground/80`,children:e.description}):null]}),r?(0,h.jsx)(o,{"aria-hidden":`true`,className:`mt-1 size-4 shrink-0`}):null]},e.id)})},e))]}),t?.reasoning&&t.efforts?.length?(0,h.jsx)(`div`,{className:`shrink-0 border-t border-border/70 p-2`,children:(0,h.jsx)(_,{label:r,value:Math.max(0,t.efforts.findIndex(e=>e.id===n?.id)),onChange:e=>{let n=t.efforts?.[Math.round(e)];n&&!n.disabled&&a?.(n.id)},min:0,max:Math.max(0,t.efforts.length-1),formatValue:e=>t.efforts?.[Math.round(e)]?.name??``})}):null]})}export{y as ModelSelectorList};