@seed-ship/mcp-ui-solid 4.0.6 → 4.2.0

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 (73) hide show
  1. package/dist/components/AgentCard.cjs +122 -0
  2. package/dist/components/AgentCard.cjs.map +1 -0
  3. package/dist/components/AgentCard.d.ts +20 -0
  4. package/dist/components/AgentCard.d.ts.map +1 -0
  5. package/dist/components/AgentCard.js +122 -0
  6. package/dist/components/AgentCard.js.map +1 -0
  7. package/dist/components/AgentHandoff.cjs +49 -0
  8. package/dist/components/AgentHandoff.cjs.map +1 -0
  9. package/dist/components/AgentHandoff.d.ts +12 -0
  10. package/dist/components/AgentHandoff.d.ts.map +1 -0
  11. package/dist/components/AgentHandoff.js +49 -0
  12. package/dist/components/AgentHandoff.js.map +1 -0
  13. package/dist/components/BriefingDiff.cjs +165 -0
  14. package/dist/components/BriefingDiff.cjs.map +1 -0
  15. package/dist/components/BriefingDiff.d.ts +12 -0
  16. package/dist/components/BriefingDiff.d.ts.map +1 -0
  17. package/dist/components/BriefingDiff.js +165 -0
  18. package/dist/components/BriefingDiff.js.map +1 -0
  19. package/dist/components/FormFieldRenderer.cjs +314 -264
  20. package/dist/components/FormFieldRenderer.cjs.map +1 -1
  21. package/dist/components/FormFieldRenderer.d.ts.map +1 -1
  22. package/dist/components/FormFieldRenderer.js +315 -265
  23. package/dist/components/FormFieldRenderer.js.map +1 -1
  24. package/dist/components/FormRenderer.cjs +74 -17
  25. package/dist/components/FormRenderer.cjs.map +1 -1
  26. package/dist/components/FormRenderer.d.ts.map +1 -1
  27. package/dist/components/FormRenderer.js +76 -19
  28. package/dist/components/FormRenderer.js.map +1 -1
  29. package/dist/components/ScratchpadPanel.cjs +618 -411
  30. package/dist/components/ScratchpadPanel.cjs.map +1 -1
  31. package/dist/components/ScratchpadPanel.d.ts.map +1 -1
  32. package/dist/components/ScratchpadPanel.js +619 -412
  33. package/dist/components/ScratchpadPanel.js.map +1 -1
  34. package/dist/components/SplitStepper.cjs +121 -0
  35. package/dist/components/SplitStepper.cjs.map +1 -0
  36. package/dist/components/SplitStepper.d.ts +12 -0
  37. package/dist/components/SplitStepper.d.ts.map +1 -0
  38. package/dist/components/SplitStepper.js +121 -0
  39. package/dist/components/SplitStepper.js.map +1 -0
  40. package/dist/components/index.d.ts +8 -0
  41. package/dist/components/index.d.ts.map +1 -1
  42. package/dist/components.cjs +9 -0
  43. package/dist/components.cjs.map +1 -1
  44. package/dist/components.d.cts +8 -0
  45. package/dist/components.d.ts +8 -0
  46. package/dist/components.js +9 -0
  47. package/dist/components.js.map +1 -1
  48. package/dist/index.cjs +9 -0
  49. package/dist/index.cjs.map +1 -1
  50. package/dist/index.d.cts +9 -1
  51. package/dist/index.d.ts +9 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +9 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/types/chat-bus.d.ts +81 -1
  56. package/dist/types/chat-bus.d.ts.map +1 -1
  57. package/dist/types/index.d.ts +15 -0
  58. package/dist/types/index.d.ts.map +1 -1
  59. package/dist/types.d.cts +15 -0
  60. package/dist/types.d.ts +15 -0
  61. package/package.json +1 -1
  62. package/src/components/AgentCard.tsx +109 -0
  63. package/src/components/AgentHandoff.tsx +64 -0
  64. package/src/components/BriefingDiff.tsx +93 -0
  65. package/src/components/FormFieldRenderer.tsx +35 -4
  66. package/src/components/FormRenderer.tsx +74 -4
  67. package/src/components/ScratchpadPanel.tsx +131 -49
  68. package/src/components/SplitStepper.tsx +111 -0
  69. package/src/components/index.ts +13 -0
  70. package/src/index.ts +15 -0
  71. package/src/types/chat-bus.ts +70 -1
  72. package/src/types/index.ts +18 -0
  73. package/tsconfig.tsbuildinfo +1 -1
@@ -1,13 +1,17 @@
1
- import { delegateEvents, getNextElement, template, getNextMarker, insert, createComponent, effect, setAttribute, runHydrationEvents, memo, className, setStyleProperty, mergeProps, setProperty } from "solid-js/web";
1
+ import { delegateEvents, getNextElement, template, getNextMarker, insert, createComponent, effect, setAttribute, runHydrationEvents, memo, className, setStyleProperty, mergeProps, setProperty, classList, addEventListener } from "solid-js/web";
2
2
  import { createSignal, createEffect, onCleanup, Show, For, Switch, Match } from "solid-js";
3
3
  import { FormFieldRenderer } from "./FormFieldRenderer.js";
4
4
  import { VerifiedText } from "./VerifiedText.js";
5
5
  import { DataPreviewSection } from "./DataPreviewSection.js";
6
6
  import { MapRenderer } from "./MapRenderer.js";
7
7
  import { ChartJSRenderer } from "./ChartJSRenderer.js";
8
- var _tmpl$ = /* @__PURE__ */ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M19 9l-7 7-7-7">`), _tmpl$2 = /* @__PURE__ */ template(`<button class="p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"aria-label=Close><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">`), _tmpl$3 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-100 dark:border-gray-700 flex flex-wrap items-center gap-1.5">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700 space-y-2">`), _tmpl$5 = /* @__PURE__ */ template(`<div class="flex flex-col items-center gap-2 py-4 text-center"><span class=text-2xl>&#128269;</span><p class="text-sm text-gray-500 dark:text-gray-400">No results for these filters</p><button type=button class="px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors">Modify filters`), _tmpl$6 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700">`), _tmpl$7 = /* @__PURE__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-0.5">Code: <!$><!/>`), _tmpl$8 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors flex items-center gap-1">&#128260; Retry`), _tmpl$9 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">Close`), _tmpl$0 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-red-100 dark:border-red-900/30 bg-red-50 dark:bg-red-900/10"><div class="flex items-start gap-2 text-sm text-red-700 dark:text-red-400"><span class="flex-shrink-0 mt-0.5">⚠️</span><div class=flex-1><p class=font-medium></p><!$><!/></div></div><div class="flex gap-2 mt-2"><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700"><button type=button class="w-full px-4 py-2.5 text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors flex items-center justify-center gap-2"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Search`), _tmpl$10 = /* @__PURE__ */ template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ template(`<div class="absolute bottom-1 right-1 px-2 py-1 text-[9px] font-mono bg-black/80 text-green-400 rounded z-50 pointer-events-none"><!$><!/> | ev:<!$><!/> | sec:<!$><!/> | <!$><!/> | last:<!$><!/>`), _tmpl$12 = /* @__PURE__ */ template(`<div style="animation:scratchpad-slide-down 0.2s ease-out"><div><div class="flex items-center gap-2"><span class=text-base>&#128221;</span><h3 class="text-sm font-semibold text-gray-900 dark:text-white"></h3><!$><!/></div><div class="flex items-center gap-2"><span></span><!$><!/></div></div><!$><!/><style>
8
+ import { AgentStatusBadge, AgentCard } from "./AgentCard.js";
9
+ import { SplitStepper } from "./SplitStepper.js";
10
+ import { AgentHandoff } from "./AgentHandoff.js";
11
+ import { BriefingDiff } from "./BriefingDiff.js";
12
+ var _tmpl$ = /* @__PURE__ */ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M19 9l-7 7-7-7">`), _tmpl$2 = /* @__PURE__ */ template(`<button class="p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"aria-label=Close><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">`), _tmpl$3 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-100 dark:border-gray-700 flex flex-wrap items-center gap-1.5">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700 space-y-2">`), _tmpl$5 = /* @__PURE__ */ template(`<div class="flex flex-col items-center gap-2 py-4 text-center"><span class=text-2xl>&#128269;</span><p class="text-sm text-gray-500 dark:text-gray-400">No results for these filters</p><button type=button class="px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors">Modify filters`), _tmpl$6 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700">`), _tmpl$7 = /* @__PURE__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-0.5">Code: <!$><!/>`), _tmpl$8 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors flex items-center gap-1">&#128260; Retry`), _tmpl$9 = /* @__PURE__ */ template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">Close`), _tmpl$0 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-red-100 dark:border-red-900/30 bg-red-50 dark:bg-red-900/10"><div class="flex items-start gap-2 text-sm text-red-700 dark:text-red-400"><span class="flex-shrink-0 mt-0.5">⚠️</span><div class=flex-1><p class=font-medium></p><!$><!/></div></div><div class="flex gap-2 mt-2"><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700"><button type=button class="w-full px-4 py-2.5 text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors flex items-center justify-center gap-2"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Search`), _tmpl$10 = /* @__PURE__ */ template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ template(`<div class="absolute bottom-1 right-1 px-2 py-1 text-[9px] font-mono bg-black/80 text-green-400 rounded z-50 pointer-events-none"><!$><!/> | ev:<!$><!/> | sec:<!$><!/> | <!$><!/> | last:<!$><!/>`), _tmpl$12 = /* @__PURE__ */ template(`<div style="animation:scratchpad-slide-down 0.2s ease-out"><div><div class="flex items-center gap-2"><span class=text-base>&#128221;</span><h3 class="text-sm font-semibold text-gray-900 dark:text-white"></h3><!$><!/><!$><!/></div><div class="flex items-center gap-2"><span></span><!$><!/></div></div><!$><!/><style>
9
13
  @keyframes scratchpad-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
10
- </style><!$><!/>`), _tmpl$13 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$14 = /* @__PURE__ */ template(`<span class="ml-1 font-normal opacity-75">— <!$><!/>`), _tmpl$15 = /* @__PURE__ */ template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$16 = /* @__PURE__ */ template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$17 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Preview</span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$18 = /* @__PURE__ */ template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$19 = /* @__PURE__ */ template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$20 = /* @__PURE__ */ template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$21 = /* @__PURE__ */ template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$22 = /* @__PURE__ */ template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$23 = /* @__PURE__ */ template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$24 = /* @__PURE__ */ template(`<div class="px-4 py-3"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$25 = /* @__PURE__ */ template(`<div class=space-y-1>`), _tmpl$26 = /* @__PURE__ */ template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$27 = /* @__PURE__ */ template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$28 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">&times;`), _tmpl$30 = /* @__PURE__ */ template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$31 = /* @__PURE__ */ template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$32 = /* @__PURE__ */ template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">Cancel`), _tmpl$33 = /* @__PURE__ */ template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$34 = /* @__PURE__ */ template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$35 = /* @__PURE__ */ template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$36 = /* @__PURE__ */ template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700">OK</button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">Cancel`), _tmpl$37 = /* @__PURE__ */ template(`<span class=ml-1>✓`), _tmpl$38 = /* @__PURE__ */ template(`<button type=button><!$><!/><!$><!/>`), _tmpl$39 = /* @__PURE__ */ template(`<form class="flex flex-col gap-3"><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$40 = /* @__PURE__ */ template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1">Next <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$41 = /* @__PURE__ */ template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$42 = /* @__PURE__ */ template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$43 = /* @__PURE__ */ template(`<div class="mt-2 ml-6">`), _tmpl$44 = /* @__PURE__ */ template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$45 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-2">`), _tmpl$46 = /* @__PURE__ */ template(`<span class=mr-1>`), _tmpl$47 = /* @__PURE__ */ template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$48 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$49 = /* @__PURE__ */ template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>⚠️</span><span>`), _tmpl$50 = /* @__PURE__ */ template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">Send`), _tmpl$51 = /* @__PURE__ */ template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><div class="flex flex-wrap gap-2"></div><!$><!/>`), _tmpl$52 = /* @__PURE__ */ template(`<span>`), _tmpl$53 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$54 = /* @__PURE__ */ template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium>Plan:</span> <!$><!/>`), _tmpl$55 = /* @__PURE__ */ template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">&#9998; Modify`), _tmpl$56 = /* @__PURE__ */ template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$57 = /* @__PURE__ */ template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$58 = /* @__PURE__ */ template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$59 = /* @__PURE__ */ template(`<div class=space-y-2>`), _tmpl$60 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$61 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$62 = /* @__PURE__ */ template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$63 = /* @__PURE__ */ template(`<span class="text-[10px] opacity-75">`), _tmpl$64 = /* @__PURE__ */ template(`<div><span></span><span></span><!$><!/>`), _tmpl$65 = /* @__PURE__ */ template(`<button type=button>&#128260; <!$><!/>`), _tmpl$66 = /* @__PURE__ */ template(`<button type=button class="px-2 py-1 text-xs opacity-70 hover:opacity-100">&#9654; Details`), _tmpl$67 = /* @__PURE__ */ template(`<pre class="mt-2 text-xs opacity-70 overflow-x-auto">`), _tmpl$68 = /* @__PURE__ */ template(`<div><div class="flex items-start gap-2"><span class=flex-shrink-0></span><div class=flex-1><p></p><div class="flex gap-2 mt-2"><!$><!/><!$><!/></div><!$><!/>`), _tmpl$69 = /* @__PURE__ */ template(`<span class="text-xs font-bold text-blue-600 dark:text-blue-400"><!$><!/> results`), _tmpl$70 = /* @__PURE__ */ template(`<p class="text-[10px] text-gray-400">`), _tmpl$71 = /* @__PURE__ */ template(`<div class="rounded-lg border border-gray-200 dark:border-gray-700 px-3 py-2"><div class="flex items-center justify-between mb-1.5"><span class="text-sm font-medium text-gray-900 dark:text-white"><!$><!/> <!$><!/></span><!$><!/></div><div class="flex flex-wrap gap-1.5 mb-1"></div><!$><!/>`), _tmpl$72 = /* @__PURE__ */ template(`<span><!$><!/> <!$><!/>`), _tmpl$73 = /* @__PURE__ */ template(`<div class=overflow-x-auto><table class="min-w-full text-xs"><thead><tr><th class="px-2 py-1 text-left text-gray-500 dark:text-gray-400"></th><th class="px-2 py-1 text-left font-medium text-blue-600 dark:text-blue-400"></th><th class="px-2 py-1 text-left font-medium text-purple-600 dark:text-purple-400"></th></tr></thead><tbody>`), _tmpl$74 = /* @__PURE__ */ template(`<tr><td class="px-2 py-1 font-mono text-gray-500 dark:text-gray-400"></td><td class="px-2 py-1 text-gray-900 dark:text-white"></td><td class="px-2 py-1 text-gray-900 dark:text-white">`);
14
+ </style><!$><!/>`), _tmpl$13 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$14 = /* @__PURE__ */ template(`<span class="ml-1 font-normal opacity-75">— <!$><!/>`), _tmpl$15 = /* @__PURE__ */ template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$16 = /* @__PURE__ */ template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$17 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Preview</span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$18 = /* @__PURE__ */ template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$19 = /* @__PURE__ */ template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$20 = /* @__PURE__ */ template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$21 = /* @__PURE__ */ template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$22 = /* @__PURE__ */ template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$23 = /* @__PURE__ */ template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$24 = /* @__PURE__ */ template(`<div class="px-4 py-3 animate-[slideDown_0.2s_ease-out]"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$25 = /* @__PURE__ */ template(`<div class=space-y-1>`), _tmpl$26 = /* @__PURE__ */ template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$27 = /* @__PURE__ */ template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$28 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">&times;`), _tmpl$30 = /* @__PURE__ */ template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$31 = /* @__PURE__ */ template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$32 = /* @__PURE__ */ template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">Cancel`), _tmpl$33 = /* @__PURE__ */ template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$34 = /* @__PURE__ */ template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$35 = /* @__PURE__ */ template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$36 = /* @__PURE__ */ template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700">OK</button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">Cancel`), _tmpl$37 = /* @__PURE__ */ template(`<span class=ml-1>✓`), _tmpl$38 = /* @__PURE__ */ template(`<button type=button><!$><!/><!$><!/>`), _tmpl$39 = /* @__PURE__ */ template(`<form class="flex flex-col gap-3"><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$40 = /* @__PURE__ */ template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1">Next <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$41 = /* @__PURE__ */ template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$42 = /* @__PURE__ */ template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$43 = /* @__PURE__ */ template(`<div class="mt-2 ml-6">`), _tmpl$44 = /* @__PURE__ */ template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$45 = /* @__PURE__ */ template(`<p class="text-sm font-medium text-gray-800 dark:text-gray-200 mb-2">`), _tmpl$46 = /* @__PURE__ */ template(`<span class=text-amber-600>(<!$><!/> unverified)`), _tmpl$47 = /* @__PURE__ */ template(`<div class="mb-2 flex items-center gap-2 text-xs"><span><!$><!/>% verified</span><!$><!/>`), _tmpl$48 = /* @__PURE__ */ template(`<div><!$><!/><!$><!/><!$><!/><div class="flex flex-wrap gap-2">`), _tmpl$49 = /* @__PURE__ */ template(`<span class="font-medium text-gray-800 dark:text-gray-200">`), _tmpl$50 = /* @__PURE__ */ template(`<span class=ml-1>&mdash; <!$><!/>`), _tmpl$51 = /* @__PURE__ */ template(`<div class="mb-2 p-2 rounded bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-xs text-gray-600 dark:text-gray-400"><!$><!/><!$><!/>`), _tmpl$52 = /* @__PURE__ */ template(`<span class=mr-1>`), _tmpl$53 = /* @__PURE__ */ template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$54 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$55 = /* @__PURE__ */ template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>⚠️</span><span>`), _tmpl$56 = /* @__PURE__ */ template(`<span class=italic>&mdash; <!$><!/>`), _tmpl$57 = /* @__PURE__ */ template(`<div class="flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400"><span><!$><!/> <!$><!/></span><!$><!/>`), _tmpl$58 = /* @__PURE__ */ template(`<div class="flex flex-wrap gap-2">`), _tmpl$59 = /* @__PURE__ */ template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">Send`), _tmpl$60 = /* @__PURE__ */ template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><!$><!/><!$><!/>`), _tmpl$61 = /* @__PURE__ */ template(`<span>`), _tmpl$62 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$63 = /* @__PURE__ */ template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium>Plan:</span> <!$><!/>`), _tmpl$64 = /* @__PURE__ */ template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">&#9998; Modify`), _tmpl$65 = /* @__PURE__ */ template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$66 = /* @__PURE__ */ template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$67 = /* @__PURE__ */ template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$68 = /* @__PURE__ */ template(`<div class=space-y-2>`), _tmpl$69 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$70 = /* @__PURE__ */ template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$71 = /* @__PURE__ */ template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$72 = /* @__PURE__ */ template(`<span class="text-[10px] opacity-75">`), _tmpl$73 = /* @__PURE__ */ template(`<div><span></span><span></span><!$><!/>`), _tmpl$74 = /* @__PURE__ */ template(`<button type=button>&#128260; <!$><!/>`), _tmpl$75 = /* @__PURE__ */ template(`<button type=button class="px-2 py-1 text-xs opacity-70 hover:opacity-100">&#9654; Details`), _tmpl$76 = /* @__PURE__ */ template(`<pre class="mt-2 text-xs opacity-70 overflow-x-auto">`), _tmpl$77 = /* @__PURE__ */ template(`<div><div class="flex items-start gap-2"><span class=flex-shrink-0></span><div class=flex-1><p></p><div class="flex gap-2 mt-2"><!$><!/><!$><!/></div><!$><!/>`), _tmpl$78 = /* @__PURE__ */ template(`<span class="text-xs font-bold text-blue-600 dark:text-blue-400"><!$><!/> results`), _tmpl$79 = /* @__PURE__ */ template(`<p class="text-[10px] text-gray-400">`), _tmpl$80 = /* @__PURE__ */ template(`<div class="rounded-lg border border-gray-200 dark:border-gray-700 px-3 py-2"><div class="flex items-center justify-between mb-1.5"><span class="text-sm font-medium text-gray-900 dark:text-white"><!$><!/> <!$><!/></span><!$><!/></div><div class="flex flex-wrap gap-1.5 mb-1"></div><!$><!/>`), _tmpl$81 = /* @__PURE__ */ template(`<span><!$><!/> <!$><!/>`), _tmpl$82 = /* @__PURE__ */ template(`<div class=overflow-x-auto><table class="min-w-full text-xs"><thead><tr><th class="px-2 py-1 text-left text-gray-500 dark:text-gray-400"></th><th class="px-2 py-1 text-left font-medium text-blue-600 dark:text-blue-400"></th><th class="px-2 py-1 text-left font-medium text-purple-600 dark:text-purple-400"></th></tr></thead><tbody>`), _tmpl$83 = /* @__PURE__ */ template(`<tr><td class="px-2 py-1 font-mono text-gray-500 dark:text-gray-400"></td><td class="px-2 py-1 text-gray-900 dark:text-white"></td><td class="px-2 py-1 text-gray-900 dark:text-white">`);
11
15
  const STATUS_BADGES = {
12
16
  loading: {
13
17
  label: "Loading...",
@@ -146,9 +150,23 @@ const ScratchpadPanel = (props) => {
146
150
  if (previewTimer) clearTimeout(previewTimer);
147
151
  });
148
152
  return (() => {
149
- var _el$ = getNextElement(_tmpl$12), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = getNextMarker(_el$7.nextSibling), _el$9 = _el$3.nextSibling, _el$0 = _el$9.firstChild, _el$10 = _el$0.nextSibling, [_el$11, _co$2] = getNextMarker(_el$10.nextSibling), _el$67 = _el$2.nextSibling, [_el$68, _co$15] = getNextMarker(_el$67.nextSibling), _el$51 = _el$68.nextSibling, _el$69 = _el$51.nextSibling, [_el$70, _co$16] = getNextMarker(_el$69.nextSibling);
153
+ var _el$ = getNextElement(_tmpl$12), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = getNextMarker(_el$7.nextSibling), _el$9 = _el$8.nextSibling, [_el$0, _co$2] = getNextMarker(_el$9.nextSibling), _el$1 = _el$3.nextSibling, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling, [_el$13, _co$3] = getNextMarker(_el$12.nextSibling), _el$69 = _el$2.nextSibling, [_el$70, _co$16] = getNextMarker(_el$69.nextSibling), _el$53 = _el$70.nextSibling, _el$71 = _el$53.nextSibling, [_el$72, _co$17] = getNextMarker(_el$71.nextSibling);
150
154
  _el$2.$$click = () => isCollapsible() && setCollapsed(!collapsed());
151
155
  insert(_el$5, () => props.state.title);
156
+ insert(_el$3, () => {
157
+ const agentSection = props.state.sections.find((s) => s.type === "agent_card");
158
+ if (!agentSection) return null;
159
+ const ac = parseContent(agentSection.content);
160
+ if (!(ac == null ? void 0 : ac.name)) return null;
161
+ return createComponent(AgentStatusBadge, {
162
+ get agentName() {
163
+ return ac.name;
164
+ },
165
+ get status() {
166
+ return ac.status || "idle";
167
+ }
168
+ });
169
+ }, _el$8, _co$);
152
170
  insert(_el$3, createComponent(Show, {
153
171
  get when() {
154
172
  return isCollapsible();
@@ -158,36 +176,36 @@ const ScratchpadPanel = (props) => {
158
176
  effect(() => setAttribute(_el$6, "class", `w-3.5 h-3.5 text-gray-400 transition-transform ${collapsed() ? "-rotate-90" : ""}`));
159
177
  return _el$6;
160
178
  }
161
- }), _el$8, _co$);
162
- insert(_el$0, () => badge().label);
163
- insert(_el$9, createComponent(Show, {
179
+ }), _el$0, _co$2);
180
+ insert(_el$10, () => badge().label);
181
+ insert(_el$1, createComponent(Show, {
164
182
  get when() {
165
183
  return memo(() => !!isClosable())() && props.onClose;
166
184
  },
167
185
  get children() {
168
- var _el$1 = getNextElement(_tmpl$2);
169
- _el$1.$$click = (e) => {
186
+ var _el$11 = getNextElement(_tmpl$2);
187
+ _el$11.$$click = (e) => {
170
188
  var _a2;
171
189
  e.stopPropagation();
172
190
  (_a2 = props.onClose) == null ? void 0 : _a2.call(props);
173
191
  };
174
192
  runHydrationEvents();
175
- return _el$1;
193
+ return _el$11;
176
194
  }
177
- }), _el$11, _co$2);
195
+ }), _el$13, _co$3);
178
196
  insert(_el$, createComponent(Show, {
179
197
  get when() {
180
198
  return !collapsed();
181
199
  },
182
200
  get children() {
183
- var _el$12 = getNextElement(_tmpl$10), _el$41 = _el$12.firstChild, [_el$42, _co$7] = getNextMarker(_el$41.nextSibling), _el$14 = _el$42.nextSibling, _el$43 = _el$14.nextSibling, [_el$44, _co$8] = getNextMarker(_el$43.nextSibling), _el$45 = _el$44.nextSibling, [_el$46, _co$9] = getNextMarker(_el$45.nextSibling), _el$47 = _el$46.nextSibling, [_el$48, _co$0] = getNextMarker(_el$47.nextSibling), _el$49 = _el$48.nextSibling, [_el$50, _co$1] = getNextMarker(_el$49.nextSibling);
184
- insert(_el$12, createComponent(Show, {
201
+ var _el$14 = getNextElement(_tmpl$10), _el$43 = _el$14.firstChild, [_el$44, _co$8] = getNextMarker(_el$43.nextSibling), _el$16 = _el$44.nextSibling, _el$45 = _el$16.nextSibling, [_el$46, _co$9] = getNextMarker(_el$45.nextSibling), _el$47 = _el$46.nextSibling, [_el$48, _co$0] = getNextMarker(_el$47.nextSibling), _el$49 = _el$48.nextSibling, [_el$50, _co$1] = getNextMarker(_el$49.nextSibling), _el$51 = _el$50.nextSibling, [_el$52, _co$10] = getNextMarker(_el$51.nextSibling);
202
+ insert(_el$14, createComponent(Show, {
185
203
  get when() {
186
204
  return memo(() => !!props.state.turnHistory)() && props.state.turnHistory.length > 0;
187
205
  },
188
206
  get children() {
189
- var _el$13 = getNextElement(_tmpl$3);
190
- insert(_el$13, createComponent(For, {
207
+ var _el$15 = getNextElement(_tmpl$3);
208
+ insert(_el$15, createComponent(For, {
191
209
  get each() {
192
210
  return props.state.turnHistory;
193
211
  },
@@ -199,30 +217,30 @@ const ScratchpadPanel = (props) => {
199
217
  return getNextElement(_tmpl$13);
200
218
  }
201
219
  }), (() => {
202
- var _el$72 = getNextElement(_tmpl$15), _el$78 = _el$72.firstChild, [_el$79, _co$18] = getNextMarker(_el$78.nextSibling), _el$73 = _el$79.nextSibling, _el$80 = _el$73.nextSibling, [_el$81, _co$19] = getNextMarker(_el$80.nextSibling), _el$82 = _el$81.nextSibling, [_el$83, _co$20] = getNextMarker(_el$82.nextSibling);
203
- insert(_el$72, (() => {
220
+ var _el$74 = getNextElement(_tmpl$15), _el$80 = _el$74.firstChild, [_el$81, _co$19] = getNextMarker(_el$80.nextSibling), _el$75 = _el$81.nextSibling, _el$82 = _el$75.nextSibling, [_el$83, _co$20] = getNextMarker(_el$82.nextSibling), _el$84 = _el$83.nextSibling, [_el$85, _co$21] = getNextMarker(_el$84.nextSibling);
221
+ insert(_el$74, (() => {
204
222
  var _c$ = memo(() => turn.status === "done");
205
223
  return () => _c$() ? "✅" : turn.status === "active" ? "●" : "○";
206
- })(), _el$79, _co$18);
207
- insert(_el$72, () => turn.label, _el$81, _co$19);
208
- insert(_el$72, createComponent(Show, {
224
+ })(), _el$81, _co$19);
225
+ insert(_el$74, () => turn.label, _el$83, _co$20);
226
+ insert(_el$74, createComponent(Show, {
209
227
  get when() {
210
228
  return turn.summary;
211
229
  },
212
230
  get children() {
213
- var _el$74 = getNextElement(_tmpl$14), _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling, [_el$77, _co$17] = getNextMarker(_el$76.nextSibling);
214
- insert(_el$74, () => turn.summary, _el$77, _co$17);
215
- return _el$74;
231
+ var _el$76 = getNextElement(_tmpl$14), _el$77 = _el$76.firstChild, _el$78 = _el$77.nextSibling, [_el$79, _co$18] = getNextMarker(_el$78.nextSibling);
232
+ insert(_el$76, () => turn.summary, _el$79, _co$18);
233
+ return _el$76;
216
234
  }
217
- }), _el$83, _co$20);
218
- effect(() => className(_el$72, `text-xs font-medium px-2 py-0.5 rounded-full ${turn.status === "done" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : turn.status === "active" ? "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400" : turn.status === "skipped" ? "bg-gray-100 dark:bg-gray-700 text-gray-400 line-through" : "bg-gray-100 dark:bg-gray-700 text-gray-400"}`));
219
- return _el$72;
235
+ }), _el$85, _co$21);
236
+ effect(() => className(_el$74, `text-xs font-medium px-2 py-0.5 rounded-full ${turn.status === "done" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : turn.status === "active" ? "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400" : turn.status === "skipped" ? "bg-gray-100 dark:bg-gray-700 text-gray-400 line-through" : "bg-gray-100 dark:bg-gray-700 text-gray-400"}`));
237
+ return _el$74;
220
238
  })()]
221
239
  }));
222
- return _el$13;
240
+ return _el$15;
223
241
  }
224
- }), _el$42, _co$7);
225
- insert(_el$14, createComponent(For, {
242
+ }), _el$44, _co$8);
243
+ insert(_el$16, createComponent(For, {
226
244
  get each() {
227
245
  return props.state.sections;
228
246
  },
@@ -243,188 +261,188 @@ const ScratchpadPanel = (props) => {
243
261
  }
244
262
  })
245
263
  }));
246
- insert(_el$12, createComponent(Show, {
264
+ insert(_el$14, createComponent(Show, {
247
265
  get when() {
248
266
  return props.state.agentMessages.length > 0;
249
267
  },
250
268
  get children() {
251
- var _el$15 = getNextElement(_tmpl$4);
252
- insert(_el$15, createComponent(For, {
269
+ var _el$17 = getNextElement(_tmpl$4);
270
+ insert(_el$17, createComponent(For, {
253
271
  get each() {
254
272
  return props.state.agentMessages;
255
273
  },
256
274
  children: (msg) => (() => {
257
- var _el$84 = getNextElement(_tmpl$16), _el$85 = _el$84.firstChild, _el$86 = _el$85.nextSibling;
258
- insert(_el$85, (() => {
275
+ var _el$86 = getNextElement(_tmpl$16), _el$87 = _el$86.firstChild, _el$88 = _el$87.nextSibling;
276
+ insert(_el$87, (() => {
259
277
  var _c$2 = memo(() => msg.type === "warning");
260
278
  return () => _c$2() ? "⚠️" : msg.type === "question" ? "❓" : "ℹ️";
261
279
  })());
262
- insert(_el$86, () => msg.text);
263
- effect(() => className(_el$84, `flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${msg.type === "warning" ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400" : msg.type === "question" ? "bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-700/50 text-gray-600 dark:text-gray-400"}`));
264
- return _el$84;
280
+ insert(_el$88, () => msg.text);
281
+ effect(() => className(_el$86, `flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${msg.type === "warning" ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400" : msg.type === "question" ? "bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-700/50 text-gray-600 dark:text-gray-400"}`));
282
+ return _el$86;
265
283
  })()
266
284
  }));
267
- return _el$15;
285
+ return _el$17;
268
286
  }
269
- }), _el$44, _co$8);
270
- insert(_el$12, createComponent(Show, {
287
+ }), _el$46, _co$9);
288
+ insert(_el$14, createComponent(Show, {
271
289
  get when() {
272
290
  return preview();
273
291
  },
274
292
  get children() {
275
- var _el$16 = getNextElement(_tmpl$6);
276
- insert(_el$16, createComponent(Show, {
293
+ var _el$18 = getNextElement(_tmpl$6);
294
+ insert(_el$18, createComponent(Show, {
277
295
  get when() {
278
296
  return preview().count === 0;
279
297
  },
280
298
  get fallback() {
281
299
  return [(() => {
282
- var _el$87 = getNextElement(_tmpl$17), _el$88 = _el$87.firstChild, _el$89 = _el$88.nextSibling;
283
- insert(_el$89, () => preview().count.toLocaleString());
284
- return _el$87;
300
+ var _el$89 = getNextElement(_tmpl$17), _el$90 = _el$89.firstChild, _el$91 = _el$90.nextSibling;
301
+ insert(_el$91, () => preview().count.toLocaleString());
302
+ return _el$89;
285
303
  })(), (() => {
286
- var _el$90 = getNextElement(_tmpl$18);
287
- insert(_el$90, () => preview().summary);
288
- return _el$90;
304
+ var _el$92 = getNextElement(_tmpl$18);
305
+ insert(_el$92, () => preview().summary);
306
+ return _el$92;
289
307
  })(), createComponent(Show, {
290
308
  get when() {
291
309
  return memo(() => !!preview().rows)() && preview().rows.length > 0;
292
310
  },
293
311
  get children() {
294
- var _el$91 = getNextElement(_tmpl$19), _el$92 = _el$91.firstChild, _el$93 = _el$92.firstChild, _el$94 = _el$93.firstChild, _el$95 = _el$93.nextSibling;
295
- insert(_el$94, createComponent(For, {
312
+ var _el$93 = getNextElement(_tmpl$19), _el$94 = _el$93.firstChild, _el$95 = _el$94.firstChild, _el$96 = _el$95.firstChild, _el$97 = _el$95.nextSibling;
313
+ insert(_el$96, createComponent(For, {
296
314
  get each() {
297
315
  return Object.keys(preview().rows[0]);
298
316
  },
299
317
  children: (k) => (() => {
300
- var _el$96 = getNextElement(_tmpl$20);
301
- insert(_el$96, k);
302
- return _el$96;
318
+ var _el$98 = getNextElement(_tmpl$20);
319
+ insert(_el$98, k);
320
+ return _el$98;
303
321
  })()
304
322
  }));
305
- insert(_el$95, createComponent(For, {
323
+ insert(_el$97, createComponent(For, {
306
324
  get each() {
307
325
  return preview().rows.slice(0, 5);
308
326
  },
309
327
  children: (row) => (() => {
310
- var _el$97 = getNextElement(_tmpl$21);
311
- insert(_el$97, createComponent(For, {
328
+ var _el$99 = getNextElement(_tmpl$21);
329
+ insert(_el$99, createComponent(For, {
312
330
  get each() {
313
331
  return Object.values(row);
314
332
  },
315
333
  children: (v) => (() => {
316
- var _el$98 = getNextElement(_tmpl$22);
317
- insert(_el$98, () => String(v));
318
- return _el$98;
334
+ var _el$100 = getNextElement(_tmpl$22);
335
+ insert(_el$100, () => String(v));
336
+ return _el$100;
319
337
  })()
320
338
  }));
321
- return _el$97;
339
+ return _el$99;
322
340
  })()
323
341
  }));
324
- return _el$91;
342
+ return _el$93;
325
343
  }
326
344
  })];
327
345
  },
328
346
  get children() {
329
- var _el$17 = getNextElement(_tmpl$5), _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$19.nextSibling;
330
- _el$20.$$click = () => {
347
+ var _el$19 = getNextElement(_tmpl$5), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling;
348
+ _el$22.$$click = () => {
331
349
  var _a2;
332
350
  return (_a2 = props.onAction) == null ? void 0 : _a2.call(props, "refine_filters");
333
351
  };
334
352
  runHydrationEvents();
335
- return _el$17;
353
+ return _el$19;
336
354
  }
337
355
  }));
338
- return _el$16;
356
+ return _el$18;
339
357
  }
340
- }), _el$46, _co$9);
341
- insert(_el$12, createComponent(Show, {
358
+ }), _el$48, _co$0);
359
+ insert(_el$14, createComponent(Show, {
342
360
  get when() {
343
361
  return memo(() => props.state.status === "error")() && props.state.error;
344
362
  },
345
363
  get children() {
346
- var _el$21 = getNextElement(_tmpl$0), _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.firstChild, _el$30 = _el$25.nextSibling, [_el$31, _co$4] = getNextMarker(_el$30.nextSibling), _el$32 = _el$22.nextSibling, _el$35 = _el$32.firstChild, [_el$36, _co$5] = getNextMarker(_el$35.nextSibling), _el$37 = _el$36.nextSibling, [_el$38, _co$6] = getNextMarker(_el$37.nextSibling);
347
- insert(_el$25, () => props.state.error.message);
348
- insert(_el$24, createComponent(Show, {
364
+ var _el$23 = getNextElement(_tmpl$0), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild, _el$32 = _el$27.nextSibling, [_el$33, _co$5] = getNextMarker(_el$32.nextSibling), _el$34 = _el$24.nextSibling, _el$37 = _el$34.firstChild, [_el$38, _co$6] = getNextMarker(_el$37.nextSibling), _el$39 = _el$38.nextSibling, [_el$40, _co$7] = getNextMarker(_el$39.nextSibling);
365
+ insert(_el$27, () => props.state.error.message);
366
+ insert(_el$26, createComponent(Show, {
349
367
  get when() {
350
368
  return props.state.error.code;
351
369
  },
352
370
  get children() {
353
- var _el$26 = getNextElement(_tmpl$7), _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, [_el$29, _co$3] = getNextMarker(_el$28.nextSibling);
354
- insert(_el$26, () => props.state.error.code, _el$29, _co$3);
355
- return _el$26;
371
+ var _el$28 = getNextElement(_tmpl$7), _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, [_el$31, _co$4] = getNextMarker(_el$30.nextSibling);
372
+ insert(_el$28, () => props.state.error.code, _el$31, _co$4);
373
+ return _el$28;
356
374
  }
357
- }), _el$31, _co$4);
358
- insert(_el$32, createComponent(Show, {
375
+ }), _el$33, _co$5);
376
+ insert(_el$34, createComponent(Show, {
359
377
  get when() {
360
378
  return props.state.error.retryable !== false;
361
379
  },
362
380
  get children() {
363
- var _el$33 = getNextElement(_tmpl$8);
364
- _el$33.$$click = () => {
381
+ var _el$35 = getNextElement(_tmpl$8);
382
+ _el$35.$$click = () => {
365
383
  var _a2;
366
384
  return (_a2 = props.onRetry) == null ? void 0 : _a2.call(props);
367
385
  };
368
386
  runHydrationEvents();
369
- return _el$33;
387
+ return _el$35;
370
388
  }
371
- }), _el$36, _co$5);
372
- insert(_el$32, createComponent(Show, {
389
+ }), _el$38, _co$6);
390
+ insert(_el$34, createComponent(Show, {
373
391
  get when() {
374
392
  return props.onClose;
375
393
  },
376
394
  get children() {
377
- var _el$34 = getNextElement(_tmpl$9);
378
- _el$34.$$click = () => {
395
+ var _el$36 = getNextElement(_tmpl$9);
396
+ _el$36.$$click = () => {
379
397
  var _a2;
380
398
  return (_a2 = props.onClose) == null ? void 0 : _a2.call(props);
381
399
  };
382
400
  runHydrationEvents();
383
- return _el$34;
401
+ return _el$36;
384
402
  }
385
- }), _el$38, _co$6);
386
- return _el$21;
403
+ }), _el$40, _co$7);
404
+ return _el$23;
387
405
  }
388
- }), _el$48, _co$0);
389
- insert(_el$12, createComponent(Show, {
406
+ }), _el$50, _co$1);
407
+ insert(_el$14, createComponent(Show, {
390
408
  get when() {
391
409
  return memo(() => props.state.status === "waiting_human")() && hasFilters();
392
410
  },
393
411
  get children() {
394
- var _el$39 = getNextElement(_tmpl$1), _el$40 = _el$39.firstChild;
395
- _el$40.$$click = () => handleAction("search", {
412
+ var _el$41 = getNextElement(_tmpl$1), _el$42 = _el$41.firstChild;
413
+ _el$42.$$click = () => handleAction("search", {
396
414
  filters: props.state.filters
397
415
  });
398
416
  runHydrationEvents();
399
- return _el$39;
417
+ return _el$41;
400
418
  }
401
- }), _el$50, _co$1);
402
- effect((_$p) => setStyleProperty(_el$12, "max-height", props.maxHeight || "500px"));
403
- return _el$12;
419
+ }), _el$52, _co$10);
420
+ effect((_$p) => setStyleProperty(_el$14, "max-height", props.maxHeight || "500px"));
421
+ return _el$14;
404
422
  }
405
- }), _el$68, _co$15);
423
+ }), _el$70, _co$16);
406
424
  insert(_el$, createComponent(Show, {
407
425
  get when() {
408
426
  return props.debugOverlay;
409
427
  },
410
428
  get children() {
411
- var _el$52 = getNextElement(_tmpl$11), _el$57 = _el$52.firstChild, [_el$58, _co$10] = getNextMarker(_el$57.nextSibling), _el$53 = _el$58.nextSibling, _el$59 = _el$53.nextSibling, [_el$60, _co$11] = getNextMarker(_el$59.nextSibling), _el$54 = _el$60.nextSibling, _el$61 = _el$54.nextSibling, [_el$62, _co$12] = getNextMarker(_el$61.nextSibling), _el$55 = _el$62.nextSibling, _el$63 = _el$55.nextSibling, [_el$64, _co$13] = getNextMarker(_el$63.nextSibling), _el$56 = _el$64.nextSibling, _el$65 = _el$56.nextSibling, [_el$66, _co$14] = getNextMarker(_el$65.nextSibling);
412
- insert(_el$52, () => props.state.id, _el$58, _co$10);
413
- insert(_el$52, eventCount, _el$60, _co$11);
414
- insert(_el$52, () => {
429
+ var _el$54 = getNextElement(_tmpl$11), _el$59 = _el$54.firstChild, [_el$60, _co$11] = getNextMarker(_el$59.nextSibling), _el$55 = _el$60.nextSibling, _el$61 = _el$55.nextSibling, [_el$62, _co$12] = getNextMarker(_el$61.nextSibling), _el$56 = _el$62.nextSibling, _el$63 = _el$56.nextSibling, [_el$64, _co$13] = getNextMarker(_el$63.nextSibling), _el$57 = _el$64.nextSibling, _el$65 = _el$57.nextSibling, [_el$66, _co$14] = getNextMarker(_el$65.nextSibling), _el$58 = _el$66.nextSibling, _el$67 = _el$58.nextSibling, [_el$68, _co$15] = getNextMarker(_el$67.nextSibling);
430
+ insert(_el$54, () => props.state.id, _el$60, _co$11);
431
+ insert(_el$54, eventCount, _el$62, _co$12);
432
+ insert(_el$54, () => {
415
433
  var _a2;
416
434
  return ((_a2 = props.state.sections) == null ? void 0 : _a2.length) || 0;
417
- }, _el$62, _co$12);
418
- insert(_el$52, () => props.state.status, _el$64, _co$13);
419
- insert(_el$52, lastEvent, _el$66, _co$14);
420
- return _el$52;
435
+ }, _el$64, _co$13);
436
+ insert(_el$54, () => props.state.status, _el$66, _co$14);
437
+ insert(_el$54, lastEvent, _el$68, _co$15);
438
+ return _el$54;
421
439
  }
422
- }), _el$70, _co$16);
440
+ }), _el$72, _co$17);
423
441
  effect((_p$) => {
424
442
  var _v$ = `w-full bg-white dark:bg-gray-800 rounded-xl border shadow-lg overflow-visible ${props.state.status === "waiting_human" ? "border-blue-300 dark:border-blue-600" : "border-gray-200 dark:border-gray-700"} ${props.pinned ? "sticky top-0 z-40" : ""}`, _v$2 = `flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-700 ${isCollapsible() ? "cursor-pointer select-none hover:bg-gray-50 dark:hover:bg-gray-750" : ""}`, _v$3 = `px-2 py-0.5 text-xs font-medium rounded-full ${badge().class}`;
425
443
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
426
444
  _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
427
- _v$3 !== _p$.a && className(_el$0, _p$.a = _v$3);
445
+ _v$3 !== _p$.a && className(_el$10, _p$.a = _v$3);
428
446
  return _p$;
429
447
  }, {
430
448
  e: void 0,
@@ -447,9 +465,9 @@ function parseContent(content) {
447
465
  }
448
466
  const SectionRenderer = (props) => {
449
467
  return (() => {
450
- var _el$99 = getNextElement(_tmpl$24), _el$100 = _el$99.firstChild, _el$103 = _el$100.nextSibling, [_el$104, _co$21] = getNextMarker(_el$103.nextSibling);
451
- insert(_el$100, () => props.section.title);
452
- insert(_el$99, createComponent(Switch, {
468
+ var _el$101 = getNextElement(_tmpl$24), _el$102 = _el$101.firstChild, _el$105 = _el$102.nextSibling, [_el$106, _co$22] = getNextMarker(_el$105.nextSibling);
469
+ insert(_el$102, () => props.section.title);
470
+ insert(_el$101, createComponent(Switch, {
453
471
  get children() {
454
472
  return [createComponent(Match, {
455
473
  get when() {
@@ -484,9 +502,9 @@ const SectionRenderer = (props) => {
484
502
  return props.section.type === "message";
485
503
  },
486
504
  get children() {
487
- var _el$101 = getNextElement(_tmpl$18);
488
- insert(_el$101, () => String(props.section.content));
489
- return _el$101;
505
+ var _el$103 = getNextElement(_tmpl$18);
506
+ insert(_el$103, () => String(props.section.content));
507
+ return _el$103;
490
508
  }
491
509
  }), createComponent(Match, {
492
510
  get when() {
@@ -697,40 +715,84 @@ const SectionRenderer = (props) => {
697
715
  });
698
716
  })();
699
717
  }
718
+ }), createComponent(Match, {
719
+ get when() {
720
+ return props.section.type === "agent_card";
721
+ },
722
+ get children() {
723
+ return createComponent(AgentCard, {
724
+ get content() {
725
+ return parseContent(props.section.content);
726
+ }
727
+ });
728
+ }
729
+ }), createComponent(Match, {
730
+ get when() {
731
+ return props.section.type === "split_stepper";
732
+ },
733
+ get children() {
734
+ return createComponent(SplitStepper, {
735
+ get content() {
736
+ return parseContent(props.section.content);
737
+ }
738
+ });
739
+ }
740
+ }), createComponent(Match, {
741
+ get when() {
742
+ return props.section.type === "agent_handoff";
743
+ },
744
+ get children() {
745
+ return createComponent(AgentHandoff, {
746
+ get content() {
747
+ return parseContent(props.section.content);
748
+ }
749
+ });
750
+ }
751
+ }), createComponent(Match, {
752
+ get when() {
753
+ return props.section.type === "briefing_diff";
754
+ },
755
+ get children() {
756
+ return createComponent(BriefingDiff, {
757
+ get content() {
758
+ return parseContent(props.section.content);
759
+ }
760
+ });
761
+ }
700
762
  }), createComponent(Match, {
701
763
  when: true,
702
764
  get children() {
703
- var _el$102 = getNextElement(_tmpl$23);
704
- insert(_el$102, () => JSON.stringify(props.section.content, null, 2));
705
- return _el$102;
765
+ var _el$104 = getNextElement(_tmpl$23);
766
+ insert(_el$104, () => JSON.stringify(props.section.content, null, 2));
767
+ return _el$104;
706
768
  }
707
769
  })];
708
770
  }
709
- }), _el$104, _co$21);
710
- return _el$99;
771
+ }), _el$106, _co$22);
772
+ return _el$101;
711
773
  })();
712
774
  };
713
775
  const DataSection = (props) => {
714
776
  const entries = () => typeof props.content === "object" && props.content ? Object.entries(props.content) : [];
715
777
  return (() => {
716
- var _el$105 = getNextElement(_tmpl$25);
717
- insert(_el$105, createComponent(For, {
778
+ var _el$107 = getNextElement(_tmpl$25);
779
+ insert(_el$107, createComponent(For, {
718
780
  get each() {
719
781
  return entries();
720
782
  },
721
783
  children: ([k, v]) => (() => {
722
- var _el$106 = getNextElement(_tmpl$26), _el$107 = _el$106.firstChild, _el$109 = _el$107.firstChild, [_el$110, _co$22] = getNextMarker(_el$109.nextSibling);
723
- _el$110.nextSibling;
724
- var _el$111 = _el$107.nextSibling;
725
- insert(_el$107, k, _el$110, _co$22);
726
- insert(_el$111, (() => {
784
+ var _el$108 = getNextElement(_tmpl$26), _el$109 = _el$108.firstChild, _el$111 = _el$109.firstChild, [_el$112, _co$23] = getNextMarker(_el$111.nextSibling);
785
+ _el$112.nextSibling;
786
+ var _el$113 = _el$109.nextSibling;
787
+ insert(_el$109, k, _el$112, _co$23);
788
+ insert(_el$113, (() => {
727
789
  var _c$3 = memo(() => !!Array.isArray(v));
728
790
  return () => _c$3() ? v.join(", ") : String(v);
729
791
  })());
730
- return _el$106;
792
+ return _el$108;
731
793
  })()
732
794
  }));
733
- return _el$105;
795
+ return _el$107;
734
796
  })();
735
797
  };
736
798
  const InteractiveFilterSection = (props) => {
@@ -764,8 +826,8 @@ const InteractiveFilterSection = (props) => {
764
826
  };
765
827
  const getDef = (key) => filterDefs()[key] || {};
766
828
  return (() => {
767
- var _el$112 = getNextElement(_tmpl$28), _el$114 = _el$112.firstChild, [_el$115, _co$23] = getNextMarker(_el$114.nextSibling), _el$116 = _el$115.nextSibling, [_el$117, _co$24] = getNextMarker(_el$116.nextSibling);
768
- insert(_el$112, createComponent(For, {
829
+ var _el$114 = getNextElement(_tmpl$28), _el$116 = _el$114.firstChild, [_el$117, _co$24] = getNextMarker(_el$116.nextSibling), _el$118 = _el$117.nextSibling, [_el$119, _co$25] = getNextMarker(_el$118.nextSibling);
830
+ insert(_el$114, createComponent(For, {
769
831
  get each() {
770
832
  return allKeys();
771
833
  },
@@ -774,136 +836,136 @@ const InteractiveFilterSection = (props) => {
774
836
  const value = () => props.filters[key];
775
837
  const hasValue = () => value() !== void 0 && value() !== "";
776
838
  return (() => {
777
- var _el$118 = getNextElement(_tmpl$34), _el$134 = _el$118.firstChild, [_el$135, _co$28] = getNextMarker(_el$134.nextSibling), _el$136 = _el$135.nextSibling, [_el$137, _co$29] = getNextMarker(_el$136.nextSibling);
778
- insert(_el$118, createComponent(Show, {
839
+ var _el$120 = getNextElement(_tmpl$34), _el$136 = _el$120.firstChild, [_el$137, _co$29] = getNextMarker(_el$136.nextSibling), _el$138 = _el$137.nextSibling, [_el$139, _co$30] = getNextMarker(_el$138.nextSibling);
840
+ insert(_el$120, createComponent(Show, {
779
841
  get when() {
780
842
  return hasValue();
781
843
  },
782
844
  get fallback() {
783
845
  return (() => {
784
- var _el$138 = getNextElement(_tmpl$35), _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling, [_el$141, _co$30] = getNextMarker(_el$140.nextSibling);
785
- _el$138.$$click = () => {
846
+ var _el$140 = getNextElement(_tmpl$35), _el$141 = _el$140.firstChild, _el$142 = _el$141.nextSibling, [_el$143, _co$31] = getNextMarker(_el$142.nextSibling);
847
+ _el$140.$$click = () => {
786
848
  setEditingKey(key);
787
849
  setEditValue("");
788
850
  };
789
- insert(_el$138, () => {
851
+ insert(_el$140, () => {
790
852
  var _a;
791
853
  return ((_a = def()) == null ? void 0 : _a.label) || key;
792
- }, _el$141, _co$30);
854
+ }, _el$143, _co$31);
793
855
  runHydrationEvents();
794
- return _el$138;
856
+ return _el$140;
795
857
  })();
796
858
  },
797
859
  get children() {
798
- var _el$119 = getNextElement(_tmpl$30), _el$120 = _el$119.firstChild, _el$121 = _el$120.firstChild, _el$123 = _el$121.firstChild, [_el$124, _co$25] = getNextMarker(_el$123.nextSibling);
799
- _el$124.nextSibling;
800
- var _el$125 = _el$121.nextSibling, _el$126 = _el$125.nextSibling, [_el$127, _co$26] = getNextMarker(_el$126.nextSibling), _el$129 = _el$120.nextSibling, [_el$130, _co$27] = getNextMarker(_el$129.nextSibling);
801
- _el$120.$$click = () => {
860
+ var _el$121 = getNextElement(_tmpl$30), _el$122 = _el$121.firstChild, _el$123 = _el$122.firstChild, _el$125 = _el$123.firstChild, [_el$126, _co$26] = getNextMarker(_el$125.nextSibling);
861
+ _el$126.nextSibling;
862
+ var _el$127 = _el$123.nextSibling, _el$128 = _el$127.nextSibling, [_el$129, _co$27] = getNextMarker(_el$128.nextSibling), _el$131 = _el$122.nextSibling, [_el$132, _co$28] = getNextMarker(_el$131.nextSibling);
863
+ _el$122.$$click = () => {
802
864
  setEditingKey(key);
803
865
  setEditValue(String(value() || ""));
804
866
  };
805
- insert(_el$121, () => {
867
+ insert(_el$123, () => {
806
868
  var _a;
807
869
  return ((_a = def()) == null ? void 0 : _a.label) || key;
808
- }, _el$124, _co$25);
809
- insert(_el$120, (() => {
870
+ }, _el$126, _co$26);
871
+ insert(_el$122, (() => {
810
872
  var _c$4 = memo(() => !!Array.isArray(value()));
811
873
  return () => _c$4() ? value().join(", ") : String(value());
812
- })(), _el$127, _co$26);
813
- insert(_el$119, createComponent(Show, {
874
+ })(), _el$129, _co$27);
875
+ insert(_el$121, createComponent(Show, {
814
876
  get when() {
815
877
  return props.onFilterChange;
816
878
  },
817
879
  get children() {
818
- var _el$128 = getNextElement(_tmpl$29);
819
- _el$128.$$click = () => removeFilter(key);
820
- setAttribute(_el$128, "aria-label", `Remove ${key}`);
880
+ var _el$130 = getNextElement(_tmpl$29);
881
+ _el$130.$$click = () => removeFilter(key);
882
+ setAttribute(_el$130, "aria-label", `Remove ${key}`);
821
883
  runHydrationEvents();
822
- return _el$128;
884
+ return _el$130;
823
885
  }
824
- }), _el$130, _co$27);
886
+ }), _el$132, _co$28);
825
887
  runHydrationEvents();
826
- return _el$119;
888
+ return _el$121;
827
889
  }
828
- }), _el$135, _co$28);
829
- insert(_el$118, createComponent(Show, {
890
+ }), _el$137, _co$29);
891
+ insert(_el$120, createComponent(Show, {
830
892
  get when() {
831
893
  return editingKey() === key;
832
894
  },
833
895
  get children() {
834
- var _el$131 = getNextElement(_tmpl$33);
835
- insert(_el$131, createComponent(Show, {
896
+ var _el$133 = getNextElement(_tmpl$33);
897
+ insert(_el$133, createComponent(Show, {
836
898
  get when() {
837
899
  var _a;
838
900
  return (_a = def()) == null ? void 0 : _a.options;
839
901
  },
840
902
  get fallback() {
841
903
  return (() => {
842
- var _el$142 = getNextElement(_tmpl$36), _el$143 = _el$142.firstChild, _el$144 = _el$143.nextSibling, _el$145 = _el$144.nextSibling;
843
- _el$142.addEventListener("submit", (e) => {
904
+ var _el$144 = getNextElement(_tmpl$36), _el$145 = _el$144.firstChild, _el$146 = _el$145.nextSibling, _el$147 = _el$146.nextSibling;
905
+ _el$144.addEventListener("submit", (e) => {
844
906
  e.preventDefault();
845
907
  setFilter(key, editValue());
846
908
  });
847
- _el$143.$$input = (e) => setEditValue(e.currentTarget.value);
848
- _el$145.$$click = () => setEditingKey(null);
909
+ _el$145.$$input = (e) => setEditValue(e.currentTarget.value);
910
+ _el$147.$$click = () => setEditingKey(null);
849
911
  effect(() => {
850
912
  var _a;
851
- return setAttribute(_el$143, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
913
+ return setAttribute(_el$145, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
852
914
  });
853
- effect(() => setProperty(_el$143, "value", editValue()));
915
+ effect(() => setProperty(_el$145, "value", editValue()));
854
916
  runHydrationEvents();
855
- return _el$142;
917
+ return _el$144;
856
918
  })();
857
919
  },
858
920
  get children() {
859
921
  return [(() => {
860
- var _el$132 = getNextElement(_tmpl$31);
861
- insert(_el$132, createComponent(For, {
922
+ var _el$134 = getNextElement(_tmpl$31);
923
+ insert(_el$134, createComponent(For, {
862
924
  get each() {
863
925
  return def().options;
864
926
  },
865
927
  children: (opt) => (() => {
866
- var _el$146 = getNextElement(_tmpl$38), _el$148 = _el$146.firstChild, [_el$149, _co$31] = getNextMarker(_el$148.nextSibling), _el$150 = _el$149.nextSibling, [_el$151, _co$32] = getNextMarker(_el$150.nextSibling);
867
- _el$146.$$click = () => setFilter(key, opt.value);
868
- insert(_el$146, () => opt.label, _el$149, _co$31);
869
- insert(_el$146, createComponent(Show, {
928
+ var _el$148 = getNextElement(_tmpl$38), _el$150 = _el$148.firstChild, [_el$151, _co$32] = getNextMarker(_el$150.nextSibling), _el$152 = _el$151.nextSibling, [_el$153, _co$33] = getNextMarker(_el$152.nextSibling);
929
+ _el$148.$$click = () => setFilter(key, opt.value);
930
+ insert(_el$148, () => opt.label, _el$151, _co$32);
931
+ insert(_el$148, createComponent(Show, {
870
932
  get when() {
871
933
  return String(value()) === opt.value;
872
934
  },
873
935
  get children() {
874
936
  return getNextElement(_tmpl$37);
875
937
  }
876
- }), _el$151, _co$32);
877
- effect(() => className(_el$146, `w-full text-left px-2 py-1.5 text-sm rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 ${String(value()) === opt.value ? "text-blue-600 dark:text-blue-400 bg-blue-50/50 dark:bg-blue-900/10" : "text-gray-900 dark:text-white"}`));
938
+ }), _el$153, _co$33);
939
+ effect(() => className(_el$148, `w-full text-left px-2 py-1.5 text-sm rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 ${String(value()) === opt.value ? "text-blue-600 dark:text-blue-400 bg-blue-50/50 dark:bg-blue-900/10" : "text-gray-900 dark:text-white"}`));
878
940
  runHydrationEvents();
879
- return _el$146;
941
+ return _el$148;
880
942
  })()
881
943
  }));
882
- return _el$132;
944
+ return _el$134;
883
945
  })(), (() => {
884
- var _el$133 = getNextElement(_tmpl$32);
885
- _el$133.$$click = () => setEditingKey(null);
946
+ var _el$135 = getNextElement(_tmpl$32);
947
+ _el$135.$$click = () => setEditingKey(null);
886
948
  runHydrationEvents();
887
- return _el$133;
949
+ return _el$135;
888
950
  })()];
889
951
  }
890
952
  }));
891
- return _el$131;
953
+ return _el$133;
892
954
  }
893
- }), _el$137, _co$29);
894
- return _el$118;
955
+ }), _el$139, _co$30);
956
+ return _el$120;
895
957
  })();
896
958
  }
897
- }), _el$115, _co$23);
898
- insert(_el$112, createComponent(Show, {
959
+ }), _el$117, _co$24);
960
+ insert(_el$114, createComponent(Show, {
899
961
  get when() {
900
962
  return allKeys().length === 0;
901
963
  },
902
964
  get children() {
903
965
  return getNextElement(_tmpl$27);
904
966
  }
905
- }), _el$117, _co$24);
906
- return _el$112;
967
+ }), _el$119, _co$25);
968
+ return _el$114;
907
969
  })();
908
970
  };
909
971
  const EmbeddedFormSection = (props) => {
@@ -970,9 +1032,9 @@ const EmbeddedFormSection = (props) => {
970
1032
  }
971
1033
  };
972
1034
  return (() => {
973
- var _el$152 = getNextElement(_tmpl$39), _el$155 = _el$152.firstChild, [_el$156, _co$33] = getNextMarker(_el$155.nextSibling), _el$153 = _el$156.nextSibling, _el$154 = _el$153.firstChild;
974
- _el$152.addEventListener("submit", handleSubmit);
975
- insert(_el$152, createComponent(For, {
1035
+ var _el$154 = getNextElement(_tmpl$39), _el$157 = _el$154.firstChild, [_el$158, _co$34] = getNextMarker(_el$157.nextSibling), _el$155 = _el$158.nextSibling, _el$156 = _el$155.firstChild;
1036
+ _el$154.addEventListener("submit", handleSubmit);
1037
+ insert(_el$154, createComponent(For, {
976
1038
  get each() {
977
1039
  return config().fields;
978
1040
  },
@@ -986,9 +1048,9 @@ const EmbeddedFormSection = (props) => {
986
1048
  onChange: (val) => updateField(field.name, val),
987
1049
  formData
988
1050
  })
989
- }), _el$156, _co$33);
990
- insert(_el$154, () => config().submitLabel);
991
- return _el$152;
1051
+ }), _el$158, _co$34);
1052
+ insert(_el$156, () => config().submitLabel);
1053
+ return _el$154;
992
1054
  })();
993
1055
  };
994
1056
  const EnrichedStepsSection = (props) => {
@@ -1000,35 +1062,35 @@ const EnrichedStepsSection = (props) => {
1000
1062
  };
1001
1063
  };
1002
1064
  return (() => {
1003
- var _el$157 = getNextElement(_tmpl$41), _el$160 = _el$157.firstChild, [_el$161, _co$34] = getNextMarker(_el$160.nextSibling), _el$162 = _el$161.nextSibling, [_el$163, _co$35] = getNextMarker(_el$162.nextSibling);
1004
- insert(_el$157, createComponent(For, {
1065
+ var _el$159 = getNextElement(_tmpl$41), _el$162 = _el$159.firstChild, [_el$163, _co$35] = getNextMarker(_el$162.nextSibling), _el$164 = _el$163.nextSibling, [_el$165, _co$36] = getNextMarker(_el$164.nextSibling);
1066
+ insert(_el$159, createComponent(For, {
1005
1067
  get each() {
1006
1068
  return stepsData().steps;
1007
1069
  },
1008
1070
  children: (step) => (() => {
1009
- var _el$164 = getNextElement(_tmpl$44), _el$165 = _el$164.firstChild, _el$166 = _el$165.firstChild, _el$171 = _el$166.nextSibling, [_el$172, _co$37] = getNextMarker(_el$171.nextSibling), _el$173 = _el$172.nextSibling, [_el$174, _co$38] = getNextMarker(_el$173.nextSibling), _el$176 = _el$165.nextSibling, [_el$177, _co$39] = getNextMarker(_el$176.nextSibling);
1010
- insert(_el$166, (() => {
1071
+ var _el$166 = getNextElement(_tmpl$44), _el$167 = _el$166.firstChild, _el$168 = _el$167.firstChild, _el$173 = _el$168.nextSibling, [_el$174, _co$38] = getNextMarker(_el$173.nextSibling), _el$175 = _el$174.nextSibling, [_el$176, _co$39] = getNextMarker(_el$175.nextSibling), _el$178 = _el$167.nextSibling, [_el$179, _co$40] = getNextMarker(_el$178.nextSibling);
1072
+ insert(_el$168, (() => {
1011
1073
  var _c$5 = memo(() => step.status === "done");
1012
1074
  return () => _c$5() ? "✅" : step.status === "active" ? "●" : "○";
1013
1075
  })());
1014
- insert(_el$165, () => step.label, _el$172, _co$37);
1015
- insert(_el$165, createComponent(Show, {
1076
+ insert(_el$167, () => step.label, _el$174, _co$38);
1077
+ insert(_el$167, createComponent(Show, {
1016
1078
  get when() {
1017
1079
  return memo(() => !!step.description)() && step.status === "active";
1018
1080
  },
1019
1081
  get children() {
1020
- var _el$167 = getNextElement(_tmpl$42), _el$168 = _el$167.firstChild, _el$169 = _el$168.nextSibling, [_el$170, _co$36] = getNextMarker(_el$169.nextSibling);
1021
- insert(_el$167, () => step.description, _el$170, _co$36);
1022
- return _el$167;
1082
+ var _el$169 = getNextElement(_tmpl$42), _el$170 = _el$169.firstChild, _el$171 = _el$170.nextSibling, [_el$172, _co$37] = getNextMarker(_el$171.nextSibling);
1083
+ insert(_el$169, () => step.description, _el$172, _co$37);
1084
+ return _el$169;
1023
1085
  }
1024
- }), _el$174, _co$38);
1025
- insert(_el$164, createComponent(Show, {
1086
+ }), _el$176, _co$39);
1087
+ insert(_el$166, createComponent(Show, {
1026
1088
  get when() {
1027
1089
  return memo(() => step.status === "active")() && step.content;
1028
1090
  },
1029
1091
  get children() {
1030
- var _el$175 = getNextElement(_tmpl$43);
1031
- insert(_el$175, createComponent(SectionRenderer, {
1092
+ var _el$177 = getNextElement(_tmpl$43);
1093
+ insert(_el$177, createComponent(SectionRenderer, {
1032
1094
  get section() {
1033
1095
  return step.content;
1034
1096
  },
@@ -1040,79 +1102,160 @@ const EnrichedStepsSection = (props) => {
1040
1102
  return props.onAction;
1041
1103
  }
1042
1104
  }));
1043
- return _el$175;
1105
+ return _el$177;
1044
1106
  }
1045
- }), _el$177, _co$39);
1107
+ }), _el$179, _co$40);
1046
1108
  effect((_p$) => {
1047
1109
  var _v$4 = `rounded-lg ${step.status === "active" ? "bg-blue-50/50 dark:bg-blue-900/10 border border-blue-200 dark:border-blue-800 p-3 animate-pulse" : "px-1"}`, _v$5 = `flex items-center gap-2 text-sm font-medium ${step.status === "done" ? "text-green-600 dark:text-green-400" : step.status === "active" ? "text-blue-600 dark:text-blue-400" : "text-gray-400"}`;
1048
- _v$4 !== _p$.e && className(_el$164, _p$.e = _v$4);
1049
- _v$5 !== _p$.t && className(_el$165, _p$.t = _v$5);
1110
+ _v$4 !== _p$.e && className(_el$166, _p$.e = _v$4);
1111
+ _v$5 !== _p$.t && className(_el$167, _p$.t = _v$5);
1050
1112
  return _p$;
1051
1113
  }, {
1052
1114
  e: void 0,
1053
1115
  t: void 0
1054
1116
  });
1055
- return _el$164;
1117
+ return _el$166;
1056
1118
  })()
1057
- }), _el$161, _co$34);
1058
- insert(_el$157, createComponent(Show, {
1119
+ }), _el$163, _co$35);
1120
+ insert(_el$159, createComponent(Show, {
1059
1121
  get when() {
1060
1122
  return stepsData().steps.some((s) => s.status === "active");
1061
1123
  },
1062
1124
  get children() {
1063
- var _el$158 = getNextElement(_tmpl$40), _el$159 = _el$158.firstChild;
1064
- _el$159.$$click = () => {
1125
+ var _el$160 = getNextElement(_tmpl$40), _el$161 = _el$160.firstChild;
1126
+ _el$161.$$click = () => {
1065
1127
  var _a;
1066
1128
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "next_step", {
1067
1129
  step: stepsData().currentStep
1068
1130
  });
1069
1131
  };
1070
1132
  runHydrationEvents();
1071
- return _el$158;
1133
+ return _el$160;
1072
1134
  }
1073
- }), _el$163, _co$35);
1074
- return _el$157;
1135
+ }), _el$165, _co$36);
1136
+ return _el$159;
1075
1137
  })();
1076
1138
  };
1077
1139
  const ActionSection = (props) => {
1078
- const actions = () => {
1079
- if (Array.isArray(props.content)) return props.content;
1080
- const obj = props.content;
1081
- if (obj && Array.isArray(obj.actions)) {
1082
- console.warn("[MCP-UI] ActionSection: content should be an array, got { actions: [...] }. Unwrapping automatically.");
1083
- return obj.actions;
1084
- }
1085
- return [];
1140
+ const data = () => {
1141
+ const c = props.content;
1142
+ if (Array.isArray(c)) return {
1143
+ actions: c,
1144
+ title: void 0,
1145
+ preview: void 0,
1146
+ validation: void 0
1147
+ };
1148
+ if (c && Array.isArray(c.actions)) return {
1149
+ actions: c.actions,
1150
+ title: c.title,
1151
+ preview: c.preview,
1152
+ validation: c.validation
1153
+ };
1154
+ return {
1155
+ actions: [],
1156
+ title: void 0,
1157
+ preview: void 0,
1158
+ validation: void 0
1159
+ };
1086
1160
  };
1087
1161
  return (() => {
1088
- var _el$178 = getNextElement(_tmpl$45);
1089
- insert(_el$178, createComponent(For, {
1162
+ var _el$180 = getNextElement(_tmpl$48), _el$195 = _el$180.firstChild, [_el$196, _co$44] = getNextMarker(_el$195.nextSibling), _el$197 = _el$196.nextSibling, [_el$198, _co$45] = getNextMarker(_el$197.nextSibling), _el$199 = _el$198.nextSibling, [_el$200, _co$46] = getNextMarker(_el$199.nextSibling), _el$194 = _el$200.nextSibling;
1163
+ insert(_el$180, createComponent(Show, {
1164
+ get when() {
1165
+ return data().title;
1166
+ },
1167
+ get children() {
1168
+ var _el$181 = getNextElement(_tmpl$45);
1169
+ insert(_el$181, () => data().title);
1170
+ return _el$181;
1171
+ }
1172
+ }), _el$196, _co$44);
1173
+ insert(_el$180, createComponent(Show, {
1174
+ get when() {
1175
+ return data().preview;
1176
+ },
1177
+ children: (preview) => (() => {
1178
+ var _el$201 = getNextElement(_tmpl$51), _el$207 = _el$201.firstChild, [_el$208, _co$48] = getNextMarker(_el$207.nextSibling), _el$209 = _el$208.nextSibling, [_el$210, _co$49] = getNextMarker(_el$209.nextSibling);
1179
+ insert(_el$201, createComponent(Show, {
1180
+ get when() {
1181
+ return preview().count != null;
1182
+ },
1183
+ get children() {
1184
+ return [(() => {
1185
+ var _el$202 = getNextElement(_tmpl$49);
1186
+ insert(_el$202, () => preview().count);
1187
+ return _el$202;
1188
+ })(), " items"];
1189
+ }
1190
+ }), _el$208, _co$48);
1191
+ insert(_el$201, createComponent(Show, {
1192
+ get when() {
1193
+ return preview().summary;
1194
+ },
1195
+ get children() {
1196
+ var _el$203 = getNextElement(_tmpl$50), _el$204 = _el$203.firstChild, _el$205 = _el$204.nextSibling, [_el$206, _co$47] = getNextMarker(_el$205.nextSibling);
1197
+ insert(_el$203, () => preview().summary, _el$206, _co$47);
1198
+ return _el$203;
1199
+ }
1200
+ }), _el$210, _co$49);
1201
+ return _el$201;
1202
+ })()
1203
+ }), _el$198, _co$45);
1204
+ insert(_el$180, createComponent(Show, {
1205
+ get when() {
1206
+ return memo(() => !!data().validation)() && data().validation.confidence != null;
1207
+ },
1208
+ get children() {
1209
+ var _el$182 = getNextElement(_tmpl$47), _el$183 = _el$182.firstChild, _el$185 = _el$183.firstChild, [_el$186, _co$41] = getNextMarker(_el$185.nextSibling);
1210
+ _el$186.nextSibling;
1211
+ var _el$192 = _el$183.nextSibling, [_el$193, _co$43] = getNextMarker(_el$192.nextSibling);
1212
+ insert(_el$183, () => Math.round(data().validation.confidence * 100), _el$186, _co$41);
1213
+ insert(_el$182, createComponent(Show, {
1214
+ get when() {
1215
+ var _a;
1216
+ return ((_a = data().validation.hallucinated) == null ? void 0 : _a.length) > 0;
1217
+ },
1218
+ get children() {
1219
+ var _el$187 = getNextElement(_tmpl$46), _el$188 = _el$187.firstChild, _el$190 = _el$188.nextSibling, [_el$191, _co$42] = getNextMarker(_el$190.nextSibling);
1220
+ _el$191.nextSibling;
1221
+ insert(_el$187, () => data().validation.hallucinated.length, _el$191, _co$42);
1222
+ return _el$187;
1223
+ }
1224
+ }), _el$193, _co$43);
1225
+ effect((_$p) => classList(_el$183, {
1226
+ "text-green-600 dark:text-green-400": data().validation.confidence >= 0.8,
1227
+ "text-amber-600 dark:text-amber-400": data().validation.confidence >= 0.5 && data().validation.confidence < 0.8,
1228
+ "text-red-600 dark:text-red-400": data().validation.confidence < 0.5
1229
+ }, _$p));
1230
+ return _el$182;
1231
+ }
1232
+ }), _el$200, _co$46);
1233
+ insert(_el$194, createComponent(For, {
1090
1234
  get each() {
1091
- return actions();
1235
+ return data().actions;
1092
1236
  },
1093
1237
  children: (item) => (() => {
1094
- var _el$179 = getNextElement(_tmpl$38), _el$181 = _el$179.firstChild, [_el$182, _co$40] = getNextMarker(_el$181.nextSibling), _el$183 = _el$182.nextSibling, [_el$184, _co$41] = getNextMarker(_el$183.nextSibling);
1095
- _el$179.$$click = () => {
1238
+ var _el$211 = getNextElement(_tmpl$38), _el$213 = _el$211.firstChild, [_el$214, _co$50] = getNextMarker(_el$213.nextSibling), _el$215 = _el$214.nextSibling, [_el$216, _co$51] = getNextMarker(_el$215.nextSibling);
1239
+ addEventListener(_el$211, "click", () => {
1096
1240
  var _a;
1097
1241
  return (_a = props.onAction) == null ? void 0 : _a.call(props, item.value || item.action || item.label, item);
1098
- };
1099
- insert(_el$179, createComponent(Show, {
1242
+ });
1243
+ insert(_el$211, createComponent(Show, {
1100
1244
  get when() {
1101
1245
  return item.icon;
1102
1246
  },
1103
1247
  get children() {
1104
- var _el$180 = getNextElement(_tmpl$46);
1105
- insert(_el$180, () => item.icon);
1106
- return _el$180;
1248
+ var _el$212 = getNextElement(_tmpl$52);
1249
+ insert(_el$212, () => item.icon);
1250
+ return _el$212;
1107
1251
  }
1108
- }), _el$182, _co$40);
1109
- insert(_el$179, () => item.label, _el$184, _co$41);
1110
- effect(() => className(_el$179, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${item.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : item.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1111
- runHydrationEvents();
1112
- return _el$179;
1252
+ }), _el$214, _co$50);
1253
+ insert(_el$211, () => item.label, _el$216, _co$51);
1254
+ effect(() => className(_el$211, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${item.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : item.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : item.variant === "secondary" ? "border border-blue-300 dark:border-blue-600 text-blue-700 dark:text-blue-300 hover:bg-blue-50 dark:hover:bg-blue-900/20" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1255
+ return _el$211;
1113
1256
  })()
1114
1257
  }));
1115
- return _el$178;
1258
+ return _el$180;
1116
1259
  })();
1117
1260
  };
1118
1261
  const UnderstandingSection = (props) => {
@@ -1136,44 +1279,45 @@ const UnderstandingSection = (props) => {
1136
1279
  }
1137
1280
  };
1138
1281
  return (() => {
1139
- var _el$185 = getNextElement(_tmpl$47), _el$186 = _el$185.firstChild, _el$188 = _el$186.nextSibling, [_el$189, _co$42] = getNextMarker(_el$188.nextSibling);
1140
- insert(_el$186, createComponent(For, {
1282
+ var _el$217 = getNextElement(_tmpl$53), _el$218 = _el$217.firstChild, _el$220 = _el$218.nextSibling, [_el$221, _co$52] = getNextMarker(_el$220.nextSibling);
1283
+ insert(_el$218, createComponent(For, {
1141
1284
  get each() {
1142
1285
  return data().detections;
1143
1286
  },
1144
1287
  children: (det) => (() => {
1145
- var _el$190 = getNextElement(_tmpl$48), _el$191 = _el$190.firstChild, _el$192 = _el$191.nextSibling;
1146
- insert(_el$191, () => det.label);
1147
- insert(_el$192, () => det.value);
1148
- effect(() => className(_el$191, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
1149
- return _el$190;
1288
+ var _el$222 = getNextElement(_tmpl$54), _el$223 = _el$222.firstChild, _el$224 = _el$223.nextSibling;
1289
+ insert(_el$223, () => det.label);
1290
+ insert(_el$224, () => det.value);
1291
+ effect(() => className(_el$223, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
1292
+ return _el$222;
1150
1293
  })()
1151
1294
  }));
1152
- insert(_el$185, createComponent(Show, {
1295
+ insert(_el$217, createComponent(Show, {
1153
1296
  get when() {
1154
1297
  return data().warnings.length > 0;
1155
1298
  },
1156
1299
  get children() {
1157
- var _el$187 = getNextElement(_tmpl$25);
1158
- insert(_el$187, createComponent(For, {
1300
+ var _el$219 = getNextElement(_tmpl$25);
1301
+ insert(_el$219, createComponent(For, {
1159
1302
  get each() {
1160
1303
  return data().warnings;
1161
1304
  },
1162
1305
  children: (w) => (() => {
1163
- var _el$193 = getNextElement(_tmpl$49), _el$194 = _el$193.firstChild, _el$195 = _el$194.nextSibling;
1164
- insert(_el$195, w);
1165
- return _el$193;
1306
+ var _el$225 = getNextElement(_tmpl$55), _el$226 = _el$225.firstChild, _el$227 = _el$226.nextSibling;
1307
+ insert(_el$227, w);
1308
+ return _el$225;
1166
1309
  })()
1167
1310
  }));
1168
- return _el$187;
1311
+ return _el$219;
1169
1312
  }
1170
- }), _el$189, _co$42);
1171
- return _el$185;
1313
+ }), _el$221, _co$52);
1314
+ return _el$217;
1172
1315
  })();
1173
1316
  };
1174
1317
  const FeedbackSection = (props) => {
1175
1318
  const [comment, setComment] = createSignal("");
1176
1319
  const [showComment, setShowComment] = createSignal(false);
1320
+ const [submitted, setSubmitted] = createSignal(null);
1177
1321
  const data = () => {
1178
1322
  var _a, _b, _c, _d;
1179
1323
  const c = props.content;
@@ -1191,7 +1335,10 @@ const FeedbackSection = (props) => {
1191
1335
  question: (c == null ? void 0 : c.question) || "",
1192
1336
  options,
1193
1337
  allowFreeText: (c == null ? void 0 : c.allowFreeText) ?? (c == null ? void 0 : c.allowComment) ?? false,
1194
- placeholder: (c == null ? void 0 : c.placeholder) || (c == null ? void 0 : c.commentPlaceholder) || "Add a comment..."
1338
+ placeholder: (c == null ? void 0 : c.placeholder) || (c == null ? void 0 : c.commentPlaceholder) || "Add a comment...",
1339
+ // v4.1.0: per-step feedback
1340
+ agentId: c == null ? void 0 : c.agentId,
1341
+ stepId: c == null ? void 0 : c.stepId
1195
1342
  };
1196
1343
  };
1197
1344
  const handleOption = (option) => {
@@ -1200,66 +1347,126 @@ const FeedbackSection = (props) => {
1200
1347
  setShowComment(true);
1201
1348
  return;
1202
1349
  }
1203
- (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
1350
+ setSubmitted(option.value);
1351
+ const payload = {
1204
1352
  option: option.value,
1205
- comment: comment()
1353
+ comment: comment(),
1354
+ ...data().agentId ? {
1355
+ agentId: data().agentId
1356
+ } : {},
1357
+ ...data().stepId ? {
1358
+ stepId: data().stepId
1359
+ } : {}
1360
+ };
1361
+ console.info("[MCP-UI:HITL] user responded", {
1362
+ agentId: data().agentId,
1363
+ stepId: data().stepId,
1364
+ action: option.value
1206
1365
  });
1366
+ (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", payload);
1207
1367
  };
1208
1368
  return (() => {
1209
- var _el$196 = getNextElement(_tmpl$51), _el$197 = _el$196.firstChild, _el$198 = _el$197.nextSibling, _el$202 = _el$198.nextSibling, [_el$203, _co$43] = getNextMarker(_el$202.nextSibling);
1210
- insert(_el$197, () => data().question);
1211
- insert(_el$198, createComponent(For, {
1212
- get each() {
1213
- return data().options;
1369
+ var _el$228 = getNextElement(_tmpl$60), _el$229 = _el$228.firstChild, _el$247 = _el$229.nextSibling, [_el$248, _co$57] = getNextMarker(_el$247.nextSibling), _el$249 = _el$248.nextSibling, [_el$250, _co$58] = getNextMarker(_el$249.nextSibling);
1370
+ insert(_el$229, () => data().question);
1371
+ insert(_el$228, createComponent(Show, {
1372
+ get when() {
1373
+ return submitted();
1214
1374
  },
1215
- children: (option) => (() => {
1216
- var _el$204 = getNextElement(_tmpl$38), _el$206 = _el$204.firstChild, [_el$207, _co$44] = getNextMarker(_el$206.nextSibling), _el$208 = _el$207.nextSibling, [_el$209, _co$45] = getNextMarker(_el$208.nextSibling);
1217
- _el$204.$$click = () => handleOption(option);
1218
- insert(_el$204, createComponent(Show, {
1375
+ get children() {
1376
+ var _el$230 = getNextElement(_tmpl$57), _el$231 = _el$230.firstChild, _el$233 = _el$231.firstChild, [_el$234, _co$53] = getNextMarker(_el$233.nextSibling), _el$232 = _el$234.nextSibling, _el$235 = _el$232.nextSibling, [_el$236, _co$54] = getNextMarker(_el$235.nextSibling), _el$241 = _el$231.nextSibling, [_el$242, _co$56] = getNextMarker(_el$241.nextSibling);
1377
+ insert(_el$231, (() => {
1378
+ var _c$6 = memo(() => submitted() === "approve");
1379
+ return () => _c$6() ? "✅" : submitted() === "reject" ? "❌" : "💬";
1380
+ })(), _el$234, _co$53);
1381
+ insert(_el$231, submitted, _el$236, _co$54);
1382
+ insert(_el$230, createComponent(Show, {
1219
1383
  get when() {
1220
- return option.icon;
1384
+ return comment();
1221
1385
  },
1222
1386
  get children() {
1223
- var _el$205 = getNextElement(_tmpl$52);
1224
- insert(_el$205, () => option.icon);
1225
- return _el$205;
1387
+ var _el$237 = getNextElement(_tmpl$56), _el$238 = _el$237.firstChild, _el$239 = _el$238.nextSibling, [_el$240, _co$55] = getNextMarker(_el$239.nextSibling);
1388
+ insert(_el$237, comment, _el$240, _co$55);
1389
+ return _el$237;
1226
1390
  }
1227
- }), _el$207, _co$44);
1228
- insert(_el$204, () => option.label, _el$209, _co$45);
1229
- effect(() => className(_el$204, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors flex items-center gap-1 ${option.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : option.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1230
- runHydrationEvents();
1231
- return _el$204;
1232
- })()
1233
- }));
1234
- insert(_el$196, createComponent(Show, {
1235
- get when() {
1236
- return data().allowFreeText || showComment();
1237
- },
1238
- get children() {
1239
- var _el$199 = getNextElement(_tmpl$50), _el$200 = _el$199.firstChild, _el$201 = _el$200.nextSibling;
1240
- _el$200.$$input = (e) => setComment(e.currentTarget.value);
1241
- _el$201.$$click = () => {
1242
- var _a;
1243
- return (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
1244
- option: "comment",
1245
- comment: comment()
1246
- });
1247
- };
1391
+ }), _el$242, _co$56);
1248
1392
  effect((_p$) => {
1249
- var _v$6 = data().placeholder, _v$7 = showComment();
1250
- _v$6 !== _p$.e && setAttribute(_el$200, "placeholder", _p$.e = _v$6);
1251
- _v$7 !== _p$.t && setProperty(_el$200, "autofocus", _p$.t = _v$7);
1393
+ var _v$6 = !!(submitted() === "approve"), _v$7 = !!(submitted() === "reject"), _v$8 = !!(submitted() !== "approve" && submitted() !== "reject");
1394
+ _v$6 !== _p$.e && _el$231.classList.toggle("text-green-600", _p$.e = _v$6);
1395
+ _v$7 !== _p$.t && _el$231.classList.toggle("text-red-600", _p$.t = _v$7);
1396
+ _v$8 !== _p$.a && _el$231.classList.toggle("text-blue-600", _p$.a = _v$8);
1252
1397
  return _p$;
1253
1398
  }, {
1254
1399
  e: void 0,
1255
- t: void 0
1400
+ t: void 0,
1401
+ a: void 0
1256
1402
  });
1257
- effect(() => setProperty(_el$200, "value", comment()));
1258
- runHydrationEvents();
1259
- return _el$199;
1403
+ return _el$230;
1260
1404
  }
1261
- }), _el$203, _co$43);
1262
- return _el$196;
1405
+ }), _el$248, _co$57);
1406
+ insert(_el$228, createComponent(Show, {
1407
+ get when() {
1408
+ return !submitted();
1409
+ },
1410
+ get children() {
1411
+ return [(() => {
1412
+ var _el$243 = getNextElement(_tmpl$58);
1413
+ insert(_el$243, createComponent(For, {
1414
+ get each() {
1415
+ return data().options;
1416
+ },
1417
+ children: (option) => (() => {
1418
+ var _el$251 = getNextElement(_tmpl$38), _el$253 = _el$251.firstChild, [_el$254, _co$59] = getNextMarker(_el$253.nextSibling), _el$255 = _el$254.nextSibling, [_el$256, _co$60] = getNextMarker(_el$255.nextSibling);
1419
+ addEventListener(_el$251, "click", () => handleOption(option));
1420
+ insert(_el$251, createComponent(Show, {
1421
+ get when() {
1422
+ return option.icon;
1423
+ },
1424
+ get children() {
1425
+ var _el$252 = getNextElement(_tmpl$61);
1426
+ insert(_el$252, () => option.icon);
1427
+ return _el$252;
1428
+ }
1429
+ }), _el$254, _co$59);
1430
+ insert(_el$251, () => option.label, _el$256, _co$60);
1431
+ effect(() => className(_el$251, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors flex items-center gap-1 ${option.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : option.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1432
+ return _el$251;
1433
+ })()
1434
+ }));
1435
+ return _el$243;
1436
+ })(), createComponent(Show, {
1437
+ get when() {
1438
+ return data().allowFreeText || showComment();
1439
+ },
1440
+ get children() {
1441
+ var _el$244 = getNextElement(_tmpl$59), _el$245 = _el$244.firstChild, _el$246 = _el$245.nextSibling;
1442
+ _el$245.$$input = (e) => setComment(e.currentTarget.value);
1443
+ addEventListener(_el$246, "click", () => {
1444
+ var _a;
1445
+ setSubmitted("comment");
1446
+ (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
1447
+ option: "comment",
1448
+ comment: comment(),
1449
+ agentId: data().agentId,
1450
+ stepId: data().stepId
1451
+ });
1452
+ });
1453
+ effect((_p$) => {
1454
+ var _v$9 = data().placeholder, _v$0 = showComment();
1455
+ _v$9 !== _p$.e && setAttribute(_el$245, "placeholder", _p$.e = _v$9);
1456
+ _v$0 !== _p$.t && setProperty(_el$245, "autofocus", _p$.t = _v$0);
1457
+ return _p$;
1458
+ }, {
1459
+ e: void 0,
1460
+ t: void 0
1461
+ });
1462
+ effect(() => setProperty(_el$245, "value", comment()));
1463
+ runHydrationEvents();
1464
+ return _el$244;
1465
+ }
1466
+ })];
1467
+ }
1468
+ }), _el$250, _co$58);
1469
+ return _el$228;
1263
1470
  })();
1264
1471
  };
1265
1472
  const PromptSection = (props) => {
@@ -1274,56 +1481,56 @@ const PromptSection = (props) => {
1274
1481
  };
1275
1482
  };
1276
1483
  return (() => {
1277
- var _el$210 = getNextElement(_tmpl$56), _el$223 = _el$210.firstChild, [_el$224, _co$48] = getNextMarker(_el$223.nextSibling), _el$216 = _el$224.nextSibling, _el$225 = _el$216.nextSibling, [_el$226, _co$49] = getNextMarker(_el$225.nextSibling), _el$227 = _el$226.nextSibling, [_el$228, _co$50] = getNextMarker(_el$227.nextSibling);
1278
- insert(_el$210, createComponent(Show, {
1484
+ var _el$257 = getNextElement(_tmpl$65), _el$270 = _el$257.firstChild, [_el$271, _co$63] = getNextMarker(_el$270.nextSibling), _el$263 = _el$271.nextSibling, _el$272 = _el$263.nextSibling, [_el$273, _co$64] = getNextMarker(_el$272.nextSibling), _el$274 = _el$273.nextSibling, [_el$275, _co$65] = getNextMarker(_el$274.nextSibling);
1485
+ insert(_el$257, createComponent(Show, {
1279
1486
  get when() {
1280
1487
  return data().originalQuery;
1281
1488
  },
1282
1489
  get children() {
1283
- var _el$211 = getNextElement(_tmpl$53), _el$212 = _el$211.firstChild, _el$214 = _el$212.nextSibling, [_el$215, _co$46] = getNextMarker(_el$214.nextSibling);
1284
- _el$215.nextSibling;
1285
- insert(_el$211, () => data().originalQuery, _el$215, _co$46);
1286
- return _el$211;
1490
+ var _el$258 = getNextElement(_tmpl$62), _el$259 = _el$258.firstChild, _el$261 = _el$259.nextSibling, [_el$262, _co$61] = getNextMarker(_el$261.nextSibling);
1491
+ _el$262.nextSibling;
1492
+ insert(_el$258, () => data().originalQuery, _el$262, _co$61);
1493
+ return _el$258;
1287
1494
  }
1288
- }), _el$224, _co$48);
1289
- insert(_el$216, createComponent(For, {
1495
+ }), _el$271, _co$63);
1496
+ insert(_el$263, createComponent(For, {
1290
1497
  get each() {
1291
1498
  return Object.entries(data().extracted);
1292
1499
  },
1293
1500
  children: ([key, value]) => (() => {
1294
- var _el$229 = getNextElement(_tmpl$57), _el$230 = _el$229.firstChild, _el$232 = _el$230.firstChild, [_el$233, _co$51] = getNextMarker(_el$232.nextSibling);
1295
- _el$233.nextSibling;
1296
- var _el$234 = _el$230.nextSibling;
1297
- insert(_el$230, key, _el$233, _co$51);
1298
- insert(_el$234, () => String(value));
1299
- return _el$229;
1501
+ var _el$276 = getNextElement(_tmpl$66), _el$277 = _el$276.firstChild, _el$279 = _el$277.firstChild, [_el$280, _co$66] = getNextMarker(_el$279.nextSibling);
1502
+ _el$280.nextSibling;
1503
+ var _el$281 = _el$277.nextSibling;
1504
+ insert(_el$277, key, _el$280, _co$66);
1505
+ insert(_el$281, () => String(value));
1506
+ return _el$276;
1300
1507
  })()
1301
1508
  }));
1302
- insert(_el$210, createComponent(Show, {
1509
+ insert(_el$257, createComponent(Show, {
1303
1510
  get when() {
1304
1511
  return data().plan;
1305
1512
  },
1306
1513
  get children() {
1307
- var _el$217 = getNextElement(_tmpl$54), _el$218 = _el$217.firstChild, _el$219 = _el$218.nextSibling, _el$220 = _el$219.nextSibling, [_el$221, _co$47] = getNextMarker(_el$220.nextSibling);
1308
- insert(_el$217, () => data().plan, _el$221, _co$47);
1309
- return _el$217;
1514
+ var _el$264 = getNextElement(_tmpl$63), _el$265 = _el$264.firstChild, _el$266 = _el$265.nextSibling, _el$267 = _el$266.nextSibling, [_el$268, _co$62] = getNextMarker(_el$267.nextSibling);
1515
+ insert(_el$264, () => data().plan, _el$268, _co$62);
1516
+ return _el$264;
1310
1517
  }
1311
- }), _el$226, _co$49);
1312
- insert(_el$210, createComponent(Show, {
1518
+ }), _el$273, _co$64);
1519
+ insert(_el$257, createComponent(Show, {
1313
1520
  get when() {
1314
1521
  return data().editable;
1315
1522
  },
1316
1523
  get children() {
1317
- var _el$222 = getNextElement(_tmpl$55);
1318
- _el$222.$$click = () => {
1524
+ var _el$269 = getNextElement(_tmpl$64);
1525
+ _el$269.$$click = () => {
1319
1526
  var _a;
1320
1527
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "edit_prompt", data());
1321
1528
  };
1322
1529
  runHydrationEvents();
1323
- return _el$222;
1530
+ return _el$269;
1324
1531
  }
1325
- }), _el$228, _co$50);
1326
- return _el$210;
1532
+ }), _el$275, _co$65);
1533
+ return _el$257;
1327
1534
  })();
1328
1535
  };
1329
1536
  const StepperProgressSection = (props) => {
@@ -1353,46 +1560,46 @@ const StepperProgressSection = (props) => {
1353
1560
  },
1354
1561
  get fallback() {
1355
1562
  return (() => {
1356
- var _el$236 = getNextElement(_tmpl$59);
1357
- insert(_el$236, createComponent(For, {
1563
+ var _el$283 = getNextElement(_tmpl$68);
1564
+ insert(_el$283, createComponent(For, {
1358
1565
  get each() {
1359
1566
  return data().steps;
1360
1567
  },
1361
1568
  children: (step) => (() => {
1362
- var _el$237 = getNextElement(_tmpl$62), _el$238 = _el$237.firstChild, _el$239 = _el$238.nextSibling, _el$240 = _el$239.firstChild, _el$250 = _el$240.nextSibling, [_el$251, _co$54] = getNextMarker(_el$250.nextSibling), _el$252 = _el$251.nextSibling, [_el$253, _co$55] = getNextMarker(_el$252.nextSibling);
1363
- insert(_el$238, () => statusIcon(step.status));
1364
- insert(_el$240, () => step.label);
1365
- insert(_el$239, createComponent(Show, {
1569
+ var _el$284 = getNextElement(_tmpl$71), _el$285 = _el$284.firstChild, _el$286 = _el$285.nextSibling, _el$287 = _el$286.firstChild, _el$297 = _el$287.nextSibling, [_el$298, _co$69] = getNextMarker(_el$297.nextSibling), _el$299 = _el$298.nextSibling, [_el$300, _co$70] = getNextMarker(_el$299.nextSibling);
1570
+ insert(_el$285, () => statusIcon(step.status));
1571
+ insert(_el$287, () => step.label);
1572
+ insert(_el$286, createComponent(Show, {
1366
1573
  get when() {
1367
1574
  return step.summary;
1368
1575
  },
1369
1576
  get children() {
1370
- var _el$241 = getNextElement(_tmpl$60), _el$242 = _el$241.firstChild, _el$243 = _el$242.nextSibling, [_el$244, _co$52] = getNextMarker(_el$243.nextSibling);
1371
- insert(_el$241, () => step.summary, _el$244, _co$52);
1372
- return _el$241;
1577
+ var _el$288 = getNextElement(_tmpl$69), _el$289 = _el$288.firstChild, _el$290 = _el$289.nextSibling, [_el$291, _co$67] = getNextMarker(_el$290.nextSibling);
1578
+ insert(_el$288, () => step.summary, _el$291, _co$67);
1579
+ return _el$288;
1373
1580
  }
1374
- }), _el$251, _co$54);
1375
- insert(_el$239, createComponent(Show, {
1581
+ }), _el$298, _co$69);
1582
+ insert(_el$286, createComponent(Show, {
1376
1583
  get when() {
1377
1584
  return step.duration_ms;
1378
1585
  },
1379
1586
  get children() {
1380
- var _el$245 = getNextElement(_tmpl$61), _el$246 = _el$245.firstChild, _el$248 = _el$246.nextSibling, [_el$249, _co$53] = getNextMarker(_el$248.nextSibling);
1381
- _el$249.nextSibling;
1382
- insert(_el$245, () => step.duration_ms, _el$249, _co$53);
1383
- return _el$245;
1587
+ var _el$292 = getNextElement(_tmpl$70), _el$293 = _el$292.firstChild, _el$295 = _el$293.nextSibling, [_el$296, _co$68] = getNextMarker(_el$295.nextSibling);
1588
+ _el$296.nextSibling;
1589
+ insert(_el$292, () => step.duration_ms, _el$296, _co$68);
1590
+ return _el$292;
1384
1591
  }
1385
- }), _el$253, _co$55);
1386
- effect(() => className(_el$237, `flex items-start gap-2 text-sm ${step.status === "active" ? "font-medium" : ""} ${step.status === "pending" ? "text-gray-400" : "text-gray-700 dark:text-gray-300"}`));
1387
- return _el$237;
1592
+ }), _el$300, _co$70);
1593
+ effect(() => className(_el$284, `flex items-start gap-2 text-sm ${step.status === "active" ? "font-medium" : ""} ${step.status === "pending" ? "text-gray-400" : "text-gray-700 dark:text-gray-300"}`));
1594
+ return _el$284;
1388
1595
  })()
1389
1596
  }));
1390
- return _el$236;
1597
+ return _el$283;
1391
1598
  })();
1392
1599
  },
1393
1600
  get children() {
1394
- var _el$235 = getNextElement(_tmpl$58);
1395
- insert(_el$235, createComponent(For, {
1601
+ var _el$282 = getNextElement(_tmpl$67);
1602
+ insert(_el$282, createComponent(For, {
1396
1603
  get each() {
1397
1604
  return data().steps;
1398
1605
  },
@@ -1404,24 +1611,24 @@ const StepperProgressSection = (props) => {
1404
1611
  return getNextElement(_tmpl$13);
1405
1612
  }
1406
1613
  }), (() => {
1407
- var _el$255 = getNextElement(_tmpl$64), _el$256 = _el$255.firstChild, _el$257 = _el$256.nextSibling, _el$259 = _el$257.nextSibling, [_el$260, _co$56] = getNextMarker(_el$259.nextSibling);
1408
- insert(_el$256, () => statusIcon(step.status));
1409
- insert(_el$257, () => step.label);
1410
- insert(_el$255, createComponent(Show, {
1614
+ var _el$302 = getNextElement(_tmpl$73), _el$303 = _el$302.firstChild, _el$304 = _el$303.nextSibling, _el$306 = _el$304.nextSibling, [_el$307, _co$71] = getNextMarker(_el$306.nextSibling);
1615
+ insert(_el$303, () => statusIcon(step.status));
1616
+ insert(_el$304, () => step.label);
1617
+ insert(_el$302, createComponent(Show, {
1411
1618
  get when() {
1412
1619
  return step.summary;
1413
1620
  },
1414
1621
  get children() {
1415
- var _el$258 = getNextElement(_tmpl$63);
1416
- insert(_el$258, () => step.summary);
1417
- return _el$258;
1622
+ var _el$305 = getNextElement(_tmpl$72);
1623
+ insert(_el$305, () => step.summary);
1624
+ return _el$305;
1418
1625
  }
1419
- }), _el$260, _co$56);
1420
- effect(() => className(_el$255, `flex items-center gap-1 px-2 py-1 rounded text-xs ${step.status === "done" ? "bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400" : step.status === "active" ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 font-medium animate-pulse" : step.status === "error" ? "bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400" : "text-gray-400"}`));
1421
- return _el$255;
1626
+ }), _el$307, _co$71);
1627
+ effect(() => className(_el$302, `flex items-center gap-1 px-2 py-1 rounded text-xs ${step.status === "done" ? "bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400" : step.status === "active" ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 font-medium animate-pulse" : step.status === "error" ? "bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400" : "text-gray-400"}`));
1628
+ return _el$302;
1422
1629
  })()]
1423
1630
  }));
1424
- return _el$235;
1631
+ return _el$282;
1425
1632
  }
1426
1633
  });
1427
1634
  };
@@ -1442,48 +1649,48 @@ const ErrorSectionRenderer = (props) => {
1442
1649
  };
1443
1650
  const isWarning = () => data().severity === "warning";
1444
1651
  return (() => {
1445
- var _el$261 = getNextElement(_tmpl$68), _el$262 = _el$261.firstChild, _el$263 = _el$262.firstChild, _el$264 = _el$263.nextSibling, _el$265 = _el$264.firstChild, _el$266 = _el$265.nextSibling, _el$272 = _el$266.firstChild, [_el$273, _co$58] = getNextMarker(_el$272.nextSibling), _el$274 = _el$273.nextSibling, [_el$275, _co$59] = getNextMarker(_el$274.nextSibling), _el$277 = _el$266.nextSibling, [_el$278, _co$60] = getNextMarker(_el$277.nextSibling);
1446
- insert(_el$263, () => isWarning() ? "⚠️" : "❌");
1447
- insert(_el$265, () => data().message);
1448
- insert(_el$266, createComponent(Show, {
1652
+ var _el$308 = getNextElement(_tmpl$77), _el$309 = _el$308.firstChild, _el$310 = _el$309.firstChild, _el$311 = _el$310.nextSibling, _el$312 = _el$311.firstChild, _el$313 = _el$312.nextSibling, _el$319 = _el$313.firstChild, [_el$320, _co$73] = getNextMarker(_el$319.nextSibling), _el$321 = _el$320.nextSibling, [_el$322, _co$74] = getNextMarker(_el$321.nextSibling), _el$324 = _el$313.nextSibling, [_el$325, _co$75] = getNextMarker(_el$324.nextSibling);
1653
+ insert(_el$310, () => isWarning() ? "⚠️" : "❌");
1654
+ insert(_el$312, () => data().message);
1655
+ insert(_el$313, createComponent(Show, {
1449
1656
  get when() {
1450
1657
  return data().retryAction;
1451
1658
  },
1452
1659
  get children() {
1453
- var _el$267 = getNextElement(_tmpl$65), _el$268 = _el$267.firstChild, _el$269 = _el$268.nextSibling, [_el$270, _co$57] = getNextMarker(_el$269.nextSibling);
1454
- _el$267.$$click = () => {
1660
+ var _el$314 = getNextElement(_tmpl$74), _el$315 = _el$314.firstChild, _el$316 = _el$315.nextSibling, [_el$317, _co$72] = getNextMarker(_el$316.nextSibling);
1661
+ _el$314.$$click = () => {
1455
1662
  var _a;
1456
1663
  return (_a = props.onAction) == null ? void 0 : _a.call(props, data().retryAction);
1457
1664
  };
1458
- insert(_el$267, () => data().retryLabel, _el$270, _co$57);
1459
- effect(() => className(_el$267, `px-2 py-1 text-xs font-medium rounded ${isWarning() ? "bg-amber-600 text-white hover:bg-amber-700" : "bg-red-600 text-white hover:bg-red-700"} transition-colors`));
1665
+ insert(_el$314, () => data().retryLabel, _el$317, _co$72);
1666
+ effect(() => className(_el$314, `px-2 py-1 text-xs font-medium rounded ${isWarning() ? "bg-amber-600 text-white hover:bg-amber-700" : "bg-red-600 text-white hover:bg-red-700"} transition-colors`));
1460
1667
  runHydrationEvents();
1461
- return _el$267;
1668
+ return _el$314;
1462
1669
  }
1463
- }), _el$273, _co$58);
1464
- insert(_el$266, createComponent(Show, {
1670
+ }), _el$320, _co$73);
1671
+ insert(_el$313, createComponent(Show, {
1465
1672
  get when() {
1466
1673
  return data().details;
1467
1674
  },
1468
1675
  get children() {
1469
- var _el$271 = getNextElement(_tmpl$66);
1470
- _el$271.$$click = () => setShowDetails(!showDetails());
1676
+ var _el$318 = getNextElement(_tmpl$75);
1677
+ _el$318.$$click = () => setShowDetails(!showDetails());
1471
1678
  runHydrationEvents();
1472
- return _el$271;
1679
+ return _el$318;
1473
1680
  }
1474
- }), _el$275, _co$59);
1475
- insert(_el$264, createComponent(Show, {
1681
+ }), _el$322, _co$74);
1682
+ insert(_el$311, createComponent(Show, {
1476
1683
  get when() {
1477
1684
  return memo(() => !!showDetails())() && data().details;
1478
1685
  },
1479
1686
  get children() {
1480
- var _el$276 = getNextElement(_tmpl$67);
1481
- insert(_el$276, () => data().details);
1482
- return _el$276;
1687
+ var _el$323 = getNextElement(_tmpl$76);
1688
+ insert(_el$323, () => data().details);
1689
+ return _el$323;
1483
1690
  }
1484
- }), _el$278, _co$60);
1485
- effect(() => className(_el$261, `rounded-lg px-3 py-2 text-sm ${isWarning() ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-800" : "bg-red-50 dark:bg-red-900/10 text-red-700 dark:text-red-400 border border-red-200 dark:border-red-800"}`));
1486
- return _el$261;
1691
+ }), _el$325, _co$75);
1692
+ effect(() => className(_el$308, `rounded-lg px-3 py-2 text-sm ${isWarning() ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-800" : "bg-red-50 dark:bg-red-900/10 text-red-700 dark:text-red-400 border border-red-200 dark:border-red-800"}`));
1693
+ return _el$308;
1487
1694
  })();
1488
1695
  };
1489
1696
  const SourceCardSection = (props) => {
@@ -1504,46 +1711,46 @@ const SourceCardSection = (props) => {
1504
1711
  error: "❌"
1505
1712
  })[data().status] || "📦";
1506
1713
  return (() => {
1507
- var _el$279 = getNextElement(_tmpl$71), _el$280 = _el$279.firstChild, _el$281 = _el$280.firstChild, _el$283 = _el$281.firstChild, [_el$284, _co$61] = getNextMarker(_el$283.nextSibling), _el$282 = _el$284.nextSibling, _el$285 = _el$282.nextSibling, [_el$286, _co$62] = getNextMarker(_el$285.nextSibling), _el$291 = _el$281.nextSibling, [_el$292, _co$64] = getNextMarker(_el$291.nextSibling), _el$293 = _el$280.nextSibling, _el$295 = _el$293.nextSibling, [_el$296, _co$65] = getNextMarker(_el$295.nextSibling);
1508
- insert(_el$281, statusIcon, _el$284, _co$61);
1509
- insert(_el$281, () => data().name, _el$286, _co$62);
1510
- insert(_el$280, createComponent(Show, {
1714
+ var _el$326 = getNextElement(_tmpl$80), _el$327 = _el$326.firstChild, _el$328 = _el$327.firstChild, _el$330 = _el$328.firstChild, [_el$331, _co$76] = getNextMarker(_el$330.nextSibling), _el$329 = _el$331.nextSibling, _el$332 = _el$329.nextSibling, [_el$333, _co$77] = getNextMarker(_el$332.nextSibling), _el$338 = _el$328.nextSibling, [_el$339, _co$79] = getNextMarker(_el$338.nextSibling), _el$340 = _el$327.nextSibling, _el$342 = _el$340.nextSibling, [_el$343, _co$80] = getNextMarker(_el$342.nextSibling);
1715
+ insert(_el$328, statusIcon, _el$331, _co$76);
1716
+ insert(_el$328, () => data().name, _el$333, _co$77);
1717
+ insert(_el$327, createComponent(Show, {
1511
1718
  get when() {
1512
1719
  return data().row_count !== void 0;
1513
1720
  },
1514
1721
  get children() {
1515
- var _el$287 = getNextElement(_tmpl$69), _el$289 = _el$287.firstChild, [_el$290, _co$63] = getNextMarker(_el$289.nextSibling);
1516
- _el$290.nextSibling;
1517
- insert(_el$287, () => {
1722
+ var _el$334 = getNextElement(_tmpl$78), _el$336 = _el$334.firstChild, [_el$337, _co$78] = getNextMarker(_el$336.nextSibling);
1723
+ _el$337.nextSibling;
1724
+ insert(_el$334, () => {
1518
1725
  var _a;
1519
1726
  return (_a = data().row_count) == null ? void 0 : _a.toLocaleString();
1520
- }, _el$290, _co$63);
1521
- return _el$287;
1727
+ }, _el$337, _co$78);
1728
+ return _el$334;
1522
1729
  }
1523
- }), _el$292, _co$64);
1524
- insert(_el$293, createComponent(For, {
1730
+ }), _el$339, _co$79);
1731
+ insert(_el$340, createComponent(For, {
1525
1732
  get each() {
1526
1733
  return data().capabilities;
1527
1734
  },
1528
1735
  children: (cap) => (() => {
1529
- var _el$297 = getNextElement(_tmpl$72), _el$299 = _el$297.firstChild, [_el$300, _co$66] = getNextMarker(_el$299.nextSibling), _el$298 = _el$300.nextSibling, _el$301 = _el$298.nextSibling, [_el$302, _co$67] = getNextMarker(_el$301.nextSibling);
1530
- insert(_el$297, () => cap.supported ? "✅" : "❌", _el$300, _co$66);
1531
- insert(_el$297, () => cap.label, _el$302, _co$67);
1532
- effect(() => className(_el$297, `text-[10px] px-1.5 py-0.5 rounded ${cap.supported ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : "bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400"}`));
1533
- return _el$297;
1736
+ var _el$344 = getNextElement(_tmpl$81), _el$346 = _el$344.firstChild, [_el$347, _co$81] = getNextMarker(_el$346.nextSibling), _el$345 = _el$347.nextSibling, _el$348 = _el$345.nextSibling, [_el$349, _co$82] = getNextMarker(_el$348.nextSibling);
1737
+ insert(_el$344, () => cap.supported ? "✅" : "❌", _el$347, _co$81);
1738
+ insert(_el$344, () => cap.label, _el$349, _co$82);
1739
+ effect(() => className(_el$344, `text-[10px] px-1.5 py-0.5 rounded ${cap.supported ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : "bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400"}`));
1740
+ return _el$344;
1534
1741
  })()
1535
1742
  }));
1536
- insert(_el$279, createComponent(Show, {
1743
+ insert(_el$326, createComponent(Show, {
1537
1744
  get when() {
1538
1745
  return data().freshness || data().latency_ms;
1539
1746
  },
1540
1747
  get children() {
1541
- var _el$294 = getNextElement(_tmpl$70);
1542
- insert(_el$294, () => [data().freshness, data().latency_ms ? `${data().latency_ms}ms` : ""].filter(Boolean).join(" · "));
1543
- return _el$294;
1748
+ var _el$341 = getNextElement(_tmpl$79);
1749
+ insert(_el$341, () => [data().freshness, data().latency_ms ? `${data().latency_ms}ms` : ""].filter(Boolean).join(" · "));
1750
+ return _el$341;
1544
1751
  }
1545
- }), _el$296, _co$65);
1546
- return _el$279;
1752
+ }), _el$343, _co$80);
1753
+ return _el$326;
1547
1754
  })();
1548
1755
  };
1549
1756
  const DiffSection = (props) => {
@@ -1567,10 +1774,10 @@ const DiffSection = (props) => {
1567
1774
  return [.../* @__PURE__ */ new Set([...Object.keys(l), ...Object.keys(r)])];
1568
1775
  };
1569
1776
  return (() => {
1570
- var _el$303 = getNextElement(_tmpl$73), _el$304 = _el$303.firstChild, _el$305 = _el$304.firstChild, _el$306 = _el$305.firstChild, _el$307 = _el$306.firstChild, _el$308 = _el$307.nextSibling, _el$309 = _el$308.nextSibling, _el$310 = _el$305.nextSibling;
1571
- insert(_el$308, () => data().left.label);
1572
- insert(_el$309, () => data().right.label);
1573
- insert(_el$310, createComponent(For, {
1777
+ var _el$350 = getNextElement(_tmpl$82), _el$351 = _el$350.firstChild, _el$352 = _el$351.firstChild, _el$353 = _el$352.firstChild, _el$354 = _el$353.firstChild, _el$355 = _el$354.nextSibling, _el$356 = _el$355.nextSibling, _el$357 = _el$352.nextSibling;
1778
+ insert(_el$355, () => data().left.label);
1779
+ insert(_el$356, () => data().right.label);
1780
+ insert(_el$357, createComponent(For, {
1574
1781
  get each() {
1575
1782
  return allKeys();
1576
1783
  },
@@ -1585,22 +1792,22 @@ const DiffSection = (props) => {
1585
1792
  };
1586
1793
  const isDiff = () => String(lVal()) !== String(rVal()) && data().highlight.includes(key);
1587
1794
  return (() => {
1588
- var _el$311 = getNextElement(_tmpl$74), _el$312 = _el$311.firstChild, _el$313 = _el$312.nextSibling, _el$314 = _el$313.nextSibling;
1589
- insert(_el$312, key);
1590
- insert(_el$313, (() => {
1591
- var _c$6 = memo(() => lVal() !== void 0);
1592
- return () => _c$6() ? String(lVal()) : "—";
1795
+ var _el$358 = getNextElement(_tmpl$83), _el$359 = _el$358.firstChild, _el$360 = _el$359.nextSibling, _el$361 = _el$360.nextSibling;
1796
+ insert(_el$359, key);
1797
+ insert(_el$360, (() => {
1798
+ var _c$7 = memo(() => lVal() !== void 0);
1799
+ return () => _c$7() ? String(lVal()) : "—";
1593
1800
  })());
1594
- insert(_el$314, (() => {
1595
- var _c$7 = memo(() => rVal() !== void 0);
1596
- return () => _c$7() ? String(rVal()) : "—";
1801
+ insert(_el$361, (() => {
1802
+ var _c$8 = memo(() => rVal() !== void 0);
1803
+ return () => _c$8() ? String(rVal()) : "—";
1597
1804
  })());
1598
- effect(() => className(_el$311, `border-t border-gray-100 dark:border-gray-700 ${isDiff() ? "bg-yellow-50 dark:bg-yellow-900/10" : ""}`));
1599
- return _el$311;
1805
+ effect(() => className(_el$358, `border-t border-gray-100 dark:border-gray-700 ${isDiff() ? "bg-yellow-50 dark:bg-yellow-900/10" : ""}`));
1806
+ return _el$358;
1600
1807
  })();
1601
1808
  }
1602
1809
  }));
1603
- return _el$303;
1810
+ return _el$350;
1604
1811
  })();
1605
1812
  };
1606
1813
  delegateEvents(["click", "input"]);