@anvia/studio 0.7.22 → 0.7.23

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 (28) hide show
  1. package/dist/ui/assets/{evals-page-0x7pIugn.js → evals-page-DC-njvlP.js} +2 -2
  2. package/dist/ui/assets/{evals-page-0x7pIugn.js.map → evals-page-DC-njvlP.js.map} +1 -1
  3. package/dist/ui/assets/index-Bc7sqnn5.js +55 -0
  4. package/dist/ui/assets/index-Bc7sqnn5.js.map +1 -0
  5. package/dist/ui/assets/{knowledge-page-CYLD4cys.js → knowledge-page-BciniOcu.js} +2 -2
  6. package/dist/ui/assets/{knowledge-page-CYLD4cys.js.map → knowledge-page-BciniOcu.js.map} +1 -1
  7. package/dist/ui/assets/{mcps-page-Qd4wgj-B.js → mcps-page-Dd_gbvBb.js} +2 -2
  8. package/dist/ui/assets/{mcps-page-Qd4wgj-B.js.map → mcps-page-Dd_gbvBb.js.map} +1 -1
  9. package/dist/ui/assets/{memory-page-krtr9o5d.js → memory-page-K1u-LDDz.js} +2 -2
  10. package/dist/ui/assets/{memory-page-krtr9o5d.js.map → memory-page-K1u-LDDz.js.map} +1 -1
  11. package/dist/ui/assets/{pipelines-page-DNpoe4kw.js → pipelines-page-GOtnu1I3.js} +2 -2
  12. package/dist/ui/assets/{pipelines-page-DNpoe4kw.js.map → pipelines-page-GOtnu1I3.js.map} +1 -1
  13. package/dist/ui/assets/{sessions-page-Cg-xwPD0.js → sessions-page-zABdhQUl.js} +2 -2
  14. package/dist/ui/assets/{sessions-page-Cg-xwPD0.js.map → sessions-page-zABdhQUl.js.map} +1 -1
  15. package/dist/ui/assets/{status-page-vgm2JUc7.js → status-page-BVw1UGMb.js} +2 -2
  16. package/dist/ui/assets/{status-page-vgm2JUc7.js.map → status-page-BVw1UGMb.js.map} +1 -1
  17. package/dist/ui/assets/{tool-runner-zwr5Bxg2.js → tool-runner-qP32ZAwv.js} +2 -2
  18. package/dist/ui/assets/{tool-runner-zwr5Bxg2.js.map → tool-runner-qP32ZAwv.js.map} +1 -1
  19. package/dist/ui/assets/{tools-page-CmmxKJfO.js → tools-page-Brv85Xnm.js} +2 -2
  20. package/dist/ui/assets/{tools-page-CmmxKJfO.js.map → tools-page-Brv85Xnm.js.map} +1 -1
  21. package/dist/ui/assets/{trace-browser-FXCuGeXt.js → trace-browser-mWVtzrMg.js} +2 -2
  22. package/dist/ui/assets/{trace-browser-FXCuGeXt.js.map → trace-browser-mWVtzrMg.js.map} +1 -1
  23. package/dist/ui/assets/{transcript-item-BF9qx3gB.js → transcript-item-CsKPOoJ7.js} +2 -2
  24. package/dist/ui/assets/{transcript-item-BF9qx3gB.js.map → transcript-item-CsKPOoJ7.js.map} +1 -1
  25. package/dist/ui/index.html +1 -1
  26. package/package.json +4 -4
  27. package/dist/ui/assets/index-NsFU1TN1.js +0 -55
  28. package/dist/ui/assets/index-NsFU1TN1.js.map +0 -1
@@ -1,3 +1,3 @@
1
- import{i as e,r as t,s as n,t as r}from"./utils-BN2yP0LH.js";import{n as i}from"./format-C9HPGfkW.js";import{t as a}from"./PathIcon-DX1w_Nk9.js";import{F as o,I as s,t as c,z as l}from"./index-NsFU1TN1.js";import{t as u}from"./badge-BH7gz3tB.js";import{i as d,r as f}from"./renderers-m-gqGocU.js";var p=[[`path`,{d:`M4 15L4 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9L12 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M22 22L2 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M20 13L20 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M5.60009 8.79993C5.23521 8.31419 4.6543 8 4 8C2.89543 8 2 8.89543 2 10C2 11.1046 2.89543 12 4 12C5.10457 12 6 11.1046 6 10C6 9.54973 5.8512 9.13421 5.60009 8.79993ZM5.60009 8.79993L10.3999 5.20007M10.3999 5.20007C10.7648 5.68581 11.3457 6 12 6C12.783 6 13.4609 5.55006 13.7892 4.89462M10.3999 5.20007C10.1488 4.86579 10 4.45027 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 4.32158 13.9241 4.62543 13.7892 4.89462M13.7892 4.89462L18.2108 7.10538M18.2108 7.10538C18.0759 7.37457 18 7.67842 18 8C18 9.10457 18.8954 10 20 10C21.1046 10 22 9.10457 22 8C22 6.89543 21.1046 6 20 6C19.217 6 18.5391 6.44994 18.2108 7.10538Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],m=[[`path`,{d:`M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],h=[[`path`,{d:`M11 10.6667C11 10.6667 11.75 10.6667 12.5 12C12.5 12 14.8824 8.66667 17 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 11V9C7 5.70017 7 4.05025 8.02513 3.02513C9.05025 2 10.7002 2 14 2C17.2998 2 18.9497 2 19.9749 3.02513C21 4.05025 21 5.70017 21 9V11C21 14.2998 21 15.9497 19.9749 16.9749C18.9497 18 17.2998 18 14 18C10.7002 18 9.05025 18 8.02513 16.9749C7 15.9497 7 14.2998 7 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 6V15C3 18.2998 3 19.9497 4.02513 20.9749C5.05025 22 6.70017 22 10 22H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],g=n(e(),1),_=t();function v(e){if(e.entry.kind===`reasoning`)return(0,_.jsxs)(`article`,{className:`max-w-205 justify-self-start text-muted-foreground`,"data-entry-id":String(e.entry.entryId),children:[(0,_.jsx)(`div`,{className:`mb-1 text-xs font-semibold uppercase text-muted-foreground`,children:`Reasoning`}),(0,_.jsx)(f,{size:`base`,text:e.entry.text})]});if(e.entry.kind===`tool`)return(0,_.jsx)(A,{entry:e.entry,decidingApprovals:e.decidingApprovals,answeringQuestions:e.answeringQuestions,onApprovalDecision:e.onApprovalDecision,onQuestionAnswer:e.onQuestionAnswer});let t=e.entry.role===`assistant`?e.entry.traceId:void 0,n=e.entry.role===`assistant`&&k(e.entry.text),i=e.entry.role===`assistant`&&`tone`in e.entry&&e.entry.tone===`error`,a=e.entry.role===`assistant`&&`tone`in e.entry&&e.entry.tone===`pending`,o=e.entry.role===`assistant`&&!a&&e.entry.text.trim().length>0;return e.entry.role===`user`?(0,_.jsxs)(`article`,{className:`grid w-fit max-w-[min(64ch,82%)] justify-items-end justify-self-end self-start text-foreground`,"data-entry-id":String(e.entry.entryId),children:[e.entry.text.trim().length===0?null:(0,_.jsx)(`div`,{className:`rounded-2xl bg-muted/55 px-4 py-2.5 shadow-sm shadow-black/[0.04] dark:bg-white/[0.08] dark:shadow-black/20`,children:(0,_.jsx)(f,{size:`base`,text:e.entry.text})}),e.entry.attachments===void 0?null:(0,_.jsx)(O,{attachments:e.entry.attachments})]}):(0,_.jsxs)(`article`,{className:r(`self-start`,n?`w-full max-w-full`:`max-w-[min(82ch,100%)]`,e.entry.role===`assistant`&&r(`justify-self-start text-foreground`,i&&`text-destructive`)),"data-entry-id":String(e.entry.entryId),children:[a?(0,_.jsx)(D,{}):null,e.entry.text.trim().length===0?null:(0,_.jsx)(f,{size:`base`,text:e.entry.text}),o?(0,_.jsx)(y,{metrics:e.metrics,text:e.entry.text,traceId:t,onOpenTrace:e.onOpenTrace}):null]})}function y(e){let[t,n]=(0,g.useState)(!1),r=e.traceId;async function i(){if(!(typeof navigator>`u`||navigator.clipboard===void 0))try{await navigator.clipboard.writeText(e.text),n(!0),window.setTimeout(()=>n(!1),1200)}catch{n(!1)}}return(0,_.jsxs)(`div`,{className:`mt-3 flex min-w-0 items-center gap-1.5`,children:[(0,_.jsx)(s,{"aria-label":t?`Response copied`:`Copy response`,className:`h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground`,title:t?`Copied`:`Copy response`,type:`button`,variant:`ghost`,onClick:()=>void i(),children:(0,_.jsx)(o,{icon:t?h:m,"aria-hidden":`true`})}),(0,_.jsxs)(`div`,{className:`group relative`,children:[(0,_.jsx)(s,{"aria-label":`Response metrics`,className:`h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground`,title:w(e.metrics),type:`button`,variant:`ghost`,children:(0,_.jsx)(o,{icon:p,"aria-hidden":`true`})}),(0,_.jsx)(`div`,{className:`pointer-events-none absolute left-0 top-full z-30 mt-2 hidden w-64 rounded-lg border border-border/90 bg-popover p-3 text-popover-foreground shadow-xl shadow-black/25 group-focus-within:grid group-hover:grid`,role:`tooltip`,children:(0,_.jsx)(b,{metrics:e.metrics})})]}),r===void 0?null:(0,_.jsx)(s,{"aria-label":`Open trace ${r}`,className:`h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground`,title:`Open trace ${r}`,type:`button`,variant:`ghost`,onClick:()=>e.onOpenTrace(r),children:(0,_.jsx)(o,{icon:a,"aria-hidden":`true`})})]})}function b(e){let t=S(e.metrics);return(0,_.jsxs)(`div`,{className:`grid min-w-0 gap-2 text-xs leading-5`,children:[(0,_.jsx)(`div`,{className:`font-semibold text-foreground`,children:`Response metrics`}),(0,_.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,_.jsx)(x,{label:`Cost`,value:`Unavailable`}),t.length===0?(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:`No usage metrics yet`}):t.map(e=>(0,_.jsx)(x,{label:e.label,value:e.value},e.label))]})]})}function x(e){return(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,_.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),(0,_.jsx)(`span`,{className:`shrink-0 font-medium tabular-nums text-foreground`,children:e.value})]})}function S(e){let t=[],n=e?.usage;return n?.totalTokens!==void 0&&t.push({label:`Total`,value:`${T(n.totalTokens)} tokens`}),n?.inputTokens!==void 0&&t.push({label:`Input`,value:T(n.inputTokens)}),n?.outputTokens!==void 0&&t.push({label:`Output`,value:T(n.outputTokens)}),C(t,`Cached`,n,`cachedInputTokens`),C(t,`Cache create`,n,`cacheCreationInputTokens`),e?.durationMs!==void 0&&t.push({label:`Duration`,value:E(e.durationMs)}),t}function C(e,t,n,r){let i=n?.[r];i!==void 0&&i>0&&e.push({label:t,value:T(i)})}function w(e){let t=S(e);return t.length===0?`Cost unavailable. No usage metrics yet.`:[`Cost unavailable`,...t.map(e=>`${e.label}: ${e.value}`)].join(`. `)}function T(e){return e.toLocaleString()}function E(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function D(){return(0,_.jsxs)(`div`,{"aria-label":`Assistant is responding`,className:`inline-flex h-9 min-h-9 items-center gap-2 rounded-xl border border-border/70 bg-muted/35 px-3 text-muted-foreground shadow-sm`,role:`status`,children:[(0,_.jsxs)(`span`,{className:`flex items-center gap-1`,"aria-hidden":`true`,children:[(0,_.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-foreground`}),(0,_.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:150ms]`}),(0,_.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:300ms]`})]}),(0,_.jsx)(`span`,{className:` text-xs font-semibold uppercase text-muted-foreground`,children:`Thinking`})]})}function O(e){return(0,_.jsx)(`div`,{className:`mt-2 flex max-w-full flex-wrap gap-2`,children:e.attachments.map((e,t)=>{let n=`${e.kind}-${e.name??e.mediaType??t}-${t}`;if(e.kind===`image`){let t=e.url??(e.data===void 0?void 0:`data:${e.mediaType??`image/png`};base64,${e.data}`);return(0,_.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border/80 bg-card/80`,children:t===void 0?(0,_.jsx)(`div`,{className:`grid h-20 w-24 place-items-center px-2 text-center text-xs text-muted-foreground`,children:`Image`}):(0,_.jsx)(`img`,{alt:e.name??`Attached image`,className:`h-20 w-24 object-cover`,src:t})},n)}return(0,_.jsx)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-lg border border-border/80 bg-card/80 px-2 py-1 text-xs font-medium text-muted-foreground`,children:(0,_.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name??e.mediaType??`Document`})},n)})})}function k(e){let t=e.split(`
1
+ import{i as e,r as t,s as n,t as r}from"./utils-BN2yP0LH.js";import{n as i}from"./format-C9HPGfkW.js";import{t as a}from"./PathIcon-DX1w_Nk9.js";import{F as o,I as s,t as c,z as l}from"./index-Bc7sqnn5.js";import{t as u}from"./badge-BH7gz3tB.js";import{i as d,r as f}from"./renderers-m-gqGocU.js";var p=[[`path`,{d:`M4 15L4 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9L12 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M22 22L2 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M20 13L20 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M5.60009 8.79993C5.23521 8.31419 4.6543 8 4 8C2.89543 8 2 8.89543 2 10C2 11.1046 2.89543 12 4 12C5.10457 12 6 11.1046 6 10C6 9.54973 5.8512 9.13421 5.60009 8.79993ZM5.60009 8.79993L10.3999 5.20007M10.3999 5.20007C10.7648 5.68581 11.3457 6 12 6C12.783 6 13.4609 5.55006 13.7892 4.89462M10.3999 5.20007C10.1488 4.86579 10 4.45027 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 4.32158 13.9241 4.62543 13.7892 4.89462M13.7892 4.89462L18.2108 7.10538M18.2108 7.10538C18.0759 7.37457 18 7.67842 18 8C18 9.10457 18.8954 10 20 10C21.1046 10 22 9.10457 22 8C22 6.89543 21.1046 6 20 6C19.217 6 18.5391 6.44994 18.2108 7.10538Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],m=[[`path`,{d:`M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],h=[[`path`,{d:`M11 10.6667C11 10.6667 11.75 10.6667 12.5 12C12.5 12 14.8824 8.66667 17 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 11V9C7 5.70017 7 4.05025 8.02513 3.02513C9.05025 2 10.7002 2 14 2C17.2998 2 18.9497 2 19.9749 3.02513C21 4.05025 21 5.70017 21 9V11C21 14.2998 21 15.9497 19.9749 16.9749C18.9497 18 17.2998 18 14 18C10.7002 18 9.05025 18 8.02513 16.9749C7 15.9497 7 14.2998 7 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 6V15C3 18.2998 3 19.9497 4.02513 20.9749C5.05025 22 6.70017 22 10 22H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],g=n(e(),1),_=t();function v(e){if(e.entry.kind===`reasoning`)return(0,_.jsxs)(`article`,{className:`max-w-205 justify-self-start text-muted-foreground`,"data-entry-id":String(e.entry.entryId),children:[(0,_.jsx)(`div`,{className:`mb-1 text-xs font-semibold uppercase text-muted-foreground`,children:`Reasoning`}),(0,_.jsx)(f,{size:`base`,text:e.entry.text})]});if(e.entry.kind===`tool`)return(0,_.jsx)(A,{entry:e.entry,decidingApprovals:e.decidingApprovals,answeringQuestions:e.answeringQuestions,onApprovalDecision:e.onApprovalDecision,onQuestionAnswer:e.onQuestionAnswer});let t=e.entry.role===`assistant`?e.entry.traceId:void 0,n=e.entry.role===`assistant`&&k(e.entry.text),i=e.entry.role===`assistant`&&`tone`in e.entry&&e.entry.tone===`error`,a=e.entry.role===`assistant`&&`tone`in e.entry&&e.entry.tone===`pending`,o=e.entry.role===`assistant`&&!a&&e.entry.text.trim().length>0;return e.entry.role===`user`?(0,_.jsxs)(`article`,{className:`grid w-fit max-w-[min(64ch,82%)] justify-items-end justify-self-end self-start text-foreground`,"data-entry-id":String(e.entry.entryId),children:[e.entry.text.trim().length===0?null:(0,_.jsx)(`div`,{className:`rounded-2xl bg-muted/55 px-4 py-2.5 shadow-sm shadow-black/[0.04] dark:bg-white/[0.08] dark:shadow-black/20`,children:(0,_.jsx)(f,{size:`base`,text:e.entry.text})}),e.entry.attachments===void 0?null:(0,_.jsx)(O,{attachments:e.entry.attachments})]}):(0,_.jsxs)(`article`,{className:r(`self-start`,n?`w-full max-w-full`:`max-w-[min(82ch,100%)]`,e.entry.role===`assistant`&&r(`justify-self-start text-foreground`,i&&`text-destructive`)),"data-entry-id":String(e.entry.entryId),children:[a?(0,_.jsx)(D,{}):null,e.entry.text.trim().length===0?null:(0,_.jsx)(f,{size:`base`,text:e.entry.text}),o?(0,_.jsx)(y,{metrics:e.metrics,text:e.entry.text,traceId:t,onOpenTrace:e.onOpenTrace}):null]})}function y(e){let[t,n]=(0,g.useState)(!1),r=e.traceId;async function i(){if(!(typeof navigator>`u`||navigator.clipboard===void 0))try{await navigator.clipboard.writeText(e.text),n(!0),window.setTimeout(()=>n(!1),1200)}catch{n(!1)}}return(0,_.jsxs)(`div`,{className:`mt-3 flex min-w-0 items-center gap-1.5`,children:[(0,_.jsx)(s,{"aria-label":t?`Response copied`:`Copy response`,className:`h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground`,title:t?`Copied`:`Copy response`,type:`button`,variant:`ghost`,onClick:()=>void i(),children:(0,_.jsx)(o,{icon:t?h:m,"aria-hidden":`true`})}),(0,_.jsxs)(`div`,{className:`group relative`,children:[(0,_.jsx)(s,{"aria-label":`Response metrics`,className:`h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground`,title:w(e.metrics),type:`button`,variant:`ghost`,children:(0,_.jsx)(o,{icon:p,"aria-hidden":`true`})}),(0,_.jsx)(`div`,{className:`pointer-events-none absolute left-0 top-full z-30 mt-2 hidden w-64 rounded-lg border border-border/90 bg-popover p-3 text-popover-foreground shadow-xl shadow-black/25 group-focus-within:grid group-hover:grid`,role:`tooltip`,children:(0,_.jsx)(b,{metrics:e.metrics})})]}),r===void 0?null:(0,_.jsx)(s,{"aria-label":`Open trace ${r}`,className:`h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground`,title:`Open trace ${r}`,type:`button`,variant:`ghost`,onClick:()=>e.onOpenTrace(r),children:(0,_.jsx)(o,{icon:a,"aria-hidden":`true`})})]})}function b(e){let t=S(e.metrics);return(0,_.jsxs)(`div`,{className:`grid min-w-0 gap-2 text-xs leading-5`,children:[(0,_.jsx)(`div`,{className:`font-semibold text-foreground`,children:`Response metrics`}),(0,_.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,_.jsx)(x,{label:`Cost`,value:`Unavailable`}),t.length===0?(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:`No usage metrics yet`}):t.map(e=>(0,_.jsx)(x,{label:e.label,value:e.value},e.label))]})]})}function x(e){return(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,_.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),(0,_.jsx)(`span`,{className:`shrink-0 font-medium tabular-nums text-foreground`,children:e.value})]})}function S(e){let t=[],n=e?.usage;return n?.totalTokens!==void 0&&t.push({label:`Total`,value:`${T(n.totalTokens)} tokens`}),n?.inputTokens!==void 0&&t.push({label:`Input`,value:T(n.inputTokens)}),n?.outputTokens!==void 0&&t.push({label:`Output`,value:T(n.outputTokens)}),C(t,`Cached`,n,`cachedInputTokens`),C(t,`Cache create`,n,`cacheCreationInputTokens`),e?.durationMs!==void 0&&t.push({label:`Duration`,value:E(e.durationMs)}),t}function C(e,t,n,r){let i=n?.[r];i!==void 0&&i>0&&e.push({label:t,value:T(i)})}function w(e){let t=S(e);return t.length===0?`Cost unavailable. No usage metrics yet.`:[`Cost unavailable`,...t.map(e=>`${e.label}: ${e.value}`)].join(`. `)}function T(e){return e.toLocaleString()}function E(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function D(){return(0,_.jsxs)(`div`,{"aria-label":`Assistant is responding`,className:`inline-flex h-9 min-h-9 items-center gap-2 rounded-xl border border-border/70 bg-muted/35 px-3 text-muted-foreground shadow-sm`,role:`status`,children:[(0,_.jsxs)(`span`,{className:`flex items-center gap-1`,"aria-hidden":`true`,children:[(0,_.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-foreground`}),(0,_.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:150ms]`}),(0,_.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:300ms]`})]}),(0,_.jsx)(`span`,{className:` text-xs font-semibold uppercase text-muted-foreground`,children:`Thinking`})]})}function O(e){return(0,_.jsx)(`div`,{className:`mt-2 flex max-w-full flex-wrap gap-2`,children:e.attachments.map((e,t)=>{let n=`${e.kind}-${e.name??e.mediaType??t}-${t}`;if(e.kind===`image`){let t=e.url??(e.data===void 0?void 0:`data:${e.mediaType??`image/png`};base64,${e.data}`);return(0,_.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border/80 bg-card/80`,children:t===void 0?(0,_.jsx)(`div`,{className:`grid h-20 w-24 place-items-center px-2 text-center text-xs text-muted-foreground`,children:`Image`}):(0,_.jsx)(`img`,{alt:e.name??`Attached image`,className:`h-20 w-24 object-cover`,src:t})},n)}return(0,_.jsx)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-lg border border-border/80 bg-card/80 px-2 py-1 text-xs font-medium text-muted-foreground`,children:(0,_.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name??e.mediaType??`Document`})},n)})})}function k(e){let t=e.split(`
2
2
  `);return t.some((e,n)=>{let r=t[n+1];return e.includes(`|`)&&r!==void 0&&/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(r)})}function A(e){let[t,n]=(0,g.useState)(e.entry.approval?.status!==`pending`&&e.entry.question?.status!==`pending`),i=e.entry.approval,a=e.entry.question,c=e.entry.childEvents??[],f=e.entry.args!==void 0||e.entry.result!==void 0||c.length>0||i!==void 0||a!==void 0,p=i?.status===`pending`,m=a?.status===`pending`,h=i!==void 0&&e.decidingApprovals.has(i.id),v=a!==void 0&&e.answeringQuestions.has(a.id);return(0,_.jsxs)(`article`,{className:`w-full justify-self-start overflow-hidden rounded-xl border border-border/80 bg-card/90 text-foreground shadow-sm shadow-black/20`,"data-entry-id":String(e.entry.entryId),children:[(0,_.jsxs)(`div`,{className:r(`flex min-w-0 items-center gap-2 px-3 py-2.5`,!t&&f&&`bg-muted/20`),children:[(0,_.jsxs)(s,{"aria-expanded":!t,className:`h-auto min-h-0 min-w-0 flex-1 justify-between border-0 bg-transparent p-0 text-left text-inherit shadow-none hover:bg-transparent hover:text-inherit`,type:`button`,variant:`ghost`,onClick:()=>n(e=>!e),children:[(0,_.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`grid h-6 w-4 shrink-0 place-items-center text-foreground`,children:(0,_.jsx)(o,{icon:l,className:`h-3.5 w-3.5`,"aria-hidden":`true`})}),(0,_.jsx)(`strong`,{className:`min-w-0 truncate text-sm font-semibold text-foreground`,children:e.entry.toolName})]}),p?null:(0,_.jsx)(`span`,{className:`ml-auto shrink-0 text-xs font-medium text-muted-foreground`,children:t?`Show`:`Hide`})]}),p&&i!==void 0?(0,_.jsx)(I,{disabled:h,onDecision:t=>e.onApprovalDecision(i.id,t)}):null,m?(0,_.jsx)(u,{className:`border-border/70 bg-muted/45 px-1.5 py-0.5 text-xs uppercase text-foreground`,children:`Waiting for input`}):null,p||m?(0,_.jsx)(s,{"aria-expanded":!t,className:`h-7 min-h-7 px-2 text-xs font-medium`,size:`sm`,type:`button`,variant:`ghost`,onClick:()=>n(e=>!e),children:t?`Show`:`Hide`}):null]}),t||!f?null:(0,_.jsxs)(`div`,{className:`grid gap-3 p-3`,children:[i===void 0?null:(0,_.jsx)(F,{approval:i}),a===void 0?null:(0,_.jsx)(M,{disabled:v,question:a,onAnswer:t=>e.onQuestionAnswer(a.id,t)}),a!==void 0||e.entry.args===void 0?null:(0,_.jsx)(d,{title:`Input`,value:e.entry.args}),c.length===0?null:(0,_.jsx)(j,{events:c}),a!==void 0||e.entry.result===void 0?null:(0,_.jsx)(d,{title:`Output`,value:e.entry.result})]})]})}function j(e){return(0,_.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/80 bg-background/65`,children:[(0,_.jsx)(`div`,{className:`bg-muted/20 px-3 py-2 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:`Subagent activity`}),(0,_.jsx)(`div`,{className:`grid gap-3 p-3`,children:e.events.map(e=>{let t=e.agentName??e.agentId;return e.kind===`message`||e.kind===`reasoning`?(0,_.jsxs)(`div`,{className:`grid gap-1 rounded-xl border border-border/80 bg-card/90 p-3`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(u,{className:`border-border bg-muted px-1.5 py-0.5 text-xs uppercase text-muted-foreground`,children:e.kind===`reasoning`?`Reasoning`:`Response`}),(0,_.jsx)(`span`,{className:`min-w-0 truncate text-xs font-semibold text-muted-foreground`,children:t})]}),(0,_.jsx)(f,{size:`base`,text:e.text})]},`${e.kind}-${e.agentId}-${e.text}`):(0,_.jsxs)(`div`,{className:`grid gap-2 rounded-xl border border-border/80 bg-card/90 p-3`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(u,{className:`border-border/70 bg-muted/45 px-1.5 py-0.5 text-xs uppercase text-foreground`,children:`Tool`}),(0,_.jsxs)(`span`,{className:`min-w-0 truncate text-xs font-semibold text-muted-foreground`,children:[t,` / `,e.toolName]})]}),e.args===void 0?null:(0,_.jsx)(d,{title:`Input`,value:e.args}),e.result===void 0?null:(0,_.jsx)(d,{title:`Output`,value:e.result})]},`${e.kind}-${e.agentId}-${e.toolName}-${e.callId??e.args??e.result??``}`)})})]})}function M(e){let[t,n]=(0,g.useState)({}),[r,i]=(0,g.useState)(0),a=e.question.status===`pending`,o=e.question.questions.length,c=e.question.questions.map(e=>{let n=t[e.id],r=n?.customValue?.trim()??``,i=r.length>0?r:n?.answer;return{questionId:e.id,answer:i?.trim()??``,...n?.choice===void 0?{}:{choice:n.choice},...r.length>0?{custom:!0}:{}}}),l=o===0?0:Math.min(r,o-1),u=e.question.questions[l],d=c[l]?.answer??``,f=c.filter(e=>e.answer.length>0).length,p=d.length>0,m=a&&c.every(e=>e.answer.length>0),h=l===0,v=l>=o-1;if(u===void 0)return(0,_.jsx)(`div`,{className:`rounded-xl border border-border bg-background p-4 text-sm font-medium text-muted-foreground`,children:`No questions`});let y=()=>i(e=>Math.max(0,e-1)),b=()=>i(t=>Math.min(e.question.questions.length-1,t+1)),x=(e,t)=>n(n=>({...n,[e]:t}));return(0,_.jsxs)(`div`,{className:`grid gap-3`,children:[(0,_.jsx)(N,{disabled:e.disabled||!a,index:l,total:o,question:u,value:t[u.id],answer:e.question.answers?.find(e=>e.questionId===u.id),onChange:e=>x(u.id,e),...v?{}:{onAdvance:b}},u.id),a?(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 rounded-xl bg-muted/20 px-3 py-2`,children:[(0,_.jsxs)(`div`,{className:`min-w-0 text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:[f,`/`,o,` answered`]}),(0,_.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[h?null:(0,_.jsx)(s,{type:`button`,variant:`secondary`,onClick:y,children:`Back`}),v?(0,_.jsx)(s,{className:`h-9 min-h-9 px-4`,disabled:e.disabled||!m,type:`button`,onClick:()=>e.onAnswer(c),children:`Submit answers`}):(0,_.jsx)(s,{className:`h-9 min-h-9 px-4`,disabled:e.disabled||!p,type:`button`,onClick:b,children:`Next question`})]})]}):o>1?(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 rounded-xl bg-muted/20 px-3 py-2`,children:[(0,_.jsx)(`div`,{className:`min-w-0 text-xs font-semibold uppercase tracking-[0.2em] text-foreground`,children:`Answered`}),(0,_.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,_.jsx)(s,{disabled:h,type:`button`,variant:`secondary`,onClick:y,children:`Back`}),(0,_.jsx)(s,{disabled:v,type:`button`,variant:`secondary`,onClick:b,children:`Next`})]})]}):null]})}function N(e){let t=e.answer?.answer,n=P(e.value),i=t===void 0?n.length>0?`Ready`:`Waiting`:`Answered`;return(0,_.jsxs)(`section`,{className:`grid gap-4 rounded-xl border border-border/80 bg-background/70 p-4`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,_.jsxs)(`div`,{className:`grid min-w-0 gap-2`,children:[(0,_.jsxs)(`div`,{className:` text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:[`Question `,e.index+1,` of `,e.total]}),(0,_.jsx)(`h3`,{className:`m-0 text-base font-semibold leading-7 text-foreground [overflow-wrap:anywhere]`,children:e.question.question})]}),(0,_.jsx)(`span`,{className:r(`shrink-0 text-xs font-semibold uppercase tracking-[0.18em]`,i===`Answered`&&`text-foreground`,i===`Ready`&&`text-foreground`,i===`Waiting`&&`text-muted-foreground`),children:i})]}),t===void 0?null:(0,_.jsx)(`div`,{className:`rounded-lg border border-border/70 bg-muted/45 px-3 py-2 text-sm font-medium text-foreground`,children:t}),t===void 0&&e.question.choices.length>0?(0,_.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.question.choices.map(t=>{let n=e.value?.choice===t.value;return(0,_.jsx)(s,{className:r(`h-8 min-h-8 px-3 text-xs`,n&&`border-foreground/45`),disabled:e.disabled,size:`sm`,type:`button`,variant:n?`default`:`secondary`,onClick:()=>{e.onChange({answer:t.value,choice:t.value,customValue:e.value?.customValue??``}),e.onAdvance?.()},children:t.label},t.value)})}):null,t===void 0?(0,_.jsx)(c,{className:`min-h-24 text-sm`,disabled:e.disabled,placeholder:`Type a custom answer`,rows:3,value:e.value?.customValue??``,onChange:t=>e.onChange({...e.value,customValue:t.currentTarget.value})}):null]})}function P(e){let t=e?.customValue?.trim()??``;return t.length>0?t:e?.answer?.trim()??``}function F(e){return(0,_.jsxs)(`div`,{className:`grid gap-2 rounded-xl border border-border/70 bg-muted/25 px-3 py-2.5`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(u,{className:r(`border-border/70 bg-background/60 px-1.5 py-0.5 text-xs uppercase text-muted-foreground`,e.approval.status===`approved`&&`text-foreground`,e.approval.status===`rejected`&&`text-destructive`),children:`Approval`}),(0,_.jsx)(`div`,{className:`min-w-0`,children:(0,_.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:i(e.approval)})})]}),e.approval.reason===void 0?null:(0,_.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground [overflow-wrap:anywhere]`,children:e.approval.reason})]})}function I(e){return(0,_.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 rounded-lg border border-border/80 bg-background/55 p-0.5`,children:[(0,_.jsx)(s,{className:`h-7 min-h-7 rounded-md border-0 bg-transparent px-2.5 text-xs text-muted-foreground shadow-none hover:bg-destructive/10 hover:text-destructive`,disabled:e.disabled,size:`sm`,type:`button`,variant:`ghost`,onClick:()=>e.onDecision(!1),children:`Reject`}),(0,_.jsx)(s,{className:`h-7 min-h-7 rounded-md px-2.5 text-xs`,disabled:e.disabled,size:`sm`,type:`button`,onClick:()=>e.onDecision(!0),children:`Approve`})]})}export{v as TranscriptItem};
3
- //# sourceMappingURL=transcript-item-BF9qx3gB.js.map
3
+ //# sourceMappingURL=transcript-item-CsKPOoJ7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transcript-item-BF9qx3gB.js","names":[],"sources":["../../../../../node_modules/.pnpm/@hugeicons+core-free-icons@4.2.2/node_modules/@hugeicons/core-free-icons/dist/esm/ChartBarLineIcon.js","../../../../../node_modules/.pnpm/@hugeicons+core-free-icons@4.2.2/node_modules/@hugeicons/core-free-icons/dist/esm/Copy01Icon.js","../../../../../node_modules/.pnpm/@hugeicons+core-free-icons@4.2.2/node_modules/@hugeicons/core-free-icons/dist/esm/CopyCheckIcon.js","../../../src/ui/app/modules/playground/transcript-item.tsx"],"sourcesContent":["const ChartBarLineIcon = [\n [\"path\", { d: \"M4 15L4 19\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"0\" }],\n [\"path\", { d: \"M12 9L12 19\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"1\" }],\n [\"path\", { d: \"M22 22L2 22\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"2\" }],\n [\"path\", { d: \"M20 13L20 19\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"3\" }],\n [\"path\", { d: \"M5.60009 8.79993C5.23521 8.31419 4.6543 8 4 8C2.89543 8 2 8.89543 2 10C2 11.1046 2.89543 12 4 12C5.10457 12 6 11.1046 6 10C6 9.54973 5.8512 9.13421 5.60009 8.79993ZM5.60009 8.79993L10.3999 5.20007M10.3999 5.20007C10.7648 5.68581 11.3457 6 12 6C12.783 6 13.4609 5.55006 13.7892 4.89462M10.3999 5.20007C10.1488 4.86579 10 4.45027 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 4.32158 13.9241 4.62543 13.7892 4.89462M13.7892 4.89462L18.2108 7.10538M18.2108 7.10538C18.0759 7.37457 18 7.67842 18 8C18 9.10457 18.8954 10 20 10C21.1046 10 22 9.10457 22 8C22 6.89543 21.1046 6 20 6C19.217 6 18.5391 6.44994 18.2108 7.10538Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", key: \"4\" }]\n];\n\nexport { ChartBarLineIcon as default };\n//# sourceMappingURL=ChartBarLineIcon.js.map\n","const Copy01Icon = [\n [\"path\", { d: \"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"0\" }],\n [\"path\", { d: \"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"1\" }]\n];\n\nexport { Copy01Icon as default };\n//# sourceMappingURL=Copy01Icon.js.map\n","const CopyCheckIcon = [\n [\"path\", { d: \"M11 10.6667C11 10.6667 11.75 10.6667 12.5 12C12.5 12 14.8824 8.66667 17 8\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"0\" }],\n [\"path\", { d: \"M7 11V9C7 5.70017 7 4.05025 8.02513 3.02513C9.05025 2 10.7002 2 14 2C17.2998 2 18.9497 2 19.9749 3.02513C21 4.05025 21 5.70017 21 9V11C21 14.2998 21 15.9497 19.9749 16.9749C18.9497 18 17.2998 18 14 18C10.7002 18 9.05025 18 8.02513 16.9749C7 15.9497 7 14.2998 7 11Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"1\" }],\n [\"path\", { d: \"M3 6V15C3 18.2998 3 19.9497 4.02513 20.9749C5.05025 22 6.70017 22 10 22H17\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"2\" }]\n];\n\nexport { CopyCheckIcon as default };\n//# sourceMappingURL=CopyCheckIcon.js.map\n","import {\n ChartBarLineIcon,\n Copy01Icon,\n CopyCheckIcon,\n PathIcon,\n Wrench01Icon,\n} from \"@hugeicons/core-free-icons\";\nimport { useState } from \"react\";\nimport { Badge } from \"../../components/ui/badge\";\nimport { Button } from \"../../components/ui/button\";\nimport { StudioIcon } from \"../../components/ui/icon\";\nimport { Textarea } from \"../../components/ui/textarea\";\nimport { cn } from \"../../lib/utils\";\nimport { approvalLabel } from \"../shared/format\";\nimport { MarkdownText, ToolPayload } from \"../shared/renderers\";\nimport type { ToolApproval, ToolMessage, ToolQuestion, TranscriptEntry } from \"../shared/types\";\nimport type { AssistantResponseMetrics, ResponseUsageMetrics } from \"./response-metrics\";\n\nexport function TranscriptItem(props: {\n entry: TranscriptEntry;\n metrics?: AssistantResponseMetrics | undefined;\n decidingApprovals: Set<string>;\n answeringQuestions: Set<string>;\n onApprovalDecision: (approvalId: string, approved: boolean) => void;\n onQuestionAnswer: (\n questionId: string,\n answers: Array<{ questionId: string; answer: string; choice?: string; custom?: boolean }>,\n ) => void;\n onOpenTrace: (traceId: string) => void;\n}) {\n if (props.entry.kind === \"reasoning\") {\n return (\n <article\n className=\"max-w-205 justify-self-start text-muted-foreground\"\n data-entry-id={String(props.entry.entryId)}\n >\n <div className=\"mb-1 text-xs font-semibold uppercase text-muted-foreground\">Reasoning</div>\n <MarkdownText size=\"base\" text={props.entry.text} />\n </article>\n );\n }\n\n if (props.entry.kind === \"tool\") {\n return (\n <ToolEntry\n entry={props.entry}\n decidingApprovals={props.decidingApprovals}\n answeringQuestions={props.answeringQuestions}\n onApprovalDecision={props.onApprovalDecision}\n onQuestionAnswer={props.onQuestionAnswer}\n />\n );\n }\n\n const traceId = props.entry.role === \"assistant\" ? props.entry.traceId : undefined;\n const hasTable = props.entry.role === \"assistant\" && hasMarkdownTable(props.entry.text);\n const isError =\n props.entry.role === \"assistant\" && \"tone\" in props.entry && props.entry.tone === \"error\";\n const isPending =\n props.entry.role === \"assistant\" && \"tone\" in props.entry && props.entry.tone === \"pending\";\n const showAssistantActions =\n props.entry.role === \"assistant\" && !isPending && props.entry.text.trim().length > 0;\n\n if (props.entry.role === \"user\") {\n return (\n <article\n className=\"grid w-fit max-w-[min(64ch,82%)] justify-items-end justify-self-end self-start text-foreground\"\n data-entry-id={String(props.entry.entryId)}\n >\n {props.entry.text.trim().length === 0 ? null : (\n <div className=\"rounded-2xl bg-muted/55 px-4 py-2.5 shadow-sm shadow-black/[0.04] dark:bg-white/[0.08] dark:shadow-black/20\">\n <MarkdownText size=\"base\" text={props.entry.text} />\n </div>\n )}\n {props.entry.attachments !== undefined ? (\n <MessageAttachments attachments={props.entry.attachments} />\n ) : null}\n </article>\n );\n }\n\n return (\n <article\n className={cn(\n \"self-start\",\n hasTable ? \"w-full max-w-full\" : \"max-w-[min(82ch,100%)]\",\n props.entry.role === \"assistant\" &&\n cn(\"justify-self-start text-foreground\", isError && \"text-destructive\"),\n )}\n data-entry-id={String(props.entry.entryId)}\n >\n {isPending ? <AssistantLoadingIndicator /> : null}\n {props.entry.text.trim().length === 0 ? null : (\n <MarkdownText size=\"base\" text={props.entry.text} />\n )}\n {showAssistantActions ? (\n <AssistantResponseActions\n metrics={props.metrics}\n text={props.entry.text}\n traceId={traceId}\n onOpenTrace={props.onOpenTrace}\n />\n ) : null}\n </article>\n );\n}\n\nfunction AssistantResponseActions(props: {\n metrics?: AssistantResponseMetrics | undefined;\n text: string;\n traceId?: string | undefined;\n onOpenTrace: (traceId: string) => void;\n}) {\n const [copied, setCopied] = useState(false);\n const traceId = props.traceId;\n\n async function copyResponse() {\n if (typeof navigator === \"undefined\" || navigator.clipboard === undefined) {\n return;\n }\n try {\n await navigator.clipboard.writeText(props.text);\n setCopied(true);\n window.setTimeout(() => setCopied(false), 1200);\n } catch {\n setCopied(false);\n }\n }\n\n return (\n <div className=\"mt-3 flex min-w-0 items-center gap-1.5\">\n <Button\n aria-label={copied ? \"Response copied\" : \"Copy response\"}\n className=\"h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground\"\n title={copied ? \"Copied\" : \"Copy response\"}\n type=\"button\"\n variant=\"ghost\"\n onClick={() => void copyResponse()}\n >\n <StudioIcon icon={copied ? CopyCheckIcon : Copy01Icon} aria-hidden=\"true\" />\n </Button>\n <div className=\"group relative\">\n <Button\n aria-label=\"Response metrics\"\n className=\"h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground\"\n title={metricsTitle(props.metrics)}\n type=\"button\"\n variant=\"ghost\"\n >\n <StudioIcon icon={ChartBarLineIcon} aria-hidden=\"true\" />\n </Button>\n <div\n className=\"pointer-events-none absolute left-0 top-full z-30 mt-2 hidden w-64 rounded-lg border border-border/90 bg-popover p-3 text-popover-foreground shadow-xl shadow-black/25 group-focus-within:grid group-hover:grid\"\n role=\"tooltip\"\n >\n <ResponseMetricsTooltip metrics={props.metrics} />\n </div>\n </div>\n {traceId === undefined ? null : (\n <Button\n aria-label={`Open trace ${traceId}`}\n className=\"h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground\"\n title={`Open trace ${traceId}`}\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onOpenTrace(traceId)}\n >\n <StudioIcon icon={PathIcon} aria-hidden=\"true\" />\n </Button>\n )}\n </div>\n );\n}\n\nfunction ResponseMetricsTooltip(props: { metrics?: AssistantResponseMetrics | undefined }) {\n const rows = responseMetricRows(props.metrics);\n return (\n <div className=\"grid min-w-0 gap-2 text-xs leading-5\">\n <div className=\"font-semibold text-foreground\">Response metrics</div>\n <div className=\"grid min-w-0 gap-1\">\n <MetricRow label=\"Cost\" value=\"Unavailable\" />\n {rows.length === 0 ? (\n <div className=\"text-muted-foreground\">No usage metrics yet</div>\n ) : (\n rows.map((row) => <MetricRow label={row.label} value={row.value} key={row.label} />)\n )}\n </div>\n </div>\n );\n}\n\nfunction MetricRow(props: { label: string; value: string }) {\n return (\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">{props.label}</span>\n <span className=\"shrink-0 font-medium tabular-nums text-foreground\">{props.value}</span>\n </div>\n );\n}\n\nfunction responseMetricRows(metrics: AssistantResponseMetrics | undefined): Array<{\n label: string;\n value: string;\n}> {\n const rows: Array<{ label: string; value: string }> = [];\n const usage = metrics?.usage;\n if (usage?.totalTokens !== undefined) {\n rows.push({ label: \"Total\", value: `${formatMetricNumber(usage.totalTokens)} tokens` });\n }\n if (usage?.inputTokens !== undefined) {\n rows.push({ label: \"Input\", value: formatMetricNumber(usage.inputTokens) });\n }\n if (usage?.outputTokens !== undefined) {\n rows.push({ label: \"Output\", value: formatMetricNumber(usage.outputTokens) });\n }\n pushOptionalUsageRow(rows, \"Cached\", usage, \"cachedInputTokens\");\n pushOptionalUsageRow(rows, \"Cache create\", usage, \"cacheCreationInputTokens\");\n if (metrics?.durationMs !== undefined) {\n rows.push({ label: \"Duration\", value: formatResponseDuration(metrics.durationMs) });\n }\n return rows;\n}\n\nfunction pushOptionalUsageRow(\n rows: Array<{ label: string; value: string }>,\n label: string,\n usage: ResponseUsageMetrics | undefined,\n key: keyof ResponseUsageMetrics,\n) {\n const value = usage?.[key];\n if (value !== undefined && value > 0) {\n rows.push({ label, value: formatMetricNumber(value) });\n }\n}\n\nfunction metricsTitle(metrics: AssistantResponseMetrics | undefined): string {\n const rows = responseMetricRows(metrics);\n if (rows.length === 0) {\n return \"Cost unavailable. No usage metrics yet.\";\n }\n return [\"Cost unavailable\", ...rows.map((row) => `${row.label}: ${row.value}`)].join(\". \");\n}\n\nfunction formatMetricNumber(value: number): string {\n return value.toLocaleString();\n}\n\nfunction formatResponseDuration(value: number): string {\n if (value < 1000) {\n return `${value}ms`;\n }\n return `${(value / 1000).toFixed(1)}s`;\n}\n\nfunction AssistantLoadingIndicator() {\n return (\n <div\n aria-label=\"Assistant is responding\"\n className=\"inline-flex h-9 min-h-9 items-center gap-2 rounded-xl border border-border/70 bg-muted/35 px-3 text-muted-foreground shadow-sm\"\n role=\"status\"\n >\n <span className=\"flex items-center gap-1\" aria-hidden=\"true\">\n <span className=\"h-1.5 w-1.5 animate-pulse rounded-full bg-foreground\" />\n <span className=\"h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:150ms]\" />\n <span className=\"h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:300ms]\" />\n </span>\n <span className=\" text-xs font-semibold uppercase text-muted-foreground\">Thinking</span>\n </div>\n );\n}\n\nfunction MessageAttachments(props: {\n attachments: NonNullable<Extract<TranscriptEntry, { kind: \"message\" }>[\"attachments\"]>;\n}) {\n return (\n <div className=\"mt-2 flex max-w-full flex-wrap gap-2\">\n {props.attachments.map((attachment, index) => {\n const key = `${attachment.kind}-${attachment.name ?? attachment.mediaType ?? index}-${index}`;\n if (attachment.kind === \"image\") {\n const src =\n attachment.url ??\n (attachment.data === undefined\n ? undefined\n : `data:${attachment.mediaType ?? \"image/png\"};base64,${attachment.data}`);\n return (\n <div\n className=\"overflow-hidden rounded-lg border border-border/80 bg-card/80\"\n key={key}\n >\n {src === undefined ? (\n <div className=\"grid h-20 w-24 place-items-center px-2 text-center text-xs text-muted-foreground\">\n Image\n </div>\n ) : (\n <img\n alt={attachment.name ?? \"Attached image\"}\n className=\"h-20 w-24 object-cover\"\n src={src}\n />\n )}\n </div>\n );\n }\n return (\n <span\n className=\"inline-flex max-w-full items-center gap-1.5 rounded-lg border border-border/80 bg-card/80 px-2 py-1 text-xs font-medium text-muted-foreground\"\n key={key}\n >\n <span className=\"min-w-0 truncate\">\n {attachment.name ?? attachment.mediaType ?? \"Document\"}\n </span>\n </span>\n );\n })}\n </div>\n );\n}\n\nfunction hasMarkdownTable(text: string): boolean {\n const lines = text.split(\"\\n\");\n return lines.some((line, index) => {\n const next = lines[index + 1];\n return (\n line.includes(\"|\") &&\n next !== undefined &&\n /^\\s*\\|?\\s*:?-{3,}:?\\s*(\\|\\s*:?-{3,}:?\\s*)+\\|?\\s*$/.test(next)\n );\n });\n}\n\nfunction ToolEntry(props: {\n entry: ToolMessage;\n decidingApprovals: Set<string>;\n answeringQuestions: Set<string>;\n onApprovalDecision: (approvalId: string, approved: boolean) => void;\n onQuestionAnswer: (\n questionId: string,\n answers: Array<{ questionId: string; answer: string; choice?: string; custom?: boolean }>,\n ) => void;\n}) {\n const [collapsed, setCollapsed] = useState(\n props.entry.approval?.status !== \"pending\" && props.entry.question?.status !== \"pending\",\n );\n const approval = props.entry.approval;\n const question = props.entry.question;\n const childEvents = props.entry.childEvents ?? [];\n const hasPayload =\n props.entry.args !== undefined ||\n props.entry.result !== undefined ||\n childEvents.length > 0 ||\n approval !== undefined ||\n question !== undefined;\n const pendingApproval = approval?.status === \"pending\";\n const pendingQuestion = question?.status === \"pending\";\n const deciding = approval !== undefined && props.decidingApprovals.has(approval.id);\n const answering = question !== undefined && props.answeringQuestions.has(question.id);\n\n return (\n <article\n className=\"w-full justify-self-start overflow-hidden rounded-xl border border-border/80 bg-card/90 text-foreground shadow-sm shadow-black/20\"\n data-entry-id={String(props.entry.entryId)}\n >\n <div\n className={cn(\n \"flex min-w-0 items-center gap-2 px-3 py-2.5\",\n !collapsed && hasPayload && \"bg-muted/20\",\n )}\n >\n <Button\n aria-expanded={!collapsed}\n className=\"h-auto min-h-0 min-w-0 flex-1 justify-between border-0 bg-transparent p-0 text-left text-inherit shadow-none hover:bg-transparent hover:text-inherit\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setCollapsed((current) => !current)}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <span className=\"grid h-6 w-4 shrink-0 place-items-center text-foreground\">\n <StudioIcon icon={Wrench01Icon} className=\"h-3.5 w-3.5\" aria-hidden=\"true\" />\n </span>\n <strong className=\"min-w-0 truncate text-sm font-semibold text-foreground\">\n {props.entry.toolName}\n </strong>\n </span>\n {pendingApproval ? null : (\n <span className=\"ml-auto shrink-0 text-xs font-medium text-muted-foreground\">\n {collapsed ? \"Show\" : \"Hide\"}\n </span>\n )}\n </Button>\n {pendingApproval && approval !== undefined ? (\n <ToolApprovalActions\n disabled={deciding}\n onDecision={(approved) => props.onApprovalDecision(approval.id, approved)}\n />\n ) : null}\n {pendingQuestion ? (\n <Badge className=\"border-border/70 bg-muted/45 px-1.5 py-0.5 text-xs uppercase text-foreground\">\n Waiting for input\n </Badge>\n ) : null}\n {pendingApproval || pendingQuestion ? (\n <Button\n aria-expanded={!collapsed}\n className=\"h-7 min-h-7 px-2 text-xs font-medium\"\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setCollapsed((current) => !current)}\n >\n {collapsed ? \"Show\" : \"Hide\"}\n </Button>\n ) : null}\n </div>\n {collapsed || !hasPayload ? null : (\n <div className=\"grid gap-3 p-3\">\n {approval === undefined ? null : <ToolApprovalPanel approval={approval} />}\n {question === undefined ? null : (\n <ToolQuestionPanel\n disabled={answering}\n question={question}\n onAnswer={(answers) => props.onQuestionAnswer(question.id, answers)}\n />\n )}\n {question !== undefined || props.entry.args === undefined ? null : (\n <ToolPayload title=\"Input\" value={props.entry.args} />\n )}\n {childEvents.length === 0 ? null : <ChildAgentActivity events={childEvents} />}\n {question !== undefined || props.entry.result === undefined ? null : (\n <ToolPayload title=\"Output\" value={props.entry.result} />\n )}\n </div>\n )}\n </article>\n );\n}\n\nfunction ChildAgentActivity(props: { events: NonNullable<ToolMessage[\"childEvents\"]> }) {\n return (\n <div className=\"overflow-hidden rounded-xl border border-border/80 bg-background/65\">\n <div className=\"bg-muted/20 px-3 py-2 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground\">\n Subagent activity\n </div>\n <div className=\"grid gap-3 p-3\">\n {props.events.map((event) => {\n const agentLabel = event.agentName ?? event.agentId;\n if (event.kind === \"message\" || event.kind === \"reasoning\") {\n return (\n <div\n className=\"grid gap-1 rounded-xl border border-border/80 bg-card/90 p-3\"\n key={`${event.kind}-${event.agentId}-${event.text}`}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n <Badge className=\"border-border bg-muted px-1.5 py-0.5 text-xs uppercase text-muted-foreground\">\n {event.kind === \"reasoning\" ? \"Reasoning\" : \"Response\"}\n </Badge>\n <span className=\"min-w-0 truncate text-xs font-semibold text-muted-foreground\">\n {agentLabel}\n </span>\n </div>\n <MarkdownText size=\"base\" text={event.text} />\n </div>\n );\n }\n return (\n <div\n className=\"grid gap-2 rounded-xl border border-border/80 bg-card/90 p-3\"\n key={`${event.kind}-${event.agentId}-${event.toolName}-${event.callId ?? event.args ?? event.result ?? \"\"}`}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n <Badge className=\"border-border/70 bg-muted/45 px-1.5 py-0.5 text-xs uppercase text-foreground\">\n Tool\n </Badge>\n <span className=\"min-w-0 truncate text-xs font-semibold text-muted-foreground\">\n {agentLabel} / {event.toolName}\n </span>\n </div>\n {event.args === undefined ? null : <ToolPayload title=\"Input\" value={event.args} />}\n {event.result === undefined ? null : (\n <ToolPayload title=\"Output\" value={event.result} />\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nfunction ToolQuestionPanel(props: {\n question: ToolQuestion;\n disabled: boolean;\n onAnswer: (\n answers: Array<{ questionId: string; answer: string; choice?: string; custom?: boolean }>,\n ) => void;\n}) {\n const [values, setValues] = useState<Record<string, QuestionDraft>>({});\n const [activeQuestionIndex, setActiveQuestionIndex] = useState(0);\n const pending = props.question.status === \"pending\";\n const total = props.question.questions.length;\n\n const answers = props.question.questions.map((question) => {\n const draft = values[question.id];\n const customAnswer = draft?.customValue?.trim() ?? \"\";\n const answer = customAnswer.length > 0 ? customAnswer : draft?.answer;\n return {\n questionId: question.id,\n answer: answer?.trim() ?? \"\",\n ...(draft?.choice === undefined ? {} : { choice: draft.choice }),\n ...(customAnswer.length > 0 ? { custom: true } : {}),\n };\n });\n const activeIndex = total === 0 ? 0 : Math.min(activeQuestionIndex, total - 1);\n const activeQuestion = props.question.questions[activeIndex];\n const activeAnswer = answers[activeIndex]?.answer ?? \"\";\n const answeredCount = answers.filter((answer) => answer.answer.length > 0).length;\n const canAdvance = activeAnswer.length > 0;\n const canSubmit = pending && answers.every((answer) => answer.answer.length > 0);\n const firstQuestion = activeIndex === 0;\n const lastQuestion = activeIndex >= total - 1;\n\n if (activeQuestion === undefined) {\n return (\n <div className=\"rounded-xl border border-border bg-background p-4 text-sm font-medium text-muted-foreground\">\n No questions\n </div>\n );\n }\n\n const goPrevious = () => setActiveQuestionIndex((current) => Math.max(0, current - 1));\n const goNext = () =>\n setActiveQuestionIndex((current) => Math.min(props.question.questions.length - 1, current + 1));\n const updateDraft = (questionId: string, value: QuestionDraft) =>\n setValues((current) => ({\n ...current,\n [questionId]: value,\n }));\n\n return (\n <div className=\"grid gap-3\">\n <QuestionPromptControl\n key={activeQuestion.id}\n disabled={props.disabled || !pending}\n index={activeIndex}\n total={total}\n question={activeQuestion}\n value={values[activeQuestion.id]}\n answer={props.question.answers?.find((answer) => answer.questionId === activeQuestion.id)}\n onChange={(value) => updateDraft(activeQuestion.id, value)}\n {...(lastQuestion ? {} : { onAdvance: goNext })}\n />\n {pending ? (\n <div className=\"flex min-w-0 items-center justify-between gap-3 rounded-xl bg-muted/20 px-3 py-2\">\n <div className=\"min-w-0 text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground\">\n {answeredCount}/{total} answered\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {firstQuestion ? null : (\n <Button type=\"button\" variant=\"secondary\" onClick={goPrevious}>\n Back\n </Button>\n )}\n {lastQuestion ? (\n <Button\n className=\"h-9 min-h-9 px-4\"\n disabled={props.disabled || !canSubmit}\n type=\"button\"\n onClick={() => props.onAnswer(answers)}\n >\n Submit answers\n </Button>\n ) : (\n <Button\n className=\"h-9 min-h-9 px-4\"\n disabled={props.disabled || !canAdvance}\n type=\"button\"\n onClick={goNext}\n >\n Next question\n </Button>\n )}\n </div>\n </div>\n ) : total > 1 ? (\n <div className=\"flex min-w-0 items-center justify-between gap-3 rounded-xl bg-muted/20 px-3 py-2\">\n <div className=\"min-w-0 text-xs font-semibold uppercase tracking-[0.2em] text-foreground\">\n Answered\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n <Button disabled={firstQuestion} type=\"button\" variant=\"secondary\" onClick={goPrevious}>\n Back\n </Button>\n <Button disabled={lastQuestion} type=\"button\" variant=\"secondary\" onClick={goNext}>\n Next\n </Button>\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\ntype QuestionDraft = {\n answer?: string;\n choice?: string;\n customValue?: string;\n};\n\nfunction QuestionPromptControl(props: {\n question: ToolQuestion[\"questions\"][number];\n value: QuestionDraft | undefined;\n answer: NonNullable<ToolQuestion[\"answers\"]>[number] | undefined;\n disabled: boolean;\n index: number;\n total: number;\n onChange: (value: QuestionDraft) => void;\n onAdvance?: () => void;\n}) {\n const submittedAnswer = props.answer?.answer;\n const draftAnswer = questionDraftAnswer(props.value);\n const state =\n submittedAnswer !== undefined ? \"Answered\" : draftAnswer.length > 0 ? \"Ready\" : \"Waiting\";\n\n return (\n <section className=\"grid gap-4 rounded-xl border border-border/80 bg-background/70 p-4\">\n <div className=\"flex min-w-0 items-start justify-between gap-4\">\n <div className=\"grid min-w-0 gap-2\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground\">\n Question {props.index + 1} of {props.total}\n </div>\n <h3 className=\"m-0 text-base font-semibold leading-7 text-foreground [overflow-wrap:anywhere]\">\n {props.question.question}\n </h3>\n </div>\n <span\n className={cn(\n \"shrink-0 text-xs font-semibold uppercase tracking-[0.18em]\",\n state === \"Answered\" && \"text-foreground\",\n state === \"Ready\" && \"text-foreground\",\n state === \"Waiting\" && \"text-muted-foreground\",\n )}\n >\n {state}\n </span>\n </div>\n {submittedAnswer === undefined ? null : (\n <div className=\"rounded-lg border border-border/70 bg-muted/45 px-3 py-2 text-sm font-medium text-foreground\">\n {submittedAnswer}\n </div>\n )}\n {submittedAnswer !== undefined ? null : props.question.choices.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {props.question.choices.map((choice) => {\n const active = props.value?.choice === choice.value;\n return (\n <Button\n key={choice.value}\n className={cn(\"h-8 min-h-8 px-3 text-xs\", active && \"border-foreground/45\")}\n disabled={props.disabled}\n size=\"sm\"\n type=\"button\"\n variant={active ? \"default\" : \"secondary\"}\n onClick={() => {\n props.onChange({\n answer: choice.value,\n choice: choice.value,\n customValue: props.value?.customValue ?? \"\",\n });\n props.onAdvance?.();\n }}\n >\n {choice.label}\n </Button>\n );\n })}\n </div>\n ) : null}\n {submittedAnswer !== undefined ? null : (\n <Textarea\n className=\"min-h-24 text-sm\"\n disabled={props.disabled}\n placeholder=\"Type a custom answer\"\n rows={3}\n value={props.value?.customValue ?? \"\"}\n onChange={(event) =>\n props.onChange({\n ...props.value,\n customValue: event.currentTarget.value,\n })\n }\n />\n )}\n </section>\n );\n}\n\nfunction questionDraftAnswer(value: QuestionDraft | undefined): string {\n const customAnswer = value?.customValue?.trim() ?? \"\";\n return customAnswer.length > 0 ? customAnswer : (value?.answer?.trim() ?? \"\");\n}\n\nfunction ToolApprovalPanel(props: { approval: ToolApproval }) {\n return (\n <div className=\"grid gap-2 rounded-xl border border-border/70 bg-muted/25 px-3 py-2.5\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <Badge\n className={cn(\n \"border-border/70 bg-background/60 px-1.5 py-0.5 text-xs uppercase text-muted-foreground\",\n props.approval.status === \"approved\" && \"text-foreground\",\n props.approval.status === \"rejected\" && \"text-destructive\",\n )}\n >\n Approval\n </Badge>\n <div className=\"min-w-0\">\n <div className=\"text-sm font-medium text-foreground\">{approvalLabel(props.approval)}</div>\n </div>\n </div>\n {props.approval.reason === undefined ? null : (\n <div className=\"text-xs font-medium text-muted-foreground [overflow-wrap:anywhere]\">\n {props.approval.reason}\n </div>\n )}\n </div>\n );\n}\n\nfunction ToolApprovalActions(props: {\n disabled: boolean;\n onDecision: (approved: boolean) => void;\n}) {\n return (\n <div className=\"flex shrink-0 items-center gap-1 rounded-lg border border-border/80 bg-background/55 p-0.5\">\n <Button\n className=\"h-7 min-h-7 rounded-md border-0 bg-transparent px-2.5 text-xs text-muted-foreground shadow-none hover:bg-destructive/10 hover:text-destructive\"\n disabled={props.disabled}\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onDecision(false)}\n >\n Reject\n </Button>\n <Button\n className=\"h-7 min-h-7 rounded-md px-2.5 text-xs\"\n disabled={props.disabled}\n size=\"sm\"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O,EAAa,OAAS,EAAI,EAAgB,GAAO,QAAQ,MAAM,EAAI,GAG5E,SAAS,EAAkB,EAAmC,CAC5D,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,iFAAf,EACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,2CAAf,EACE,EAAA,EAAA,KAAC,EAAD,CACE,UAAW,EACT,0FACA,EAAM,SAAS,SAAW,YAAc,kBACxC,EAAM,SAAS,SAAW,YAAc,mBACzC,UACF,WAEO,CAAA,EACR,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,oBACb,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,+CAAuC,EAAc,EAAM,SAAS,CAAO,CAAA,CACtF,CAAA,CACF,GACL,EAAM,SAAS,SAAW,IAAA,GAAY,MACrC,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,8EACZ,EAAM,SAAS,OACZ,CAAA,CAEJ,GAIV,SAAS,EAAoB,EAG1B,CACD,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,sGAAf,EACE,EAAA,EAAA,KAAC,EAAD,CACE,UAAU,iJACV,SAAU,EAAM,SAChB,KAAK,KACL,KAAK,SACL,QAAQ,QACR,YAAe,EAAM,WAAW,GAAM,UACvC,SAEQ,CAAA,EACT,EAAA,EAAA,KAAC,EAAD,CACE,UAAU,wCACV,SAAU,EAAM,SAChB,KAAK,KACL,KAAK,SACL,YAAe,EAAM,WAAW,GAAK,UACtC,UAEQ,CAAA,CACL"}
1
+ {"version":3,"file":"transcript-item-CsKPOoJ7.js","names":[],"sources":["../../../../../node_modules/.pnpm/@hugeicons+core-free-icons@4.2.2/node_modules/@hugeicons/core-free-icons/dist/esm/ChartBarLineIcon.js","../../../../../node_modules/.pnpm/@hugeicons+core-free-icons@4.2.2/node_modules/@hugeicons/core-free-icons/dist/esm/Copy01Icon.js","../../../../../node_modules/.pnpm/@hugeicons+core-free-icons@4.2.2/node_modules/@hugeicons/core-free-icons/dist/esm/CopyCheckIcon.js","../../../src/ui/app/modules/playground/transcript-item.tsx"],"sourcesContent":["const ChartBarLineIcon = [\n [\"path\", { d: \"M4 15L4 19\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"0\" }],\n [\"path\", { d: \"M12 9L12 19\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"1\" }],\n [\"path\", { d: \"M22 22L2 22\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"2\" }],\n [\"path\", { d: \"M20 13L20 19\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"3\" }],\n [\"path\", { d: \"M5.60009 8.79993C5.23521 8.31419 4.6543 8 4 8C2.89543 8 2 8.89543 2 10C2 11.1046 2.89543 12 4 12C5.10457 12 6 11.1046 6 10C6 9.54973 5.8512 9.13421 5.60009 8.79993ZM5.60009 8.79993L10.3999 5.20007M10.3999 5.20007C10.7648 5.68581 11.3457 6 12 6C12.783 6 13.4609 5.55006 13.7892 4.89462M10.3999 5.20007C10.1488 4.86579 10 4.45027 10 4C10 2.89543 10.8954 2 12 2C13.1046 2 14 2.89543 14 4C14 4.32158 13.9241 4.62543 13.7892 4.89462M13.7892 4.89462L18.2108 7.10538M18.2108 7.10538C18.0759 7.37457 18 7.67842 18 8C18 9.10457 18.8954 10 20 10C21.1046 10 22 9.10457 22 8C22 6.89543 21.1046 6 20 6C19.217 6 18.5391 6.44994 18.2108 7.10538Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", key: \"4\" }]\n];\n\nexport { ChartBarLineIcon as default };\n//# sourceMappingURL=ChartBarLineIcon.js.map\n","const Copy01Icon = [\n [\"path\", { d: \"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"0\" }],\n [\"path\", { d: \"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"1\" }]\n];\n\nexport { Copy01Icon as default };\n//# sourceMappingURL=Copy01Icon.js.map\n","const CopyCheckIcon = [\n [\"path\", { d: \"M11 10.6667C11 10.6667 11.75 10.6667 12.5 12C12.5 12 14.8824 8.66667 17 8\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"0\" }],\n [\"path\", { d: \"M7 11V9C7 5.70017 7 4.05025 8.02513 3.02513C9.05025 2 10.7002 2 14 2C17.2998 2 18.9497 2 19.9749 3.02513C21 4.05025 21 5.70017 21 9V11C21 14.2998 21 15.9497 19.9749 16.9749C18.9497 18 17.2998 18 14 18C10.7002 18 9.05025 18 8.02513 16.9749C7 15.9497 7 14.2998 7 11Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"1\" }],\n [\"path\", { d: \"M3 6V15C3 18.2998 3 19.9497 4.02513 20.9749C5.05025 22 6.70017 22 10 22H17\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", key: \"2\" }]\n];\n\nexport { CopyCheckIcon as default };\n//# sourceMappingURL=CopyCheckIcon.js.map\n","import {\n ChartBarLineIcon,\n Copy01Icon,\n CopyCheckIcon,\n PathIcon,\n Wrench01Icon,\n} from \"@hugeicons/core-free-icons\";\nimport { useState } from \"react\";\nimport { Badge } from \"../../components/ui/badge\";\nimport { Button } from \"../../components/ui/button\";\nimport { StudioIcon } from \"../../components/ui/icon\";\nimport { Textarea } from \"../../components/ui/textarea\";\nimport { cn } from \"../../lib/utils\";\nimport { approvalLabel } from \"../shared/format\";\nimport { MarkdownText, ToolPayload } from \"../shared/renderers\";\nimport type { ToolApproval, ToolMessage, ToolQuestion, TranscriptEntry } from \"../shared/types\";\nimport type { AssistantResponseMetrics, ResponseUsageMetrics } from \"./response-metrics\";\n\nexport function TranscriptItem(props: {\n entry: TranscriptEntry;\n metrics?: AssistantResponseMetrics | undefined;\n decidingApprovals: Set<string>;\n answeringQuestions: Set<string>;\n onApprovalDecision: (approvalId: string, approved: boolean) => void;\n onQuestionAnswer: (\n questionId: string,\n answers: Array<{ questionId: string; answer: string; choice?: string; custom?: boolean }>,\n ) => void;\n onOpenTrace: (traceId: string) => void;\n}) {\n if (props.entry.kind === \"reasoning\") {\n return (\n <article\n className=\"max-w-205 justify-self-start text-muted-foreground\"\n data-entry-id={String(props.entry.entryId)}\n >\n <div className=\"mb-1 text-xs font-semibold uppercase text-muted-foreground\">Reasoning</div>\n <MarkdownText size=\"base\" text={props.entry.text} />\n </article>\n );\n }\n\n if (props.entry.kind === \"tool\") {\n return (\n <ToolEntry\n entry={props.entry}\n decidingApprovals={props.decidingApprovals}\n answeringQuestions={props.answeringQuestions}\n onApprovalDecision={props.onApprovalDecision}\n onQuestionAnswer={props.onQuestionAnswer}\n />\n );\n }\n\n const traceId = props.entry.role === \"assistant\" ? props.entry.traceId : undefined;\n const hasTable = props.entry.role === \"assistant\" && hasMarkdownTable(props.entry.text);\n const isError =\n props.entry.role === \"assistant\" && \"tone\" in props.entry && props.entry.tone === \"error\";\n const isPending =\n props.entry.role === \"assistant\" && \"tone\" in props.entry && props.entry.tone === \"pending\";\n const showAssistantActions =\n props.entry.role === \"assistant\" && !isPending && props.entry.text.trim().length > 0;\n\n if (props.entry.role === \"user\") {\n return (\n <article\n className=\"grid w-fit max-w-[min(64ch,82%)] justify-items-end justify-self-end self-start text-foreground\"\n data-entry-id={String(props.entry.entryId)}\n >\n {props.entry.text.trim().length === 0 ? null : (\n <div className=\"rounded-2xl bg-muted/55 px-4 py-2.5 shadow-sm shadow-black/[0.04] dark:bg-white/[0.08] dark:shadow-black/20\">\n <MarkdownText size=\"base\" text={props.entry.text} />\n </div>\n )}\n {props.entry.attachments !== undefined ? (\n <MessageAttachments attachments={props.entry.attachments} />\n ) : null}\n </article>\n );\n }\n\n return (\n <article\n className={cn(\n \"self-start\",\n hasTable ? \"w-full max-w-full\" : \"max-w-[min(82ch,100%)]\",\n props.entry.role === \"assistant\" &&\n cn(\"justify-self-start text-foreground\", isError && \"text-destructive\"),\n )}\n data-entry-id={String(props.entry.entryId)}\n >\n {isPending ? <AssistantLoadingIndicator /> : null}\n {props.entry.text.trim().length === 0 ? null : (\n <MarkdownText size=\"base\" text={props.entry.text} />\n )}\n {showAssistantActions ? (\n <AssistantResponseActions\n metrics={props.metrics}\n text={props.entry.text}\n traceId={traceId}\n onOpenTrace={props.onOpenTrace}\n />\n ) : null}\n </article>\n );\n}\n\nfunction AssistantResponseActions(props: {\n metrics?: AssistantResponseMetrics | undefined;\n text: string;\n traceId?: string | undefined;\n onOpenTrace: (traceId: string) => void;\n}) {\n const [copied, setCopied] = useState(false);\n const traceId = props.traceId;\n\n async function copyResponse() {\n if (typeof navigator === \"undefined\" || navigator.clipboard === undefined) {\n return;\n }\n try {\n await navigator.clipboard.writeText(props.text);\n setCopied(true);\n window.setTimeout(() => setCopied(false), 1200);\n } catch {\n setCopied(false);\n }\n }\n\n return (\n <div className=\"mt-3 flex min-w-0 items-center gap-1.5\">\n <Button\n aria-label={copied ? \"Response copied\" : \"Copy response\"}\n className=\"h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground\"\n title={copied ? \"Copied\" : \"Copy response\"}\n type=\"button\"\n variant=\"ghost\"\n onClick={() => void copyResponse()}\n >\n <StudioIcon icon={copied ? CopyCheckIcon : Copy01Icon} aria-hidden=\"true\" />\n </Button>\n <div className=\"group relative\">\n <Button\n aria-label=\"Response metrics\"\n className=\"h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground\"\n title={metricsTitle(props.metrics)}\n type=\"button\"\n variant=\"ghost\"\n >\n <StudioIcon icon={ChartBarLineIcon} aria-hidden=\"true\" />\n </Button>\n <div\n className=\"pointer-events-none absolute left-0 top-full z-30 mt-2 hidden w-64 rounded-lg border border-border/90 bg-popover p-3 text-popover-foreground shadow-xl shadow-black/25 group-focus-within:grid group-hover:grid\"\n role=\"tooltip\"\n >\n <ResponseMetricsTooltip metrics={props.metrics} />\n </div>\n </div>\n {traceId === undefined ? null : (\n <Button\n aria-label={`Open trace ${traceId}`}\n className=\"h-8 min-h-8 w-8 rounded-lg border border-border/70 bg-muted/30 p-0 text-muted-foreground shadow-none hover:border-border hover:bg-muted/55 hover:text-foreground\"\n title={`Open trace ${traceId}`}\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onOpenTrace(traceId)}\n >\n <StudioIcon icon={PathIcon} aria-hidden=\"true\" />\n </Button>\n )}\n </div>\n );\n}\n\nfunction ResponseMetricsTooltip(props: { metrics?: AssistantResponseMetrics | undefined }) {\n const rows = responseMetricRows(props.metrics);\n return (\n <div className=\"grid min-w-0 gap-2 text-xs leading-5\">\n <div className=\"font-semibold text-foreground\">Response metrics</div>\n <div className=\"grid min-w-0 gap-1\">\n <MetricRow label=\"Cost\" value=\"Unavailable\" />\n {rows.length === 0 ? (\n <div className=\"text-muted-foreground\">No usage metrics yet</div>\n ) : (\n rows.map((row) => <MetricRow label={row.label} value={row.value} key={row.label} />)\n )}\n </div>\n </div>\n );\n}\n\nfunction MetricRow(props: { label: string; value: string }) {\n return (\n <div className=\"flex min-w-0 items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">{props.label}</span>\n <span className=\"shrink-0 font-medium tabular-nums text-foreground\">{props.value}</span>\n </div>\n );\n}\n\nfunction responseMetricRows(metrics: AssistantResponseMetrics | undefined): Array<{\n label: string;\n value: string;\n}> {\n const rows: Array<{ label: string; value: string }> = [];\n const usage = metrics?.usage;\n if (usage?.totalTokens !== undefined) {\n rows.push({ label: \"Total\", value: `${formatMetricNumber(usage.totalTokens)} tokens` });\n }\n if (usage?.inputTokens !== undefined) {\n rows.push({ label: \"Input\", value: formatMetricNumber(usage.inputTokens) });\n }\n if (usage?.outputTokens !== undefined) {\n rows.push({ label: \"Output\", value: formatMetricNumber(usage.outputTokens) });\n }\n pushOptionalUsageRow(rows, \"Cached\", usage, \"cachedInputTokens\");\n pushOptionalUsageRow(rows, \"Cache create\", usage, \"cacheCreationInputTokens\");\n if (metrics?.durationMs !== undefined) {\n rows.push({ label: \"Duration\", value: formatResponseDuration(metrics.durationMs) });\n }\n return rows;\n}\n\nfunction pushOptionalUsageRow(\n rows: Array<{ label: string; value: string }>,\n label: string,\n usage: ResponseUsageMetrics | undefined,\n key: keyof ResponseUsageMetrics,\n) {\n const value = usage?.[key];\n if (value !== undefined && value > 0) {\n rows.push({ label, value: formatMetricNumber(value) });\n }\n}\n\nfunction metricsTitle(metrics: AssistantResponseMetrics | undefined): string {\n const rows = responseMetricRows(metrics);\n if (rows.length === 0) {\n return \"Cost unavailable. No usage metrics yet.\";\n }\n return [\"Cost unavailable\", ...rows.map((row) => `${row.label}: ${row.value}`)].join(\". \");\n}\n\nfunction formatMetricNumber(value: number): string {\n return value.toLocaleString();\n}\n\nfunction formatResponseDuration(value: number): string {\n if (value < 1000) {\n return `${value}ms`;\n }\n return `${(value / 1000).toFixed(1)}s`;\n}\n\nfunction AssistantLoadingIndicator() {\n return (\n <div\n aria-label=\"Assistant is responding\"\n className=\"inline-flex h-9 min-h-9 items-center gap-2 rounded-xl border border-border/70 bg-muted/35 px-3 text-muted-foreground shadow-sm\"\n role=\"status\"\n >\n <span className=\"flex items-center gap-1\" aria-hidden=\"true\">\n <span className=\"h-1.5 w-1.5 animate-pulse rounded-full bg-foreground\" />\n <span className=\"h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:150ms]\" />\n <span className=\"h-1.5 w-1.5 animate-pulse rounded-full bg-foreground [animation-delay:300ms]\" />\n </span>\n <span className=\" text-xs font-semibold uppercase text-muted-foreground\">Thinking</span>\n </div>\n );\n}\n\nfunction MessageAttachments(props: {\n attachments: NonNullable<Extract<TranscriptEntry, { kind: \"message\" }>[\"attachments\"]>;\n}) {\n return (\n <div className=\"mt-2 flex max-w-full flex-wrap gap-2\">\n {props.attachments.map((attachment, index) => {\n const key = `${attachment.kind}-${attachment.name ?? attachment.mediaType ?? index}-${index}`;\n if (attachment.kind === \"image\") {\n const src =\n attachment.url ??\n (attachment.data === undefined\n ? undefined\n : `data:${attachment.mediaType ?? \"image/png\"};base64,${attachment.data}`);\n return (\n <div\n className=\"overflow-hidden rounded-lg border border-border/80 bg-card/80\"\n key={key}\n >\n {src === undefined ? (\n <div className=\"grid h-20 w-24 place-items-center px-2 text-center text-xs text-muted-foreground\">\n Image\n </div>\n ) : (\n <img\n alt={attachment.name ?? \"Attached image\"}\n className=\"h-20 w-24 object-cover\"\n src={src}\n />\n )}\n </div>\n );\n }\n return (\n <span\n className=\"inline-flex max-w-full items-center gap-1.5 rounded-lg border border-border/80 bg-card/80 px-2 py-1 text-xs font-medium text-muted-foreground\"\n key={key}\n >\n <span className=\"min-w-0 truncate\">\n {attachment.name ?? attachment.mediaType ?? \"Document\"}\n </span>\n </span>\n );\n })}\n </div>\n );\n}\n\nfunction hasMarkdownTable(text: string): boolean {\n const lines = text.split(\"\\n\");\n return lines.some((line, index) => {\n const next = lines[index + 1];\n return (\n line.includes(\"|\") &&\n next !== undefined &&\n /^\\s*\\|?\\s*:?-{3,}:?\\s*(\\|\\s*:?-{3,}:?\\s*)+\\|?\\s*$/.test(next)\n );\n });\n}\n\nfunction ToolEntry(props: {\n entry: ToolMessage;\n decidingApprovals: Set<string>;\n answeringQuestions: Set<string>;\n onApprovalDecision: (approvalId: string, approved: boolean) => void;\n onQuestionAnswer: (\n questionId: string,\n answers: Array<{ questionId: string; answer: string; choice?: string; custom?: boolean }>,\n ) => void;\n}) {\n const [collapsed, setCollapsed] = useState(\n props.entry.approval?.status !== \"pending\" && props.entry.question?.status !== \"pending\",\n );\n const approval = props.entry.approval;\n const question = props.entry.question;\n const childEvents = props.entry.childEvents ?? [];\n const hasPayload =\n props.entry.args !== undefined ||\n props.entry.result !== undefined ||\n childEvents.length > 0 ||\n approval !== undefined ||\n question !== undefined;\n const pendingApproval = approval?.status === \"pending\";\n const pendingQuestion = question?.status === \"pending\";\n const deciding = approval !== undefined && props.decidingApprovals.has(approval.id);\n const answering = question !== undefined && props.answeringQuestions.has(question.id);\n\n return (\n <article\n className=\"w-full justify-self-start overflow-hidden rounded-xl border border-border/80 bg-card/90 text-foreground shadow-sm shadow-black/20\"\n data-entry-id={String(props.entry.entryId)}\n >\n <div\n className={cn(\n \"flex min-w-0 items-center gap-2 px-3 py-2.5\",\n !collapsed && hasPayload && \"bg-muted/20\",\n )}\n >\n <Button\n aria-expanded={!collapsed}\n className=\"h-auto min-h-0 min-w-0 flex-1 justify-between border-0 bg-transparent p-0 text-left text-inherit shadow-none hover:bg-transparent hover:text-inherit\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setCollapsed((current) => !current)}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <span className=\"grid h-6 w-4 shrink-0 place-items-center text-foreground\">\n <StudioIcon icon={Wrench01Icon} className=\"h-3.5 w-3.5\" aria-hidden=\"true\" />\n </span>\n <strong className=\"min-w-0 truncate text-sm font-semibold text-foreground\">\n {props.entry.toolName}\n </strong>\n </span>\n {pendingApproval ? null : (\n <span className=\"ml-auto shrink-0 text-xs font-medium text-muted-foreground\">\n {collapsed ? \"Show\" : \"Hide\"}\n </span>\n )}\n </Button>\n {pendingApproval && approval !== undefined ? (\n <ToolApprovalActions\n disabled={deciding}\n onDecision={(approved) => props.onApprovalDecision(approval.id, approved)}\n />\n ) : null}\n {pendingQuestion ? (\n <Badge className=\"border-border/70 bg-muted/45 px-1.5 py-0.5 text-xs uppercase text-foreground\">\n Waiting for input\n </Badge>\n ) : null}\n {pendingApproval || pendingQuestion ? (\n <Button\n aria-expanded={!collapsed}\n className=\"h-7 min-h-7 px-2 text-xs font-medium\"\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => setCollapsed((current) => !current)}\n >\n {collapsed ? \"Show\" : \"Hide\"}\n </Button>\n ) : null}\n </div>\n {collapsed || !hasPayload ? null : (\n <div className=\"grid gap-3 p-3\">\n {approval === undefined ? null : <ToolApprovalPanel approval={approval} />}\n {question === undefined ? null : (\n <ToolQuestionPanel\n disabled={answering}\n question={question}\n onAnswer={(answers) => props.onQuestionAnswer(question.id, answers)}\n />\n )}\n {question !== undefined || props.entry.args === undefined ? null : (\n <ToolPayload title=\"Input\" value={props.entry.args} />\n )}\n {childEvents.length === 0 ? null : <ChildAgentActivity events={childEvents} />}\n {question !== undefined || props.entry.result === undefined ? null : (\n <ToolPayload title=\"Output\" value={props.entry.result} />\n )}\n </div>\n )}\n </article>\n );\n}\n\nfunction ChildAgentActivity(props: { events: NonNullable<ToolMessage[\"childEvents\"]> }) {\n return (\n <div className=\"overflow-hidden rounded-xl border border-border/80 bg-background/65\">\n <div className=\"bg-muted/20 px-3 py-2 text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground\">\n Subagent activity\n </div>\n <div className=\"grid gap-3 p-3\">\n {props.events.map((event) => {\n const agentLabel = event.agentName ?? event.agentId;\n if (event.kind === \"message\" || event.kind === \"reasoning\") {\n return (\n <div\n className=\"grid gap-1 rounded-xl border border-border/80 bg-card/90 p-3\"\n key={`${event.kind}-${event.agentId}-${event.text}`}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n <Badge className=\"border-border bg-muted px-1.5 py-0.5 text-xs uppercase text-muted-foreground\">\n {event.kind === \"reasoning\" ? \"Reasoning\" : \"Response\"}\n </Badge>\n <span className=\"min-w-0 truncate text-xs font-semibold text-muted-foreground\">\n {agentLabel}\n </span>\n </div>\n <MarkdownText size=\"base\" text={event.text} />\n </div>\n );\n }\n return (\n <div\n className=\"grid gap-2 rounded-xl border border-border/80 bg-card/90 p-3\"\n key={`${event.kind}-${event.agentId}-${event.toolName}-${event.callId ?? event.args ?? event.result ?? \"\"}`}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n <Badge className=\"border-border/70 bg-muted/45 px-1.5 py-0.5 text-xs uppercase text-foreground\">\n Tool\n </Badge>\n <span className=\"min-w-0 truncate text-xs font-semibold text-muted-foreground\">\n {agentLabel} / {event.toolName}\n </span>\n </div>\n {event.args === undefined ? null : <ToolPayload title=\"Input\" value={event.args} />}\n {event.result === undefined ? null : (\n <ToolPayload title=\"Output\" value={event.result} />\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nfunction ToolQuestionPanel(props: {\n question: ToolQuestion;\n disabled: boolean;\n onAnswer: (\n answers: Array<{ questionId: string; answer: string; choice?: string; custom?: boolean }>,\n ) => void;\n}) {\n const [values, setValues] = useState<Record<string, QuestionDraft>>({});\n const [activeQuestionIndex, setActiveQuestionIndex] = useState(0);\n const pending = props.question.status === \"pending\";\n const total = props.question.questions.length;\n\n const answers = props.question.questions.map((question) => {\n const draft = values[question.id];\n const customAnswer = draft?.customValue?.trim() ?? \"\";\n const answer = customAnswer.length > 0 ? customAnswer : draft?.answer;\n return {\n questionId: question.id,\n answer: answer?.trim() ?? \"\",\n ...(draft?.choice === undefined ? {} : { choice: draft.choice }),\n ...(customAnswer.length > 0 ? { custom: true } : {}),\n };\n });\n const activeIndex = total === 0 ? 0 : Math.min(activeQuestionIndex, total - 1);\n const activeQuestion = props.question.questions[activeIndex];\n const activeAnswer = answers[activeIndex]?.answer ?? \"\";\n const answeredCount = answers.filter((answer) => answer.answer.length > 0).length;\n const canAdvance = activeAnswer.length > 0;\n const canSubmit = pending && answers.every((answer) => answer.answer.length > 0);\n const firstQuestion = activeIndex === 0;\n const lastQuestion = activeIndex >= total - 1;\n\n if (activeQuestion === undefined) {\n return (\n <div className=\"rounded-xl border border-border bg-background p-4 text-sm font-medium text-muted-foreground\">\n No questions\n </div>\n );\n }\n\n const goPrevious = () => setActiveQuestionIndex((current) => Math.max(0, current - 1));\n const goNext = () =>\n setActiveQuestionIndex((current) => Math.min(props.question.questions.length - 1, current + 1));\n const updateDraft = (questionId: string, value: QuestionDraft) =>\n setValues((current) => ({\n ...current,\n [questionId]: value,\n }));\n\n return (\n <div className=\"grid gap-3\">\n <QuestionPromptControl\n key={activeQuestion.id}\n disabled={props.disabled || !pending}\n index={activeIndex}\n total={total}\n question={activeQuestion}\n value={values[activeQuestion.id]}\n answer={props.question.answers?.find((answer) => answer.questionId === activeQuestion.id)}\n onChange={(value) => updateDraft(activeQuestion.id, value)}\n {...(lastQuestion ? {} : { onAdvance: goNext })}\n />\n {pending ? (\n <div className=\"flex min-w-0 items-center justify-between gap-3 rounded-xl bg-muted/20 px-3 py-2\">\n <div className=\"min-w-0 text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground\">\n {answeredCount}/{total} answered\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {firstQuestion ? null : (\n <Button type=\"button\" variant=\"secondary\" onClick={goPrevious}>\n Back\n </Button>\n )}\n {lastQuestion ? (\n <Button\n className=\"h-9 min-h-9 px-4\"\n disabled={props.disabled || !canSubmit}\n type=\"button\"\n onClick={() => props.onAnswer(answers)}\n >\n Submit answers\n </Button>\n ) : (\n <Button\n className=\"h-9 min-h-9 px-4\"\n disabled={props.disabled || !canAdvance}\n type=\"button\"\n onClick={goNext}\n >\n Next question\n </Button>\n )}\n </div>\n </div>\n ) : total > 1 ? (\n <div className=\"flex min-w-0 items-center justify-between gap-3 rounded-xl bg-muted/20 px-3 py-2\">\n <div className=\"min-w-0 text-xs font-semibold uppercase tracking-[0.2em] text-foreground\">\n Answered\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n <Button disabled={firstQuestion} type=\"button\" variant=\"secondary\" onClick={goPrevious}>\n Back\n </Button>\n <Button disabled={lastQuestion} type=\"button\" variant=\"secondary\" onClick={goNext}>\n Next\n </Button>\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\ntype QuestionDraft = {\n answer?: string;\n choice?: string;\n customValue?: string;\n};\n\nfunction QuestionPromptControl(props: {\n question: ToolQuestion[\"questions\"][number];\n value: QuestionDraft | undefined;\n answer: NonNullable<ToolQuestion[\"answers\"]>[number] | undefined;\n disabled: boolean;\n index: number;\n total: number;\n onChange: (value: QuestionDraft) => void;\n onAdvance?: () => void;\n}) {\n const submittedAnswer = props.answer?.answer;\n const draftAnswer = questionDraftAnswer(props.value);\n const state =\n submittedAnswer !== undefined ? \"Answered\" : draftAnswer.length > 0 ? \"Ready\" : \"Waiting\";\n\n return (\n <section className=\"grid gap-4 rounded-xl border border-border/80 bg-background/70 p-4\">\n <div className=\"flex min-w-0 items-start justify-between gap-4\">\n <div className=\"grid min-w-0 gap-2\">\n <div className=\" text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground\">\n Question {props.index + 1} of {props.total}\n </div>\n <h3 className=\"m-0 text-base font-semibold leading-7 text-foreground [overflow-wrap:anywhere]\">\n {props.question.question}\n </h3>\n </div>\n <span\n className={cn(\n \"shrink-0 text-xs font-semibold uppercase tracking-[0.18em]\",\n state === \"Answered\" && \"text-foreground\",\n state === \"Ready\" && \"text-foreground\",\n state === \"Waiting\" && \"text-muted-foreground\",\n )}\n >\n {state}\n </span>\n </div>\n {submittedAnswer === undefined ? null : (\n <div className=\"rounded-lg border border-border/70 bg-muted/45 px-3 py-2 text-sm font-medium text-foreground\">\n {submittedAnswer}\n </div>\n )}\n {submittedAnswer !== undefined ? null : props.question.choices.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {props.question.choices.map((choice) => {\n const active = props.value?.choice === choice.value;\n return (\n <Button\n key={choice.value}\n className={cn(\"h-8 min-h-8 px-3 text-xs\", active && \"border-foreground/45\")}\n disabled={props.disabled}\n size=\"sm\"\n type=\"button\"\n variant={active ? \"default\" : \"secondary\"}\n onClick={() => {\n props.onChange({\n answer: choice.value,\n choice: choice.value,\n customValue: props.value?.customValue ?? \"\",\n });\n props.onAdvance?.();\n }}\n >\n {choice.label}\n </Button>\n );\n })}\n </div>\n ) : null}\n {submittedAnswer !== undefined ? null : (\n <Textarea\n className=\"min-h-24 text-sm\"\n disabled={props.disabled}\n placeholder=\"Type a custom answer\"\n rows={3}\n value={props.value?.customValue ?? \"\"}\n onChange={(event) =>\n props.onChange({\n ...props.value,\n customValue: event.currentTarget.value,\n })\n }\n />\n )}\n </section>\n );\n}\n\nfunction questionDraftAnswer(value: QuestionDraft | undefined): string {\n const customAnswer = value?.customValue?.trim() ?? \"\";\n return customAnswer.length > 0 ? customAnswer : (value?.answer?.trim() ?? \"\");\n}\n\nfunction ToolApprovalPanel(props: { approval: ToolApproval }) {\n return (\n <div className=\"grid gap-2 rounded-xl border border-border/70 bg-muted/25 px-3 py-2.5\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <Badge\n className={cn(\n \"border-border/70 bg-background/60 px-1.5 py-0.5 text-xs uppercase text-muted-foreground\",\n props.approval.status === \"approved\" && \"text-foreground\",\n props.approval.status === \"rejected\" && \"text-destructive\",\n )}\n >\n Approval\n </Badge>\n <div className=\"min-w-0\">\n <div className=\"text-sm font-medium text-foreground\">{approvalLabel(props.approval)}</div>\n </div>\n </div>\n {props.approval.reason === undefined ? null : (\n <div className=\"text-xs font-medium text-muted-foreground [overflow-wrap:anywhere]\">\n {props.approval.reason}\n </div>\n )}\n </div>\n );\n}\n\nfunction ToolApprovalActions(props: {\n disabled: boolean;\n onDecision: (approved: boolean) => void;\n}) {\n return (\n <div className=\"flex shrink-0 items-center gap-1 rounded-lg border border-border/80 bg-background/55 p-0.5\">\n <Button\n className=\"h-7 min-h-7 rounded-md border-0 bg-transparent px-2.5 text-xs text-muted-foreground shadow-none hover:bg-destructive/10 hover:text-destructive\"\n disabled={props.disabled}\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onDecision(false)}\n >\n Reject\n </Button>\n <Button\n className=\"h-7 min-h-7 rounded-md px-2.5 text-xs\"\n disabled={props.disabled}\n size=\"sm\"\n type=\"button\"\n onClick={() => props.onDecision(true)}\n >\n Approve\n </Button>\n </div>\n );\n}\n"],"x_google_ignoreList":[0,1,2],"mappings":"ySAAA,IAAM,EAAmB,CACvB,CAAC,OAAQ,CAAE,EAAG,aAAc,OAAQ,eAAgB,cAAe,QAAS,eAAgB,QAAS,YAAa,MAAO,IAAK,IAAK,CAAC,CACpI,CAAC,OAAQ,CAAE,EAAG,cAAe,OAAQ,eAAgB,cAAe,QAAS,eAAgB,QAAS,YAAa,MAAO,IAAK,IAAK,CAAC,CACrI,CAAC,OAAQ,CAAE,EAAG,cAAe,OAAQ,eAAgB,cAAe,QAAS,eAAgB,QAAS,YAAa,MAAO,IAAK,IAAK,CAAC,CACrI,CAAC,OAAQ,CAAE,EAAG,eAAgB,OAAQ,eAAgB,cAAe,QAAS,eAAgB,QAAS,YAAa,MAAO,IAAK,IAAK,CAAC,CACtI,CAAC,OAAQ,CAAE,EAAG,ynBAA0nB,OAAQ,eAAgB,YAAa,MAAO,IAAK,IAAK,CAAC,CAChsB,CCNK,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,uRAAwR,OAAQ,eAAgB,cAAe,QAAS,eAAgB,QAAS,YAAa,MAAO,IAAK,IAAK,CAAC,CAC9Y,CAAC,OAA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,CAAA,EACT,EAAA,EAAA,KAAC,EAAD,CACE,UAAU,wCACV,SAAU,EAAM,SAChB,KAAK,KACL,KAAK,SACL,YAAe,EAAM,WAAW,GAAK,UACtC,UAEQ,CAAA,CACL"}
@@ -9,7 +9,7 @@
9
9
  content="Professional Studio interface for Anvia agents, sessions, tools, knowledge, and traces."
10
10
  />
11
11
  <link rel="icon" type="image/png" href="/ui/assets/anvia.png" />
12
- <script type="module" crossorigin src="/ui/assets/index-NsFU1TN1.js"></script>
12
+ <script type="module" crossorigin src="/ui/assets/index-Bc7sqnn5.js"></script>
13
13
  <link rel="modulepreload" crossorigin href="/ui/assets/utils-BN2yP0LH.js">
14
14
  <link rel="modulepreload" crossorigin href="/ui/assets/format-C9HPGfkW.js">
15
15
  <link rel="stylesheet" crossorigin href="/ui/assets/index-Dl647xDC.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anvia/studio",
3
- "version": "0.7.22",
3
+ "version": "0.7.23",
4
4
  "description": "Studio UI and HTTP runtime for Anvia agents.",
5
5
  "author": "anvia",
6
6
  "maintainer": "Indra Zulfi",
@@ -44,8 +44,8 @@
44
44
  "react-dom": "^19.2.7",
45
45
  "react-markdown": "^10.1.0",
46
46
  "tailwind-merge": "^3.6.0",
47
- "@anvia/react": "0.8.1",
48
- "@anvia/server": "0.5.1"
47
+ "@anvia/server": "0.5.2",
48
+ "@anvia/react": "0.8.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@tailwindcss/typography": "^0.5.19",
@@ -61,7 +61,7 @@
61
61
  "vite": "^8.0.10",
62
62
  "vitest": "^4.0.8",
63
63
  "zod": "^4.4.3",
64
- "@anvia/core": "0.12.4"
64
+ "@anvia/core": "0.12.5"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@anvia/core": ">=0.7.1 <1.0.0"