@copilotkit/web-inspector 1.80.0 → 1.81.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-ui-view.cjs","names":["GENERATIVE_UI_ROOT_ID","LitElement","nothing","renderHighlightedJsonBlock"],"sources":["../../src/components/generative-ui-view.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from \"lit\";\nimport {\n GENERATIVE_UI_ROOT_ID,\n childIdsAtRefs,\n collectChildRefs,\n} from \"@copilotkit/shared\";\nimport type {\n A2UIComponentNode,\n A2UIOperation,\n GenerativeUIComponentManifest,\n GenerativeUITemplateChildren,\n} from \"@copilotkit/shared\";\nimport { renderHighlightedJsonBlock } from \"../lib/json-block.js\";\nimport type {\n ɵGenerativeUIDebugPromptSection,\n ɵGenerativeUIDebugRun,\n ɵGenerativeUIDebugSnapshot,\n ɵGenerativeUIDebugSource,\n ɵGenerativeUIDebugSurface,\n} from \"@copilotkit/core\";\n\ntype GenerativeUITab = \"surfaces\" | \"catalog\" | \"prompt\";\n\nconst TABS: ReadonlyArray<{ key: GenerativeUITab; label: string }> = [\n { key: \"surfaces\", label: \"Surfaces\" },\n { key: \"catalog\", label: \"Catalog\" },\n { key: \"prompt\", label: \"Prompt\" },\n];\n\nconst PROMPT_SOURCE_NOTES: Record<\n ɵGenerativeUIDebugPromptSection[\"source\"],\n string\n> = {\n runtime:\n \"The runtime adds this text as a context entry, with the render_ui tool.\",\n context: \"The provider sends this text as a context entry.\",\n backend:\n \"sendContext is false. Your backend builds the prompt, usually from this text.\",\n};\n\n/** A rough token count: about 4 characters for each token. */\nexport function estimateTokens(text: string): number {\n return Math.ceil(text.length / 4);\n}\n\nfunction formatTokens(text: string) {\n return `~${estimateTokens(text).toLocaleString()} tokens`;\n}\n\nfunction json(value: unknown) {\n return JSON.stringify(value, null, 2) ?? \"undefined\";\n}\n\n/** The kind of an A2UI operation, for example `updateComponents`. */\nexport function operationKind(operation: unknown): string {\n if (typeof operation !== \"object\" || operation === null) return \"unknown\";\n return Object.keys(operation).find((key) => key !== \"version\") ?? \"unknown\";\n}\n\n/** One component of a surface, as the browser renders it. */\nexport interface ComponentTreeNode {\n id: string;\n component: string;\n /** The props that are not slots, as the model wrote them. */\n props: Record<string, unknown>;\n /** Set when a template repeats the component for each item at this path. */\n repeat?: string;\n children: ComponentTreeNode[];\n}\n\n/**\n * The component tree of a surface, from its root. Later operations replace\n * components with the same id. Skipped operations (rejected by the browser)\n * are left out. A slot id with no component yet is left out too.\n */\nexport function componentTree(\n operations: readonly A2UIOperation[],\n skip: ReadonlySet<number>,\n catalog: Record<string, GenerativeUIComponentManifest>,\n): ComponentTreeNode | undefined {\n const byId = new Map<string, A2UIComponentNode>();\n operations.forEach((operation, index) => {\n if (skip.has(index)) return;\n const components =\n \"createSurface\" in operation\n ? operation.createSurface.components\n : \"updateComponents\" in operation\n ? operation.updateComponents.components\n : undefined;\n for (const node of components ?? []) byId.set(node.id, node);\n });\n const seen = new Set<string>();\n const build = (id: unknown, repeat?: string): ComponentTreeNode[] => {\n const node = typeof id === \"string\" ? byId.get(id) : undefined;\n // The browser rejects cycles. The guard keeps a bad snapshot from looping.\n if (!node || seen.has(node.id)) return [];\n seen.add(node.id);\n const { id: _id, component, ...rest } = node;\n const manifest = catalog[component];\n // A child is in a slot, or at a `child()` / `childList()` ref of the\n // props. A top-level ref reads like a slot. A deeper ref (the `child` of\n // each tab) stays in the props, and its ids become children too.\n const refs = manifest ? collectChildRefs(manifest.props) : [];\n const childKeys = new Set([\n ...Object.keys(manifest?.slots ?? {}),\n ...refs.filter((ref) => ref.path.length === 1).map((ref) => ref.path[0]),\n ]);\n const nested = refs.filter((ref) => ref.path.length > 1);\n const props: Record<string, unknown> = {};\n const children: ComponentTreeNode[] = [];\n for (const [name, value] of Object.entries(rest)) {\n if (!childKeys.has(name)) props[name] = value;\n else if (Array.isArray(value)) {\n for (const child of value) children.push(...build(child));\n } else if (typeof value === \"object\" && value !== null) {\n const template = value as Partial<GenerativeUITemplateChildren>;\n children.push(...build(template.componentId, template.path));\n } else children.push(...build(value));\n }\n for (const child of childIdsAtRefs(rest, nested)) {\n children.push(...build(child));\n }\n return [\n {\n id: node.id,\n component,\n props,\n ...(repeat ? { repeat } : {}),\n children,\n },\n ];\n };\n return build(GENERATIVE_UI_ROOT_ID)[0];\n}\n\n/** The first element of the page whose `attribute` is `value`. */\nfunction findOnPage(attribute: string, value: string) {\n return [...document.querySelectorAll<HTMLElement>(`[${attribute}]`)].find(\n (element) => element.getAttribute(attribute) === value,\n );\n}\n\n/**\n * The function problem that the inspector shows. A function goes to the\n * model only with exactly one mounted handler.\n */\n/**\n * Splits components by the catalog that declared them: the catalog of the\n * provider first, then each base in the order of `extends`.\n */\nexport function groupByCatalog<Entry extends [string, unknown]>(\n components: Entry[],\n snapshot: Pick<ɵGenerativeUIDebugSnapshot, \"catalogId\" | \"componentCatalogs\">,\n): [string, Entry[]][] {\n const groups = new Map<string, Entry[]>([[snapshot.catalogId, []]]);\n for (const entry of components) {\n const id = snapshot.componentCatalogs[entry[0]] ?? snapshot.catalogId;\n groups.set(id, [...(groups.get(id) ?? []), entry]);\n }\n return [...groups].filter(([, group]) => group.length > 0);\n}\n\nexport function functionHandlerProblem(handlers: number): string | undefined {\n if (handlers === 1) return undefined;\n if (handlers === 0) {\n return \"No useGenerativeUIFunction handler is mounted, so the model does not get this function.\";\n }\n return `${handlers} handlers are mounted. Mount exactly one, or the model does not get this function.`;\n}\n\n/**\n * The Generative UI pane: the catalog, the targets and surfaces on the page,\n * and what a run adds to the prompt of the model.\n */\nexport class CpkGenerativeUIView extends LitElement {\n static properties = {\n source: { attribute: false },\n };\n\n source: ɵGenerativeUIDebugSource | undefined;\n private tab: GenerativeUITab = \"surfaces\";\n private run: \"last\" | \"next\" = \"last\";\n private filter = \"\";\n private readonly expanded = new Set<string>();\n private copied: string | null = null;\n private unsubscribe: (() => void) | null = null;\n private subscribedSource: ɵGenerativeUIDebugSource | undefined;\n private outlined: {\n element: HTMLElement;\n outline: string;\n outlineOffset: string;\n } | null = null;\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.unhighlight();\n this.unsubscribe?.();\n this.unsubscribe = null;\n this.subscribedSource = undefined;\n }\n\n override willUpdate() {\n if (this.source === this.subscribedSource && this.unsubscribe) return;\n this.unsubscribe?.();\n this.subscribedSource = this.source;\n this.unsubscribe =\n this.source?.subscribe(() => this.requestUpdate()) ?? null;\n }\n\n private toggle(key: string) {\n if (this.expanded.has(key)) this.expanded.delete(key);\n else this.expanded.add(key);\n this.requestUpdate();\n }\n\n private async copy(key: string, text: string) {\n try {\n await navigator.clipboard.writeText(text);\n this.copied = key;\n } catch {\n this.copied = null;\n }\n this.requestUpdate();\n setTimeout(() => {\n if (this.copied !== key) return;\n this.copied = null;\n this.requestUpdate();\n }, 1500);\n }\n\n /**\n * Outlines an element of the page and scrolls it into view, until\n * `unhighlight`. Hover and keyboard focus call these two.\n */\n private highlight(element: HTMLElement | null | undefined) {\n this.unhighlight();\n if (!element) return;\n const { outline, outlineOffset } = element.style;\n this.outlined = { element, outline, outlineOffset };\n element.style.outline = \"2px solid #7567ff\";\n element.style.outlineOffset = \"4px\";\n element.scrollIntoView({ behavior: \"smooth\", block: \"nearest\" });\n }\n\n private unhighlight() {\n if (!this.outlined) return;\n const { element, outline, outlineOffset } = this.outlined;\n element.style.outline = outline;\n element.style.outlineOffset = outlineOffset;\n this.outlined = null;\n }\n\n override render() {\n if (!this.source) {\n return html`\n <div class=\"empty\">\n <p class=\"strong\">No generative UI</p>\n <p>\n Pass <code>generativeUI</code> to <code>CopilotKitProvider</code>, and this\n pane shows its catalog, surfaces, and prompt.\n </p>\n </div>\n `;\n }\n const snapshot = this.source.getSnapshot();\n return html`\n <header class=\"header\">\n <div class=\"title-row\">\n <h2>Generative UI</h2>\n <span class=\"chip\">${snapshot.transport} transport</span>\n <code class=\"muted\">${snapshot.catalogId}</code>\n </div>\n <p class=\"muted small\">\n ${\n snapshot.agentIds\n ? `For agents: ${snapshot.agentIds.join(\", \")}`\n : \"For every agent\"\n }\n · ${Object.keys(snapshot.components).length} components ·\n ${Object.keys(snapshot.functions).length} functions ·\n ${snapshot.surfaces.length} surfaces\n </p>\n <nav class=\"tabs\" role=\"tablist\">\n ${TABS.map(\n (tab) =>\n html`<button\n type=\"button\"\n role=\"tab\"\n aria-selected=${this.tab === tab.key}\n class=\"tab ${this.tab === tab.key ? \"active\" : \"\"}\"\n @click=${() => {\n this.tab = tab.key;\n this.requestUpdate();\n }}\n >\n ${tab.label}\n </button>`,\n )}\n </nav>\n </header>\n <div class=\"body\">\n ${\n this.tab === \"surfaces\"\n ? this.renderSurfaces(snapshot)\n : this.tab === \"catalog\"\n ? this.renderCatalog(snapshot)\n : this.renderPrompt(snapshot)\n }\n </div>\n `;\n }\n\n private renderSurfaces(snapshot: ɵGenerativeUIDebugSnapshot) {\n const stateKeys = Object.keys(snapshot.state);\n const active = snapshot.surfaces.filter(\n (surface) => surface.threadId === snapshot.activeThreadId,\n );\n const other = snapshot.surfaces.filter(\n (surface) => surface.threadId !== snapshot.activeThreadId,\n );\n return html`\n <section>\n <h3>Targets</h3>\n <p class=\"muted small\">\n Where the model can render. The model sees each description.\n </p>\n ${snapshot.targets.map((target) => {\n const show = () =>\n this.highlight(findOnPage(\"data-generative-ui-surface\", target.id));\n return html`<div\n class=\"row\"\n @mouseenter=${show}\n @mouseleave=${this.unhighlight}\n >\n <div class=\"row-main\">\n <div class=\"row-title\">\n <code>${target.id}</code>\n <span class=\"chip\">${target.kind}</span>\n ${\n target.components\n ? html`<span class=\"chip\"\n >${target.components.length} components only</span\n >`\n : nothing\n }\n </div>\n ${\n target.description\n ? html`<p class=\"small\">${target.description}</p>`\n : target.kind === \"inline\"\n ? html`\n <p class=\"small warn\">\n No description. Give the surface a description, so the model knows what to put\n in it.\n </p>\n `\n : nothing\n }\n ${\n target.components\n ? html`<p class=\"muted small\">\n ${target.components.join(\", \") || \"No components\"}\n </p>`\n : nothing\n }\n </div>\n </div>`;\n })}\n </section>\n <section>\n <h3>Surfaces in this thread</h3>\n ${\n active.length === 0\n ? html`\n <p class=\"muted small\">No surfaces yet. Ask the chat for something visual.</p>\n `\n : active.map((surface) =>\n this.renderSurface(surface, snapshot.components),\n )\n }\n ${\n other.length > 0\n ? html`<h4>Other threads</h4>\n ${other.map((surface) =>\n this.renderSurface(surface, snapshot.components),\n )}`\n : nothing\n }\n </section>\n <section>\n <h3>App state</h3>\n <p class=\"muted small\">\n Bound props read these values. The model does not see them.\n </p>\n ${\n stateKeys.length === 0\n ? html`\n <p class=\"muted small\">No state is set.</p>\n `\n : renderHighlightedJsonBlock(snapshot.state)\n }\n </section>\n `;\n }\n\n private renderComponent(\n node: ComponentTreeNode,\n key: string,\n ): ReturnType<typeof html> {\n const nodeKey = `${key}:component:${node.id}`;\n const propCount = Object.keys(node.props).length;\n return html`<li>\n <button\n type=\"button\"\n class=\"op-toggle\"\n aria-expanded=${this.expanded.has(nodeKey)}\n @click=${() => this.toggle(nodeKey)}\n >\n <code>${node.component}</code>\n <span class=\"muted small\">${node.id}</span>\n ${\n node.repeat\n ? html`<span class=\"chip\">each item of ${node.repeat}</span>`\n : nothing\n }\n <span class=\"muted small\">${propCount} props</span>\n </button>\n ${\n this.expanded.has(nodeKey)\n ? renderHighlightedJsonBlock(node.props)\n : nothing\n }\n ${\n node.children.length > 0\n ? html`<ul class=\"tree\">\n ${node.children.map((child) => this.renderComponent(child, key))}\n </ul>`\n : nothing\n }\n </li>`;\n }\n\n private renderSurface(\n surface: ɵGenerativeUIDebugSurface,\n catalog: ɵGenerativeUIDebugSnapshot[\"components\"],\n ) {\n const key = `surface:${surface.threadId}:${surface.surfaceId}`;\n const isOpen = this.expanded.has(key);\n const userPaths = Object.keys(surface.userValues);\n const browserRejected = new Set(\n surface.rejected\n .filter((rejection) => rejection.source === \"browser\")\n .map((rejection) => rejection.index),\n );\n const tree = isOpen\n ? componentTree(surface.operations, browserRejected, catalog)\n : undefined;\n // Hover or focus outlines the surface on the page. The surface root has\n // `display: contents`, so the box is the `<GenerativeUISurface>` around\n // it. A chat surface has none, so the chat does not scroll.\n const show = () =>\n this.highlight(\n findOnPage(\n \"data-generative-ui-root\",\n surface.surfaceId,\n )?.closest<HTMLElement>(\"[data-generative-ui-surface]\"),\n );\n return html`<div\n class=\"card\"\n @mouseenter=${show}\n @mouseleave=${this.unhighlight}\n @focusin=${show}\n @focusout=${this.unhighlight}\n >\n <div class=\"card-head\">\n <button\n type=\"button\"\n class=\"card-toggle\"\n aria-expanded=${isOpen}\n @click=${() => this.toggle(key)}\n >\n <span class=\"row-title\">\n <code>${surface.surfaceId}</code>\n <span class=\"chip status-${surface.status}\">${surface.status}</span>\n <span class=\"muted small\">in ${surface.target}</span>\n </span>\n <span class=\"muted small\">\n ${surface.operations.length} operations\n ${\n surface.rejected.length > 0\n ? html`·\n <span class=\"danger\"\n >${surface.rejected.length} rejected</span\n >`\n : nothing\n }\n ${\n userPaths.length > 0\n ? html`· ${userPaths.length} user values`\n : nothing\n }\n </span>\n </button>\n </div>\n ${\n isOpen\n ? html`<div class=\"card-body\">\n ${\n surface.rejected.length > 0\n ? html`<h4>Rejected operations</h4>\n <p class=\"muted small\">\n These were dropped. The model gets them on its next run, so\n it can fix them.\n </p>\n <ul class=\"list\">\n ${surface.rejected.map(\n (rejection) =>\n html`<li class=\"danger\">\n <span class=\"chip\">${rejection.source}</span>\n operation ${rejection.index}: ${rejection.reason}\n </li>`,\n )}\n </ul>`\n : nothing\n }\n ${\n userPaths.length > 0\n ? html`<h4>User values</h4>\n <p class=\"muted small\">\n The user wrote these paths. Agent writes to them are\n ignored.\n </p>\n ${renderHighlightedJsonBlock(surface.userValues)}`\n : nothing\n }\n <h4>Components</h4>\n ${\n tree\n ? html`<ul class=\"tree root\">\n ${this.renderComponent(tree, key)}\n </ul>`\n : html`\n <p class=\"muted small\">No root component yet.</p>\n `\n }\n <h4>Data model</h4>\n ${renderHighlightedJsonBlock(surface.dataModel)}\n <h4>Operations</h4>\n <ol class=\"ops\">\n ${surface.operations.map((operation, index) => {\n const opKey = `${key}:op:${index}`;\n const rejected = browserRejected.has(index);\n return html`<li class=${rejected ? \"danger\" : \"\"}>\n <button\n type=\"button\"\n class=\"op-toggle\"\n aria-expanded=${this.expanded.has(opKey)}\n @click=${() => this.toggle(opKey)}\n >\n <span class=\"muted\">${index}</span>\n <code>${operationKind(operation)}</code>\n ${\n rejected\n ? html`\n <span class=\"chip\">rejected</span>\n `\n : nothing\n }\n </button>\n ${\n this.expanded.has(opKey)\n ? renderHighlightedJsonBlock(operation)\n : nothing\n }\n </li>`;\n })}\n </ol>\n <p class=\"muted small\">Thread <code>${surface.threadId}</code></p>\n </div>`\n : nothing\n }\n </div>`;\n }\n\n private renderCatalogComponent(\n name: string,\n component: GenerativeUIComponentManifest,\n ) {\n const key = `component:${name}`;\n const isOpen = this.expanded.has(key);\n const events = Object.keys(component.events ?? {});\n const slots = [\n ...Object.entries(component.slots ?? {}),\n ...collectChildRefs(component.props).map(\n (ref) => [ref.path.join(\".\"), ref.kind] as const,\n ),\n ];\n return html`<div class=\"card\">\n <button\n type=\"button\"\n class=\"card-toggle\"\n aria-expanded=${isOpen}\n @click=${() => this.toggle(key)}\n >\n <span class=\"row-title\">\n <code>${name}</code>\n ${slots.map(\n ([slot, kind]) => html`<span class=\"chip\">${slot}: ${kind}</span>`,\n )}\n ${events.map(\n (event) => html`<span class=\"chip event\">${event}</span>`,\n )}\n </span>\n ${\n component.description\n ? html`<span class=\"small\">${component.description}</span>`\n : html`\n <span class=\"small warn\">No description</span>\n `\n }\n </button>\n ${\n isOpen\n ? html`<div class=\"card-body\">\n <h4>Props (JSON Schema)</h4>\n ${renderHighlightedJsonBlock(component.props)}\n ${\n component.events\n ? html`<h4>Events</h4>\n ${renderHighlightedJsonBlock(component.events)}`\n : nothing\n }\n </div>`\n : nothing\n }\n </div>`;\n }\n\n private renderCatalog(snapshot: ɵGenerativeUIDebugSnapshot) {\n const query = this.filter.trim().toLowerCase();\n const matches = ([name, entry]: [string, { description?: string }]) =>\n !query ||\n name.toLowerCase().includes(query) ||\n entry.description?.toLowerCase().includes(query);\n const components = Object.entries(snapshot.components).filter(matches);\n const functions = Object.entries(snapshot.functions).filter(matches);\n return html`\n <section>\n <div class=\"section-head\">\n <h3>Components</h3>\n <input\n class=\"filter\"\n type=\"search\"\n placeholder=\"Search\"\n aria-label=\"Search components and functions\"\n .value=${this.filter}\n @input=${(event: Event) => {\n this.filter = (event.target as HTMLInputElement).value;\n this.requestUpdate();\n }}\n />\n </div>\n <p class=\"muted small\">\n ${Object.keys(snapshot.components).length} components ·\n ${formatTokens(JSON.stringify(snapshot.components))} in the envelope\n </p>\n ${groupByCatalog(components, snapshot).map(([catalogId, group]) => {\n const key = `catalog:${catalogId}`;\n const isOwn = catalogId === snapshot.catalogId;\n // The provider catalog starts open and a base catalog starts\n // closed. A search opens all of them, so each match shows.\n const toggled = this.expanded.has(key);\n const isOpen = query !== \"\" || (isOwn ? !toggled : toggled);\n return html`<h4>\n <button\n type=\"button\"\n class=\"op-toggle catalog-toggle\"\n aria-expanded=${isOpen}\n @click=${() => this.toggle(key)}\n >\n <code>${catalogId}</code>\n ${\n isOwn\n ? nothing\n : html`\n <span class=\"chip\">extended</span>\n `\n }\n <span class=\"muted small\">${group.length} components</span>\n </button>\n </h4>\n ${\n isOpen\n ? group.map(([name, component]) =>\n this.renderCatalogComponent(name, component),\n )\n : nothing\n }`;\n })}\n ${\n query && components.length === 0\n ? html`\n <p class=\"muted small\">No component matches.</p>\n `\n : nothing\n }\n </section>\n <section>\n <h3>Functions</h3>\n ${\n functions.length === 0\n ? html`<p class=\"muted small\">\n ${query ? \"No function matches.\" : \"No functions are declared.\"}\n </p>`\n : functions.map(([name, fn]) => {\n const problem = functionHandlerProblem(fn.handlers);\n return html`<div class=\"card\">\n <div class=\"card-body\">\n <div class=\"row-title\">\n <code>${name}</code>\n <span\n class=\"chip ${problem ? \"status-error\" : \"status-ready\"}\"\n >${fn.handlers}\n handler${fn.handlers === 1 ? \"\" : \"s\"}</span\n >\n </div>\n ${\n fn.description\n ? html`<p class=\"small\">${fn.description}</p>`\n : nothing\n }\n ${\n problem\n ? html`<p class=\"small warn\">${problem}</p>`\n : nothing\n }\n ${renderHighlightedJsonBlock(fn.parameters)}\n </div>\n </div>`;\n })\n }\n </section>\n `;\n }\n\n /**\n * The prompt text and the envelope are large (about 90,000 characters\n * each in the shop), and the next run changes with each surface change.\n * So they are drawn only when open.\n */\n private renderShowButton(key: string) {\n const open = this.expanded.has(key);\n return html`<button\n type=\"button\"\n class=\"button\"\n aria-expanded=${open}\n @click=${() => this.toggle(key)}\n >\n ${open ? \"Hide\" : \"Show\"}\n </button>`;\n }\n\n private renderPrompt(snapshot: ɵGenerativeUIDebugSnapshot) {\n const showing = this.run === \"last\" && snapshot.lastRun ? \"last\" : \"next\";\n const run: ɵGenerativeUIDebugRun =\n showing === \"last\" && snapshot.lastRun\n ? snapshot.lastRun\n : snapshot.nextRun;\n const isLast = showing === \"last\";\n const envelope = json(run.envelope);\n return html`\n <div class=\"segmented\" role=\"radiogroup\">\n ${([\"last\", \"next\"] as const).map(\n (option) =>\n html`<button\n type=\"button\"\n role=\"radio\"\n aria-checked=${showing === option}\n class=\"tab ${showing === option ? \"active\" : \"\"}\"\n ?disabled=${option === \"last\" && !snapshot.lastRun}\n @click=${() => {\n this.run = option;\n this.requestUpdate();\n }}\n >\n ${option === \"last\" ? \"Last run\" : \"Next run\"}\n </button>`,\n )}\n </div>\n <p class=\"muted small\">\n ${\n isLast\n ? html`What the last run of\n <code>${run.agentId ?? \"the agent\"}</code> sent${\n run.startedAt\n ? `, at ${new Date(run.startedAt).toLocaleTimeString()}`\n : \"\"\n }.`\n : html`\n What the next run will send, from the page as it is now.\n `\n }\n Your own system prompt and tools are not shown.\n </p>\n ${run.prompt.map((section, index) => {\n const key = `prompt:${index}`;\n return html`<section>\n <div class=\"section-head\">\n <h3>${section.title}</h3>\n <span class=\"muted small\">${formatTokens(section.text)}</span>\n ${this.renderShowButton(key)}\n <button\n type=\"button\"\n class=\"button\"\n @click=${() => void this.copy(key, section.text)}\n >\n ${this.copied === key ? \"Copied\" : \"Copy\"}\n </button>\n </div>\n <p class=\"muted small\">${PROMPT_SOURCE_NOTES[section.source]}</p>\n ${\n this.expanded.has(key)\n ? html`<pre class=\"prompt\">${section.text || \"(empty)\"}</pre>`\n : nothing\n }\n </section>`;\n })}\n <section>\n <div class=\"section-head\">\n <h3>Envelope</h3>\n <span class=\"muted small\">${formatTokens(envelope)}</span>\n ${this.renderShowButton(\"envelope\")}\n <button\n type=\"button\"\n class=\"button\"\n @click=${() => void this.copy(\"envelope\", envelope)}\n >\n ${this.copied === \"envelope\" ? \"Copied\" : \"Copy\"}\n </button>\n </div>\n <p class=\"muted small\">\n The run sends this as <code>forwardedProps.copilotkit.ui</code>.\n </p>\n ${\n this.expanded.has(\"envelope\")\n ? renderHighlightedJsonBlock(run.envelope)\n : nothing\n }\n </section>\n `;\n }\n\n static styles = css`\n :host {\n --gui-ink: #202127;\n --gui-muted: #64656f;\n --gui-line: #dcdce4;\n --gui-soft: #f7f7fa;\n --gui-canvas: #fff;\n --gui-accent: #7567ff;\n --gui-accent-soft: #f0edff;\n --gui-green: #168b69;\n --gui-green-soft: #eaf6f1;\n --gui-amber: #8a5a00;\n --gui-amber-soft: #fff6e0;\n --gui-danger: #a12f2f;\n --gui-danger-soft: #fff4f4;\n --cpk-json-key: #3d408f;\n --cpk-json-str: #0b6b4c;\n --cpk-json-num: #8a5900;\n --cpk-json-bool: #c0333a;\n --cpk-json-nil: #57575b;\n display: block;\n height: 100%;\n overflow: auto;\n color: var(--gui-ink);\n background: var(--gui-canvas);\n font-family: Inter, ui-sans-serif, system-ui, sans-serif;\n font-size: 12px;\n }\n :host([data-color-scheme=\"dark\"]) {\n color-scheme: dark;\n --gui-ink: #f3f4f8;\n --gui-muted: #b0b3be;\n --gui-line: #3a3e4b;\n --gui-soft: #20232d;\n --gui-canvas: #15171e;\n --gui-accent: #a296ff;\n --gui-accent-soft: #2a2940;\n --gui-green: #4dc69d;\n --gui-green-soft: #172923;\n --gui-amber: #f2c46d;\n --gui-amber-soft: #2f2716;\n --gui-danger: #ffabab;\n --gui-danger-soft: #321f25;\n --cpk-json-key: #bec2ff;\n --cpk-json-str: #85ecce;\n --cpk-json-num: #ffac4d;\n --cpk-json-bool: #fa5f67;\n --cpk-json-nil: #afafb7;\n }\n .header {\n position: sticky;\n top: 0;\n z-index: 1;\n padding: 12px 16px 0;\n background: var(--gui-canvas);\n border-bottom: 1px solid var(--gui-line);\n }\n .title-row,\n .row-title,\n .section-head {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n }\n .title-row,\n .row-title {\n align-items: baseline;\n }\n .section-head h3 {\n margin-right: auto;\n }\n h2 {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n }\n h3 {\n margin: 0 0 4px;\n font-size: 12px;\n font-weight: 600;\n }\n h4 {\n margin: 12px 0 4px;\n font-size: 11px;\n font-weight: 600;\n color: var(--gui-muted);\n }\n p {\n margin: 2px 0 6px;\n }\n code {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 11px;\n }\n .body {\n padding: 12px 16px 24px;\n }\n section {\n margin-bottom: 20px;\n }\n .muted {\n color: var(--gui-muted);\n }\n .small {\n font-size: 11px;\n }\n .strong {\n font-weight: 600;\n color: var(--gui-ink);\n }\n .warn {\n color: var(--gui-amber);\n }\n .danger {\n color: var(--gui-danger);\n }\n .tabs,\n .segmented {\n display: flex;\n gap: 4px;\n margin-top: 8px;\n }\n .segmented {\n margin: 0 0 8px;\n }\n .tab {\n border: 0;\n border-bottom: 2px solid transparent;\n background: none;\n color: var(--gui-muted);\n font: inherit;\n font-weight: 500;\n padding: 6px 8px;\n cursor: pointer;\n }\n .segmented .tab {\n border: 1px solid var(--gui-line);\n border-radius: 6px;\n }\n .tab.active {\n color: var(--gui-ink);\n border-bottom-color: var(--gui-accent);\n }\n .segmented .tab.active {\n border-color: var(--gui-accent);\n background: var(--gui-accent-soft);\n }\n .tab:disabled {\n opacity: 0.5;\n cursor: default;\n }\n .chip {\n display: inline-block;\n border: 1px solid var(--gui-line);\n border-radius: 999px;\n padding: 0 6px;\n font-size: 10px;\n line-height: 16px;\n color: var(--gui-muted);\n background: var(--gui-soft);\n }\n .chip.event {\n color: var(--gui-accent);\n background: var(--gui-accent-soft);\n }\n .status-ready {\n color: var(--gui-green);\n background: var(--gui-green-soft);\n }\n .status-streaming {\n color: var(--gui-accent);\n background: var(--gui-accent-soft);\n }\n .status-error {\n color: var(--gui-danger);\n background: var(--gui-danger-soft);\n }\n .row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 0;\n border-bottom: 1px solid var(--gui-line);\n }\n .row-main {\n flex: 1;\n min-width: 0;\n }\n .card {\n border: 1px solid var(--gui-line);\n border-radius: 8px;\n margin-bottom: 6px;\n overflow: hidden;\n }\n .card-head {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-right: 8px;\n }\n .cpk-json-block {\n margin: 4px 0 0;\n max-height: 320px;\n overflow: auto;\n border: 1px solid var(--gui-line);\n border-radius: 6px;\n padding: 8px 10px;\n background: var(--gui-soft);\n color: var(--gui-ink);\n font-family: \"Spline Sans Mono\", ui-monospace, monospace;\n font-size: 11px;\n line-height: 1.6;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n }\n .cpk-json-token--key {\n color: var(--cpk-json-key);\n }\n .cpk-json-token--str {\n color: var(--cpk-json-str);\n }\n .cpk-json-token--num {\n color: var(--cpk-json-num);\n }\n .cpk-json-token--bool {\n color: var(--cpk-json-bool);\n }\n .cpk-json-token--nil {\n color: var(--cpk-json-nil);\n }\n .card-toggle {\n display: flex;\n flex: 1;\n box-sizing: border-box;\n width: 100%;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n min-width: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: left;\n padding: 8px 10px;\n cursor: pointer;\n }\n .card-toggle:hover {\n background: var(--gui-soft);\n }\n .card-body {\n padding: 8px 10px;\n border-top: 1px solid var(--gui-line);\n }\n .card > .card-body:first-child {\n border-top: 0;\n }\n .button {\n flex-shrink: 0;\n border: 1px solid var(--gui-line);\n border-radius: 6px;\n background: var(--gui-canvas);\n color: var(--gui-ink);\n font: inherit;\n font-size: 11px;\n padding: 2px 8px;\n cursor: pointer;\n }\n .button:hover {\n border-color: var(--gui-accent);\n }\n .section-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n }\n .filter {\n width: 160px;\n box-sizing: border-box;\n border: 1px solid var(--gui-line);\n border-radius: 6px;\n background: var(--gui-canvas);\n color: var(--gui-ink);\n font: inherit;\n font-size: 11px;\n padding: 3px 6px;\n }\n .catalog-toggle::before {\n content: \"▸\";\n display: inline-block;\n width: 10px;\n color: var(--gui-muted);\n transition: transform 0.1s;\n }\n .catalog-toggle[aria-expanded=\"true\"]::before {\n transform: rotate(90deg);\n }\n pre {\n margin: 4px 0 0;\n max-height: 320px;\n overflow: auto;\n border-radius: 6px;\n background: var(--gui-soft);\n padding: 8px;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 11px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n }\n pre.prompt {\n max-height: 480px;\n }\n .list,\n .ops {\n margin: 0;\n padding-left: 18px;\n }\n .list li {\n margin-bottom: 4px;\n }\n .ops {\n list-style: none;\n padding: 0;\n }\n .tree {\n list-style: none;\n margin: 0;\n padding-left: 14px;\n border-left: 1px solid var(--gui-line);\n }\n .tree.root {\n padding-left: 0;\n border-left: 0;\n }\n .op-toggle {\n display: flex;\n align-items: baseline;\n gap: 6px;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n padding: 2px 0;\n cursor: pointer;\n }\n .empty {\n padding: 48px 24px;\n text-align: center;\n color: var(--gui-muted);\n }\n `;\n}\n\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