@copilotkit/web-inspector 1.66.4 → 1.67.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -13
- package/dist/index.cjs +1436 -429
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -8
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +118 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1438 -431
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1721 -533
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/inspector-metadata.cjs +60 -0
- package/dist/lib/inspector-metadata.cjs.map +1 -0
- package/dist/lib/inspector-metadata.mjs +60 -0
- package/dist/lib/inspector-metadata.mjs.map +1 -0
- package/dist/lib/telemetry.cjs +117 -32
- package/dist/lib/telemetry.cjs.map +1 -1
- package/dist/lib/telemetry.mjs +116 -33
- package/dist/lib/telemetry.mjs.map +1 -1
- package/dist/lib/thread-selection.cjs +36 -0
- package/dist/lib/thread-selection.cjs.map +1 -0
- package/dist/lib/thread-selection.mjs +35 -0
- package/dist/lib/thread-selection.mjs.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/styles/generated.cjs +1 -1
- package/dist/styles/generated.cjs.map +1 -1
- package/dist/styles/generated.mjs +1 -1
- package/dist/styles/generated.mjs.map +1 -1
- package/package.json +9 -4
- package/CHANGELOG.md +0 -505
- package/dev/css-raw-import.spec.ts +0 -31
- package/dev/index.html +0 -115
- package/dev/main.ts +0 -165
- package/dev/vite.config.ts +0 -30
- package/src/__tests__/memory-recall.spec.ts +0 -76
- package/src/__tests__/telemetry-egress-guard.spec.ts +0 -41
- package/src/__tests__/web-inspector.spec.ts +0 -3935
- package/src/assets/inspector-logo-icon.svg +0 -8
- package/src/assets/inspector-logo.svg +0 -40
- package/src/components.d.ts +0 -20
- package/src/index.ts +0 -11849
- package/src/lib/__tests__/telemetry.test.ts +0 -557
- package/src/lib/context-helpers.ts +0 -166
- package/src/lib/persistence.ts +0 -206
- package/src/lib/telemetry.ts +0 -474
- package/src/lib/testing/telemetry-egress-guard.ts +0 -33
- package/src/lib/types.ts +0 -19
- package/src/styles/generated.css +0 -2
- package/src/styles/tailwind.css +0 -23
- package/src/types/css.d.ts +0 -4
- package/src/types/svg.d.ts +0 -4
- package/tsconfig.json +0 -14
- package/tsdown.config.ts +0 -45
- package/vitest.config.ts +0 -66
- package/vitest.setup.ts +0 -84
package/dist/index.umd.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lit'), require('marked'), require('lit/directives/style-map.js'), require('lit/directives/unsafe-html.js'), require('lucide'), require('@copilotkit/core')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'lit', 'marked', 'lit/directives/style-map.js', 'lit/directives/unsafe-html.js', 'lucide', '@copilotkit/core'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitWebInspector = {}), global.Lit,global.marked,global.LitDirectivesStyleMap,global.LitDirectivesUnsafeHtml,global.lucide,global.CopilotKitCore));
|
|
5
|
-
})(this, function(exports, lit, marked, lit_directives_style_map_js, lit_directives_unsafe_html_js, lucide, _copilotkit_core) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lit'), require('marked'), require('lit/directives/style-map.js'), require('lit/directives/unsafe-html.js'), require('lucide'), require('@copilotkit/core'), require('@copilotkit/shared')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'lit', 'marked', 'lit/directives/style-map.js', 'lit/directives/unsafe-html.js', 'lucide', '@copilotkit/core', '@copilotkit/shared'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitWebInspector = {}), global.Lit,global.marked,global.LitDirectivesStyleMap,global.LitDirectivesUnsafeHtml,global.lucide,global.CopilotKitCore,global.CopilotKitShared));
|
|
5
|
+
})(this, function(exports, lit, marked, lit_directives_style_map_js, lit_directives_unsafe_html_js, lucide, _copilotkit_core, _copilotkit_shared) {
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
7
7
|
|
|
8
8
|
//#region src/styles/generated.css
|
|
9
|
-
var generated_default = "/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-green-100:oklch(96.2% .044 156.743);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-700:oklch(50% .134 242.749);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-700:oklch(49.1% .27 292.581);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-50:oklch(97.7% .017 320.058);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-medium:500;--font-weight-semibold:600;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{font-family:var(--font-sans);color:var(--color-slate-900);background-color:#0000;display:block}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:calc(var(--spacing)*0)}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.bottom-1{bottom:calc(var(--spacing)*1)}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.m-0{margin:calc(var(--spacing)*0)}.mx-4{margin-inline:calc(var(--spacing)*4)}.my-1{margin-block:calc(var(--spacing)*1)}.my-3{margin-block:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.max-h-64{max-height:calc(var(--spacing)*64)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-40{width:calc(var(--spacing)*40)}.w-auto{width:auto}.w-full{width:100%}.max-w-\\[240px\\]{max-width:240px}.max-w-md{max-width:var(--container-md)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[200px\\]{min-width:200px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-\\[2px\\]{--tw-translate-y:calc(2px*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-nwse-resize{cursor:nwse-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-200{border-color:var(--color-amber-200)}.border-blue-200{border-color:var(--color-blue-200)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-fuchsia-200{border-color:var(--color-fuchsia-200)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-purple-200{border-color:var(--color-purple-200)}.border-rose-200{border-color:var(--color-rose-200)}.border-sky-200{border-color:var(--color-sky-200)}.border-slate-200{border-color:var(--color-slate-200)}.border-violet-200{border-color:var(--color-violet-200)}.border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-fuchsia-50{background-color:var(--color-fuchsia-50)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/50{background-color:#f9fafb80}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\\/50{background-color:color-mix(in oklab,var(--color-gray-50)50%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950\\/95{background-color:#020618f2}@supports (color:color-mix(in lab, red, red)){.bg-slate-950\\/95{background-color:color-mix(in oklab,var(--color-slate-950)95%,transparent)}}.bg-violet-50{background-color:var(--color-violet-50)}.bg-white{background-color:var(--color-white)}.bg-white\\/60{background-color:#fff9}@supports (color:color-mix(in lab, red, red)){.bg-white\\/60{background-color:color-mix(in oklab,var(--color-white)60%,transparent)}}.bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-emerald-700{color:var(--color-emerald-700)}.text-fuchsia-700{color:var(--color-fuchsia-700)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-purple-700{color:var(--color-purple-700)}.text-rose-700{color:var(--color-rose-700)}.text-sky-700{color:var(--color-sky-700)}.text-slate-500{color:var(--color-slate-500)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-black\\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.ring-black\\/5{--tw-ring-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.ring-transparent{--tw-ring-color:transparent}.ring-white\\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.ring-white\\/10{--tw-ring-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-white\\/30:hover{border-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.hover\\:border-white\\/30:hover{border-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-blue-50\\/50:hover{background-color:#eff6ff80}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-blue-50\\/50:hover{background-color:color-mix(in oklab,var(--color-blue-50)50%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\\:bg-slate-900\\/95:hover{background-color:#0f172bf2}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-slate-900\\/95:hover{background-color:color-mix(in oklab,var(--color-slate-900)95%,transparent)}}.hover\\:text-gray-600:hover{color:var(--color-gray-600)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}}.focus\\:border-gray-300:focus{border-color:var(--color-gray-300)}.focus\\:bg-gray-50:focus{background-color:var(--color-gray-50)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-gray-200:focus{--tw-ring-color:var(--color-gray-200)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-\\[\\#BEC2FF\\]:focus-visible{outline-color:#bec2ff}.focus-visible\\:outline-gray-300:focus-visible{outline-color:var(--color-gray-300)}.focus-visible\\:outline-gray-400:focus-visible{outline-color:var(--color-gray-400)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:48rem){.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&\\>svg\\]\\:\\!h-8>svg{height:calc(var(--spacing)*8)!important}.\\[\\&\\>svg\\]\\:\\!w-8>svg{width:calc(var(--spacing)*8)!important}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}";
|
|
9
|
+
var generated_default = "/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-green-100:oklch(96.2% .044 156.743);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-700:oklch(50% .134 242.749);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-700:oklch(49.1% .27 292.581);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-50:oklch(97.7% .017 320.058);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-medium:500;--font-weight-semibold:600;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{font-family:var(--font-sans);color:var(--color-slate-900);background-color:#0000;display:block}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:calc(var(--spacing)*0)}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.bottom-1{bottom:calc(var(--spacing)*1)}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.m-0{margin:calc(var(--spacing)*0)}.mx-4{margin-inline:calc(var(--spacing)*4)}.my-1{margin-block:calc(var(--spacing)*1)}.my-3{margin-block:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.max-h-64{max-height:calc(var(--spacing)*64)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-40{width:calc(var(--spacing)*40)}.w-auto{width:auto}.w-full{width:100%}.max-w-\\[240px\\]{max-width:240px}.max-w-md{max-width:var(--container-md)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[200px\\]{min-width:200px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-\\[2px\\]{--tw-translate-y:calc(2px*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-nwse-resize{cursor:nwse-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-200{border-color:var(--color-amber-200)}.border-blue-200{border-color:var(--color-blue-200)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-fuchsia-200{border-color:var(--color-fuchsia-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-purple-200{border-color:var(--color-purple-200)}.border-rose-200{border-color:var(--color-rose-200)}.border-sky-200{border-color:var(--color-sky-200)}.border-slate-200{border-color:var(--color-slate-200)}.border-violet-200{border-color:var(--color-violet-200)}.border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-fuchsia-50{background-color:var(--color-fuchsia-50)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/50{background-color:#f9fafb80}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\\/50{background-color:color-mix(in oklab,var(--color-gray-50)50%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950\\/95{background-color:#020618f2}@supports (color:color-mix(in lab, red, red)){.bg-slate-950\\/95{background-color:color-mix(in oklab,var(--color-slate-950)95%,transparent)}}.bg-violet-50{background-color:var(--color-violet-50)}.bg-white{background-color:var(--color-white)}.bg-white\\/60{background-color:#fff9}@supports (color:color-mix(in lab, red, red)){.bg-white\\/60{background-color:color-mix(in oklab,var(--color-white)60%,transparent)}}.bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-emerald-700{color:var(--color-emerald-700)}.text-fuchsia-700{color:var(--color-fuchsia-700)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-purple-700{color:var(--color-purple-700)}.text-rose-700{color:var(--color-rose-700)}.text-sky-700{color:var(--color-sky-700)}.text-slate-500{color:var(--color-slate-500)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-black\\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.ring-black\\/5{--tw-ring-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.ring-transparent{--tw-ring-color:transparent}.ring-white\\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.ring-white\\/10{--tw-ring-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-white\\/30:hover{border-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.hover\\:border-white\\/30:hover{border-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-blue-50\\/50:hover{background-color:#eff6ff80}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-blue-50\\/50:hover{background-color:color-mix(in oklab,var(--color-blue-50)50%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\\:bg-slate-900\\/95:hover{background-color:#0f172bf2}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-slate-900\\/95:hover{background-color:color-mix(in oklab,var(--color-slate-900)95%,transparent)}}.hover\\:text-gray-600:hover{color:var(--color-gray-600)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}}.focus\\:border-gray-300:focus{border-color:var(--color-gray-300)}.focus\\:bg-gray-50:focus{background-color:var(--color-gray-50)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-gray-200:focus{--tw-ring-color:var(--color-gray-200)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-\\[\\#BEC2FF\\]:focus-visible{outline-color:#bec2ff}.focus-visible\\:outline-gray-300:focus-visible{outline-color:var(--color-gray-300)}.focus-visible\\:outline-gray-400:focus-visible{outline-color:var(--color-gray-400)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:48rem){.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&\\>svg\\]\\:\\!h-8>svg{height:calc(var(--spacing)*8)!important}.\\[\\&\\>svg\\]\\:\\!w-8>svg{width:calc(var(--spacing)*8)!important}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}}.inspector-account-strip{color:#fff;background-color:#010507;width:100%;min-width:0}.inspector-account-logo{filter:brightness(0)invert()}.inspector-agent-placeholder{color:#afafb7;border-color:#ffffff47}.inspector-primary-navigation,.inspector-child-navigation{cursor:default;background-color:#fff;border-bottom:1px solid #dbdbe5;flex:none;align-items:center;gap:4px;width:100%;min-width:0;padding:6px 12px;display:flex}.inspector-primary-navigation{overflow:auto hidden}.inspector-child-navigation{overscroll-behavior-inline:contain;white-space:nowrap;overflow:auto hidden}.inspector-nav-control{color:#57575b;min-height:32px;font:inherit;outline-offset:2px;cursor:pointer;background-color:#0000;border:1px solid #0000;border-radius:4px;outline:2px solid #0000;flex:none;justify-content:center;align-items:center;gap:6px;padding:6px 9px;font-size:12px;font-weight:600;line-height:1.25;display:inline-flex}.inspector-nav-control:hover{color:#010507;background-color:#f0f0f4}.inspector-nav-control-active{color:#3f176f;background-color:#eee6fe;border-color:#bec2ff}.inspector-nav-icon{flex:none;align-items:center;display:inline-flex}.inspector-nav-icon svg{width:15px;height:15px}.inspector-nav-control:focus-visible,.inspector-nav-control:focus,.inspector-account-control:focus-visible,.inspector-account-control:focus,[data-inspector-thread-cta]:focus-visible,[data-inspector-thread-cta]:focus,[data-inspector-action-placement=threads-footer]:focus-visible,[data-inspector-action-placement=threads-footer]:focus{outline-offset:2px;outline:2px solid #6430ab!important}.inspector-account-control{color:#afafb7;outline-offset:2px;cursor:pointer;outline:2px solid #0000}.inspector-account-control:hover,.inspector-account-control-active{color:#fff;background-color:#ffffff1f}[data-inspector-thread-cta]{color:#57575b;white-space:nowrap;outline-offset:2px;cursor:pointer;background-color:#fff;border:1px solid #dbdbe5;border-radius:4px;outline:2px solid #0000;flex:none;justify-content:center;align-items:center;min-height:32px;margin-left:auto;padding:6px 9px;font-size:11px;font-weight:600;line-height:1.25;text-decoration:none;display:inline-flex}[data-inspector-account-strip] button,[data-inspector-account-strip] a{cursor:pointer}[data-inspector-thread-cta]:hover{color:#010507;background-color:#f7f7f9;border-color:#afafb7}[data-inspector-threads-setup-prompt],[data-inspector-threads-setup-link]{min-height:34px;font:inherit;outline-offset:2px;cursor:pointer;border:1px solid #dbdbe5;border-radius:6px;outline:2px solid #0000;justify-content:center;align-items:center;gap:6px;padding:8px 12px;font-size:12px;font-weight:600;line-height:1.25;text-decoration:none;display:inline-flex}[data-inspector-threads-setup-prompt]{color:#fff;background-color:#010507;border-color:#010507}[data-inspector-threads-setup-prompt]:hover{background-color:#2b2b2b;border-color:#2b2b2b}[data-inspector-threads-setup-link]{color:#57575b;background-color:#fff}[data-inspector-threads-setup-link]:hover{color:#010507;background-color:#f7f7f9;border-color:#afafb7}[data-inspector-threads-setup-prompt]:focus-visible,[data-inspector-threads-setup-link]:focus-visible{outline-offset:2px;outline:2px solid #6430ab}.inspector-threads-footer{color:#57575b;background-color:#f7f7f9;border-top:1px solid #dbdbe5;flex:none;gap:10px;padding:12px;font-size:11px;line-height:1.35;display:grid}.inspector-threads-usage{gap:6px;display:grid}[data-inspector-thread-count]{color:#010507;font-weight:600}[data-inspector-thread-expiry]{color:#57575b}.inspector-thread-progress{--inspector-thread-progress-color:#189370;width:100%;height:6px;accent-color:var(--inspector-thread-progress-color);border-radius:999px;overflow:hidden}.inspector-thread-progress[data-inspector-thread-capacity=warning]{--inspector-thread-progress-color:#b45309}.inspector-thread-progress[data-inspector-thread-capacity=critical]{--inspector-thread-progress-color:#be123c}.inspector-thread-progress::-webkit-progress-bar{background-color:#dbdbe5;border-radius:999px}.inspector-thread-progress::-webkit-progress-value{background-color:var(--inspector-thread-progress-color);border-radius:999px}.inspector-thread-progress::-moz-progress-bar{background-color:var(--inspector-thread-progress-color);border-radius:999px}[data-inspector-action-placement=threads-footer]{color:#57575b;outline-offset:2px;cursor:pointer;background-color:#fff;border:1px solid #dbdbe5;border-radius:4px;outline:2px solid #0000;justify-content:center;align-items:center;width:100%;min-height:32px;padding:6px 9px;font-size:11px;font-weight:600;line-height:1.25;text-decoration:none;display:inline-flex}[data-inspector-action-placement=threads-footer][data-inspector-action-intent=upgrade]{color:#fff;background-color:#6430ab;border-color:#6430ab}[data-inspector-action-placement=threads-footer][data-inspector-action-intent=upgrade]:hover{color:#fff;background-color:#3f176f;border-color:#3f176f}[data-inspector-action-placement=threads-footer]:hover{color:#010507;background-color:#fff;border-color:#afafb7}.cpk-threads-overview-video{opacity:0;transition:opacity .22s}.cpk-threads-overview-video[data-loaded=true]{opacity:1}.cpk-threads-overview-video-control{color:#3f176f;min-height:32px;font:inherit;outline-offset:2px;cursor:pointer;background-color:#fff;border:1px solid #dbdbe5;border-radius:4px;outline:2px solid #0000;justify-content:center;align-items:center;margin:0 0 14px;padding:6px 10px;font-size:12px;font-weight:600;line-height:1.25;display:inline-flex}.cpk-threads-overview-video-control:hover{color:#010507;background-color:#f7f7f9;border-color:#afafb7}.cpk-threads-overview-video-control:focus-visible{outline-offset:2px;outline:2px solid #6430ab}.cpk-threads-overview-video-fallback{color:#57575b;max-width:440px;margin:-4px 0 14px;font-size:12px;line-height:1.5}@media (prefers-reduced-motion:reduce){.cpk-threads-overview-video{transition:none}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}";
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/assets/inspector-logo.svg
|
|
@@ -189,9 +189,100 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/lib/inspector-metadata.ts
|
|
194
|
+
/** Maps the runtime's legacy license status to the inspector's four states. */
|
|
195
|
+
function normalizeRuntimeLicenseState(status) {
|
|
196
|
+
switch (status) {
|
|
197
|
+
case "valid":
|
|
198
|
+
case "expiring": return "valid";
|
|
199
|
+
case "none": return "none";
|
|
200
|
+
case "expired":
|
|
201
|
+
case "invalid": return "expired";
|
|
202
|
+
default: return "unknown";
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function projectAction(state, action) {
|
|
206
|
+
if (state === "valid" && (action === null || action === void 0 ? void 0 : action.kind) === "manage_plan") return { threadsFooterAction: {
|
|
207
|
+
kind: action.kind,
|
|
208
|
+
url: action.url,
|
|
209
|
+
label: "Manage Your Plan"
|
|
210
|
+
} };
|
|
211
|
+
if (state === "none" && (action === null || action === void 0 ? void 0 : action.kind) === "enable_intelligence") return { lockedAction: {
|
|
212
|
+
kind: action.kind,
|
|
213
|
+
url: action.url,
|
|
214
|
+
label: "Enable Intelligence"
|
|
215
|
+
} };
|
|
216
|
+
if (state === "expired" && (action === null || action === void 0 ? void 0 : action.kind) === "renew") return { lockedAction: {
|
|
217
|
+
kind: action.kind,
|
|
218
|
+
url: action.url,
|
|
219
|
+
label: "Renew"
|
|
220
|
+
} };
|
|
221
|
+
if (state === "expired" && (action === null || action === void 0 ? void 0 : action.kind) === "manage_plan") return { lockedAction: {
|
|
222
|
+
kind: action.kind,
|
|
223
|
+
url: action.url,
|
|
224
|
+
label: "Manage Your Plan"
|
|
225
|
+
} };
|
|
226
|
+
return {};
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Re-parses Core metadata at the UI boundary and exposes independent,
|
|
230
|
+
* render-safe slots without display math.
|
|
231
|
+
*/
|
|
232
|
+
function projectInspectorMetadata(value, runtimeLicenseStatus) {
|
|
233
|
+
var _metadata$license;
|
|
234
|
+
const metadata = (0, _copilotkit_shared.parseInspectorMetadataV1)(value);
|
|
235
|
+
const runtimeState = normalizeRuntimeLicenseState(runtimeLicenseStatus);
|
|
236
|
+
const metadataState = metadata === null || metadata === void 0 || (_metadata$license = metadata.license) === null || _metadata$license === void 0 ? void 0 : _metadata$license.state;
|
|
237
|
+
const hasLicenseConflict = metadataState !== void 0 && metadataState !== "unknown" && runtimeState !== "unknown" && metadataState !== runtimeState;
|
|
238
|
+
const licenseState = hasLicenseConflict ? runtimeState : metadataState !== null && metadataState !== void 0 ? metadataState : runtimeState;
|
|
239
|
+
return {
|
|
240
|
+
...(metadata === null || metadata === void 0 ? void 0 : metadata.identity) === void 0 ? {} : { identity: metadata.identity },
|
|
241
|
+
...(metadata === null || metadata === void 0 ? void 0 : metadata.plan) === void 0 ? {} : { plan: metadata.plan },
|
|
242
|
+
...(metadata === null || metadata === void 0 ? void 0 : metadata.usage) === void 0 ? {} : { usage: metadata.usage },
|
|
243
|
+
licenseState,
|
|
244
|
+
hasLicenseConflict,
|
|
245
|
+
...hasLicenseConflict ? {} : projectAction(licenseState, metadata === null || metadata === void 0 ? void 0 : metadata.action)
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
//#endregion
|
|
250
|
+
//#region src/lib/thread-selection.ts
|
|
251
|
+
function parsedTimestamp(value) {
|
|
252
|
+
if (typeof value !== "string") return null;
|
|
253
|
+
const timestamp = Date.parse(value);
|
|
254
|
+
return Number.isFinite(timestamp) ? timestamp : null;
|
|
255
|
+
}
|
|
256
|
+
function compareNewestDate(left, right) {
|
|
257
|
+
const leftTimestamp = parsedTimestamp(left);
|
|
258
|
+
const rightTimestamp = parsedTimestamp(right);
|
|
259
|
+
if (leftTimestamp === null) return rightTimestamp === null ? 0 : 1;
|
|
260
|
+
if (rightTimestamp === null) return -1;
|
|
261
|
+
if (leftTimestamp === rightTimestamp) return 0;
|
|
262
|
+
return leftTimestamp > rightTimestamp ? -1 : 1;
|
|
263
|
+
}
|
|
264
|
+
function compareVisibleThreads(left, right) {
|
|
265
|
+
const updatedOrder = compareNewestDate(left.updatedAt, right.updatedAt);
|
|
266
|
+
if (updatedOrder !== 0) return updatedOrder;
|
|
267
|
+
const createdOrder = compareNewestDate(left.createdAt, right.createdAt);
|
|
268
|
+
if (createdOrder !== 0) return createdOrder;
|
|
269
|
+
if (left.id < right.id) return -1;
|
|
270
|
+
if (left.id > right.id) return 1;
|
|
271
|
+
return 0;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Keeps a visible explicit real-Thread selection or returns the deterministic
|
|
275
|
+
* newest visible real Thread without mutating the candidate list.
|
|
276
|
+
*/
|
|
277
|
+
function selectVisibleRealThreadId(input) {
|
|
278
|
+
var _sort$0$id, _sort$;
|
|
279
|
+
if (input.selectedThreadId !== null && input.threads.some((thread) => thread.id === input.selectedThreadId)) return input.selectedThreadId;
|
|
280
|
+
return (_sort$0$id = (_sort$ = [...input.threads].sort(compareVisibleThreads)[0]) === null || _sort$ === void 0 ? void 0 : _sort$.id) !== null && _sort$0$id !== void 0 ? _sort$0$id : null;
|
|
281
|
+
}
|
|
282
|
+
|
|
192
283
|
//#endregion
|
|
193
284
|
//#region package.json
|
|
194
|
-
var version = "1.
|
|
285
|
+
var version = "1.67.1";
|
|
195
286
|
|
|
196
287
|
//#endregion
|
|
197
288
|
//#region src/lib/telemetry.ts
|
|
@@ -214,7 +305,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
214
305
|
threadsExampleTourDismissed: "oss.inspector.threads_example_tour_dismissed",
|
|
215
306
|
threadsExampleTourCompleted: "oss.inspector.threads_example_tour_completed",
|
|
216
307
|
threadsExampleTourReopened: "oss.inspector.threads_example_tour_reopened",
|
|
217
|
-
memoriesTabClicked: "oss.inspector.memories_tab_clicked"
|
|
308
|
+
memoriesTabClicked: "oss.inspector.memories_tab_clicked",
|
|
309
|
+
metadataModuleViewed: "oss.inspector.metadata_module_viewed",
|
|
310
|
+
metadataActionClicked: "oss.inspector.metadata_action_clicked"
|
|
218
311
|
};
|
|
219
312
|
const TELEMETRY_INGEST_URL = "https://telemetry.copilotkit.ai/ingest";
|
|
220
313
|
const TELEMETRY_DOCS_URL = "https://docs.copilotkit.ai/telemetry";
|
|
@@ -222,7 +315,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
222
315
|
const PACKAGE_VERSION = version;
|
|
223
316
|
const FETCH_TIMEOUT_MS = 3e3;
|
|
224
317
|
function isEnrichedTelemetryEvent(event) {
|
|
225
|
-
return event === TELEMETRY_EVENTS.opened || event === TELEMETRY_EVENTS.threadsTabClicked || event === TELEMETRY_EVENTS.threadsLockedViewed || event === TELEMETRY_EVENTS.threadsIntelligenceSignupClicked || event === TELEMETRY_EVENTS.threadsTalkToEngineerClicked || event === TELEMETRY_EVENTS.talkToEngineerClicked || event === TELEMETRY_EVENTS.threadsEmptyEnabledViewed || event === TELEMETRY_EVENTS.threadsEnabledViewed || event === TELEMETRY_EVENTS.threadsExampleViewed || event === TELEMETRY_EVENTS.threadsExampleSelected || event === TELEMETRY_EVENTS.threadsExampleTourStarted || event === TELEMETRY_EVENTS.threadsExampleTourStepViewed || event === TELEMETRY_EVENTS.threadsExampleTourDismissed || event === TELEMETRY_EVENTS.threadsExampleTourCompleted || event === TELEMETRY_EVENTS.threadsExampleTourReopened || event === TELEMETRY_EVENTS.memoriesTabClicked;
|
|
318
|
+
return event === TELEMETRY_EVENTS.opened || event === TELEMETRY_EVENTS.threadsTabClicked || event === TELEMETRY_EVENTS.threadsLockedViewed || event === TELEMETRY_EVENTS.threadsIntelligenceSignupClicked || event === TELEMETRY_EVENTS.threadsTalkToEngineerClicked || event === TELEMETRY_EVENTS.talkToEngineerClicked || event === TELEMETRY_EVENTS.threadsEmptyEnabledViewed || event === TELEMETRY_EVENTS.threadsEnabledViewed || event === TELEMETRY_EVENTS.threadsExampleViewed || event === TELEMETRY_EVENTS.threadsExampleSelected || event === TELEMETRY_EVENTS.threadsExampleTourStarted || event === TELEMETRY_EVENTS.threadsExampleTourStepViewed || event === TELEMETRY_EVENTS.threadsExampleTourDismissed || event === TELEMETRY_EVENTS.threadsExampleTourCompleted || event === TELEMETRY_EVENTS.threadsExampleTourReopened || event === TELEMETRY_EVENTS.memoriesTabClicked || event === TELEMETRY_EVENTS.metadataModuleViewed || event === TELEMETRY_EVENTS.metadataActionClicked;
|
|
226
319
|
}
|
|
227
320
|
function getRuntimeUrlType(runtimeUrl) {
|
|
228
321
|
if (!runtimeUrl) return "missing";
|
|
@@ -248,15 +341,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
248
341
|
*/
|
|
249
342
|
function track(event, properties = {}) {
|
|
250
343
|
if (isTelemetryOptedOut()) return;
|
|
251
|
-
const distinctId = getOrCreateTelemetryDistinctId();
|
|
252
|
-
const enrichedProperties = isEnrichedTelemetryEvent(event) ? {
|
|
253
|
-
package_name: PACKAGE_NAME,
|
|
254
|
-
package_version: PACKAGE_VERSION,
|
|
255
|
-
inspector_distinct_id: distinctId
|
|
256
|
-
} : {};
|
|
257
|
-
let body;
|
|
258
344
|
try {
|
|
259
|
-
|
|
345
|
+
const distinctId = getOrCreateTelemetryDistinctId();
|
|
346
|
+
const enrichedProperties = isEnrichedTelemetryEvent(event) ? {
|
|
347
|
+
package_name: PACKAGE_NAME,
|
|
348
|
+
package_version: PACKAGE_VERSION,
|
|
349
|
+
inspector_distinct_id: distinctId
|
|
350
|
+
} : {};
|
|
351
|
+
postBestEffort(TELEMETRY_INGEST_URL, JSON.stringify({
|
|
260
352
|
event,
|
|
261
353
|
properties: {
|
|
262
354
|
...properties,
|
|
@@ -268,11 +360,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
268
360
|
...isEnrichedTelemetryEvent(event) ? { version: PACKAGE_VERSION } : {}
|
|
269
361
|
},
|
|
270
362
|
ts: Math.floor(Date.now() / 1e3)
|
|
271
|
-
});
|
|
272
|
-
} catch (_unused2) {
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
postBestEffort(TELEMETRY_INGEST_URL, body, distinctId);
|
|
363
|
+
}), distinctId);
|
|
364
|
+
} catch (_unused2) {}
|
|
276
365
|
}
|
|
277
366
|
function trackBannerViewed(props) {
|
|
278
367
|
track(TELEMETRY_EVENTS.bannerViewed, props);
|
|
@@ -299,51 +388,135 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
299
388
|
function trackInspectorOpened(props) {
|
|
300
389
|
track(TELEMETRY_EVENTS.opened, props);
|
|
301
390
|
}
|
|
391
|
+
/** Rebuild the common Thread payload from its closed coarse allowlist. */
|
|
392
|
+
function threadCommonProperties(props) {
|
|
393
|
+
return {
|
|
394
|
+
...props.intelligence_status === void 0 ? {} : { intelligence_status: props.intelligence_status },
|
|
395
|
+
...props.thread_service_status === void 0 ? {} : { thread_service_status: props.thread_service_status },
|
|
396
|
+
...props.license_status === void 0 ? {} : { license_status: props.license_status },
|
|
397
|
+
...props.runtime_mode === void 0 ? {} : { runtime_mode: props.runtime_mode },
|
|
398
|
+
...props.runtime_url_type === void 0 ? {} : { runtime_url_type: props.runtime_url_type },
|
|
399
|
+
...props.telemetry_disabled === void 0 ? {} : { telemetry_disabled: props.telemetry_disabled },
|
|
400
|
+
...props.has_threads === void 0 ? {} : { has_threads: props.has_threads },
|
|
401
|
+
...props.usage_bucket === void 0 ? {} : { usage_bucket: props.usage_bucket },
|
|
402
|
+
...props.expiry_bucket === void 0 ? {} : { expiry_bucket: props.expiry_bucket },
|
|
403
|
+
...props.group_key === void 0 ? {} : { group_key: props.group_key },
|
|
404
|
+
...props.leaf_key === void 0 ? {} : { leaf_key: props.leaf_key }
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
/** Add only the fields used by the three Thread CTA funnels. */
|
|
408
|
+
function threadCtaProperties(props) {
|
|
409
|
+
return {
|
|
410
|
+
...threadCommonProperties(props),
|
|
411
|
+
...props.cta === void 0 ? {} : { cta: props.cta },
|
|
412
|
+
...props.cta_surface === void 0 ? {} : { cta_surface: props.cta_surface },
|
|
413
|
+
...props.posthog_distinct_id === void 0 ? {} : { posthog_distinct_id: props.posthog_distinct_id }
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
/** Add only the closed example kind used by example impressions/selections. */
|
|
417
|
+
function threadExampleProperties(props) {
|
|
418
|
+
return {
|
|
419
|
+
...threadCommonProperties(props),
|
|
420
|
+
...props.example_kind === void 0 ? {} : { example_kind: props.example_kind }
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
/** Add only a bounded example kind and tour step/tab pair. */
|
|
424
|
+
function threadTourProperties(props) {
|
|
425
|
+
return {
|
|
426
|
+
...threadExampleProperties(props),
|
|
427
|
+
...props.tour_step === void 0 ? {} : { tour_step: props.tour_step },
|
|
428
|
+
...props.tour_tab === void 0 ? {} : { tour_tab: props.tour_tab }
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
/** Add the bounded dismissal leaf used only by terminal tour events. */
|
|
432
|
+
function threadTourTerminalProperties(props) {
|
|
433
|
+
return {
|
|
434
|
+
...threadTourProperties(props),
|
|
435
|
+
...props.dismiss_method === void 0 ? {} : { dismiss_method: props.dismiss_method }
|
|
436
|
+
};
|
|
437
|
+
}
|
|
302
438
|
function trackThreadsTabClicked(props = {}) {
|
|
303
|
-
track(TELEMETRY_EVENTS.threadsTabClicked, props);
|
|
439
|
+
track(TELEMETRY_EVENTS.threadsTabClicked, threadCommonProperties(props));
|
|
304
440
|
}
|
|
305
441
|
function trackThreadsLockedViewed(props) {
|
|
306
|
-
track(TELEMETRY_EVENTS.threadsLockedViewed, props);
|
|
442
|
+
track(TELEMETRY_EVENTS.threadsLockedViewed, threadCommonProperties(props));
|
|
307
443
|
}
|
|
308
444
|
function trackThreadsIntelligenceSignupClicked(props) {
|
|
309
|
-
track(TELEMETRY_EVENTS.threadsIntelligenceSignupClicked, props);
|
|
445
|
+
track(TELEMETRY_EVENTS.threadsIntelligenceSignupClicked, threadCtaProperties(props));
|
|
310
446
|
}
|
|
311
447
|
function trackThreadsTalkToEngineerClicked(props) {
|
|
312
|
-
track(TELEMETRY_EVENTS.threadsTalkToEngineerClicked, props);
|
|
448
|
+
track(TELEMETRY_EVENTS.threadsTalkToEngineerClicked, threadCtaProperties(props));
|
|
313
449
|
}
|
|
314
450
|
function trackTalkToEngineerClicked(props) {
|
|
315
|
-
track(TELEMETRY_EVENTS.talkToEngineerClicked, props);
|
|
451
|
+
track(TELEMETRY_EVENTS.talkToEngineerClicked, threadCtaProperties(props));
|
|
316
452
|
}
|
|
317
453
|
function trackThreadsEmptyEnabledViewed(props) {
|
|
318
|
-
track(TELEMETRY_EVENTS.threadsEmptyEnabledViewed, props);
|
|
454
|
+
track(TELEMETRY_EVENTS.threadsEmptyEnabledViewed, threadCommonProperties(props));
|
|
319
455
|
}
|
|
320
456
|
function trackThreadsEnabledViewed(props) {
|
|
321
|
-
track(TELEMETRY_EVENTS.threadsEnabledViewed, props);
|
|
457
|
+
track(TELEMETRY_EVENTS.threadsEnabledViewed, threadCommonProperties(props));
|
|
322
458
|
}
|
|
323
459
|
function trackThreadsExampleViewed(props) {
|
|
324
|
-
track(TELEMETRY_EVENTS.threadsExampleViewed, props);
|
|
460
|
+
track(TELEMETRY_EVENTS.threadsExampleViewed, threadExampleProperties(props));
|
|
325
461
|
}
|
|
326
462
|
function trackThreadsExampleSelected(props) {
|
|
327
|
-
track(TELEMETRY_EVENTS.threadsExampleSelected, props);
|
|
463
|
+
track(TELEMETRY_EVENTS.threadsExampleSelected, threadExampleProperties(props));
|
|
328
464
|
}
|
|
329
465
|
function trackThreadsExampleTourStarted(props) {
|
|
330
|
-
track(TELEMETRY_EVENTS.threadsExampleTourStarted, props);
|
|
466
|
+
track(TELEMETRY_EVENTS.threadsExampleTourStarted, threadTourProperties(props));
|
|
331
467
|
}
|
|
332
468
|
function trackThreadsExampleTourStepViewed(props) {
|
|
333
|
-
track(TELEMETRY_EVENTS.threadsExampleTourStepViewed, props);
|
|
469
|
+
track(TELEMETRY_EVENTS.threadsExampleTourStepViewed, threadTourProperties(props));
|
|
334
470
|
}
|
|
335
471
|
function trackThreadsExampleTourDismissed(props) {
|
|
336
|
-
track(TELEMETRY_EVENTS.threadsExampleTourDismissed, props);
|
|
472
|
+
track(TELEMETRY_EVENTS.threadsExampleTourDismissed, threadTourTerminalProperties(props));
|
|
337
473
|
}
|
|
338
474
|
function trackThreadsExampleTourCompleted(props) {
|
|
339
|
-
track(TELEMETRY_EVENTS.threadsExampleTourCompleted, props);
|
|
475
|
+
track(TELEMETRY_EVENTS.threadsExampleTourCompleted, threadTourTerminalProperties(props));
|
|
340
476
|
}
|
|
341
477
|
function trackThreadsExampleTourReopened(props) {
|
|
342
|
-
track(TELEMETRY_EVENTS.threadsExampleTourReopened, props);
|
|
478
|
+
track(TELEMETRY_EVENTS.threadsExampleTourReopened, threadTourProperties(props));
|
|
343
479
|
}
|
|
344
480
|
function trackMemoriesTabClicked(props = {}) {
|
|
345
481
|
track(TELEMETRY_EVENTS.memoriesTabClicked, props);
|
|
346
482
|
}
|
|
483
|
+
function metadataCoarseProperties(props) {
|
|
484
|
+
const navigation = props.group_key === void 0 || props.leaf_key === void 0 ? {} : {
|
|
485
|
+
group_key: props.group_key,
|
|
486
|
+
leaf_key: props.leaf_key
|
|
487
|
+
};
|
|
488
|
+
return {
|
|
489
|
+
license_bucket: props.license_bucket,
|
|
490
|
+
usage_bucket: props.usage_bucket,
|
|
491
|
+
expiry_bucket: props.expiry_bucket,
|
|
492
|
+
...navigation,
|
|
493
|
+
...props.action_placement === void 0 ? {} : { action_placement: props.action_placement }
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Tracks one visible Inspector metadata module using coarse fields only.
|
|
498
|
+
* Rebuilding the payload here prevents local labels, IDs, URLs, and usage
|
|
499
|
+
* values from crossing the telemetry boundary through extra object fields.
|
|
500
|
+
*/
|
|
501
|
+
function trackMetadataModuleViewed(props) {
|
|
502
|
+
track(TELEMETRY_EVENTS.metadataModuleViewed, {
|
|
503
|
+
module: props.module,
|
|
504
|
+
...props.action_kind === void 0 ? {} : { action_kind: props.action_kind },
|
|
505
|
+
...metadataCoarseProperties(props)
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Tracks clicks for managed plan and renewal actions. The existing
|
|
510
|
+
* Intelligence-enable funnel keeps its original event and never calls this
|
|
511
|
+
* helper, which prevents a single click from producing two wire events.
|
|
512
|
+
*/
|
|
513
|
+
function trackMetadataActionClicked(props) {
|
|
514
|
+
track(TELEMETRY_EVENTS.metadataActionClicked, {
|
|
515
|
+
module: "action",
|
|
516
|
+
action_kind: props.action_kind,
|
|
517
|
+
...metadataCoarseProperties(props)
|
|
518
|
+
});
|
|
519
|
+
}
|
|
347
520
|
/**
|
|
348
521
|
* Returns the inspector's anonymous distinct-ID for cross-domain
|
|
349
522
|
* propagation onto outbound banner-CTA links, or `null` when the user
|
|
@@ -389,9 +562,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
389
562
|
}
|
|
390
563
|
async function postBestEffort(url, body, distinctId) {
|
|
391
564
|
if (typeof fetch === "undefined") return;
|
|
392
|
-
|
|
393
|
-
const timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
565
|
+
let timeoutId;
|
|
394
566
|
try {
|
|
567
|
+
const controller = new AbortController();
|
|
568
|
+
timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
395
569
|
await fetch(url, {
|
|
396
570
|
method: "POST",
|
|
397
571
|
headers: {
|
|
@@ -402,7 +576,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
402
576
|
signal: controller.signal
|
|
403
577
|
});
|
|
404
578
|
} catch (_unused3) {} finally {
|
|
405
|
-
clearTimeout(timeoutId);
|
|
579
|
+
if (timeoutId !== void 0) clearTimeout(timeoutId);
|
|
406
580
|
}
|
|
407
581
|
}
|
|
408
582
|
|
|
@@ -411,11 +585,47 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
411
585
|
const WEB_INSPECTOR_TAG = "cpk-web-inspector";
|
|
412
586
|
const THREAD_INSPECTOR_TAG = "cpk-thread-inspector";
|
|
413
587
|
/**
|
|
414
|
-
* User-facing label for the memory
|
|
415
|
-
*
|
|
416
|
-
* changed from "Learning" to "Memory".
|
|
588
|
+
* User-facing label for the memory view header. The legacy menu key stays
|
|
589
|
+
* "memories" for persistence and telemetry stability.
|
|
417
590
|
*/
|
|
418
591
|
const MEMORY_VIEW_LABEL = "Memory";
|
|
592
|
+
const INSPECTOR_GROUPS = {
|
|
593
|
+
threads: ["threads"],
|
|
594
|
+
agents: [
|
|
595
|
+
"ag-ui-events",
|
|
596
|
+
"agents",
|
|
597
|
+
"frontend-tools",
|
|
598
|
+
"capabilities",
|
|
599
|
+
"agent-context"
|
|
600
|
+
],
|
|
601
|
+
learning: ["memories"]
|
|
602
|
+
};
|
|
603
|
+
const INSPECTOR_MENU_KEYS = [
|
|
604
|
+
...INSPECTOR_GROUPS.threads,
|
|
605
|
+
...INSPECTOR_GROUPS.agents,
|
|
606
|
+
...INSPECTOR_GROUPS.learning
|
|
607
|
+
];
|
|
608
|
+
/** Return whether persisted state names a legacy Inspector leaf. */
|
|
609
|
+
function isInspectorMenuKey(value) {
|
|
610
|
+
return typeof value === "string" && INSPECTOR_MENU_KEYS.some((menuKey) => menuKey === value);
|
|
611
|
+
}
|
|
612
|
+
const INSPECTOR_PRIMARY_NAVIGATION = [
|
|
613
|
+
{
|
|
614
|
+
key: "threads",
|
|
615
|
+
label: "Threads",
|
|
616
|
+
icon: "MessageSquare"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
key: "agents",
|
|
620
|
+
label: "Agents",
|
|
621
|
+
icon: "Bot"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
key: "learning",
|
|
625
|
+
label: "Learning",
|
|
626
|
+
icon: "Brain"
|
|
627
|
+
}
|
|
628
|
+
];
|
|
419
629
|
const EDGE_MARGIN = 16;
|
|
420
630
|
const DRAG_THRESHOLD = 6;
|
|
421
631
|
const MIN_WINDOW_WIDTH = 600;
|
|
@@ -434,17 +644,49 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
434
644
|
};
|
|
435
645
|
const DOCKED_LEFT_WIDTH = 500;
|
|
436
646
|
const MAX_AGENT_EVENTS = 200;
|
|
647
|
+
const INTERACTIVE_FOCUS_BASE_STYLE = "outline-style:solid;outline-width:2px;outline-color:transparent;outline-offset:2px;cursor:pointer;";
|
|
437
648
|
const MAX_PENDING_BANNER_VIEWED = 20;
|
|
438
649
|
const MAX_TOTAL_EVENTS = 500;
|
|
439
650
|
const INTELLIGENCE_SIGNUP_URL = "https://go.copilotkit.ai/intelligence-signup";
|
|
440
|
-
const THREADS_INTELLIGENCE_SIGNIN_URL = "https://dashboard.operations.copilotkit.ai/sign-in";
|
|
441
651
|
const TALK_TO_ENGINEER_URL = "https://www.copilotkit.ai/talk-to-an-engineer";
|
|
442
652
|
const CAPABILITIES_TAB_LABEL = "Capabilities";
|
|
443
653
|
const THREADS_DOCS_URL = "https://docs.copilotkit.ai/threads";
|
|
654
|
+
const THREADS_RUNTIME_SETUP_DOCS_URL = "https://docs.copilotkit.ai/backend/runtime-endpoints#enable-rich-threads-routes";
|
|
655
|
+
const THREADS_RUNTIME_SETUP_PROMPT = [
|
|
656
|
+
`Read ${THREADS_RUNTIME_SETUP_DOCS_URL} and finish setting up Rich Threads in this repository.`,
|
|
657
|
+
"",
|
|
658
|
+
"First inspect the repository's agent instructions, installed CopilotKit versions, Runtime adapter, frontend provider, route or proxy setup, and existing authentication. Preserve the current framework and deployment model. Preserve existing authentication middleware and access checks on every Runtime route.",
|
|
659
|
+
"",
|
|
660
|
+
"Follow the guide to enable the multi-route Runtime, align the frontend transport, scope identifyUser to the existing server-verified signed-in application user, and expose the full Runtime subtree for GET, POST, PATCH, and DELETE. Never use a fixed demo identity in production. If no trusted user identity exists, stop and ask me which auth source to use.",
|
|
661
|
+
"",
|
|
662
|
+
"Start the app and verify GET {basePath}/info reports threadEndpoints.list, inspect, mutations, and realtimeMetadata as true. Run focused tests, lint, and typecheck. Report the files changed, commands run, and verification result. If blocked, explain the missing input; do not invent setup."
|
|
663
|
+
].join("\n");
|
|
444
664
|
const SELF_HOSTED_INTELLIGENCE_URL = "https://docs.copilotkit.ai/premium/self-hosting";
|
|
445
665
|
const THREADS_EXAMPLE_OVERVIEW_VIDEO_URL = "https://cdn.copilotkit.ai/corp-site/videos/copilotkit-generative-ui-agentic-frontend-demo.webm";
|
|
666
|
+
const THREADS_EXAMPLE_OVERVIEW_VIDEO_FALLBACK = "The demo video is unavailable. Use the example threads to explore Messages, AG-UI Events, and State.";
|
|
446
667
|
const THREADS_EXAMPLE_TOUR_STORAGE_KEY = "cpk:inspector:threads-example-tour:v1";
|
|
447
668
|
const THREADS_EXAMPLE_AGENT_ID = "threads-feature";
|
|
669
|
+
/**
|
|
670
|
+
* Selects the Thread store status with a stable object identity so loading-only
|
|
671
|
+
* transitions reach one of the Inspector's two existing store subscriptions.
|
|
672
|
+
*/
|
|
673
|
+
function createThreadStoreStatusSelector() {
|
|
674
|
+
let previousError;
|
|
675
|
+
let previousIsLoading;
|
|
676
|
+
let previousStatus;
|
|
677
|
+
return (state) => {
|
|
678
|
+
const error = (0, _copilotkit_core.ɵselectThreadsError)(state);
|
|
679
|
+
const isLoading = (0, _copilotkit_core.ɵselectThreadsIsLoading)(state);
|
|
680
|
+
if (previousStatus && previousError === error && previousIsLoading === isLoading) return previousStatus;
|
|
681
|
+
previousError = error;
|
|
682
|
+
previousIsLoading = isLoading;
|
|
683
|
+
previousStatus = {
|
|
684
|
+
error,
|
|
685
|
+
isLoading
|
|
686
|
+
};
|
|
687
|
+
return previousStatus;
|
|
688
|
+
};
|
|
689
|
+
}
|
|
448
690
|
const AGENT_EVENT_TYPES = [
|
|
449
691
|
"RUN_STARTED",
|
|
450
692
|
"RUN_FINISHED",
|
|
@@ -533,6 +775,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
533
775
|
isExample: true
|
|
534
776
|
}
|
|
535
777
|
];
|
|
778
|
+
/** Map Sam's fixed example IDs to a closed telemetry vocabulary. */
|
|
779
|
+
function getExampleKind(threadId) {
|
|
780
|
+
switch (threadId) {
|
|
781
|
+
case "example-realtime-sync": return "realtime_sync";
|
|
782
|
+
case "example-manage-history": return "manage_history";
|
|
783
|
+
case "example-inspect-runs": return "inspect_runs";
|
|
784
|
+
default: return;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
536
787
|
const THREADS_EXAMPLE_DETAILS = {
|
|
537
788
|
"example-realtime-sync": {
|
|
538
789
|
messages: [{
|
|
@@ -676,13 +927,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
676
927
|
const THREADS_EXAMPLE_TOUR_STEPS = [
|
|
677
928
|
{
|
|
678
929
|
tab: "timeline",
|
|
679
|
-
label: "
|
|
930
|
+
label: "Messages",
|
|
680
931
|
title: "Read the run as a story",
|
|
681
932
|
body: "The timeline turns messages, tool calls, state changes, and run markers into a scannable debugging trail."
|
|
682
933
|
},
|
|
683
934
|
{
|
|
684
935
|
tab: "raw-events",
|
|
685
|
-
label: "
|
|
936
|
+
label: "AG-UI Events",
|
|
686
937
|
title: "Drop into the protocol payloads",
|
|
687
938
|
body: "Raw events show the exact AG-UI stream behind the timeline when you need to verify ordering or payload shape."
|
|
688
939
|
},
|
|
@@ -693,6 +944,28 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
693
944
|
body: "The state tab shows the saved values that make a thread resumable across sessions."
|
|
694
945
|
}
|
|
695
946
|
];
|
|
947
|
+
/** Return only the three supported tour step/tab pairs. */
|
|
948
|
+
function getExampleTourTelemetryPair(index) {
|
|
949
|
+
switch (index) {
|
|
950
|
+
case 0: return {
|
|
951
|
+
tour_step: 1,
|
|
952
|
+
tour_tab: "timeline"
|
|
953
|
+
};
|
|
954
|
+
case 1: return {
|
|
955
|
+
tour_step: 2,
|
|
956
|
+
tour_tab: "raw-events"
|
|
957
|
+
};
|
|
958
|
+
case 2: return {
|
|
959
|
+
tour_step: 3,
|
|
960
|
+
tour_tab: "state"
|
|
961
|
+
};
|
|
962
|
+
default: return;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
/** Convert rendered action placement to its stable telemetry key. */
|
|
966
|
+
function getMetadataActionPlacement(placement) {
|
|
967
|
+
return placement === "threads-footer" ? "threads_footer" : "threads_locked";
|
|
968
|
+
}
|
|
696
969
|
function escapeHtml(s) {
|
|
697
970
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
698
971
|
}
|
|
@@ -704,10 +977,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
704
977
|
}
|
|
705
978
|
const colors = {
|
|
706
979
|
key: "#5558B2",
|
|
707
|
-
str: "#
|
|
708
|
-
num: "#
|
|
980
|
+
str: "#087653",
|
|
981
|
+
num: "#8a5900",
|
|
709
982
|
bool: "#c0333a",
|
|
710
|
-
nil: "#
|
|
983
|
+
nil: "#68686e"
|
|
711
984
|
};
|
|
712
985
|
const json = JSON.stringify(obj, null, 2);
|
|
713
986
|
if (!json) return "";
|
|
@@ -737,7 +1010,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
737
1010
|
};
|
|
738
1011
|
if (type.startsWith("TOOL_CALL")) return {
|
|
739
1012
|
bg: "rgba(133,236,206,0.15)",
|
|
740
|
-
fg: "#
|
|
1013
|
+
fg: "#087653"
|
|
741
1014
|
};
|
|
742
1015
|
if (type.startsWith("STATE")) return {
|
|
743
1016
|
bg: "rgba(190,194,255,0.102)",
|
|
@@ -749,11 +1022,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
749
1022
|
};
|
|
750
1023
|
if (type.startsWith("RUN_") || type.startsWith("STEP_")) return {
|
|
751
1024
|
bg: "rgba(255,172,77,0.2)",
|
|
752
|
-
fg: "#
|
|
1025
|
+
fg: "#8a5900"
|
|
753
1026
|
};
|
|
754
1027
|
return {
|
|
755
1028
|
bg: "#F7F7F9",
|
|
756
|
-
fg: "#
|
|
1029
|
+
fg: "#68686e"
|
|
757
1030
|
};
|
|
758
1031
|
}
|
|
759
1032
|
function formatTimestamp(ts) {
|
|
@@ -773,6 +1046,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
773
1046
|
this.threads = [];
|
|
774
1047
|
this.selectedThreadId = null;
|
|
775
1048
|
this.errorMessage = null;
|
|
1049
|
+
this.suppressEmptyState = false;
|
|
776
1050
|
this._query = "";
|
|
777
1051
|
this.onSearchInput = (event) => {
|
|
778
1052
|
this._query = event.target.value;
|
|
@@ -824,11 +1098,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
824
1098
|
${filtered.map((thread) => {
|
|
825
1099
|
var _thread$name;
|
|
826
1100
|
return lit.html`
|
|
827
|
-
<
|
|
1101
|
+
<button
|
|
1102
|
+
type="button"
|
|
1103
|
+
aria-current=${this.selectedThreadId === thread.id ? "true" : lit.nothing}
|
|
828
1104
|
class="cpk-tl__item ${this.selectedThreadId === thread.id ? "cpk-tl__item--active" : ""}"
|
|
829
1105
|
@click=${() => this.onThreadClick(thread.id)}
|
|
830
1106
|
>
|
|
831
|
-
<
|
|
1107
|
+
<span class="cpk-tl__row1">
|
|
832
1108
|
<span
|
|
833
1109
|
class="cpk-tl__name ${!thread.name ? "cpk-tl__name--unnamed" : ""}"
|
|
834
1110
|
>${(_thread$name = thread.name) !== null && _thread$name !== void 0 ? _thread$name : "Untitled"}</span
|
|
@@ -836,17 +1112,17 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
836
1112
|
<span class="cpk-tl__time"
|
|
837
1113
|
>${this.relativeTime(thread.updatedAt)}</span
|
|
838
1114
|
>
|
|
839
|
-
</
|
|
840
|
-
<
|
|
1115
|
+
</span>
|
|
1116
|
+
<span class="cpk-tl__meta">
|
|
841
1117
|
<span class="cpk-tl__pill">${thread.agentId}</span>
|
|
842
1118
|
${thread.isExample ? lit.html`
|
|
843
1119
|
<span class="cpk-tl__pill cpk-tl__pill--example">Example</span>
|
|
844
1120
|
` : lit.nothing}
|
|
845
|
-
</
|
|
846
|
-
</
|
|
1121
|
+
</span>
|
|
1122
|
+
</button>
|
|
847
1123
|
`;
|
|
848
1124
|
})}
|
|
849
|
-
${filtered.length === 0 ? lit.html`
|
|
1125
|
+
${filtered.length === 0 && !this.suppressEmptyState ? lit.html`
|
|
850
1126
|
<div class="cpk-tl__empty">
|
|
851
1127
|
${this.errorMessage ? lit.html`
|
|
852
1128
|
<svg
|
|
@@ -901,6 +1177,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
901
1177
|
threads: { attribute: false },
|
|
902
1178
|
selectedThreadId: { attribute: false },
|
|
903
1179
|
errorMessage: { attribute: false },
|
|
1180
|
+
suppressEmptyState: { attribute: false },
|
|
904
1181
|
_query: { state: true }
|
|
905
1182
|
};
|
|
906
1183
|
CpkThreadList.styles = lit.css`
|
|
@@ -955,7 +1232,18 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
955
1232
|
|
|
956
1233
|
/* ── Thread item ── */
|
|
957
1234
|
.cpk-tl__item {
|
|
1235
|
+
appearance: none;
|
|
1236
|
+
display: block;
|
|
1237
|
+
box-sizing: border-box;
|
|
1238
|
+
width: 100%;
|
|
1239
|
+
margin: 0;
|
|
1240
|
+
border: 0;
|
|
1241
|
+
border-radius: 0;
|
|
958
1242
|
padding: 11px 13px;
|
|
1243
|
+
background: transparent;
|
|
1244
|
+
color: inherit;
|
|
1245
|
+
font: inherit;
|
|
1246
|
+
text-align: left;
|
|
959
1247
|
cursor: pointer;
|
|
960
1248
|
border-bottom: 1px solid #e9e9ef;
|
|
961
1249
|
border-left: 3px solid transparent;
|
|
@@ -975,6 +1263,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
975
1263
|
background: #bec2ff33;
|
|
976
1264
|
}
|
|
977
1265
|
|
|
1266
|
+
.cpk-tl__item:focus-visible {
|
|
1267
|
+
outline-color: #5558b2;
|
|
1268
|
+
outline-offset: -2px;
|
|
1269
|
+
outline-style: solid;
|
|
1270
|
+
outline-width: 2px;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
978
1273
|
.cpk-tl__row1 {
|
|
979
1274
|
display: flex;
|
|
980
1275
|
align-items: center;
|
|
@@ -993,7 +1288,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
993
1288
|
}
|
|
994
1289
|
|
|
995
1290
|
.cpk-tl__name--unnamed {
|
|
996
|
-
color: #
|
|
1291
|
+
color: #68686e;
|
|
997
1292
|
font-style: italic;
|
|
998
1293
|
font-weight: 400;
|
|
999
1294
|
}
|
|
@@ -1001,7 +1296,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1001
1296
|
.cpk-tl__time {
|
|
1002
1297
|
font-family: "Spline Sans Mono", monospace;
|
|
1003
1298
|
font-size: 10px;
|
|
1004
|
-
color: #
|
|
1299
|
+
color: #68686e;
|
|
1005
1300
|
flex-shrink: 0;
|
|
1006
1301
|
}
|
|
1007
1302
|
|
|
@@ -1026,14 +1321,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1026
1321
|
|
|
1027
1322
|
.cpk-tl__pill--example {
|
|
1028
1323
|
background: rgba(133, 236, 206, 0.22);
|
|
1029
|
-
color: #
|
|
1324
|
+
color: #087653;
|
|
1030
1325
|
}
|
|
1031
1326
|
|
|
1032
1327
|
/* ── Empty state ── */
|
|
1033
1328
|
.cpk-tl__empty {
|
|
1034
1329
|
padding: 32px 16px;
|
|
1035
1330
|
text-align: center;
|
|
1036
|
-
color: #
|
|
1331
|
+
color: #68686e;
|
|
1037
1332
|
font-size: 12px;
|
|
1038
1333
|
display: flex;
|
|
1039
1334
|
flex-direction: column;
|
|
@@ -1089,10 +1384,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1089
1384
|
this._messagesAbort = null;
|
|
1090
1385
|
this._eventsAbort = null;
|
|
1091
1386
|
this._stateAbort = null;
|
|
1387
|
+
this._hasConnectedOnce = false;
|
|
1092
1388
|
this._dividerResizing = false;
|
|
1093
1389
|
this._dividerPointerId = -1;
|
|
1094
1390
|
this._dividerStartX = 0;
|
|
1095
1391
|
this._dividerStartWidth = 0;
|
|
1392
|
+
this.domIdPrefix = `cpk-thread-detail-${CpkThreadInspector.nextDomId++}`;
|
|
1096
1393
|
this.onDetailDividerDown = (event) => {
|
|
1097
1394
|
this._dividerResizing = true;
|
|
1098
1395
|
this._dividerPointerId = event.pointerId;
|
|
@@ -1142,6 +1439,31 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1142
1439
|
if (id === "state") return this.renderState();
|
|
1143
1440
|
return this.renderEvents();
|
|
1144
1441
|
}
|
|
1442
|
+
/** Returns the stable DOM ID for one tab in this inspector instance. */
|
|
1443
|
+
tabDomId(id) {
|
|
1444
|
+
return `${this.domIdPrefix}-tab-${id}`;
|
|
1445
|
+
}
|
|
1446
|
+
/** Returns the stable DOM ID for the panel controlled by one tab. */
|
|
1447
|
+
panelDomId(id) {
|
|
1448
|
+
return `${this.domIdPrefix}-panel-${id}`;
|
|
1449
|
+
}
|
|
1450
|
+
/** Selects and focuses the tab targeted by an ARIA tabs navigation key. */
|
|
1451
|
+
handleTabKeyDown(event, currentId) {
|
|
1452
|
+
var _this$shadowRoot;
|
|
1453
|
+
const currentIndex = CpkThreadInspector.TAB_LIST.findIndex((tab) => tab.id === currentId);
|
|
1454
|
+
if (currentIndex < 0) return;
|
|
1455
|
+
let targetIndex = null;
|
|
1456
|
+
if (event.key === "ArrowRight") targetIndex = (currentIndex + 1) % CpkThreadInspector.TAB_LIST.length;
|
|
1457
|
+
else if (event.key === "ArrowLeft") targetIndex = (currentIndex - 1 + CpkThreadInspector.TAB_LIST.length) % CpkThreadInspector.TAB_LIST.length;
|
|
1458
|
+
else if (event.key === "Home") targetIndex = 0;
|
|
1459
|
+
else if (event.key === "End") targetIndex = CpkThreadInspector.TAB_LIST.length - 1;
|
|
1460
|
+
if (targetIndex === null) return;
|
|
1461
|
+
const target = CpkThreadInspector.TAB_LIST[targetIndex];
|
|
1462
|
+
if (!target) return;
|
|
1463
|
+
event.preventDefault();
|
|
1464
|
+
this.activateTab(target.id);
|
|
1465
|
+
(_this$shadowRoot = this.shadowRoot) === null || _this$shadowRoot === void 0 || (_this$shadowRoot = _this$shadowRoot.querySelector(`#${this.tabDomId(target.id)}`)) === null || _this$shadowRoot === void 0 || _this$shadowRoot.focus();
|
|
1466
|
+
}
|
|
1145
1467
|
activateTab(id) {
|
|
1146
1468
|
if (this._tab === id) return;
|
|
1147
1469
|
const isFirstActivation = !this._activatedTabs.has(id);
|
|
@@ -1169,6 +1491,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1169
1491
|
}
|
|
1170
1492
|
}
|
|
1171
1493
|
updated(_changed) {
|
|
1494
|
+
if (!this.isConnected) return;
|
|
1172
1495
|
const loadKey = this.currentLoadKey();
|
|
1173
1496
|
if (loadKey !== this._lastLoadKey) {
|
|
1174
1497
|
this._lastLoadKey = loadKey;
|
|
@@ -1192,6 +1515,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1192
1515
|
this.fetchMessages(this.threadId, true);
|
|
1193
1516
|
}
|
|
1194
1517
|
}
|
|
1518
|
+
connectedCallback() {
|
|
1519
|
+
super.connectedCallback();
|
|
1520
|
+
if (this._hasConnectedOnce) this.requestUpdate();
|
|
1521
|
+
this._hasConnectedOnce = true;
|
|
1522
|
+
}
|
|
1523
|
+
disconnectedCallback() {
|
|
1524
|
+
super.disconnectedCallback();
|
|
1525
|
+
this.resetLoadedThreadData();
|
|
1526
|
+
this._lastLoadKey = null;
|
|
1527
|
+
}
|
|
1195
1528
|
canFetchMessages() {
|
|
1196
1529
|
var _this$provider;
|
|
1197
1530
|
return !!((_this$provider = this.provider) === null || _this$provider === void 0 ? void 0 : _this$provider.getMessages) || !!this.runtimeUrl && this.threadInspectionAvailable;
|
|
@@ -1866,12 +2199,22 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1866
2199
|
<div class="cpk-td__left">
|
|
1867
2200
|
<!-- Tab bar -->
|
|
1868
2201
|
<div class="cpk-td__tabs-header">
|
|
1869
|
-
<div
|
|
2202
|
+
<div
|
|
2203
|
+
class="cpk-td__tab-group"
|
|
2204
|
+
role="tablist"
|
|
2205
|
+
aria-label="Thread detail views"
|
|
2206
|
+
>
|
|
1870
2207
|
${CpkThreadInspector.TAB_LIST.map((tab) => lit.html`
|
|
1871
2208
|
<button
|
|
2209
|
+
id=${this.tabDomId(tab.id)}
|
|
2210
|
+
type="button"
|
|
1872
2211
|
role="tab"
|
|
2212
|
+
aria-controls=${this.panelDomId(tab.id)}
|
|
2213
|
+
aria-selected=${this._tab === tab.id ? "true" : "false"}
|
|
2214
|
+
tabindex=${this._tab === tab.id ? "0" : "-1"}
|
|
1873
2215
|
class="cpk-td__tab ${this._tab === tab.id ? "cpk-td__tab--active" : ""}"
|
|
1874
2216
|
@click=${() => this.activateTab(tab.id)}
|
|
2217
|
+
@keydown=${(event) => this.handleTabKeyDown(event, tab.id)}
|
|
1875
2218
|
>
|
|
1876
2219
|
${tab.label}
|
|
1877
2220
|
</button>
|
|
@@ -1887,8 +2230,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1887
2230
|
<div class="cpk-td__status">Loading…</div>
|
|
1888
2231
|
` : lit.nothing}
|
|
1889
2232
|
${CpkThreadInspector.TAB_LIST.map((tab) => this._activatedTabs.has(tab.id) ? lit.html`<div
|
|
2233
|
+
id=${this.panelDomId(tab.id)}
|
|
1890
2234
|
class="cpk-td__panel"
|
|
1891
|
-
|
|
2235
|
+
role="tabpanel"
|
|
2236
|
+
aria-labelledby=${this.tabDomId(tab.id)}
|
|
2237
|
+
?hidden=${this._tab !== tab.id || this._panelInitializing}
|
|
1892
2238
|
>
|
|
1893
2239
|
${this.renderTabContent(tab.id)}
|
|
1894
2240
|
</div>` : lit.nothing)}
|
|
@@ -1922,42 +2268,58 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1922
2268
|
`;
|
|
1923
2269
|
}
|
|
1924
2270
|
renderMetadataStrip() {
|
|
1925
|
-
var _metadata$
|
|
2271
|
+
var _ref5, _metadata$name, _this$thread, _ref6, _metadata$id;
|
|
1926
2272
|
const metadata = this.metadata;
|
|
1927
|
-
const pills = [
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
2273
|
+
const pills = [{
|
|
2274
|
+
label: "Name",
|
|
2275
|
+
value: (_ref5 = (_metadata$name = metadata === null || metadata === void 0 ? void 0 : metadata.name) !== null && _metadata$name !== void 0 ? _metadata$name : (_this$thread = this.thread) === null || _this$thread === void 0 ? void 0 : _this$thread.name) !== null && _ref5 !== void 0 ? _ref5 : "Untitled"
|
|
2276
|
+
}, {
|
|
2277
|
+
label: "ID",
|
|
2278
|
+
value: (_ref6 = (_metadata$id = metadata === null || metadata === void 0 ? void 0 : metadata.id) !== null && _metadata$id !== void 0 ? _metadata$id : this.threadId) !== null && _ref6 !== void 0 ? _ref6 : "—",
|
|
2279
|
+
wrap: true
|
|
2280
|
+
}];
|
|
2281
|
+
for (const fact of [
|
|
1932
2282
|
{
|
|
1933
2283
|
label: "Agent",
|
|
1934
2284
|
value: metadata === null || metadata === void 0 ? void 0 : metadata.agentId
|
|
1935
2285
|
},
|
|
1936
2286
|
{
|
|
1937
|
-
label: "
|
|
1938
|
-
value:
|
|
2287
|
+
label: "Created",
|
|
2288
|
+
value: metadata === null || metadata === void 0 ? void 0 : metadata.createdAt
|
|
1939
2289
|
},
|
|
1940
2290
|
{
|
|
1941
|
-
label: "
|
|
1942
|
-
value: metadata === null || metadata === void 0 ? void 0 : metadata.
|
|
2291
|
+
label: "Updated",
|
|
2292
|
+
value: metadata === null || metadata === void 0 ? void 0 : metadata.updatedAt
|
|
1943
2293
|
}
|
|
1944
|
-
]
|
|
2294
|
+
]) {
|
|
2295
|
+
if (fact.value == null || fact.value === "") continue;
|
|
2296
|
+
pills.push({
|
|
2297
|
+
label: fact.label,
|
|
2298
|
+
value: fact.label === "Created" || fact.label === "Updated" ? this.fmtTime(fact.value) : fact.value
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
1945
2301
|
const bulkControls = this.renderActiveBulkControls();
|
|
1946
|
-
if (pills.length === 0 && bulkControls === lit.nothing) return lit.nothing;
|
|
1947
2302
|
return lit.html`
|
|
1948
|
-
<div
|
|
2303
|
+
<div
|
|
2304
|
+
class="cpk-td__metadata-strip"
|
|
2305
|
+
role="group"
|
|
2306
|
+
aria-label="Thread metadata"
|
|
2307
|
+
>
|
|
1949
2308
|
<div class="cpk-td__metadata-pills">
|
|
1950
|
-
${pills.map((pill) =>
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
2309
|
+
${pills.map((pill) => lit.html`
|
|
2310
|
+
<span
|
|
2311
|
+
class="cpk-td__metadata-pill ${pill.wrap ? "cpk-td__metadata-pill--wrap" : ""}"
|
|
2312
|
+
role="group"
|
|
2313
|
+
title=${pill.value}
|
|
2314
|
+
aria-label=${`${pill.label}: ${pill.value}`}
|
|
2315
|
+
>
|
|
1954
2316
|
<span class="cpk-td__metadata-label">${pill.label}</span>
|
|
1955
|
-
<span
|
|
1956
|
-
|
|
2317
|
+
<span
|
|
2318
|
+
class="cpk-td__metadata-value ${pill.wrap ? "cpk-td__metadata-value--wrap" : ""}"
|
|
2319
|
+
>${pill.value}</span
|
|
1957
2320
|
>
|
|
1958
2321
|
</span>
|
|
1959
|
-
|
|
1960
|
-
})}
|
|
2322
|
+
`)}
|
|
1961
2323
|
</div>
|
|
1962
2324
|
${bulkControls}
|
|
1963
2325
|
</div>
|
|
@@ -2015,8 +2377,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2015
2377
|
this._tab = "raw-events";
|
|
2016
2378
|
this.requestUpdate();
|
|
2017
2379
|
requestAnimationFrame(() => {
|
|
2018
|
-
var _this$
|
|
2019
|
-
const source = (_this$
|
|
2380
|
+
var _this$shadowRoot2, _source$scrollIntoVie;
|
|
2381
|
+
const source = (_this$shadowRoot2 = this.shadowRoot) === null || _this$shadowRoot2 === void 0 ? void 0 : _this$shadowRoot2.querySelector(`[data-source-index="${sourceIndex}"]`);
|
|
2020
2382
|
source === null || source === void 0 || (_source$scrollIntoVie = source.scrollIntoView) === null || _source$scrollIntoVie === void 0 || _source$scrollIntoVie.call(source, { block: "center" });
|
|
2021
2383
|
});
|
|
2022
2384
|
}
|
|
@@ -2051,8 +2413,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2051
2413
|
<div class="cpk-td__empty-state">
|
|
2052
2414
|
<span>No timeline events captured</span>
|
|
2053
2415
|
<span class="cpk-td__empty-hint"
|
|
2054
|
-
>Timeline rows are normalized from AG-UI events. Open
|
|
2055
|
-
|
|
2416
|
+
>Timeline rows are normalized from AG-UI events. Open AG-UI Events or State
|
|
2417
|
+
to inspect the available thread data.</span
|
|
2056
2418
|
>
|
|
2057
2419
|
</div>
|
|
2058
2420
|
`;
|
|
@@ -2226,7 +2588,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2226
2588
|
<svg width="10" height="10" viewBox="0 0 10 10" fill="none">
|
|
2227
2589
|
<path
|
|
2228
2590
|
d="M1 9C1 9 2 7 5 7C8 7 9 9 9 9M5 1C5 1 7 2.5 7 4.5C7 6.5 5 7 5 7C5 7 3 6.5 3 4.5C3 2.5 5 1 5 1Z"
|
|
2229
|
-
stroke="#
|
|
2591
|
+
stroke="#087653"
|
|
2230
2592
|
stroke-width="1.2"
|
|
2231
2593
|
stroke-linecap="round"
|
|
2232
2594
|
stroke-linejoin="round"
|
|
@@ -2451,7 +2813,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2451
2813
|
`;
|
|
2452
2814
|
}
|
|
2453
2815
|
renderDetailPanel() {
|
|
2454
|
-
var _metadata$
|
|
2816
|
+
var _ref7, _metadata$id2, _metadata$name2, _metadata$agentId, _metadata$endUserId, _metadata$createdById, _metadata$status;
|
|
2455
2817
|
const counts = this.activityCounts;
|
|
2456
2818
|
const metadata = this.metadata;
|
|
2457
2819
|
return lit.html`
|
|
@@ -2460,12 +2822,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2460
2822
|
<div class="cpk-tdp__row">
|
|
2461
2823
|
<span class="cpk-tdp__label">ID</span>
|
|
2462
2824
|
<span class="cpk-tdp__value cpk-tdp__value--wrap"
|
|
2463
|
-
>${
|
|
2825
|
+
>${(_ref7 = (_metadata$id2 = metadata === null || metadata === void 0 ? void 0 : metadata.id) !== null && _metadata$id2 !== void 0 ? _metadata$id2 : this.threadId) !== null && _ref7 !== void 0 ? _ref7 : "—"}</span
|
|
2464
2826
|
>
|
|
2465
2827
|
</div>
|
|
2466
2828
|
<div class="cpk-tdp__row">
|
|
2467
2829
|
<span class="cpk-tdp__label">Name</span>
|
|
2468
|
-
<span class="cpk-tdp__value">${(_metadata$
|
|
2830
|
+
<span class="cpk-tdp__value">${(_metadata$name2 = metadata === null || metadata === void 0 ? void 0 : metadata.name) !== null && _metadata$name2 !== void 0 ? _metadata$name2 : "—"}</span>
|
|
2469
2831
|
</div>
|
|
2470
2832
|
<div class="cpk-tdp__row">
|
|
2471
2833
|
<span class="cpk-tdp__label">Agent</span>
|
|
@@ -2476,7 +2838,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2476
2838
|
<div class="cpk-tdp__row">
|
|
2477
2839
|
<span class="cpk-tdp__label">End user</span>
|
|
2478
2840
|
<span class="cpk-tdp__value cpk-tdp__value--truncate"
|
|
2479
|
-
>${(_metadata$
|
|
2841
|
+
>${(_metadata$endUserId = metadata === null || metadata === void 0 ? void 0 : metadata.endUserId) !== null && _metadata$endUserId !== void 0 ? _metadata$endUserId : "—"}</span
|
|
2480
2842
|
>
|
|
2481
2843
|
</div>
|
|
2482
2844
|
<div class="cpk-tdp__row">
|
|
@@ -2560,15 +2922,16 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2560
2922
|
_panelInitializing: { state: true },
|
|
2561
2923
|
_activatedTabs: { state: true }
|
|
2562
2924
|
};
|
|
2925
|
+
CpkThreadInspector.nextDomId = 1;
|
|
2563
2926
|
CpkThreadInspector.COLLAPSE_THRESHOLD = 800;
|
|
2564
2927
|
CpkThreadInspector.TAB_LIST = [
|
|
2565
2928
|
{
|
|
2566
2929
|
id: "timeline",
|
|
2567
|
-
label: "
|
|
2930
|
+
label: "Messages"
|
|
2568
2931
|
},
|
|
2569
2932
|
{
|
|
2570
2933
|
id: "raw-events",
|
|
2571
|
-
label: "
|
|
2934
|
+
label: "AG-UI Events"
|
|
2572
2935
|
},
|
|
2573
2936
|
{
|
|
2574
2937
|
id: "state",
|
|
@@ -2639,7 +3002,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2639
3002
|
border-bottom: 2px solid transparent;
|
|
2640
3003
|
cursor: pointer;
|
|
2641
3004
|
background: transparent;
|
|
2642
|
-
color: #
|
|
3005
|
+
color: #68686e;
|
|
2643
3006
|
transition:
|
|
2644
3007
|
color 0.12s,
|
|
2645
3008
|
border-color 0.12s;
|
|
@@ -2650,6 +3013,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2650
3013
|
color: #010507;
|
|
2651
3014
|
}
|
|
2652
3015
|
|
|
3016
|
+
.cpk-td__tab:focus-visible {
|
|
3017
|
+
outline: 2px solid #5558b2;
|
|
3018
|
+
outline-offset: -3px;
|
|
3019
|
+
border-radius: 4px;
|
|
3020
|
+
}
|
|
3021
|
+
|
|
2653
3022
|
.cpk-td__tab--active {
|
|
2654
3023
|
color: #010507;
|
|
2655
3024
|
border-bottom-color: #bec2ff;
|
|
@@ -2669,7 +3038,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2669
3038
|
border: none;
|
|
2670
3039
|
border-left: 1px solid #dbdbe5;
|
|
2671
3040
|
background: transparent;
|
|
2672
|
-
color: #
|
|
3041
|
+
color: #68686e;
|
|
2673
3042
|
cursor: pointer;
|
|
2674
3043
|
flex-shrink: 0;
|
|
2675
3044
|
transition:
|
|
@@ -2738,7 +3107,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2738
3107
|
}
|
|
2739
3108
|
|
|
2740
3109
|
.cpk-td__metadata-label {
|
|
2741
|
-
color: #
|
|
3110
|
+
color: #68686e;
|
|
2742
3111
|
text-transform: uppercase;
|
|
2743
3112
|
font-size: 9px;
|
|
2744
3113
|
}
|
|
@@ -2748,6 +3117,18 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2748
3117
|
text-overflow: ellipsis;
|
|
2749
3118
|
}
|
|
2750
3119
|
|
|
3120
|
+
.cpk-td__metadata-pill--wrap {
|
|
3121
|
+
max-width: 100%;
|
|
3122
|
+
white-space: normal;
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
.cpk-td__metadata-value--wrap {
|
|
3126
|
+
overflow: visible;
|
|
3127
|
+
text-overflow: clip;
|
|
3128
|
+
white-space: normal;
|
|
3129
|
+
overflow-wrap: anywhere;
|
|
3130
|
+
}
|
|
3131
|
+
|
|
2751
3132
|
/*
|
|
2752
3133
|
* Each tab's content is wrapped in this panel so the keep-mounted
|
|
2753
3134
|
* inactive panels can be hidden via display:none without disturbing
|
|
@@ -2765,6 +3146,10 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2765
3146
|
flex-shrink: 0;
|
|
2766
3147
|
}
|
|
2767
3148
|
|
|
3149
|
+
.cpk-td__panel[hidden] {
|
|
3150
|
+
display: none;
|
|
3151
|
+
}
|
|
3152
|
+
|
|
2768
3153
|
/* ── Empty state ─────────────────────────────────────────────────── */
|
|
2769
3154
|
.cpk-td__empty-state {
|
|
2770
3155
|
flex: 1;
|
|
@@ -2773,14 +3158,14 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2773
3158
|
align-items: center;
|
|
2774
3159
|
justify-content: center;
|
|
2775
3160
|
gap: 8px;
|
|
2776
|
-
color: #
|
|
3161
|
+
color: #68686e;
|
|
2777
3162
|
font-size: 13px;
|
|
2778
3163
|
padding: 40px 0;
|
|
2779
3164
|
}
|
|
2780
3165
|
|
|
2781
3166
|
.cpk-td__empty-hint {
|
|
2782
3167
|
font-size: 11px;
|
|
2783
|
-
color: #
|
|
3168
|
+
color: #68686e;
|
|
2784
3169
|
text-align: center;
|
|
2785
3170
|
max-width: 220px;
|
|
2786
3171
|
line-height: 1.5;
|
|
@@ -2790,7 +3175,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2790
3175
|
.cpk-td__status {
|
|
2791
3176
|
padding: 16px;
|
|
2792
3177
|
font-size: 12px;
|
|
2793
|
-
color: #
|
|
3178
|
+
color: #68686e;
|
|
2794
3179
|
text-align: center;
|
|
2795
3180
|
}
|
|
2796
3181
|
|
|
@@ -2869,7 +3254,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2869
3254
|
font-family: "Spline Sans Mono", monospace;
|
|
2870
3255
|
font-size: 10px;
|
|
2871
3256
|
font-weight: 500;
|
|
2872
|
-
color: #
|
|
3257
|
+
color: #087653;
|
|
2873
3258
|
text-transform: uppercase;
|
|
2874
3259
|
flex: 1;
|
|
2875
3260
|
}
|
|
@@ -2878,15 +3263,15 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2878
3263
|
font-family: "Spline Sans Mono", monospace;
|
|
2879
3264
|
font-size: 9px;
|
|
2880
3265
|
text-transform: uppercase;
|
|
2881
|
-
color: #
|
|
3266
|
+
color: #087653;
|
|
2882
3267
|
}
|
|
2883
3268
|
|
|
2884
3269
|
.cpk-td__tool-status--pending {
|
|
2885
|
-
color: #
|
|
3270
|
+
color: #8a5900;
|
|
2886
3271
|
}
|
|
2887
3272
|
|
|
2888
3273
|
.cpk-td__tool-chevron {
|
|
2889
|
-
color: #
|
|
3274
|
+
color: #68686e;
|
|
2890
3275
|
font-size: 10px;
|
|
2891
3276
|
}
|
|
2892
3277
|
|
|
@@ -2900,7 +3285,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2900
3285
|
font-family: "Spline Sans Mono", monospace;
|
|
2901
3286
|
font-size: 9px;
|
|
2902
3287
|
font-weight: 500;
|
|
2903
|
-
color: #
|
|
3288
|
+
color: #68686e;
|
|
2904
3289
|
text-transform: uppercase;
|
|
2905
3290
|
margin-bottom: 4px;
|
|
2906
3291
|
letter-spacing: 0.3px;
|
|
@@ -2932,7 +3317,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2932
3317
|
background: rgba(133, 236, 206, 0.15);
|
|
2933
3318
|
font-family: "Spline Sans Mono", monospace;
|
|
2934
3319
|
font-size: 10px;
|
|
2935
|
-
color: #
|
|
3320
|
+
color: #087653;
|
|
2936
3321
|
text-transform: uppercase;
|
|
2937
3322
|
font-weight: 500;
|
|
2938
3323
|
border-bottom: 1px solid #e9e9ef;
|
|
@@ -2954,7 +3339,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
2954
3339
|
align-items: center;
|
|
2955
3340
|
gap: 8px;
|
|
2956
3341
|
padding: 5px 0;
|
|
2957
|
-
color: #
|
|
3342
|
+
color: #68686e;
|
|
2958
3343
|
font-family: "Spline Sans Mono", monospace;
|
|
2959
3344
|
font-size: 9px;
|
|
2960
3345
|
text-transform: uppercase;
|
|
@@ -3011,7 +3396,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3011
3396
|
.cpk-td__timeline-time {
|
|
3012
3397
|
font-family: "Spline Sans Mono", monospace;
|
|
3013
3398
|
font-size: 9px;
|
|
3014
|
-
color: #
|
|
3399
|
+
color: #68686e;
|
|
3015
3400
|
flex-shrink: 0;
|
|
3016
3401
|
}
|
|
3017
3402
|
|
|
@@ -3189,7 +3574,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3189
3574
|
.cpk-td__event-time {
|
|
3190
3575
|
font-family: "Spline Sans Mono", monospace;
|
|
3191
3576
|
font-size: 9px;
|
|
3192
|
-
color: #
|
|
3577
|
+
color: #68686e;
|
|
3193
3578
|
}
|
|
3194
3579
|
|
|
3195
3580
|
.cpk-td__event-payload {
|
|
@@ -3261,7 +3646,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3261
3646
|
font-family: "Spline Sans Mono", monospace;
|
|
3262
3647
|
font-size: 10px;
|
|
3263
3648
|
font-weight: 500;
|
|
3264
|
-
color: #
|
|
3649
|
+
color: #68686e;
|
|
3265
3650
|
text-transform: uppercase;
|
|
3266
3651
|
letter-spacing: 0.6px;
|
|
3267
3652
|
margin-bottom: 8px;
|
|
@@ -3282,7 +3667,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3282
3667
|
}
|
|
3283
3668
|
|
|
3284
3669
|
.cpk-tdp__label {
|
|
3285
|
-
color: #
|
|
3670
|
+
color: #68686e;
|
|
3286
3671
|
font-size: 11px;
|
|
3287
3672
|
white-space: nowrap;
|
|
3288
3673
|
flex-shrink: 0;
|
|
@@ -3664,7 +4049,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3664
4049
|
font-family: "Spline Sans Mono", monospace;
|
|
3665
4050
|
font-size: 9px;
|
|
3666
4051
|
margin-left: 4px;
|
|
3667
|
-
color: #
|
|
4052
|
+
color: #68686e;
|
|
3668
4053
|
}
|
|
3669
4054
|
|
|
3670
4055
|
/* ── List ── */
|
|
@@ -3731,7 +4116,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3731
4116
|
font-weight: 500;
|
|
3732
4117
|
white-space: nowrap;
|
|
3733
4118
|
background: #f0f0f5;
|
|
3734
|
-
color: #
|
|
4119
|
+
color: #68686e;
|
|
3735
4120
|
}
|
|
3736
4121
|
|
|
3737
4122
|
/* Content */
|
|
@@ -3753,7 +4138,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3753
4138
|
|
|
3754
4139
|
.cpk-ml__footer-threads {
|
|
3755
4140
|
font-size: 10px;
|
|
3756
|
-
color: #
|
|
4141
|
+
color: #68686e;
|
|
3757
4142
|
}
|
|
3758
4143
|
|
|
3759
4144
|
.cpk-ml__footer-id {
|
|
@@ -3766,7 +4151,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3766
4151
|
.cpk-ml__empty {
|
|
3767
4152
|
padding: 32px 16px;
|
|
3768
4153
|
text-align: center;
|
|
3769
|
-
color: #
|
|
4154
|
+
color: #68686e;
|
|
3770
4155
|
font-size: 12px;
|
|
3771
4156
|
display: flex;
|
|
3772
4157
|
flex-direction: column;
|
|
@@ -3847,7 +4232,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3847
4232
|
.cpk-ml__recall-clear {
|
|
3848
4233
|
font-family: "Plus Jakarta Sans", sans-serif;
|
|
3849
4234
|
font-size: 10px;
|
|
3850
|
-
color: #
|
|
4235
|
+
color: #68686e;
|
|
3851
4236
|
background: none;
|
|
3852
4237
|
border: none;
|
|
3853
4238
|
cursor: pointer;
|
|
@@ -3858,7 +4243,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3858
4243
|
}
|
|
3859
4244
|
.cpk-ml__recall-msg {
|
|
3860
4245
|
font-size: 11px;
|
|
3861
|
-
color: #
|
|
4246
|
+
color: #68686e;
|
|
3862
4247
|
line-height: 1.45;
|
|
3863
4248
|
}
|
|
3864
4249
|
.cpk-ml__recall-msg--error {
|
|
@@ -3882,7 +4267,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3882
4267
|
/* ── Scope badge variants ── */
|
|
3883
4268
|
.cpk-ml__scope-badge--user {
|
|
3884
4269
|
background: #f0f0f5;
|
|
3885
|
-
color: #
|
|
4270
|
+
color: #68686e;
|
|
3886
4271
|
}
|
|
3887
4272
|
.cpk-ml__scope-badge--project {
|
|
3888
4273
|
background: #fef3c7;
|
|
@@ -3914,6 +4299,8 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3914
4299
|
this._recallQuery = "";
|
|
3915
4300
|
this._recallSeq = 0;
|
|
3916
4301
|
this.runtimeStatus = null;
|
|
4302
|
+
this.inspectorMetadataProjection = projectInspectorMetadata(void 0, void 0);
|
|
4303
|
+
this.metadataTelemetryFingerprints = /* @__PURE__ */ new Map();
|
|
3917
4304
|
this.coreProperties = {};
|
|
3918
4305
|
this.lastCoreError = null;
|
|
3919
4306
|
this.agentSubscriptions = /* @__PURE__ */ new Map();
|
|
@@ -3935,8 +4322,19 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3935
4322
|
this.isOpen = false;
|
|
3936
4323
|
this.draggedDuringInteraction = false;
|
|
3937
4324
|
this.ignoreNextButtonClick = false;
|
|
3938
|
-
this.selectedMenu = "
|
|
4325
|
+
this.selectedMenu = "threads";
|
|
4326
|
+
this.pendingPersistedMenu = null;
|
|
4327
|
+
this.hasResolvedCore = false;
|
|
4328
|
+
this.settingsOpen = false;
|
|
4329
|
+
this.lastSelectedMenuByGroup = {
|
|
4330
|
+
threads: "threads",
|
|
4331
|
+
agents: "ag-ui-events",
|
|
4332
|
+
learning: "memories"
|
|
4333
|
+
};
|
|
4334
|
+
this.lastScrolledAgentNavigationLayout = null;
|
|
3939
4335
|
this.selectedThreadId = null;
|
|
4336
|
+
this.selectedRealThreadIsExplicit = false;
|
|
4337
|
+
this.selectedLocalExampleThreadId = null;
|
|
3940
4338
|
this.threadListWidth = 290;
|
|
3941
4339
|
this.threadDividerResizing = false;
|
|
3942
4340
|
this.threadDividerPointerId = -1;
|
|
@@ -3946,7 +4344,10 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3946
4344
|
this._threadStoreSubscriptions = /* @__PURE__ */ new Map();
|
|
3947
4345
|
this._threadsByAgent = /* @__PURE__ */ new Map();
|
|
3948
4346
|
this._threadsErrorByAgent = /* @__PURE__ */ new Map();
|
|
4347
|
+
this._threadsLoadingByAgent = /* @__PURE__ */ new Map();
|
|
3949
4348
|
this._ownedThreadStores = /* @__PURE__ */ new Map();
|
|
4349
|
+
this.threadCapabilityEnabled = null;
|
|
4350
|
+
this.threadCapabilityGeneration = 0;
|
|
3950
4351
|
this.contextMenuOpen = false;
|
|
3951
4352
|
this.dockMode = "floating";
|
|
3952
4353
|
this.previousBodyMargins = null;
|
|
@@ -3979,18 +4380,28 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
3979
4380
|
this.pendingBannerViewed = [];
|
|
3980
4381
|
this.clickedBannerIds = /* @__PURE__ */ new Set();
|
|
3981
4382
|
this.viewedThreadsTelemetryStates = /* @__PURE__ */ new Set();
|
|
3982
|
-
this.
|
|
3983
|
-
this.
|
|
4383
|
+
this.viewedExampleKinds = /* @__PURE__ */ new Set();
|
|
4384
|
+
this.selectedExampleKinds = /* @__PURE__ */ new Set();
|
|
3984
4385
|
this.viewedExampleTourSteps = /* @__PURE__ */ new Set();
|
|
3985
4386
|
this.exampleThreadProviders = /* @__PURE__ */ new Map();
|
|
3986
4387
|
this.exampleTourDismissed = false;
|
|
3987
4388
|
this.exampleTourActive = false;
|
|
3988
4389
|
this.exampleTourStep = 0;
|
|
3989
4390
|
this.exampleTourAutoShown = false;
|
|
3990
|
-
this.
|
|
3991
|
-
this.
|
|
4391
|
+
this.threadsExampleOverviewVideoState = "deferred";
|
|
4392
|
+
this.threadsExampleOverviewVideoLoaded = false;
|
|
4393
|
+
this.threadsExampleOverviewVideoReducedMotion = false;
|
|
3992
4394
|
this.threadsExampleOverviewVideoLoadTimer = null;
|
|
3993
4395
|
this.threadsExampleOverviewVideoIdleCallbackId = null;
|
|
4396
|
+
this.threadsExampleOverviewVideoElement = null;
|
|
4397
|
+
this.threadsExampleOverviewVideoListeners = null;
|
|
4398
|
+
this.threadsExampleOverviewVideoLifecycleGeneration = 0;
|
|
4399
|
+
this.threadsExampleOverviewVideoPlayAttemptGeneration = 0;
|
|
4400
|
+
this.threadsExampleOverviewVideoPlayPromise = null;
|
|
4401
|
+
this.threadsExampleOverviewVideoPlayOnNextBind = false;
|
|
4402
|
+
this.threadsSetupPromptCopyState = "idle";
|
|
4403
|
+
this.threadsSetupPromptCopyResetTimeoutId = null;
|
|
4404
|
+
this.threadsSetupPromptCopyGeneration = 0;
|
|
3994
4405
|
this.contextState = {
|
|
3995
4406
|
button: {
|
|
3996
4407
|
position: {
|
|
@@ -4038,7 +4449,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4038
4449
|
const target = event.currentTarget;
|
|
4039
4450
|
const context = (target === null || target === void 0 ? void 0 : target.dataset.dragContext) === "window" ? "window" : "button";
|
|
4040
4451
|
const eventTarget = event.target;
|
|
4041
|
-
if (context === "window" && (eventTarget === null || eventTarget === void 0 ? void 0 : eventTarget.closest("button"))) return;
|
|
4452
|
+
if (context === "window" && (eventTarget === null || eventTarget === void 0 ? void 0 : eventTarget.closest("button, a, nav"))) return;
|
|
4042
4453
|
this.pointerContext = context;
|
|
4043
4454
|
this.measureContext(context);
|
|
4044
4455
|
event.preventDefault();
|
|
@@ -4186,8 +4597,10 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4186
4597
|
this.measureContext("button");
|
|
4187
4598
|
this.applyAnchorPosition("button");
|
|
4188
4599
|
this.measureContext("window");
|
|
4600
|
+
this.contextState.window.size = this.clampWindowSize(this.contextState.window.size);
|
|
4189
4601
|
if (this.hasCustomPosition.window) this.applyAnchorPosition("window");
|
|
4190
4602
|
else this.centerContext("window");
|
|
4603
|
+
this.requestUpdate();
|
|
4191
4604
|
this.updateHostTransform();
|
|
4192
4605
|
};
|
|
4193
4606
|
this.contextOptions = [{
|
|
@@ -4200,29 +4613,36 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4200
4613
|
this.expandedTools = /* @__PURE__ */ new Set();
|
|
4201
4614
|
this.expandedContextItems = /* @__PURE__ */ new Set();
|
|
4202
4615
|
this.copiedContextItems = /* @__PURE__ */ new Set();
|
|
4203
|
-
this.
|
|
4616
|
+
this.handleInspectorMetadataActionClick = (action, placement) => {
|
|
4204
4617
|
var _this$core;
|
|
4205
|
-
if ((_this$core = this.core) === null || _this$core === void 0 ? void 0 : _this$core.telemetryDisabled) return;
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
}
|
|
4618
|
+
if (!this.isOpen || this.runtimeStatus !== _copilotkit_core.CopilotKitCoreRuntimeConnectionStatus.Connected || ((_this$core = this.core) === null || _this$core === void 0 ? void 0 : _this$core.telemetryDisabled)) return;
|
|
4619
|
+
if (action.kind === "enable_intelligence") {
|
|
4620
|
+
this.handleThreadsIntelligenceSignupClick();
|
|
4621
|
+
return;
|
|
4622
|
+
}
|
|
4623
|
+
try {
|
|
4624
|
+
trackMetadataActionClicked({
|
|
4625
|
+
action_kind: action.kind,
|
|
4626
|
+
license_bucket: this.inspectorMetadataProjection.licenseState,
|
|
4627
|
+
...this.getMetadataTelemetryContext(),
|
|
4628
|
+
action_placement: getMetadataActionPlacement(placement)
|
|
4629
|
+
});
|
|
4630
|
+
} catch (_unused3) {}
|
|
4210
4631
|
};
|
|
4211
|
-
this.
|
|
4632
|
+
this.handleTalkToEngineerClick = () => {
|
|
4212
4633
|
var _this$core2;
|
|
4213
4634
|
if ((_this$core2 = this.core) === null || _this$core2 === void 0 ? void 0 : _this$core2.telemetryDisabled) return;
|
|
4214
|
-
|
|
4215
|
-
cta: "signup",
|
|
4216
|
-
cta_surface: "threads_locked"
|
|
4217
|
-
}, { includeUrlAttribution: true }));
|
|
4635
|
+
trackTalkToEngineerClicked(this.getThreadsCtaTelemetryProps("talk_to_engineer", "threads_header"));
|
|
4218
4636
|
};
|
|
4219
|
-
this.
|
|
4637
|
+
this.handleThreadsIntelligenceSignupClick = () => {
|
|
4220
4638
|
var _this$core3;
|
|
4221
4639
|
if ((_this$core3 = this.core) === null || _this$core3 === void 0 ? void 0 : _this$core3.telemetryDisabled) return;
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4640
|
+
trackThreadsIntelligenceSignupClicked(this.getThreadsCtaTelemetryProps("signup", "threads_locked"));
|
|
4641
|
+
};
|
|
4642
|
+
this.handleThreadsTalkToEngineerClick = () => {
|
|
4643
|
+
var _this$core4;
|
|
4644
|
+
if ((_this$core4 = this.core) === null || _this$core4 === void 0 ? void 0 : _this$core4.telemetryDisabled) return;
|
|
4645
|
+
trackThreadsTalkToEngineerClicked(this.getThreadsCtaTelemetryProps("talk_to_engineer", "threads_locked"));
|
|
4226
4646
|
};
|
|
4227
4647
|
this.handleThreadDividerPointerDown = (event) => {
|
|
4228
4648
|
this.threadDividerResizing = true;
|
|
@@ -4244,9 +4664,52 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4244
4664
|
if (target.hasPointerCapture(this.threadDividerPointerId)) target.releasePointerCapture(this.threadDividerPointerId);
|
|
4245
4665
|
this.threadDividerResizing = false;
|
|
4246
4666
|
};
|
|
4247
|
-
this.
|
|
4248
|
-
|
|
4667
|
+
this.handleThreadsExampleOverviewVideoControl = () => {
|
|
4668
|
+
const video = this.threadsExampleOverviewVideoElement;
|
|
4669
|
+
if (!video) return;
|
|
4670
|
+
if (this.threadsExampleOverviewVideoState === "playing") {
|
|
4671
|
+
this.invalidateThreadsExampleOverviewVideoPlay();
|
|
4672
|
+
try {
|
|
4673
|
+
video.pause();
|
|
4674
|
+
} catch (_unused4) {}
|
|
4675
|
+
this.threadsExampleOverviewVideoState = "ready";
|
|
4676
|
+
this.requestUpdate();
|
|
4677
|
+
return;
|
|
4678
|
+
}
|
|
4679
|
+
if (this.threadsExampleOverviewVideoState === "failed") {
|
|
4680
|
+
this.cleanupThreadsExampleOverviewVideo();
|
|
4681
|
+
if (!this.isConnected || !video.isConnected) return;
|
|
4682
|
+
this.threadsExampleOverviewVideoPlayOnNextBind = true;
|
|
4683
|
+
this.requestUpdate();
|
|
4684
|
+
return;
|
|
4685
|
+
}
|
|
4686
|
+
this.cancelThreadsExampleOverviewVideoGate();
|
|
4687
|
+
const lifecycleGeneration = this.threadsExampleOverviewVideoLifecycleGeneration;
|
|
4688
|
+
if (this.threadsExampleOverviewVideoState === "deferred") {
|
|
4689
|
+
this.activateThreadsExampleOverviewVideo(video, lifecycleGeneration, true);
|
|
4690
|
+
return;
|
|
4691
|
+
}
|
|
4692
|
+
this.playThreadsExampleOverviewVideo(video, lifecycleGeneration);
|
|
4693
|
+
};
|
|
4694
|
+
this.handleThreadsSetupPromptCopy = async () => {
|
|
4695
|
+
var _navigator$clipboard;
|
|
4696
|
+
const generation = this.threadsSetupPromptCopyGeneration += 1;
|
|
4697
|
+
if (this.threadsSetupPromptCopyResetTimeoutId !== null) {
|
|
4698
|
+
window.clearTimeout(this.threadsSetupPromptCopyResetTimeoutId);
|
|
4699
|
+
this.threadsSetupPromptCopyResetTimeoutId = null;
|
|
4700
|
+
}
|
|
4701
|
+
this.threadsSetupPromptCopyState = "idle";
|
|
4249
4702
|
this.requestUpdate();
|
|
4703
|
+
if (typeof navigator === "undefined" || !((_navigator$clipboard = navigator.clipboard) === null || _navigator$clipboard === void 0 ? void 0 : _navigator$clipboard.writeText)) {
|
|
4704
|
+
this.showThreadsSetupPromptCopyState("error", generation);
|
|
4705
|
+
return;
|
|
4706
|
+
}
|
|
4707
|
+
try {
|
|
4708
|
+
await navigator.clipboard.writeText(THREADS_RUNTIME_SETUP_PROMPT);
|
|
4709
|
+
this.showThreadsSetupPromptCopyState("copied", generation);
|
|
4710
|
+
} catch (_unused5) {
|
|
4711
|
+
this.showThreadsSetupPromptCopyState("error", generation);
|
|
4712
|
+
}
|
|
4250
4713
|
};
|
|
4251
4714
|
this.handleClearEvents = () => {
|
|
4252
4715
|
if (this.selectedContext === "all-agents") {
|
|
@@ -4276,7 +4739,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4276
4739
|
};
|
|
4277
4740
|
this.copyResetTimeouts = /* @__PURE__ */ new WeakMap();
|
|
4278
4741
|
this.handleAnnouncementContentClick = (event) => {
|
|
4279
|
-
var _button$getAttribute, _navigator$
|
|
4742
|
+
var _button$getAttribute, _navigator$clipboard2;
|
|
4280
4743
|
const target = event.target instanceof HTMLElement ? event.target : null;
|
|
4281
4744
|
const button = target === null || target === void 0 ? void 0 : target.closest(".announcement-code__copy");
|
|
4282
4745
|
if (!(button instanceof HTMLButtonElement)) {
|
|
@@ -4302,7 +4765,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4302
4765
|
}, 1500);
|
|
4303
4766
|
this.copyResetTimeouts.set(button, id);
|
|
4304
4767
|
};
|
|
4305
|
-
if (typeof navigator !== "undefined" && ((_navigator$
|
|
4768
|
+
if (typeof navigator !== "undefined" && ((_navigator$clipboard2 = navigator.clipboard) === null || _navigator$clipboard2 === void 0 ? void 0 : _navigator$clipboard2.writeText)) navigator.clipboard.writeText(code).then(showCopied, () => {});
|
|
4306
4769
|
};
|
|
4307
4770
|
}
|
|
4308
4771
|
get core() {
|
|
@@ -4312,7 +4775,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4312
4775
|
const oldValue = this._core;
|
|
4313
4776
|
if (oldValue === value) return;
|
|
4314
4777
|
this.detachFromCore();
|
|
4778
|
+
const hadResolvedCore = this.hasResolvedCore;
|
|
4315
4779
|
this._core = value !== null && value !== void 0 ? value : null;
|
|
4780
|
+
if (this._core) this.hasResolvedCore = true;
|
|
4781
|
+
if (!hadResolvedCore && this._core) this.resolvePendingPersistedMenu();
|
|
4782
|
+
else if (hadResolvedCore) this.reconcileSelectedMenuVisibility();
|
|
4316
4783
|
this.requestUpdate("core", oldValue);
|
|
4317
4784
|
if (this._core) this.attachToCore(this._core);
|
|
4318
4785
|
}
|
|
@@ -4359,6 +4826,46 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4359
4826
|
}
|
|
4360
4827
|
];
|
|
4361
4828
|
}
|
|
4829
|
+
/** Return the primary navigation group that owns a legacy leaf key. */
|
|
4830
|
+
getGroupForMenu(key) {
|
|
4831
|
+
for (const group of INSPECTOR_PRIMARY_NAVIGATION) if (INSPECTOR_GROUPS[group.key].some((menuKey) => menuKey === key)) return group.key;
|
|
4832
|
+
return "threads";
|
|
4833
|
+
}
|
|
4834
|
+
/** Return the primary group for the current legacy leaf selection. */
|
|
4835
|
+
get selectedGroup() {
|
|
4836
|
+
return this.getGroupForMenu(this.selectedMenu);
|
|
4837
|
+
}
|
|
4838
|
+
/** Return only currently visible legacy leaves owned by a group. */
|
|
4839
|
+
getVisibleMenuItemsForGroup(group) {
|
|
4840
|
+
return this.menuItems.filter((item) => INSPECTOR_GROUPS[group].some((menuKey) => menuKey === item.key));
|
|
4841
|
+
}
|
|
4842
|
+
/** Resolve a group's last visible leaf, falling back to its first leaf. */
|
|
4843
|
+
getMenuForGroup(group) {
|
|
4844
|
+
var _ref8, _visibleItems$find$ke, _visibleItems$find, _visibleItems$;
|
|
4845
|
+
const visibleItems = this.getVisibleMenuItemsForGroup(group);
|
|
4846
|
+
const rememberedMenu = this.lastSelectedMenuByGroup[group];
|
|
4847
|
+
return (_ref8 = (_visibleItems$find$ke = (_visibleItems$find = visibleItems.find((item) => item.key === rememberedMenu)) === null || _visibleItems$find === void 0 ? void 0 : _visibleItems$find.key) !== null && _visibleItems$find$ke !== void 0 ? _visibleItems$find$ke : (_visibleItems$ = visibleItems[0]) === null || _visibleItems$ === void 0 ? void 0 : _visibleItems$.key) !== null && _ref8 !== void 0 ? _ref8 : "threads";
|
|
4848
|
+
}
|
|
4849
|
+
/** Replace a leaf that became hidden with its group's first visible leaf. */
|
|
4850
|
+
reconcileSelectedMenuVisibility() {
|
|
4851
|
+
var _this$getVisibleMenuI;
|
|
4852
|
+
if (this.menuItems.some((item) => item.key === this.selectedMenu)) return;
|
|
4853
|
+
const group = this.getGroupForMenu(this.selectedMenu);
|
|
4854
|
+
const fallbackMenu = (_this$getVisibleMenuI = this.getVisibleMenuItemsForGroup(group)[0]) === null || _this$getVisibleMenuI === void 0 ? void 0 : _this$getVisibleMenuI.key;
|
|
4855
|
+
this.selectedMenu = fallbackMenu !== null && fallbackMenu !== void 0 ? fallbackMenu : "threads";
|
|
4856
|
+
this.lastSelectedMenuByGroup[group] = this.selectedMenu;
|
|
4857
|
+
this.persistState();
|
|
4858
|
+
}
|
|
4859
|
+
/** Open a primary group at its last currently visible legacy leaf. */
|
|
4860
|
+
handleGroupSelect(group) {
|
|
4861
|
+
this.handleMenuSelect(this.getMenuForGroup(group));
|
|
4862
|
+
}
|
|
4863
|
+
/** Toggle Settings without replacing or persisting the active legacy leaf. */
|
|
4864
|
+
handleSettingsToggle() {
|
|
4865
|
+
this.settingsOpen = !this.settingsOpen;
|
|
4866
|
+
this.contextMenuOpen = false;
|
|
4867
|
+
this.requestUpdate();
|
|
4868
|
+
}
|
|
4362
4869
|
getThreadServiceStatus() {
|
|
4363
4870
|
var _this$_core$threadEnd;
|
|
4364
4871
|
if (!this._core) return "unknown";
|
|
@@ -4366,10 +4873,34 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4366
4873
|
return ((_this$_core$threadEnd = this._core.threadEndpoints) === null || _this$_core$threadEnd === void 0 ? void 0 : _this$_core$threadEnd.list) === false ? "unavailable" : "available";
|
|
4367
4874
|
}
|
|
4368
4875
|
areThreadEndpointsAvailable() {
|
|
4369
|
-
|
|
4876
|
+
var _this$_core3;
|
|
4877
|
+
const endpoints = (_this$_core3 = this._core) === null || _this$_core3 === void 0 ? void 0 : _this$_core3.threadEndpoints;
|
|
4878
|
+
return endpoints !== null && typeof endpoints === "object" && endpoints.list !== false;
|
|
4879
|
+
}
|
|
4880
|
+
synchronizeThreadCapability() {
|
|
4881
|
+
const enabled = this.areThreadEndpointsAvailable();
|
|
4882
|
+
if (this.threadCapabilityEnabled === enabled) return;
|
|
4883
|
+
this.threadCapabilityEnabled = enabled;
|
|
4884
|
+
this.threadCapabilityGeneration += 1;
|
|
4885
|
+
if (enabled) {
|
|
4886
|
+
const core = this.core;
|
|
4887
|
+
if (!core) return;
|
|
4888
|
+
const threadStores = typeof core.getThreadStores === "function" ? core.getThreadStores() : {};
|
|
4889
|
+
for (const [agentId, store] of Object.entries(threadStores)) this.subscribeToThreadStore(agentId, store);
|
|
4890
|
+
for (const agent of Object.values(core.agents)) if (agent === null || agent === void 0 ? void 0 : agent.agentId) this.ensureOwnedThreadStore(agent.agentId);
|
|
4891
|
+
return;
|
|
4892
|
+
}
|
|
4893
|
+
this.teardownThreadStoreSubscriptions();
|
|
4894
|
+
this.teardownOwnedThreadStores();
|
|
4895
|
+
if (this.selectedThreadId !== this.selectedLocalExampleThreadId) {
|
|
4896
|
+
this.selectedThreadId = null;
|
|
4897
|
+
this.selectedLocalExampleThreadId = null;
|
|
4898
|
+
}
|
|
4899
|
+
this.selectedRealThreadIsExplicit = false;
|
|
4900
|
+
this.requestUpdate();
|
|
4370
4901
|
}
|
|
4371
4902
|
getActiveThreadsState() {
|
|
4372
|
-
var _this$_threadsByAgent;
|
|
4903
|
+
var _this$_threadsByAgent, _this$_threadsLoading;
|
|
4373
4904
|
const displayThreads = this.selectedContext === "all-agents" ? this._threads : (_this$_threadsByAgent = this._threadsByAgent.get(this.selectedContext)) !== null && _this$_threadsByAgent !== void 0 ? _this$_threadsByAgent : [];
|
|
4374
4905
|
let threadsErrorMessage = null;
|
|
4375
4906
|
if (this.selectedContext === "all-agents") {
|
|
@@ -4380,29 +4911,74 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4380
4911
|
var _this$_threadsErrorBy, _this$_threadsErrorBy2;
|
|
4381
4912
|
threadsErrorMessage = (_this$_threadsErrorBy = (_this$_threadsErrorBy2 = this._threadsErrorByAgent.get(this.selectedContext)) === null || _this$_threadsErrorBy2 === void 0 ? void 0 : _this$_threadsErrorBy2.message) !== null && _this$_threadsErrorBy !== void 0 ? _this$_threadsErrorBy : null;
|
|
4382
4913
|
}
|
|
4914
|
+
const threadsLoading = this.selectedContext === "all-agents" ? Array.from(this._threadsLoadingByAgent.values()).some(Boolean) : (_this$_threadsLoading = this._threadsLoadingByAgent.get(this.selectedContext)) !== null && _this$_threadsLoading !== void 0 ? _this$_threadsLoading : false;
|
|
4383
4915
|
return {
|
|
4384
4916
|
displayThreads,
|
|
4385
|
-
threadsErrorMessage
|
|
4917
|
+
threadsErrorMessage,
|
|
4918
|
+
threadsLoading
|
|
4386
4919
|
};
|
|
4387
4920
|
}
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
const
|
|
4921
|
+
/** Bucket trusted usage without retaining exact counts or limits. */
|
|
4922
|
+
getThreadsUsageBucket() {
|
|
4923
|
+
const usage = this.inspectorMetadataProjection.usage;
|
|
4924
|
+
if (!usage) return "absent";
|
|
4925
|
+
if (usage.used === 0) return "empty";
|
|
4926
|
+
if (usage.limit.kind === "finite") return usage.used < usage.limit.value ? "within_limit" : "at_or_over_limit";
|
|
4927
|
+
if (usage.limit.kind === "unlimited") return "unlimited";
|
|
4928
|
+
return "unknown_limit";
|
|
4929
|
+
}
|
|
4930
|
+
/** Classify finite usage for render-only capacity copy and color. */
|
|
4931
|
+
getThreadsCapacityState() {
|
|
4932
|
+
const usage = this.inspectorMetadataProjection.usage;
|
|
4933
|
+
if (!usage || usage.limit.kind !== "finite") return void 0;
|
|
4934
|
+
if (usage.used >= usage.limit.value) return "critical";
|
|
4935
|
+
const warningThreshold = usage.limit.value - Math.floor(usage.limit.value / 10);
|
|
4936
|
+
return usage.used >= warningThreshold ? "warning" : "normal";
|
|
4937
|
+
}
|
|
4938
|
+
/** Bucket trusted expiry data independently from the usage-limit bucket. */
|
|
4939
|
+
getThreadsExpiryBucket() {
|
|
4940
|
+
const usage = this.inspectorMetadataProjection.usage;
|
|
4941
|
+
if (!usage || !Object.prototype.hasOwnProperty.call(usage, "expiringSoonCount")) return "unavailable";
|
|
4942
|
+
if (usage.expiringSoonCount === 0) return "zero";
|
|
4943
|
+
return typeof usage.expiringSoonCount === "number" && usage.expiringSoonCount > 0 ? "positive" : "unavailable";
|
|
4944
|
+
}
|
|
4945
|
+
/** Report only real rows visible in the active, settled Threads view. */
|
|
4946
|
+
hasActiveVisibleThreads() {
|
|
4947
|
+
if (this.selectedMenu !== "threads" || this.settingsOpen || !this.areThreadEndpointsAvailable()) return false;
|
|
4948
|
+
const { displayThreads, threadsErrorMessage, threadsLoading } = this.getActiveThreadsState();
|
|
4949
|
+
return !threadsErrorMessage && !threadsLoading && displayThreads.length > 0;
|
|
4950
|
+
}
|
|
4951
|
+
/** Build the closed common property set shared by all Thread events. */
|
|
4952
|
+
getThreadsTelemetryProps() {
|
|
4953
|
+
var _this$core$licenseSta, _this$core5, _this$core$runtimeMod, _this$core6, _this$core7;
|
|
4391
4954
|
const threadServiceStatus = this.getThreadServiceStatus();
|
|
4392
4955
|
return {
|
|
4393
|
-
posthog_distinct_id: distinctId !== null && distinctId !== void 0 ? distinctId : void 0,
|
|
4394
4956
|
intelligence_status: threadServiceStatus === "available" ? "intelligence_enabled" : threadServiceStatus === "unavailable" ? "intelligence_not_enabled" : "unknown",
|
|
4395
4957
|
thread_service_status: threadServiceStatus,
|
|
4396
4958
|
license_status: (_this$core$licenseSta = (_this$core5 = this.core) === null || _this$core5 === void 0 ? void 0 : _this$core5.licenseStatus) !== null && _this$core$licenseSta !== void 0 ? _this$core$licenseSta : void 0,
|
|
4397
4959
|
runtime_mode: (_this$core$runtimeMod = (_this$core6 = this.core) === null || _this$core6 === void 0 ? void 0 : _this$core6.runtimeMode) !== null && _this$core$runtimeMod !== void 0 ? _this$core$runtimeMod : void 0,
|
|
4398
4960
|
runtime_url_type: getRuntimeUrlType((_this$core7 = this.core) === null || _this$core7 === void 0 ? void 0 : _this$core7.runtimeUrl),
|
|
4399
|
-
telemetry_disabled:
|
|
4400
|
-
|
|
4961
|
+
telemetry_disabled: false,
|
|
4962
|
+
has_threads: this.hasActiveVisibleThreads(),
|
|
4963
|
+
usage_bucket: this.getThreadsUsageBucket(),
|
|
4964
|
+
expiry_bucket: this.getThreadsExpiryBucket(),
|
|
4965
|
+
group_key: "threads",
|
|
4966
|
+
leaf_key: "threads"
|
|
4967
|
+
};
|
|
4968
|
+
}
|
|
4969
|
+
/** Add the frozen CTA leaves and anonymous URL attribution when allowed. */
|
|
4970
|
+
getThreadsCtaTelemetryProps(cta, ctaSurface) {
|
|
4971
|
+
const distinctId = getTelemetryDistinctIdForUrl();
|
|
4972
|
+
return {
|
|
4973
|
+
...this.getThreadsTelemetryProps(),
|
|
4974
|
+
cta,
|
|
4975
|
+
cta_surface: ctaSurface,
|
|
4976
|
+
posthog_distinct_id: distinctId !== null && distinctId !== void 0 ? distinctId : void 0
|
|
4401
4977
|
};
|
|
4402
4978
|
}
|
|
4403
4979
|
getMemoriesTelemetryProps() {
|
|
4404
|
-
var _this$
|
|
4405
|
-
const distinctId = !((_this$
|
|
4980
|
+
var _this$core8;
|
|
4981
|
+
const distinctId = !((_this$core8 = this.core) === null || _this$core8 === void 0 ? void 0 : _this$core8.telemetryDisabled) ? getTelemetryDistinctIdForUrl() : null;
|
|
4406
4982
|
return {
|
|
4407
4983
|
posthog_distinct_id: distinctId !== null && distinctId !== void 0 ? distinctId : void 0,
|
|
4408
4984
|
memory_count: this._memories.length,
|
|
@@ -4412,9 +4988,6 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4412
4988
|
getIntelligenceSignupUrl() {
|
|
4413
4989
|
return this.appendRefParam(INTELLIGENCE_SIGNUP_URL, "cpk-inspector");
|
|
4414
4990
|
}
|
|
4415
|
-
getThreadsIntelligenceSignupUrl() {
|
|
4416
|
-
return this.appendRefParam(THREADS_INTELLIGENCE_SIGNIN_URL, "cpk-inspector");
|
|
4417
|
-
}
|
|
4418
4991
|
getTalkToEngineerUrl() {
|
|
4419
4992
|
return this.appendRefParam(TALK_TO_ENGINEER_URL, "cpk-inspector-threads");
|
|
4420
4993
|
}
|
|
@@ -4424,29 +4997,54 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4424
4997
|
getThreadsDocsUrl() {
|
|
4425
4998
|
return this.appendRefParam(THREADS_DOCS_URL, "cpk-inspector-threads");
|
|
4426
4999
|
}
|
|
5000
|
+
getThreadsRuntimeSetupDocsUrl() {
|
|
5001
|
+
return this.appendRefParam(THREADS_RUNTIME_SETUP_DOCS_URL, "cpk-inspector-threads");
|
|
5002
|
+
}
|
|
5003
|
+
getThreadsIntelligenceSignupUrl() {
|
|
5004
|
+
return this.appendRefParam(INTELLIGENCE_SIGNUP_URL, "cpk-inspector-threads");
|
|
5005
|
+
}
|
|
4427
5006
|
getSelfHostedIntelligenceUrl() {
|
|
4428
5007
|
return this.appendRefParam(SELF_HOSTED_INTELLIGENCE_URL, "cpk-inspector-threads");
|
|
4429
5008
|
}
|
|
5009
|
+
/** Selects the onboarding path for an enabled runtime with no saved Threads. */
|
|
5010
|
+
getThreadsEmptyOnboardingAction() {
|
|
5011
|
+
var _this$inspectorMetada;
|
|
5012
|
+
const planCode = (_this$inspectorMetada = this.inspectorMetadataProjection.plan) === null || _this$inspectorMetada === void 0 ? void 0 : _this$inspectorMetada.code.trim().toLowerCase();
|
|
5013
|
+
if (planCode === "team_self_hosted" || planCode === "team-self-hosted") return {
|
|
5014
|
+
href: this.getSelfHostedIntelligenceUrl(),
|
|
5015
|
+
label: "Explore self-hosted Intelligence"
|
|
5016
|
+
};
|
|
5017
|
+
return {
|
|
5018
|
+
href: this.getThreadsIntelligenceSignupUrl(),
|
|
5019
|
+
label: "Sign up for Intelligence"
|
|
5020
|
+
};
|
|
5021
|
+
}
|
|
4430
5022
|
subscribeToThreadStore(agentId, store) {
|
|
4431
5023
|
if (!this.areThreadEndpointsAvailable()) return;
|
|
4432
5024
|
if (this._threadStoreSubscriptions.has(agentId)) return;
|
|
5025
|
+
const capabilityGeneration = this.threadCapabilityGeneration;
|
|
4433
5026
|
const threadsSub = store.select(_copilotkit_core.ɵselectThreads).subscribe((threads) => {
|
|
5027
|
+
if (capabilityGeneration !== this.threadCapabilityGeneration || !this.areThreadEndpointsAvailable()) return;
|
|
4434
5028
|
this._threadsByAgent.set(agentId, threads);
|
|
4435
5029
|
this._threads = Array.from(this._threadsByAgent.values()).flat();
|
|
4436
5030
|
this.autoSelectLatestThread();
|
|
4437
5031
|
this.requestUpdate();
|
|
4438
5032
|
});
|
|
4439
|
-
const
|
|
5033
|
+
const statusSub = store.select(createThreadStoreStatusSelector()).subscribe(({ error, isLoading }) => {
|
|
5034
|
+
if (capabilityGeneration !== this.threadCapabilityGeneration || !this.areThreadEndpointsAvailable()) return;
|
|
4440
5035
|
if (error) this._threadsErrorByAgent.set(agentId, error);
|
|
4441
5036
|
else this._threadsErrorByAgent.delete(agentId);
|
|
5037
|
+
this._threadsLoadingByAgent.set(agentId, isLoading);
|
|
4442
5038
|
this.requestUpdate();
|
|
4443
5039
|
});
|
|
4444
5040
|
this._threadStoreSubscriptions.set(agentId, () => {
|
|
4445
5041
|
threadsSub.unsubscribe();
|
|
4446
|
-
|
|
5042
|
+
statusSub.unsubscribe();
|
|
4447
5043
|
});
|
|
5044
|
+
if (capabilityGeneration !== this.threadCapabilityGeneration || !this.areThreadEndpointsAvailable()) return;
|
|
4448
5045
|
const initialState = store.getState();
|
|
4449
5046
|
this._threadsByAgent.set(agentId, (0, _copilotkit_core.ɵselectThreads)(initialState));
|
|
5047
|
+
this._threadsLoadingByAgent.set(agentId, (0, _copilotkit_core.ɵselectThreadsIsLoading)(initialState));
|
|
4450
5048
|
const initialError = (0, _copilotkit_core.ɵselectThreadsError)(initialState);
|
|
4451
5049
|
if (initialError) this._threadsErrorByAgent.set(agentId, initialError);
|
|
4452
5050
|
else this._threadsErrorByAgent.delete(agentId);
|
|
@@ -4454,23 +5052,38 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4454
5052
|
this.autoSelectLatestThread();
|
|
4455
5053
|
}
|
|
4456
5054
|
autoSelectLatestThread() {
|
|
4457
|
-
if (this.
|
|
4458
|
-
|
|
5055
|
+
if (!this.areThreadEndpointsAvailable()) return;
|
|
5056
|
+
const { displayThreads } = this.getActiveThreadsState();
|
|
5057
|
+
const previousSelectedThreadId = this.selectedThreadId;
|
|
5058
|
+
if (this.selectedLocalExampleThreadId !== null && previousSelectedThreadId === this.selectedLocalExampleThreadId && displayThreads.length === 0) {
|
|
5059
|
+
this.selectedRealThreadIsExplicit = false;
|
|
5060
|
+
return;
|
|
5061
|
+
}
|
|
5062
|
+
if (this.selectedLocalExampleThreadId !== null) this.exampleTourActive = false;
|
|
5063
|
+
this.selectedLocalExampleThreadId = null;
|
|
5064
|
+
const explicitSelectedThreadId = this.selectedRealThreadIsExplicit ? previousSelectedThreadId : null;
|
|
5065
|
+
const nextSelectedThreadId = selectVisibleRealThreadId({
|
|
5066
|
+
threads: displayThreads,
|
|
5067
|
+
selectedThreadId: explicitSelectedThreadId
|
|
5068
|
+
});
|
|
5069
|
+
this.selectedThreadId = nextSelectedThreadId;
|
|
5070
|
+
this.selectedRealThreadIsExplicit = explicitSelectedThreadId !== null && nextSelectedThreadId === explicitSelectedThreadId;
|
|
4459
5071
|
}
|
|
4460
5072
|
teardownThreadStoreSubscriptions() {
|
|
4461
5073
|
for (const unsub of this._threadStoreSubscriptions.values()) unsub();
|
|
4462
5074
|
this._threadStoreSubscriptions.clear();
|
|
4463
5075
|
this._threadsByAgent.clear();
|
|
4464
5076
|
this._threadsErrorByAgent.clear();
|
|
5077
|
+
this._threadsLoadingByAgent.clear();
|
|
4465
5078
|
this._threads = [];
|
|
4466
5079
|
}
|
|
4467
5080
|
ensureOwnedThreadStore(agentId) {
|
|
4468
|
-
var _this$
|
|
5081
|
+
var _this$core9, _core$intelligence;
|
|
5082
|
+
if (!this.areThreadEndpointsAvailable()) return;
|
|
4469
5083
|
if (this._ownedThreadStores.has(agentId)) return;
|
|
4470
|
-
if ((_this$
|
|
5084
|
+
if ((_this$core9 = this.core) === null || _this$core9 === void 0 ? void 0 : _this$core9.getThreadStore(agentId)) return;
|
|
4471
5085
|
const core = this.core;
|
|
4472
5086
|
if (!(core === null || core === void 0 ? void 0 : core.runtimeUrl)) return;
|
|
4473
|
-
if (!this.areThreadEndpointsAvailable()) return;
|
|
4474
5087
|
const store = (0, _copilotkit_core.ɵcreateThreadStore)({ fetch: globalThis.fetch });
|
|
4475
5088
|
store.start();
|
|
4476
5089
|
store.setContext({
|
|
@@ -4484,11 +5097,13 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4484
5097
|
core.registerThreadStore(agentId, store);
|
|
4485
5098
|
}
|
|
4486
5099
|
refreshOwnedThreadStore(agentId) {
|
|
5100
|
+
if (!this.areThreadEndpointsAvailable()) return;
|
|
4487
5101
|
const store = this._ownedThreadStores.get(agentId);
|
|
4488
5102
|
if (!store) return;
|
|
4489
5103
|
store.refresh();
|
|
4490
5104
|
}
|
|
4491
5105
|
updateOwnedThreadStoreHeaders(headers) {
|
|
5106
|
+
if (!this.areThreadEndpointsAvailable()) return;
|
|
4492
5107
|
const core = this.core;
|
|
4493
5108
|
if (!(core === null || core === void 0 ? void 0 : core.runtimeUrl)) return;
|
|
4494
5109
|
for (const [agentId, store] of this._ownedThreadStores) {
|
|
@@ -4502,36 +5117,67 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4502
5117
|
}
|
|
4503
5118
|
}
|
|
4504
5119
|
removeOwnedThreadStore(agentId) {
|
|
4505
|
-
var _this$
|
|
5120
|
+
var _this$core10;
|
|
4506
5121
|
const store = this._ownedThreadStores.get(agentId);
|
|
4507
5122
|
if (!store) return;
|
|
4508
|
-
store.stop();
|
|
4509
|
-
(_this$core11 = this.core) === null || _this$core11 === void 0 || _this$core11.unregisterThreadStore(agentId);
|
|
4510
5123
|
this._ownedThreadStores.delete(agentId);
|
|
5124
|
+
store.stop();
|
|
5125
|
+
if (((_this$core10 = this.core) === null || _this$core10 === void 0 ? void 0 : _this$core10.getThreadStore(agentId)) === store) this.core.unregisterThreadStore(agentId);
|
|
4511
5126
|
}
|
|
4512
5127
|
teardownOwnedThreadStores() {
|
|
4513
|
-
|
|
4514
|
-
|
|
5128
|
+
const ownedThreadStores = Array.from(this._ownedThreadStores);
|
|
5129
|
+
this._ownedThreadStores.clear();
|
|
5130
|
+
for (const [agentId, store] of ownedThreadStores) {
|
|
5131
|
+
var _this$core11;
|
|
4515
5132
|
store.stop();
|
|
4516
|
-
(_this$
|
|
5133
|
+
if (((_this$core11 = this.core) === null || _this$core11 === void 0 ? void 0 : _this$core11.getThreadStore(agentId)) === store) this.core.unregisterThreadStore(agentId);
|
|
4517
5134
|
}
|
|
4518
|
-
|
|
5135
|
+
}
|
|
5136
|
+
coreSupportsInspectorMetadata(core) {
|
|
5137
|
+
try {
|
|
5138
|
+
return "inspectorMetadata" in core;
|
|
5139
|
+
} catch (_unused6) {
|
|
5140
|
+
return false;
|
|
5141
|
+
}
|
|
5142
|
+
}
|
|
5143
|
+
readCoreInspectorMetadata(core) {
|
|
5144
|
+
if (!this.coreSupportsInspectorMetadata(core)) return;
|
|
5145
|
+
try {
|
|
5146
|
+
return core.inspectorMetadata;
|
|
5147
|
+
} catch (_unused7) {
|
|
5148
|
+
return;
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
updateInspectorMetadataProjection(value) {
|
|
5152
|
+
this.inspectorMetadataValue = value;
|
|
5153
|
+
let runtimeLicense;
|
|
5154
|
+
try {
|
|
5155
|
+
var _this$_core4;
|
|
5156
|
+
runtimeLicense = (_this$_core4 = this._core) === null || _this$_core4 === void 0 ? void 0 : _this$_core4.licenseStatus;
|
|
5157
|
+
} catch (_unused8) {
|
|
5158
|
+
runtimeLicense = void 0;
|
|
5159
|
+
}
|
|
5160
|
+
this.inspectorMetadataProjection = projectInspectorMetadata(value, runtimeLicense);
|
|
4519
5161
|
}
|
|
4520
5162
|
attachToCore(core) {
|
|
4521
5163
|
this.runtimeStatus = core.runtimeConnectionStatus;
|
|
4522
5164
|
this.coreProperties = core.properties;
|
|
4523
5165
|
this.lastCoreError = null;
|
|
5166
|
+
const supportsInspectorMetadata = this.coreSupportsInspectorMetadata(core);
|
|
5167
|
+
this.updateInspectorMetadataProjection(this.readCoreInspectorMetadata(core));
|
|
4524
5168
|
this.coreSubscriber = {
|
|
4525
5169
|
onRuntimeConnectionStatusChanged: ({ status }) => {
|
|
4526
5170
|
this.runtimeStatus = status;
|
|
5171
|
+
this.updateInspectorMetadataProjection(this.inspectorMetadataValue);
|
|
5172
|
+
const threadCapabilityWasEnabled = this.threadCapabilityEnabled === true;
|
|
5173
|
+
this.synchronizeThreadCapability();
|
|
4527
5174
|
if (status === "connected") {
|
|
4528
5175
|
if (!core.telemetryDisabled) {
|
|
4529
5176
|
ensureTelemetryDistinctId();
|
|
4530
5177
|
maybeShowDisclosure();
|
|
4531
5178
|
}
|
|
4532
5179
|
this.flushPendingBannerViewed();
|
|
4533
|
-
if (this.areThreadEndpointsAvailable()) for (const agentId of this._ownedThreadStores.keys()) this.refreshOwnedThreadStore(agentId);
|
|
4534
|
-
else this.teardownOwnedThreadStores();
|
|
5180
|
+
if (threadCapabilityWasEnabled && this.areThreadEndpointsAvailable()) for (const agentId of this._ownedThreadStores.keys()) this.refreshOwnedThreadStore(agentId);
|
|
4535
5181
|
} else {
|
|
4536
5182
|
this._threadsByAgent.clear();
|
|
4537
5183
|
this._threads = [];
|
|
@@ -4546,6 +5192,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4546
5192
|
this.updateOwnedThreadStoreHeaders(headers);
|
|
4547
5193
|
this.requestUpdate();
|
|
4548
5194
|
},
|
|
5195
|
+
...supportsInspectorMetadata ? { onInspectorMetadataChanged: ({ inspectorMetadata }) => {
|
|
5196
|
+
if (this._core !== core) return;
|
|
5197
|
+
this.updateInspectorMetadataProjection(inspectorMetadata);
|
|
5198
|
+
this.requestUpdate();
|
|
5199
|
+
} } : {},
|
|
4549
5200
|
onError: ({ code, error }) => {
|
|
4550
5201
|
this.lastCoreError = {
|
|
4551
5202
|
code,
|
|
@@ -4564,18 +5215,25 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4564
5215
|
this.requestUpdate();
|
|
4565
5216
|
},
|
|
4566
5217
|
onThreadStoreRegistered: ({ agentId, store }) => {
|
|
5218
|
+
if (!this.areThreadEndpointsAvailable()) return;
|
|
4567
5219
|
this.subscribeToThreadStore(agentId, store);
|
|
4568
5220
|
this.requestUpdate();
|
|
4569
5221
|
},
|
|
4570
|
-
onThreadStoreUnregistered: ({ agentId }) => {
|
|
5222
|
+
onThreadStoreUnregistered: ({ agentId, prevStore }) => {
|
|
4571
5223
|
const unsub = this._threadStoreSubscriptions.get(agentId);
|
|
4572
5224
|
if (unsub) {
|
|
4573
5225
|
unsub();
|
|
4574
5226
|
this._threadStoreSubscriptions.delete(agentId);
|
|
4575
5227
|
}
|
|
5228
|
+
if (this._ownedThreadStores.get(agentId) === prevStore) {
|
|
5229
|
+
this._ownedThreadStores.delete(agentId);
|
|
5230
|
+
prevStore.stop();
|
|
5231
|
+
}
|
|
4576
5232
|
this._threadsByAgent.delete(agentId);
|
|
4577
5233
|
this._threadsErrorByAgent.delete(agentId);
|
|
5234
|
+
this._threadsLoadingByAgent.delete(agentId);
|
|
4578
5235
|
this._threads = Array.from(this._threadsByAgent.values()).flat();
|
|
5236
|
+
this.autoSelectLatestThread();
|
|
4579
5237
|
this.requestUpdate();
|
|
4580
5238
|
}
|
|
4581
5239
|
};
|
|
@@ -4589,7 +5247,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4589
5247
|
this.flushPendingBannerViewed();
|
|
4590
5248
|
}
|
|
4591
5249
|
const threadStores = typeof core.getThreadStores === "function" ? core.getThreadStores() : {};
|
|
4592
|
-
for (const [agentId, store] of Object.entries(threadStores)) this.subscribeToThreadStore(agentId, store);
|
|
5250
|
+
if (this.areThreadEndpointsAvailable()) for (const [agentId, store] of Object.entries(threadStores)) this.subscribeToThreadStore(agentId, store);
|
|
4593
5251
|
if (core.context) this.contextStore = this.normalizeContextStore(core.context);
|
|
4594
5252
|
if (this.selectedMenu === "memories") this.ensureMemorySubscription();
|
|
4595
5253
|
}
|
|
@@ -4653,10 +5311,10 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4653
5311
|
* reachable from the Intelligence-gated memory view, so it inherits the gate.
|
|
4654
5312
|
*/
|
|
4655
5313
|
runRecall(query) {
|
|
4656
|
-
var _this$
|
|
5314
|
+
var _this$_core5, _this$_core5$getMemor;
|
|
4657
5315
|
const trimmed = query.trim();
|
|
4658
5316
|
if (trimmed.length === 0) return;
|
|
4659
|
-
const store = (_this$
|
|
5317
|
+
const store = (_this$_core5 = this._core) === null || _this$_core5 === void 0 || (_this$_core5$getMemor = _this$_core5.getMemoryStore) === null || _this$_core5$getMemor === void 0 ? void 0 : _this$_core5$getMemor.call(_this$_core5);
|
|
4660
5318
|
if (!store || typeof store.recall !== "function") {
|
|
4661
5319
|
this._recallResults = [];
|
|
4662
5320
|
this._recallError = "Recall is not supported by this SDK version.";
|
|
@@ -4693,6 +5351,13 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4693
5351
|
}
|
|
4694
5352
|
detachFromCore() {
|
|
4695
5353
|
var _this$_memoryUnsub;
|
|
5354
|
+
this.threadCapabilityGeneration += 1;
|
|
5355
|
+
this.threadCapabilityEnabled = null;
|
|
5356
|
+
if (this.selectedThreadId !== this.selectedLocalExampleThreadId) {
|
|
5357
|
+
this.selectedThreadId = null;
|
|
5358
|
+
this.selectedLocalExampleThreadId = null;
|
|
5359
|
+
}
|
|
5360
|
+
this.selectedRealThreadIsExplicit = false;
|
|
4696
5361
|
if (this.coreUnsubscribe) {
|
|
4697
5362
|
this.coreUnsubscribe();
|
|
4698
5363
|
this.coreUnsubscribe = null;
|
|
@@ -4713,6 +5378,9 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4713
5378
|
this._recallQuery = "";
|
|
4714
5379
|
this.coreSubscriber = null;
|
|
4715
5380
|
this.runtimeStatus = null;
|
|
5381
|
+
this.inspectorMetadataValue = void 0;
|
|
5382
|
+
this.inspectorMetadataProjection = projectInspectorMetadata(void 0, void 0);
|
|
5383
|
+
this.metadataTelemetryFingerprints.clear();
|
|
4716
5384
|
this.lastCoreError = null;
|
|
4717
5385
|
this.coreProperties = {};
|
|
4718
5386
|
this.cachedTools = [];
|
|
@@ -4731,6 +5399,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4731
5399
|
this.eventCounter = 0;
|
|
4732
5400
|
}
|
|
4733
5401
|
processAgentsChanged(agents) {
|
|
5402
|
+
this.synchronizeThreadCapability();
|
|
4734
5403
|
const seenAgentIds = /* @__PURE__ */ new Set();
|
|
4735
5404
|
for (const agent of Object.values(agents)) {
|
|
4736
5405
|
if (!(agent === null || agent === void 0 ? void 0 : agent.agentId)) continue;
|
|
@@ -4796,7 +5465,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4796
5465
|
event: params.event,
|
|
4797
5466
|
result: "result" in params ? params.result : void 0
|
|
4798
5467
|
});
|
|
4799
|
-
this.refreshOwnedThreadStore(agentId);
|
|
5468
|
+
if (this.areThreadEndpointsAvailable()) this.refreshOwnedThreadStore(agentId);
|
|
4800
5469
|
},
|
|
4801
5470
|
onRunErrorEvent: ({ event }) => {
|
|
4802
5471
|
this.recordAgentEvent(agentId, "RUN_ERROR", event);
|
|
@@ -4969,6 +5638,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4969
5638
|
}
|
|
4970
5639
|
}
|
|
4971
5640
|
updateContextOptions(agentIds) {
|
|
5641
|
+
let selectedContextChanged = false;
|
|
4972
5642
|
const nextOptions = [{
|
|
4973
5643
|
key: "all-agents",
|
|
4974
5644
|
label: "All Agents"
|
|
@@ -4985,12 +5655,14 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
4985
5655
|
if ((pendingContext === "all-agents" || agentIds.has(pendingContext)) && (pendingContext === "all-agents" || agentIds.size === 1)) {
|
|
4986
5656
|
if (this.selectedContext !== pendingContext) {
|
|
4987
5657
|
this.selectedContext = pendingContext;
|
|
5658
|
+
selectedContextChanged = true;
|
|
4988
5659
|
this.expandedRows.clear();
|
|
4989
5660
|
}
|
|
4990
5661
|
this.pendingSelectedContext = null;
|
|
4991
5662
|
} else if (agentIds.size > 0) {
|
|
4992
5663
|
if (this.selectedContext !== "all-agents") {
|
|
4993
5664
|
this.selectedContext = "all-agents";
|
|
5665
|
+
selectedContextChanged = true;
|
|
4994
5666
|
this.expandedRows.clear();
|
|
4995
5667
|
}
|
|
4996
5668
|
this.pendingSelectedContext = null;
|
|
@@ -5001,10 +5673,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
5001
5673
|
if (agentIds.size === 1) nextSelected = Array.from(agentIds)[0];
|
|
5002
5674
|
if (this.selectedContext !== nextSelected) {
|
|
5003
5675
|
this.selectedContext = nextSelected;
|
|
5676
|
+
selectedContextChanged = true;
|
|
5004
5677
|
this.expandedRows.clear();
|
|
5005
5678
|
this.persistState();
|
|
5006
5679
|
}
|
|
5007
5680
|
}
|
|
5681
|
+
if (selectedContextChanged) this.autoSelectLatestThread();
|
|
5008
5682
|
}
|
|
5009
5683
|
getEventsForSelectedContext() {
|
|
5010
5684
|
var _this$agentEvents$get2;
|
|
@@ -5066,8 +5740,8 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
5066
5740
|
return lit.html`
|
|
5067
5741
|
<div class="mt-2 space-y-2">
|
|
5068
5742
|
${toolCalls.map((call, index) => {
|
|
5069
|
-
var
|
|
5070
|
-
const functionName = (
|
|
5743
|
+
var _ref9, _call$function$name, _call$function, _call$function2;
|
|
5744
|
+
const functionName = (_ref9 = (_call$function$name = (_call$function = call.function) === null || _call$function === void 0 ? void 0 : _call$function.name) !== null && _call$function$name !== void 0 ? _call$function$name : call.toolName) !== null && _ref9 !== void 0 ? _ref9 : "Unknown function";
|
|
5071
5745
|
const callId = typeof (call === null || call === void 0 ? void 0 : call.id) === "string" ? call.id : `tool-call-${index + 1}`;
|
|
5072
5746
|
const argsString = this.formatToolCallArguments((_call$function2 = call.function) === null || _call$function2 === void 0 ? void 0 : _call$function2.arguments);
|
|
5073
5747
|
return lit.html`
|
|
@@ -5096,12 +5770,12 @@ ${argsString}</pre
|
|
|
5096
5770
|
if (typeof args === "string") try {
|
|
5097
5771
|
const parsed = JSON.parse(args);
|
|
5098
5772
|
return JSON.stringify(parsed, null, 2);
|
|
5099
|
-
} catch (
|
|
5773
|
+
} catch (_unused9) {
|
|
5100
5774
|
return args;
|
|
5101
5775
|
}
|
|
5102
5776
|
if (typeof args === "object") try {
|
|
5103
5777
|
return JSON.stringify(args, null, 2);
|
|
5104
|
-
} catch (
|
|
5778
|
+
} catch (_unused10) {
|
|
5105
5779
|
return String(args);
|
|
5106
5780
|
}
|
|
5107
5781
|
return String(args);
|
|
@@ -5124,13 +5798,13 @@ ${argsString}</pre
|
|
|
5124
5798
|
try {
|
|
5125
5799
|
const parsed = JSON.parse(trimmed);
|
|
5126
5800
|
return JSON.stringify(parsed, null, 2);
|
|
5127
|
-
} catch (
|
|
5801
|
+
} catch (_unused11) {
|
|
5128
5802
|
return state;
|
|
5129
5803
|
}
|
|
5130
5804
|
}
|
|
5131
5805
|
if (typeof state === "object") try {
|
|
5132
5806
|
return JSON.stringify(state, null, 2);
|
|
5133
|
-
} catch (
|
|
5807
|
+
} catch (_unused12) {
|
|
5134
5808
|
return String(state);
|
|
5135
5809
|
}
|
|
5136
5810
|
return String(state);
|
|
@@ -5177,6 +5851,8 @@ ${argsString}</pre
|
|
|
5177
5851
|
connectedCallback() {
|
|
5178
5852
|
super.connectedCallback();
|
|
5179
5853
|
if (typeof window !== "undefined") {
|
|
5854
|
+
var _window$matchMedia$ma, _window$matchMedia, _window;
|
|
5855
|
+
this.threadsExampleOverviewVideoReducedMotion = (_window$matchMedia$ma = (_window$matchMedia = (_window = window).matchMedia) === null || _window$matchMedia === void 0 ? void 0 : _window$matchMedia.call(_window, "(prefers-reduced-motion: reduce)").matches) !== null && _window$matchMedia$ma !== void 0 ? _window$matchMedia$ma : false;
|
|
5180
5856
|
this.ensureBrandFonts();
|
|
5181
5857
|
window.addEventListener("resize", this.handleResize);
|
|
5182
5858
|
window.addEventListener("pointerdown", this.handleGlobalPointerDown);
|
|
@@ -5185,6 +5861,7 @@ ${argsString}</pre
|
|
|
5185
5861
|
this.tryAutoAttachCore();
|
|
5186
5862
|
this.ensureAnnouncementLoading();
|
|
5187
5863
|
}
|
|
5864
|
+
this.requestUpdate();
|
|
5188
5865
|
}
|
|
5189
5866
|
ensureBrandFonts() {
|
|
5190
5867
|
const FONT_LINK_ID = "cpk-inspector-brand-fonts";
|
|
@@ -5207,14 +5884,13 @@ ${argsString}</pre
|
|
|
5207
5884
|
clearTimeout(this.transitionTimeoutId);
|
|
5208
5885
|
this.transitionTimeoutId = null;
|
|
5209
5886
|
}
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
this.
|
|
5213
|
-
|
|
5214
|
-
if (this.threadsExampleOverviewVideoIdleCallbackId !== null && typeof window.cancelIdleCallback === "function") {
|
|
5215
|
-
window.cancelIdleCallback(this.threadsExampleOverviewVideoIdleCallbackId);
|
|
5216
|
-
this.threadsExampleOverviewVideoIdleCallbackId = null;
|
|
5887
|
+
this.threadsSetupPromptCopyGeneration += 1;
|
|
5888
|
+
if (this.threadsSetupPromptCopyResetTimeoutId !== null) {
|
|
5889
|
+
window.clearTimeout(this.threadsSetupPromptCopyResetTimeoutId);
|
|
5890
|
+
this.threadsSetupPromptCopyResetTimeoutId = null;
|
|
5217
5891
|
}
|
|
5892
|
+
this.threadsSetupPromptCopyState = "idle";
|
|
5893
|
+
this.cleanupThreadsExampleOverviewVideo();
|
|
5218
5894
|
this.removeDockStyles(true);
|
|
5219
5895
|
this.detachFromCore();
|
|
5220
5896
|
}
|
|
@@ -5240,6 +5916,7 @@ ${argsString}</pre
|
|
|
5240
5916
|
y: EDGE_MARGIN
|
|
5241
5917
|
};
|
|
5242
5918
|
this.hydrateStateFromStorage();
|
|
5919
|
+
this.contextState.window.size = this.clampWindowSize(this.contextState.window.size);
|
|
5243
5920
|
if (this.selectedMenu === "memories") this.ensureMemorySubscription();
|
|
5244
5921
|
if (this.isOpen && this.dockMode !== "floating") this.applyDockStyles(true);
|
|
5245
5922
|
this.applyAnchorPosition("button");
|
|
@@ -5251,6 +5928,36 @@ ${argsString}</pre
|
|
|
5251
5928
|
render() {
|
|
5252
5929
|
return this.isOpen ? this.renderWindow() : this.renderButton();
|
|
5253
5930
|
}
|
|
5931
|
+
willUpdate() {
|
|
5932
|
+
this.reconcileSelectedMenuVisibility();
|
|
5933
|
+
}
|
|
5934
|
+
updated() {
|
|
5935
|
+
var _this$shadowRoot3;
|
|
5936
|
+
this.syncThreadsExampleOverviewVideo();
|
|
5937
|
+
this.maybeTrackInspectorMetadataViews();
|
|
5938
|
+
if (!this.isOpen || this.selectedGroup !== "agents") {
|
|
5939
|
+
this.lastScrolledAgentNavigationLayout = null;
|
|
5940
|
+
return;
|
|
5941
|
+
}
|
|
5942
|
+
const navigation = (_this$shadowRoot3 = this.shadowRoot) === null || _this$shadowRoot3 === void 0 ? void 0 : _this$shadowRoot3.querySelector("nav[aria-label=\"Agent navigation\"]");
|
|
5943
|
+
if (!navigation) return;
|
|
5944
|
+
const activeControl = navigation.querySelector("[aria-current=\"page\"]");
|
|
5945
|
+
if (!activeControl) return;
|
|
5946
|
+
const layoutKey = [
|
|
5947
|
+
this.selectedMenu,
|
|
5948
|
+
this.dockMode,
|
|
5949
|
+
Math.round(this.contextState.window.size.width),
|
|
5950
|
+
typeof window === "undefined" ? 0 : window.innerWidth,
|
|
5951
|
+
navigation.clientWidth,
|
|
5952
|
+
navigation.scrollWidth
|
|
5953
|
+
].join(":");
|
|
5954
|
+
if (this.lastScrolledAgentNavigationLayout === layoutKey) return;
|
|
5955
|
+
if (typeof activeControl.scrollIntoView === "function") activeControl.scrollIntoView({
|
|
5956
|
+
block: "nearest",
|
|
5957
|
+
inline: "nearest"
|
|
5958
|
+
});
|
|
5959
|
+
this.lastScrolledAgentNavigationLayout = layoutKey;
|
|
5960
|
+
}
|
|
5254
5961
|
renderButton() {
|
|
5255
5962
|
return lit.html`
|
|
5256
5963
|
<div class="console-button-wrapper">
|
|
@@ -5306,24 +6013,80 @@ ${argsString}</pre
|
|
|
5306
6013
|
</button>
|
|
5307
6014
|
${this.renderAnnouncementPreview()}
|
|
5308
6015
|
</div>
|
|
6016
|
+
`;
|
|
6017
|
+
}
|
|
6018
|
+
/** Render a trusted action with optional context-specific copy. */
|
|
6019
|
+
renderInspectorAction(action, placement, displayLabel = action.label) {
|
|
6020
|
+
const actionIntent = displayLabel === "Upgrade Your Plan" ? "upgrade" : void 0;
|
|
6021
|
+
return lit.html`
|
|
6022
|
+
<a
|
|
6023
|
+
data-inspector-action-placement=${placement}
|
|
6024
|
+
data-inspector-action-intent=${actionIntent !== null && actionIntent !== void 0 ? actionIntent : lit.nothing}
|
|
6025
|
+
href=${action.url}
|
|
6026
|
+
target="_blank"
|
|
6027
|
+
rel="noopener noreferrer"
|
|
6028
|
+
aria-label="${displayLabel} (opens in a new tab)"
|
|
6029
|
+
style=${placement === "threads-footer" ? "" : "display:inline-flex;min-height:34px;align-items:center;justify-content:center;gap:6px;border:1px solid #dbdbe5;border-radius:6px;background:#ffffff;padding:8px 12px;color:#57575b;font-size:12px;font-weight:600;text-decoration:none;outline-style:solid;outline-width:2px;outline-color:transparent;outline-offset:2px;cursor:pointer;"}
|
|
6030
|
+
@click=${() => this.handleInspectorMetadataActionClick(action, placement)}
|
|
6031
|
+
>
|
|
6032
|
+
${displayLabel}
|
|
6033
|
+
</a>
|
|
6034
|
+
`;
|
|
6035
|
+
}
|
|
6036
|
+
renderInspectorMetadataHeader() {
|
|
6037
|
+
const { identity, plan } = this.inspectorMetadataProjection;
|
|
6038
|
+
if (!identity && !plan) return lit.nothing;
|
|
6039
|
+
return lit.html`
|
|
6040
|
+
<div
|
|
6041
|
+
style="display:flex;min-width:0;flex:1 1 220px;flex-wrap:wrap;align-items:center;gap:6px 8px;"
|
|
6042
|
+
role="group"
|
|
6043
|
+
aria-label="Inspector account details"
|
|
6044
|
+
>
|
|
6045
|
+
${identity ? lit.html`
|
|
6046
|
+
<div
|
|
6047
|
+
data-inspector-metadata="identity"
|
|
6048
|
+
style="display:flex;min-width:0;max-width:100%;align-items:center;gap:6px;color:#e7e7ec;font-size:11px;line-height:1.3;"
|
|
6049
|
+
title="${identity.organizationName} / ${identity.projectName}"
|
|
6050
|
+
>
|
|
6051
|
+
<span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"
|
|
6052
|
+
>${identity.organizationName}</span
|
|
6053
|
+
>
|
|
6054
|
+
<span aria-hidden="true" style="color:#68686e;">/</span>
|
|
6055
|
+
<span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"
|
|
6056
|
+
>${identity.projectName}</span
|
|
6057
|
+
>
|
|
6058
|
+
</div>
|
|
6059
|
+
` : lit.nothing}
|
|
6060
|
+
${plan ? lit.html`
|
|
6061
|
+
<span
|
|
6062
|
+
data-inspector-metadata="plan"
|
|
6063
|
+
style="display:inline-flex;min-height:22px;align-items:center;border:1px solid rgba(133,236,206,0.5);border-radius:4px;background:rgba(133,236,206,0.14);padding:2px 7px;color:#85ecce;font-size:10px;font-weight:600;line-height:1.2;white-space:nowrap;"
|
|
6064
|
+
>${plan.label}</span
|
|
6065
|
+
>
|
|
6066
|
+
` : lit.nothing}
|
|
6067
|
+
</div>
|
|
5309
6068
|
`;
|
|
5310
6069
|
}
|
|
5311
6070
|
renderWindow() {
|
|
5312
6071
|
const windowState = this.contextState.window;
|
|
5313
6072
|
const isDocked = this.dockMode !== "floating";
|
|
5314
6073
|
const isTransitioning = this.hasAttribute("data-transitioning");
|
|
5315
|
-
const windowStyles = isDocked ?
|
|
6074
|
+
const windowStyles = isDocked ? {
|
|
6075
|
+
...this.getDockedWindowStyles(),
|
|
6076
|
+
overflowX: "hidden"
|
|
6077
|
+
} : {
|
|
5316
6078
|
width: `${Math.round(windowState.size.width)}px`,
|
|
5317
6079
|
height: `${Math.round(windowState.size.height)}px`,
|
|
5318
6080
|
minWidth: `${MIN_WINDOW_WIDTH}px`,
|
|
5319
|
-
minHeight: `${MIN_WINDOW_HEIGHT}px
|
|
6081
|
+
minHeight: `${MIN_WINDOW_HEIGHT}px`,
|
|
6082
|
+
overflowX: "hidden"
|
|
5320
6083
|
};
|
|
5321
|
-
const hasContextDropdown = this.contextOptions.
|
|
6084
|
+
const hasContextDropdown = this.contextOptions.some((option) => option.key !== "all-agents");
|
|
5322
6085
|
const contextDropdown = hasContextDropdown ? this.renderContextDropdown() : lit.nothing;
|
|
5323
6086
|
const coreStatus = this.getCoreStatusSummary();
|
|
5324
6087
|
const agentSelector = hasContextDropdown ? contextDropdown : lit.html`
|
|
5325
6088
|
<div
|
|
5326
|
-
class="flex items-center gap-2 rounded-md border border-dashed
|
|
6089
|
+
class="inspector-agent-placeholder flex items-center gap-2 rounded-md border border-dashed px-2 py-1 text-xs"
|
|
5327
6090
|
>
|
|
5328
6091
|
<span>${this.renderIcon("Bot")}</span>
|
|
5329
6092
|
<span class="truncate">No agents available</span>
|
|
@@ -5358,32 +6121,41 @@ ${argsString}</pre
|
|
|
5358
6121
|
@pointerup=${isDocked ? void 0 : this.handlePointerUp}
|
|
5359
6122
|
@pointercancel=${isDocked ? void 0 : this.handlePointerCancel}
|
|
5360
6123
|
>
|
|
5361
|
-
<div
|
|
6124
|
+
<div
|
|
6125
|
+
class="inspector-account-strip flex flex-wrap items-center gap-3 px-4 py-3"
|
|
6126
|
+
data-inspector-account-strip
|
|
6127
|
+
style="width:100%;min-width:0;background-color:#010507;color:#ffffff;"
|
|
6128
|
+
>
|
|
5362
6129
|
<div class="flex items-center min-w-0">
|
|
5363
6130
|
<img
|
|
5364
6131
|
src=${inspector_logo_default}
|
|
5365
6132
|
alt="Inspector logo"
|
|
5366
|
-
class="h-6 w-auto"
|
|
6133
|
+
class="inspector-account-logo h-6 w-auto"
|
|
5367
6134
|
loading="lazy"
|
|
5368
6135
|
/>
|
|
5369
6136
|
</div>
|
|
6137
|
+
${this.renderInspectorMetadataHeader()}
|
|
5370
6138
|
<div class="ml-auto flex min-w-0 items-center gap-2">
|
|
5371
|
-
<div class="min-w-[160px] max-w-xs"
|
|
6139
|
+
<div class="inspector-agent-selector min-w-[160px] max-w-xs">
|
|
6140
|
+
${agentSelector}
|
|
6141
|
+
</div>
|
|
5372
6142
|
<div class="flex items-center gap-1">
|
|
5373
6143
|
${this.renderDockControls()}
|
|
5374
6144
|
<button
|
|
5375
|
-
class="flex h-8 w-8 items-center justify-center rounded-md
|
|
6145
|
+
class="inspector-account-control flex h-8 w-8 items-center justify-center rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ${this.settingsOpen ? "inspector-account-control-active" : ""}"
|
|
5376
6146
|
type="button"
|
|
5377
6147
|
aria-label="Settings"
|
|
5378
|
-
aria-pressed=${this.
|
|
5379
|
-
|
|
6148
|
+
aria-pressed=${this.settingsOpen}
|
|
6149
|
+
style=${INTERACTIVE_FOCUS_BASE_STYLE}
|
|
6150
|
+
@click=${this.handleSettingsToggle}
|
|
5380
6151
|
>
|
|
5381
6152
|
${this.renderIcon("Settings")}
|
|
5382
6153
|
</button>
|
|
5383
6154
|
<button
|
|
5384
|
-
class="flex h-8 w-8 items-center justify-center rounded-md
|
|
6155
|
+
class="inspector-account-control flex h-8 w-8 items-center justify-center rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
5385
6156
|
type="button"
|
|
5386
6157
|
aria-label="Close Web Inspector"
|
|
6158
|
+
style=${INTERACTIVE_FOCUS_BASE_STYLE}
|
|
5387
6159
|
@pointerdown=${this.handleClosePointerDown}
|
|
5388
6160
|
@click=${this.handleCloseClick}
|
|
5389
6161
|
>
|
|
@@ -5392,37 +6164,73 @@ ${argsString}</pre
|
|
|
5392
6164
|
</div>
|
|
5393
6165
|
</div>
|
|
5394
6166
|
</div>
|
|
5395
|
-
<
|
|
5396
|
-
class="
|
|
6167
|
+
<nav
|
|
6168
|
+
class="inspector-primary-navigation"
|
|
6169
|
+
aria-label="Inspector primary navigation"
|
|
6170
|
+
style="overflow-x:auto;overflow-y:hidden;cursor:default;"
|
|
5397
6171
|
>
|
|
5398
|
-
${
|
|
5399
|
-
const isSelected = this.
|
|
6172
|
+
${INSPECTOR_PRIMARY_NAVIGATION.map(({ key, label, icon }) => {
|
|
6173
|
+
const isSelected = this.selectedGroup === key;
|
|
6174
|
+
const legacyMenuKey = key === "threads" ? "threads" : key === "learning" ? "memories" : void 0;
|
|
5400
6175
|
return lit.html`
|
|
5401
6176
|
<button
|
|
5402
6177
|
type="button"
|
|
5403
|
-
class
|
|
5404
|
-
|
|
5405
|
-
|
|
6178
|
+
class="inspector-nav-control inspector-primary-control ${isSelected ? "inspector-nav-control-active" : ""}"
|
|
6179
|
+
data-inspector-group=${key}
|
|
6180
|
+
data-inspector-menu-key=${legacyMenuKey !== null && legacyMenuKey !== void 0 ? legacyMenuKey : lit.nothing}
|
|
6181
|
+
aria-current=${isSelected ? "page" : lit.nothing}
|
|
6182
|
+
style=${INTERACTIVE_FOCUS_BASE_STYLE}
|
|
6183
|
+
@click=${() => this.handleGroupSelect(key)}
|
|
5406
6184
|
>
|
|
5407
|
-
<span class="
|
|
5408
|
-
${key
|
|
6185
|
+
<span class="inspector-nav-icon" aria-hidden="true">
|
|
6186
|
+
${key === "threads" ? (0, lit_directives_unsafe_html_js.unsafeHTML)(this.customTabIcons.threads) : this.renderIcon(icon)}
|
|
5409
6187
|
</span>
|
|
5410
6188
|
<span>${label}</span>
|
|
5411
6189
|
</button>
|
|
5412
6190
|
`;
|
|
5413
6191
|
})}
|
|
5414
|
-
${this.
|
|
6192
|
+
${this.selectedGroup === "threads" ? lit.html`
|
|
5415
6193
|
<a
|
|
6194
|
+
data-inspector-thread-cta
|
|
5416
6195
|
href=${this.getThreadsTalkToEngineerUrl()}
|
|
5417
6196
|
target="_blank"
|
|
5418
|
-
rel="noopener"
|
|
5419
|
-
|
|
6197
|
+
rel="noopener noreferrer"
|
|
6198
|
+
aria-label="Talk to an Engineer (opens in a new tab)"
|
|
6199
|
+
style=${INTERACTIVE_FOCUS_BASE_STYLE}
|
|
5420
6200
|
@click=${this.handleTalkToEngineerClick}
|
|
5421
6201
|
>
|
|
5422
6202
|
Talk to an Engineer
|
|
5423
6203
|
</a>
|
|
5424
6204
|
` : lit.nothing}
|
|
5425
|
-
</
|
|
6205
|
+
</nav>
|
|
6206
|
+
${this.selectedGroup === "agents" ? lit.html`
|
|
6207
|
+
<nav
|
|
6208
|
+
class="inspector-child-navigation"
|
|
6209
|
+
aria-label="Agent navigation"
|
|
6210
|
+
style="overflow-x:auto;overflow-y:hidden;white-space:nowrap;cursor:default;"
|
|
6211
|
+
>
|
|
6212
|
+
${this.getVisibleMenuItemsForGroup("agents").map(({ key, label, icon }) => {
|
|
6213
|
+
const isSelected = this.selectedMenu === key;
|
|
6214
|
+
return lit.html`
|
|
6215
|
+
<button
|
|
6216
|
+
type="button"
|
|
6217
|
+
class="inspector-nav-control inspector-child-control ${isSelected ? "inspector-nav-control-active" : ""}"
|
|
6218
|
+
data-inspector-menu-key=${key}
|
|
6219
|
+
aria-current=${isSelected ? "page" : lit.nothing}
|
|
6220
|
+
style=${INTERACTIVE_FOCUS_BASE_STYLE}
|
|
6221
|
+
@click=${() => this.handleMenuSelect(key)}
|
|
6222
|
+
>
|
|
6223
|
+
<span
|
|
6224
|
+
class="inspector-nav-icon"
|
|
6225
|
+
aria-hidden="true"
|
|
6226
|
+
>${this.renderIcon(icon)}</span
|
|
6227
|
+
>
|
|
6228
|
+
<span>${label}</span>
|
|
6229
|
+
</button>
|
|
6230
|
+
`;
|
|
6231
|
+
})}
|
|
6232
|
+
</nav>
|
|
6233
|
+
` : lit.nothing}
|
|
5426
6234
|
</div>
|
|
5427
6235
|
<div class="flex flex-1 flex-col overflow-hidden">
|
|
5428
6236
|
<div id="cpk-main-scroll" class="flex-1 overflow-auto">
|
|
@@ -5478,10 +6286,7 @@ ${argsString}</pre
|
|
|
5478
6286
|
if (!persisted) return;
|
|
5479
6287
|
if (typeof persisted.isOpen === "boolean") this.isOpen = persisted.isOpen;
|
|
5480
6288
|
if (isValidDockMode(persisted.dockMode)) this.dockMode = persisted.dockMode;
|
|
5481
|
-
|
|
5482
|
-
const validMenu = this.menuItems.find((item) => item.key === persisted.selectedMenu);
|
|
5483
|
-
if (validMenu) this.selectedMenu = validMenu.key;
|
|
5484
|
-
}
|
|
6289
|
+
this.restorePersistedMenu(persisted.selectedMenu);
|
|
5485
6290
|
if (typeof persisted.selectedContext === "string") {
|
|
5486
6291
|
this.selectedContext = persisted.selectedContext;
|
|
5487
6292
|
this.pendingSelectedContext = persisted.selectedContext;
|
|
@@ -5491,6 +6296,7 @@ ${argsString}</pre
|
|
|
5491
6296
|
if (typeof document === "undefined" || typeof window === "undefined") return;
|
|
5492
6297
|
const persisted = loadInspectorState(INSPECTOR_STORAGE_KEY);
|
|
5493
6298
|
if (!persisted) return;
|
|
6299
|
+
this.restorePersistedMenu(persisted.selectedMenu);
|
|
5494
6300
|
const persistedButton = persisted.button;
|
|
5495
6301
|
if (persistedButton) {
|
|
5496
6302
|
if (isValidAnchor(persistedButton.anchor)) this.contextState.button.anchor = persistedButton.anchor;
|
|
@@ -5509,6 +6315,28 @@ ${argsString}</pre
|
|
|
5509
6315
|
this.pendingSelectedContext = persisted.selectedContext;
|
|
5510
6316
|
}
|
|
5511
6317
|
}
|
|
6318
|
+
/** Restore a visible legacy leaf, or use Threads for stale state. */
|
|
6319
|
+
restorePersistedMenu(value) {
|
|
6320
|
+
this.selectedMenu = "threads";
|
|
6321
|
+
this.lastSelectedMenuByGroup.threads = "threads";
|
|
6322
|
+
this.pendingPersistedMenu = null;
|
|
6323
|
+
if (!isInspectorMenuKey(value)) return;
|
|
6324
|
+
const validMenu = this.menuItems.find((item) => item.key === value);
|
|
6325
|
+
if (!validMenu) {
|
|
6326
|
+
if (!this.hasResolvedCore) this.pendingPersistedMenu = value;
|
|
6327
|
+
return;
|
|
6328
|
+
}
|
|
6329
|
+
this.selectedMenu = validMenu.key;
|
|
6330
|
+
this.lastSelectedMenuByGroup[this.getGroupForMenu(validMenu.key)] = validMenu.key;
|
|
6331
|
+
}
|
|
6332
|
+
/** Resolve a valid stored leaf after the first Core exposes its sources. */
|
|
6333
|
+
resolvePendingPersistedMenu() {
|
|
6334
|
+
const pendingMenu = this.pendingPersistedMenu;
|
|
6335
|
+
if (!pendingMenu) return;
|
|
6336
|
+
this.pendingPersistedMenu = null;
|
|
6337
|
+
this.restorePersistedMenu(pendingMenu);
|
|
6338
|
+
this.persistState();
|
|
6339
|
+
}
|
|
5512
6340
|
get activeContext() {
|
|
5513
6341
|
return this.isOpen ? "window" : "button";
|
|
5514
6342
|
}
|
|
@@ -5558,7 +6386,7 @@ ${argsString}</pre
|
|
|
5558
6386
|
};
|
|
5559
6387
|
}
|
|
5560
6388
|
persistState() {
|
|
5561
|
-
var _state$selectedContex;
|
|
6389
|
+
var _this$pendingPersiste, _state$selectedContex;
|
|
5562
6390
|
const state = {
|
|
5563
6391
|
button: {
|
|
5564
6392
|
anchor: this.contextState.button.anchor,
|
|
@@ -5576,7 +6404,7 @@ ${argsString}</pre
|
|
|
5576
6404
|
},
|
|
5577
6405
|
isOpen: this.isOpen,
|
|
5578
6406
|
dockMode: this.dockMode,
|
|
5579
|
-
selectedMenu: this.selectedMenu,
|
|
6407
|
+
selectedMenu: (_this$pendingPersiste = this.pendingPersistedMenu) !== null && _this$pendingPersiste !== void 0 ? _this$pendingPersiste : this.selectedMenu,
|
|
5580
6408
|
selectedContext: this.selectedContext
|
|
5581
6409
|
};
|
|
5582
6410
|
saveInspectorState(INSPECTOR_STORAGE_KEY, state);
|
|
@@ -5599,7 +6427,7 @@ ${argsString}</pre
|
|
|
5599
6427
|
if (mode === "docked-left") this.contextState.window.size.width = DOCKED_LEFT_WIDTH;
|
|
5600
6428
|
this.applyDockStyles();
|
|
5601
6429
|
} else {
|
|
5602
|
-
this.contextState.window.size =
|
|
6430
|
+
this.contextState.window.size = this.clampWindowSize(DEFAULT_WINDOW_SIZE);
|
|
5603
6431
|
this.centerContext("window");
|
|
5604
6432
|
}
|
|
5605
6433
|
this.persistState();
|
|
@@ -5758,6 +6586,7 @@ ${argsString}</pre
|
|
|
5758
6586
|
type="button"
|
|
5759
6587
|
aria-label="Dock to left"
|
|
5760
6588
|
title="Dock Left"
|
|
6589
|
+
style=${INTERACTIVE_FOCUS_BASE_STYLE}
|
|
5761
6590
|
@click=${() => this.handleDockClick("docked-left")}
|
|
5762
6591
|
>
|
|
5763
6592
|
${this.renderIcon("PanelLeft")}
|
|
@@ -5769,6 +6598,7 @@ ${argsString}</pre
|
|
|
5769
6598
|
type="button"
|
|
5770
6599
|
aria-label="Float window"
|
|
5771
6600
|
title="Float"
|
|
6601
|
+
style=${INTERACTIVE_FOCUS_BASE_STYLE}
|
|
5772
6602
|
@click=${() => this.handleDockClick("floating")}
|
|
5773
6603
|
>
|
|
5774
6604
|
${this.renderIcon("Maximize2")}
|
|
@@ -5839,7 +6669,7 @@ ${argsString}</pre
|
|
|
5839
6669
|
if (content === null || content === void 0) return "";
|
|
5840
6670
|
if (typeof content === "object") try {
|
|
5841
6671
|
return JSON.stringify(this.sanitizeForLogging(content));
|
|
5842
|
-
} catch (
|
|
6672
|
+
} catch (_unused13) {
|
|
5843
6673
|
return "";
|
|
5844
6674
|
}
|
|
5845
6675
|
return String(content);
|
|
@@ -5948,6 +6778,7 @@ ${argsString}</pre
|
|
|
5948
6778
|
};
|
|
5949
6779
|
}
|
|
5950
6780
|
renderMainContent() {
|
|
6781
|
+
if (this.settingsOpen) return this.renderSettingsPanel();
|
|
5951
6782
|
if (this.selectedMenu === "ag-ui-events") return this.renderEventsTable();
|
|
5952
6783
|
if (this.selectedMenu === "agents") return this.renderAgentsView();
|
|
5953
6784
|
if (this.selectedMenu === "frontend-tools") return this.renderToolsView();
|
|
@@ -5955,12 +6786,11 @@ ${argsString}</pre
|
|
|
5955
6786
|
if (this.selectedMenu === "agent-context") return this.renderContextView();
|
|
5956
6787
|
if (this.selectedMenu === "threads") return this.renderThreadsView();
|
|
5957
6788
|
if (this.selectedMenu === "memories") return this.renderMemoriesView();
|
|
5958
|
-
if (this.selectedMenu === "settings") return this.renderSettingsPanel();
|
|
5959
6789
|
return lit.nothing;
|
|
5960
6790
|
}
|
|
5961
6791
|
renderSettingsPanel() {
|
|
5962
|
-
var _this$core$
|
|
5963
|
-
const optedOut = (_this$core$
|
|
6792
|
+
var _this$core$telemetryD, _this$core12;
|
|
6793
|
+
const optedOut = (_this$core$telemetryD = (_this$core12 = this.core) === null || _this$core12 === void 0 ? void 0 : _this$core12.telemetryDisabled) !== null && _this$core$telemetryD !== void 0 ? _this$core$telemetryD : false;
|
|
5964
6794
|
return lit.html`
|
|
5965
6795
|
<div class="flex h-full flex-col overflow-hidden">
|
|
5966
6796
|
<div class="overflow-auto p-4">
|
|
@@ -5993,18 +6823,107 @@ ${argsString}</pre
|
|
|
5993
6823
|
`;
|
|
5994
6824
|
}
|
|
5995
6825
|
trackOpened(source, hadUnseenAnnouncement) {
|
|
5996
|
-
var _this$
|
|
5997
|
-
if ((_this$
|
|
6826
|
+
var _this$core13, _this$core$licenseSta2, _this$core14, _this$core$runtimeMod2, _this$core15, _this$core16;
|
|
6827
|
+
if ((_this$core13 = this.core) === null || _this$core13 === void 0 ? void 0 : _this$core13.telemetryDisabled) return;
|
|
5998
6828
|
trackInspectorOpened({
|
|
5999
6829
|
open_source: source,
|
|
6000
6830
|
...this.runtimeStatus === "connected" ? {
|
|
6001
|
-
license_status: (_this$core$licenseSta2 = (_this$
|
|
6002
|
-
runtime_mode: (_this$core$runtimeMod2 = (_this$
|
|
6831
|
+
license_status: (_this$core$licenseSta2 = (_this$core14 = this.core) === null || _this$core14 === void 0 ? void 0 : _this$core14.licenseStatus) !== null && _this$core$licenseSta2 !== void 0 ? _this$core$licenseSta2 : void 0,
|
|
6832
|
+
runtime_mode: (_this$core$runtimeMod2 = (_this$core15 = this.core) === null || _this$core15 === void 0 ? void 0 : _this$core15.runtimeMode) !== null && _this$core$runtimeMod2 !== void 0 ? _this$core$runtimeMod2 : void 0
|
|
6003
6833
|
} : {},
|
|
6004
|
-
runtime_url_type: getRuntimeUrlType((_this$
|
|
6834
|
+
runtime_url_type: getRuntimeUrlType((_this$core16 = this.core) === null || _this$core16 === void 0 ? void 0 : _this$core16.runtimeUrl),
|
|
6005
6835
|
has_unseen_announcement: hadUnseenAnnouncement
|
|
6006
6836
|
});
|
|
6007
6837
|
}
|
|
6838
|
+
getVisibleInspectorMetadataAction() {
|
|
6839
|
+
const { threadsFooterAction, lockedAction } = this.inspectorMetadataProjection;
|
|
6840
|
+
if (threadsFooterAction && !this.settingsOpen && this.selectedMenu === "threads") return {
|
|
6841
|
+
action: threadsFooterAction,
|
|
6842
|
+
placement: "threads-footer"
|
|
6843
|
+
};
|
|
6844
|
+
if (lockedAction && !this.settingsOpen && this.selectedMenu === "threads" && !this.areThreadEndpointsAvailable()) return {
|
|
6845
|
+
action: lockedAction,
|
|
6846
|
+
placement: "locked"
|
|
6847
|
+
};
|
|
6848
|
+
}
|
|
6849
|
+
/** Return paired stable navigation keys, or neither for an invalid leaf. */
|
|
6850
|
+
getMetadataTelemetryNavigation() {
|
|
6851
|
+
const selectedLeaf = this.selectedMenu;
|
|
6852
|
+
if (!isInspectorMenuKey(selectedLeaf)) return {};
|
|
6853
|
+
for (const group of INSPECTOR_PRIMARY_NAVIGATION) if (INSPECTOR_GROUPS[group.key].some((menuKey) => menuKey === selectedLeaf)) return {
|
|
6854
|
+
group_key: group.key,
|
|
6855
|
+
leaf_key: selectedLeaf
|
|
6856
|
+
};
|
|
6857
|
+
return {};
|
|
6858
|
+
}
|
|
6859
|
+
/** Build metadata's shared coarse buckets and stable navigation context. */
|
|
6860
|
+
getMetadataTelemetryContext() {
|
|
6861
|
+
return {
|
|
6862
|
+
usage_bucket: this.getThreadsUsageBucket(),
|
|
6863
|
+
expiry_bucket: this.getThreadsExpiryBucket(),
|
|
6864
|
+
...this.getMetadataTelemetryNavigation()
|
|
6865
|
+
};
|
|
6866
|
+
}
|
|
6867
|
+
trackMetadataModuleIfChanged(props, fingerprint) {
|
|
6868
|
+
if (this.metadataTelemetryFingerprints.get(props.module) === fingerprint) return;
|
|
6869
|
+
this.metadataTelemetryFingerprints.set(props.module, fingerprint);
|
|
6870
|
+
try {
|
|
6871
|
+
trackMetadataModuleViewed(props);
|
|
6872
|
+
} catch (_unused14) {}
|
|
6873
|
+
}
|
|
6874
|
+
maybeTrackInspectorMetadataViews() {
|
|
6875
|
+
var _this$core17, _telemetryContext$gro, _telemetryContext$lea;
|
|
6876
|
+
if (!this.isOpen || this.runtimeStatus !== _copilotkit_core.CopilotKitCoreRuntimeConnectionStatus.Connected || ((_this$core17 = this.core) === null || _this$core17 === void 0 ? void 0 : _this$core17.telemetryDisabled)) return;
|
|
6877
|
+
const { identity, plan } = this.inspectorMetadataProjection;
|
|
6878
|
+
const license_bucket = this.inspectorMetadataProjection.licenseState;
|
|
6879
|
+
const telemetryContext = this.getMetadataTelemetryContext();
|
|
6880
|
+
const contextFingerprint = [
|
|
6881
|
+
telemetryContext.usage_bucket,
|
|
6882
|
+
telemetryContext.expiry_bucket,
|
|
6883
|
+
(_telemetryContext$gro = telemetryContext.group_key) !== null && _telemetryContext$gro !== void 0 ? _telemetryContext$gro : null,
|
|
6884
|
+
(_telemetryContext$lea = telemetryContext.leaf_key) !== null && _telemetryContext$lea !== void 0 ? _telemetryContext$lea : null
|
|
6885
|
+
];
|
|
6886
|
+
if (identity) this.trackMetadataModuleIfChanged({
|
|
6887
|
+
module: "identity",
|
|
6888
|
+
license_bucket,
|
|
6889
|
+
...telemetryContext
|
|
6890
|
+
}, JSON.stringify([
|
|
6891
|
+
license_bucket,
|
|
6892
|
+
...contextFingerprint,
|
|
6893
|
+
identity.organizationName,
|
|
6894
|
+
identity.projectName
|
|
6895
|
+
]));
|
|
6896
|
+
else this.metadataTelemetryFingerprints.delete("identity");
|
|
6897
|
+
if (plan) this.trackMetadataModuleIfChanged({
|
|
6898
|
+
module: "plan",
|
|
6899
|
+
license_bucket,
|
|
6900
|
+
...telemetryContext
|
|
6901
|
+
}, JSON.stringify([
|
|
6902
|
+
license_bucket,
|
|
6903
|
+
...contextFingerprint,
|
|
6904
|
+
plan.code,
|
|
6905
|
+
plan.label
|
|
6906
|
+
]));
|
|
6907
|
+
else this.metadataTelemetryFingerprints.delete("plan");
|
|
6908
|
+
const visibleAction = this.getVisibleInspectorMetadataAction();
|
|
6909
|
+
if (visibleAction) {
|
|
6910
|
+
const { action, placement } = visibleAction;
|
|
6911
|
+
const action_placement = getMetadataActionPlacement(placement);
|
|
6912
|
+
this.trackMetadataModuleIfChanged({
|
|
6913
|
+
module: "action",
|
|
6914
|
+
action_kind: action.kind,
|
|
6915
|
+
license_bucket,
|
|
6916
|
+
...telemetryContext,
|
|
6917
|
+
action_placement
|
|
6918
|
+
}, JSON.stringify([
|
|
6919
|
+
license_bucket,
|
|
6920
|
+
...contextFingerprint,
|
|
6921
|
+
action_placement,
|
|
6922
|
+
action.kind,
|
|
6923
|
+
action.url
|
|
6924
|
+
]));
|
|
6925
|
+
} else this.metadataTelemetryFingerprints.delete("action");
|
|
6926
|
+
}
|
|
6008
6927
|
trackBannerDismissedOnce(surface) {
|
|
6009
6928
|
var _this$core18, _this$announcementCta;
|
|
6010
6929
|
if ((_this$core18 = this.core) === null || _this$core18 === void 0 ? void 0 : _this$core18.telemetryDisabled) return;
|
|
@@ -6033,22 +6952,19 @@ ${argsString}</pre
|
|
|
6033
6952
|
cta_label: (_this$announcementCta2 = this.announcementCtaLabel) !== null && _this$announcementCta2 !== void 0 ? _this$announcementCta2 : void 0
|
|
6034
6953
|
});
|
|
6035
6954
|
}
|
|
6036
|
-
trackThreadsViewStateOnce(state
|
|
6955
|
+
trackThreadsViewStateOnce(state) {
|
|
6037
6956
|
var _this$core20;
|
|
6038
6957
|
if ((_this$core20 = this.core) === null || _this$core20 === void 0 ? void 0 : _this$core20.telemetryDisabled) return;
|
|
6039
6958
|
const key = `${state}:${this.getThreadServiceStatus()}`;
|
|
6040
6959
|
if (this.viewedThreadsTelemetryStates.has(key)) return;
|
|
6041
6960
|
this.viewedThreadsTelemetryStates.add(key);
|
|
6042
|
-
const props = this.getThreadsTelemetryProps(
|
|
6961
|
+
const props = this.getThreadsTelemetryProps();
|
|
6043
6962
|
if (state === "locked") trackThreadsLockedViewed(props);
|
|
6044
6963
|
else if (state === "empty_enabled") trackThreadsEmptyEnabledViewed(props);
|
|
6045
6964
|
else trackThreadsEnabledViewed(props);
|
|
6046
6965
|
}
|
|
6047
|
-
shouldRenderExampleThreads(displayThreads, threadsErrorMessage) {
|
|
6048
|
-
return
|
|
6049
|
-
}
|
|
6050
|
-
getVisibleThreads(displayThreads, threadsErrorMessage) {
|
|
6051
|
-
return this.shouldRenderExampleThreads(displayThreads, threadsErrorMessage) ? THREADS_EXAMPLE_THREADS : displayThreads;
|
|
6966
|
+
shouldRenderExampleThreads(locked, displayThreads, threadsErrorMessage, threadsLoading) {
|
|
6967
|
+
return locked || !threadsErrorMessage && !threadsLoading && displayThreads.length === 0;
|
|
6052
6968
|
}
|
|
6053
6969
|
isExampleThreadId(threadId) {
|
|
6054
6970
|
return THREADS_EXAMPLE_THREADS.some((thread) => thread.id === threadId);
|
|
@@ -6065,6 +6981,7 @@ ${argsString}</pre
|
|
|
6065
6981
|
agentId: thread.agentId,
|
|
6066
6982
|
endUserId: "example-user",
|
|
6067
6983
|
status: "completed",
|
|
6984
|
+
createdAt: thread.createdAt,
|
|
6068
6985
|
updatedAt: thread.updatedAt
|
|
6069
6986
|
} : null,
|
|
6070
6987
|
getMessages: async () => {
|
|
@@ -6087,50 +7004,53 @@ ${argsString}</pre
|
|
|
6087
7004
|
var _this$core21;
|
|
6088
7005
|
if ((_this$core21 = this.core) === null || _this$core21 === void 0 ? void 0 : _this$core21.telemetryDisabled) return;
|
|
6089
7006
|
for (const thread of THREADS_EXAMPLE_THREADS) {
|
|
6090
|
-
|
|
6091
|
-
this.
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
7007
|
+
const exampleKind = getExampleKind(thread.id);
|
|
7008
|
+
if (!exampleKind || this.viewedExampleKinds.has(exampleKind)) continue;
|
|
7009
|
+
this.viewedExampleKinds.add(exampleKind);
|
|
7010
|
+
trackThreadsExampleViewed({
|
|
7011
|
+
...this.getThreadsTelemetryProps(),
|
|
7012
|
+
example_kind: exampleKind
|
|
7013
|
+
});
|
|
6096
7014
|
}
|
|
6097
7015
|
}
|
|
6098
7016
|
trackThreadsExampleSelectedOnce(threadId) {
|
|
6099
7017
|
var _this$core22;
|
|
6100
7018
|
if ((_this$core22 = this.core) === null || _this$core22 === void 0 ? void 0 : _this$core22.telemetryDisabled) return;
|
|
6101
|
-
|
|
6102
|
-
this.
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
7019
|
+
const exampleKind = getExampleKind(threadId);
|
|
7020
|
+
if (!exampleKind || this.selectedExampleKinds.has(exampleKind)) return;
|
|
7021
|
+
this.selectedExampleKinds.add(exampleKind);
|
|
7022
|
+
trackThreadsExampleSelected({
|
|
7023
|
+
...this.getThreadsTelemetryProps(),
|
|
7024
|
+
example_kind: exampleKind
|
|
7025
|
+
});
|
|
6107
7026
|
}
|
|
6108
7027
|
getCurrentExampleTourProps() {
|
|
6109
|
-
|
|
6110
|
-
const
|
|
6111
|
-
return
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
}
|
|
7028
|
+
const exampleKind = this.selectedThreadId ? getExampleKind(this.selectedThreadId) : void 0;
|
|
7029
|
+
const tourPair = getExampleTourTelemetryPair(this.exampleTourStep);
|
|
7030
|
+
if (!exampleKind || !tourPair) return void 0;
|
|
7031
|
+
return {
|
|
7032
|
+
...this.getThreadsTelemetryProps(),
|
|
7033
|
+
example_kind: exampleKind,
|
|
7034
|
+
...tourPair
|
|
7035
|
+
};
|
|
6117
7036
|
}
|
|
6118
7037
|
trackThreadsExampleTourStepViewedOnce() {
|
|
6119
|
-
var _this$core23
|
|
7038
|
+
var _this$core23;
|
|
6120
7039
|
if (((_this$core23 = this.core) === null || _this$core23 === void 0 ? void 0 : _this$core23.telemetryDisabled) || !this.selectedThreadId) return;
|
|
6121
|
-
|
|
6122
|
-
|
|
7040
|
+
const props = this.getCurrentExampleTourProps();
|
|
7041
|
+
if (!props) return;
|
|
7042
|
+
const key = `${props.example_kind}:${props.tour_step}`;
|
|
6123
7043
|
if (this.viewedExampleTourSteps.has(key)) return;
|
|
6124
7044
|
this.viewedExampleTourSteps.add(key);
|
|
6125
|
-
trackThreadsExampleTourStepViewed(
|
|
7045
|
+
trackThreadsExampleTourStepViewed(props);
|
|
6126
7046
|
}
|
|
6127
7047
|
syncExampleTourTab() {
|
|
6128
|
-
var
|
|
6129
|
-
const step = (
|
|
7048
|
+
var _THREADS_EXAMPLE_TOUR;
|
|
7049
|
+
const step = (_THREADS_EXAMPLE_TOUR = THREADS_EXAMPLE_TOUR_STEPS[this.exampleTourStep]) !== null && _THREADS_EXAMPLE_TOUR !== void 0 ? _THREADS_EXAMPLE_TOUR : THREADS_EXAMPLE_TOUR_STEPS[0];
|
|
6130
7050
|
if (!step) return;
|
|
6131
7051
|
this.updateComplete.then(() => {
|
|
6132
|
-
var _this$
|
|
6133
|
-
const details = (_this$
|
|
7052
|
+
var _this$shadowRoot4, _details$selectTab;
|
|
7053
|
+
const details = (_this$shadowRoot4 = this.shadowRoot) === null || _this$shadowRoot4 === void 0 ? void 0 : _this$shadowRoot4.querySelector("cpk-thread-details");
|
|
6134
7054
|
details === null || details === void 0 || (_details$selectTab = details.selectTab) === null || _details$selectTab === void 0 || _details$selectTab.call(details, step.tab);
|
|
6135
7055
|
});
|
|
6136
7056
|
}
|
|
@@ -6142,45 +7062,66 @@ ${argsString}</pre
|
|
|
6142
7062
|
if (autoStarted) {
|
|
6143
7063
|
var _this$core24;
|
|
6144
7064
|
this.exampleTourAutoShown = true;
|
|
6145
|
-
if (!((_this$core24 = this.core) === null || _this$core24 === void 0 ? void 0 : _this$core24.telemetryDisabled))
|
|
6146
|
-
|
|
7065
|
+
if (!((_this$core24 = this.core) === null || _this$core24 === void 0 ? void 0 : _this$core24.telemetryDisabled)) {
|
|
7066
|
+
const props = this.getCurrentExampleTourProps();
|
|
7067
|
+
if (props) trackThreadsExampleTourStarted(props);
|
|
7068
|
+
}
|
|
7069
|
+
} else if (!((_this$core25 = this.core) === null || _this$core25 === void 0 ? void 0 : _this$core25.telemetryDisabled)) {
|
|
7070
|
+
const props = this.getCurrentExampleTourProps();
|
|
7071
|
+
if (props) trackThreadsExampleTourReopened(props);
|
|
7072
|
+
}
|
|
6147
7073
|
this.trackThreadsExampleTourStepViewedOnce();
|
|
6148
7074
|
this.syncExampleTourTab();
|
|
6149
7075
|
this.requestUpdate();
|
|
6150
7076
|
}
|
|
6151
7077
|
setExampleTourStep(nextStep) {
|
|
7078
|
+
const telemetryStepIsValid = getExampleTourTelemetryPair(nextStep) !== void 0;
|
|
6152
7079
|
this.exampleTourStep = Math.max(0, Math.min(THREADS_EXAMPLE_TOUR_STEPS.length - 1, nextStep));
|
|
6153
|
-
this.trackThreadsExampleTourStepViewedOnce();
|
|
7080
|
+
if (telemetryStepIsValid) this.trackThreadsExampleTourStepViewedOnce();
|
|
6154
7081
|
this.syncExampleTourTab();
|
|
6155
7082
|
this.requestUpdate();
|
|
6156
7083
|
}
|
|
6157
7084
|
dismissExampleTour(method) {
|
|
6158
7085
|
var _this$core26;
|
|
6159
7086
|
if (!this.selectedThreadId) return;
|
|
6160
|
-
const props = {
|
|
6161
|
-
...this.getCurrentExampleTourProps(),
|
|
6162
|
-
dismiss_method: method
|
|
6163
|
-
};
|
|
6164
7087
|
this.exampleTourActive = false;
|
|
6165
7088
|
this.exampleTourDismissed = true;
|
|
6166
7089
|
this.writeThreadsExampleTourDismissed();
|
|
6167
|
-
if (!((_this$core26 = this.core) === null || _this$core26 === void 0 ? void 0 : _this$core26.telemetryDisabled))
|
|
6168
|
-
|
|
7090
|
+
if (!((_this$core26 = this.core) === null || _this$core26 === void 0 ? void 0 : _this$core26.telemetryDisabled)) {
|
|
7091
|
+
const currentProps = this.getCurrentExampleTourProps();
|
|
7092
|
+
if (currentProps) {
|
|
7093
|
+
const props = {
|
|
7094
|
+
...currentProps,
|
|
7095
|
+
dismiss_method: method
|
|
7096
|
+
};
|
|
7097
|
+
if (method === "done") trackThreadsExampleTourCompleted(props);
|
|
7098
|
+
else trackThreadsExampleTourDismissed(props);
|
|
7099
|
+
}
|
|
7100
|
+
}
|
|
6169
7101
|
this.requestUpdate();
|
|
6170
7102
|
}
|
|
6171
7103
|
handleThreadsThreadSelected(threadId, showingExamples) {
|
|
6172
|
-
if (showingExamples && this.selectedThreadId === threadId) {
|
|
7104
|
+
if (showingExamples && this.selectedThreadId === threadId && this.selectedLocalExampleThreadId === threadId) {
|
|
6173
7105
|
this.selectedThreadId = null;
|
|
7106
|
+
this.selectedRealThreadIsExplicit = false;
|
|
7107
|
+
this.selectedLocalExampleThreadId = null;
|
|
6174
7108
|
this.exampleTourActive = false;
|
|
6175
7109
|
this.requestUpdate();
|
|
6176
7110
|
return;
|
|
6177
7111
|
}
|
|
6178
7112
|
this.selectedThreadId = threadId;
|
|
6179
7113
|
if (showingExamples && this.isExampleThreadId(threadId)) {
|
|
7114
|
+
this.selectedRealThreadIsExplicit = false;
|
|
7115
|
+
this.selectedLocalExampleThreadId = threadId;
|
|
6180
7116
|
this.trackThreadsExampleSelectedOnce(threadId);
|
|
6181
7117
|
if (!this.exampleTourDismissed && !this.exampleTourAutoShown) this.startExampleTour(true);
|
|
6182
7118
|
else this.exampleTourActive = false;
|
|
6183
|
-
} else
|
|
7119
|
+
} else {
|
|
7120
|
+
const { displayThreads } = this.getActiveThreadsState();
|
|
7121
|
+
this.selectedRealThreadIsExplicit = displayThreads.some((thread) => thread.id === threadId);
|
|
7122
|
+
this.selectedLocalExampleThreadId = null;
|
|
7123
|
+
this.exampleTourActive = false;
|
|
7124
|
+
}
|
|
6184
7125
|
this.requestUpdate();
|
|
6185
7126
|
}
|
|
6186
7127
|
readThreadsExampleTourDismissed() {
|
|
@@ -6189,7 +7130,7 @@ ${argsString}</pre
|
|
|
6189
7130
|
const raw = window.localStorage.getItem(THREADS_EXAMPLE_TOUR_STORAGE_KEY);
|
|
6190
7131
|
if (!raw) return false;
|
|
6191
7132
|
return JSON.parse(raw).dismissed === true;
|
|
6192
|
-
} catch (
|
|
7133
|
+
} catch (_unused15) {
|
|
6193
7134
|
return false;
|
|
6194
7135
|
}
|
|
6195
7136
|
}
|
|
@@ -6197,45 +7138,232 @@ ${argsString}</pre
|
|
|
6197
7138
|
if (typeof window === "undefined") return;
|
|
6198
7139
|
try {
|
|
6199
7140
|
window.localStorage.setItem(THREADS_EXAMPLE_TOUR_STORAGE_KEY, JSON.stringify({ dismissed: true }));
|
|
6200
|
-
} catch (
|
|
7141
|
+
} catch (_unused16) {}
|
|
6201
7142
|
}
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
if (this.
|
|
6205
|
-
|
|
6206
|
-
const loadVideo = () => {
|
|
7143
|
+
/** Cancels the one deferred gate without disturbing a newer lifecycle. */
|
|
7144
|
+
cancelThreadsExampleOverviewVideoGate() {
|
|
7145
|
+
if (this.threadsExampleOverviewVideoLoadTimer !== null) {
|
|
7146
|
+
if (typeof window !== "undefined") window.clearTimeout(this.threadsExampleOverviewVideoLoadTimer);
|
|
6207
7147
|
this.threadsExampleOverviewVideoLoadTimer = null;
|
|
7148
|
+
}
|
|
7149
|
+
if (this.threadsExampleOverviewVideoIdleCallbackId !== null) {
|
|
7150
|
+
if (typeof window !== "undefined" && typeof window.cancelIdleCallback === "function") window.cancelIdleCallback(this.threadsExampleOverviewVideoIdleCallbackId);
|
|
6208
7151
|
this.threadsExampleOverviewVideoIdleCallbackId = null;
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
7152
|
+
}
|
|
7153
|
+
}
|
|
7154
|
+
/** Returns whether media work still belongs to the mounted lifecycle. */
|
|
7155
|
+
isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration) {
|
|
7156
|
+
return this.isConnected && video.isConnected && this.threadsExampleOverviewVideoElement === video && this.threadsExampleOverviewVideoLifecycleGeneration === lifecycleGeneration;
|
|
7157
|
+
}
|
|
7158
|
+
/** Invalidates any unresolved play request without exposing another state. */
|
|
7159
|
+
invalidateThreadsExampleOverviewVideoPlay() {
|
|
7160
|
+
this.threadsExampleOverviewVideoPlayAttemptGeneration += 1;
|
|
7161
|
+
this.threadsExampleOverviewVideoPlayPromise = null;
|
|
7162
|
+
}
|
|
7163
|
+
/** Moves a current media lifecycle into its readable failure state. */
|
|
7164
|
+
failThreadsExampleOverviewVideo(video, lifecycleGeneration) {
|
|
7165
|
+
if (!this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration)) return;
|
|
7166
|
+
this.invalidateThreadsExampleOverviewVideoPlay();
|
|
7167
|
+
this.threadsExampleOverviewVideoLoaded = false;
|
|
7168
|
+
this.threadsExampleOverviewVideoState = "failed";
|
|
7169
|
+
this.requestUpdate();
|
|
7170
|
+
}
|
|
7171
|
+
/** Settles one guarded play promise and ignores stale completion. */
|
|
7172
|
+
async settleThreadsExampleOverviewVideoPlay(video, lifecycleGeneration, playAttemptGeneration, playback) {
|
|
7173
|
+
try {
|
|
7174
|
+
await playback;
|
|
7175
|
+
if (this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration) && this.threadsExampleOverviewVideoPlayAttemptGeneration === playAttemptGeneration && this.threadsExampleOverviewVideoState !== "failed") {
|
|
7176
|
+
this.threadsExampleOverviewVideoState = "playing";
|
|
7177
|
+
this.requestUpdate();
|
|
7178
|
+
}
|
|
7179
|
+
} catch (_unused17) {
|
|
7180
|
+
if (this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration) && this.threadsExampleOverviewVideoPlayAttemptGeneration === playAttemptGeneration) this.failThreadsExampleOverviewVideo(video, lifecycleGeneration);
|
|
7181
|
+
} finally {
|
|
7182
|
+
if (this.threadsExampleOverviewVideoPlayAttemptGeneration === playAttemptGeneration) this.threadsExampleOverviewVideoPlayPromise = null;
|
|
7183
|
+
}
|
|
7184
|
+
}
|
|
7185
|
+
/** Starts at most one play request for the current media lifecycle. */
|
|
7186
|
+
playThreadsExampleOverviewVideo(video, lifecycleGeneration) {
|
|
7187
|
+
if (this.threadsExampleOverviewVideoPlayPromise !== null || this.threadsExampleOverviewVideoState === "deferred" || this.threadsExampleOverviewVideoState === "failed" || !this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration)) return;
|
|
7188
|
+
const playAttemptGeneration = this.threadsExampleOverviewVideoPlayAttemptGeneration + 1;
|
|
7189
|
+
this.threadsExampleOverviewVideoPlayAttemptGeneration = playAttemptGeneration;
|
|
7190
|
+
try {
|
|
7191
|
+
const playback = Promise.resolve(video.play());
|
|
7192
|
+
this.threadsExampleOverviewVideoPlayPromise = this.settleThreadsExampleOverviewVideoPlay(video, lifecycleGeneration, playAttemptGeneration, playback);
|
|
7193
|
+
} catch (_unused18) {
|
|
7194
|
+
this.failThreadsExampleOverviewVideo(video, lifecycleGeneration);
|
|
7195
|
+
}
|
|
7196
|
+
}
|
|
7197
|
+
/** Attaches the sole source for a generation and optionally starts playback. */
|
|
7198
|
+
activateThreadsExampleOverviewVideo(video, lifecycleGeneration, play) {
|
|
7199
|
+
if (this.threadsExampleOverviewVideoState !== "deferred" || !this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration)) return;
|
|
7200
|
+
this.threadsExampleOverviewVideoState = "ready";
|
|
7201
|
+
this.threadsExampleOverviewVideoLoaded = false;
|
|
7202
|
+
video.autoplay = !this.threadsExampleOverviewVideoReducedMotion;
|
|
7203
|
+
video.setAttribute("src", THREADS_EXAMPLE_OVERVIEW_VIDEO_URL);
|
|
7204
|
+
this.requestUpdate();
|
|
7205
|
+
if (play) this.playThreadsExampleOverviewVideo(video, lifecycleGeneration);
|
|
7206
|
+
}
|
|
7207
|
+
/** Schedules exactly one idle or timer gate for the current video. */
|
|
7208
|
+
scheduleThreadsExampleOverviewVideoLoad() {
|
|
7209
|
+
const video = this.threadsExampleOverviewVideoElement;
|
|
7210
|
+
if (!video || !this.isConnected || this.threadsExampleOverviewVideoState !== "deferred" || this.threadsExampleOverviewVideoLoadTimer !== null || this.threadsExampleOverviewVideoIdleCallbackId !== null || typeof window === "undefined") return;
|
|
7211
|
+
const lifecycleGeneration = this.threadsExampleOverviewVideoLifecycleGeneration;
|
|
6212
7212
|
if (typeof window.requestIdleCallback === "function") {
|
|
6213
|
-
|
|
7213
|
+
let idleCallbackId = 0;
|
|
7214
|
+
const loadVideo = () => {
|
|
7215
|
+
if (this.threadsExampleOverviewVideoIdleCallbackId !== idleCallbackId) return;
|
|
7216
|
+
this.threadsExampleOverviewVideoIdleCallbackId = null;
|
|
7217
|
+
this.activateThreadsExampleOverviewVideo(video, lifecycleGeneration, !this.threadsExampleOverviewVideoReducedMotion);
|
|
7218
|
+
};
|
|
7219
|
+
idleCallbackId = window.requestIdleCallback(loadVideo, { timeout: 1200 });
|
|
7220
|
+
this.threadsExampleOverviewVideoIdleCallbackId = idleCallbackId;
|
|
6214
7221
|
return;
|
|
6215
7222
|
}
|
|
6216
|
-
|
|
7223
|
+
const loadTimer = window.setTimeout(() => {
|
|
7224
|
+
if (this.threadsExampleOverviewVideoLoadTimer !== loadTimer) return;
|
|
7225
|
+
this.threadsExampleOverviewVideoLoadTimer = null;
|
|
7226
|
+
this.activateThreadsExampleOverviewVideo(video, lifecycleGeneration, !this.threadsExampleOverviewVideoReducedMotion);
|
|
7227
|
+
}, 450);
|
|
7228
|
+
this.threadsExampleOverviewVideoLoadTimer = loadTimer;
|
|
7229
|
+
}
|
|
7230
|
+
/** Attaches one generation-scoped media listener set to the stable video. */
|
|
7231
|
+
bindThreadsExampleOverviewVideo(video) {
|
|
7232
|
+
const lifecycleGeneration = this.threadsExampleOverviewVideoLifecycleGeneration;
|
|
7233
|
+
const listeners = {
|
|
7234
|
+
loadeddata: () => {
|
|
7235
|
+
if (!this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration) || this.threadsExampleOverviewVideoState === "deferred" || this.threadsExampleOverviewVideoState === "failed") return;
|
|
7236
|
+
this.threadsExampleOverviewVideoLoaded = true;
|
|
7237
|
+
this.requestUpdate();
|
|
7238
|
+
},
|
|
7239
|
+
play: () => {
|
|
7240
|
+
if (this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration) && this.threadsExampleOverviewVideoState !== "deferred" && this.threadsExampleOverviewVideoState !== "failed") {
|
|
7241
|
+
this.threadsExampleOverviewVideoState = "playing";
|
|
7242
|
+
this.requestUpdate();
|
|
7243
|
+
}
|
|
7244
|
+
},
|
|
7245
|
+
pause: () => {
|
|
7246
|
+
if (this.isCurrentThreadsExampleOverviewVideo(video, lifecycleGeneration) && this.threadsExampleOverviewVideoState !== "deferred" && this.threadsExampleOverviewVideoState !== "failed") {
|
|
7247
|
+
this.invalidateThreadsExampleOverviewVideoPlay();
|
|
7248
|
+
this.threadsExampleOverviewVideoState = "ready";
|
|
7249
|
+
this.requestUpdate();
|
|
7250
|
+
}
|
|
7251
|
+
},
|
|
7252
|
+
error: () => {
|
|
7253
|
+
this.failThreadsExampleOverviewVideo(video, lifecycleGeneration);
|
|
7254
|
+
}
|
|
7255
|
+
};
|
|
7256
|
+
this.threadsExampleOverviewVideoElement = video;
|
|
7257
|
+
this.threadsExampleOverviewVideoListeners = listeners;
|
|
7258
|
+
video.addEventListener("loadeddata", listeners.loadeddata);
|
|
7259
|
+
video.addEventListener("play", listeners.play);
|
|
7260
|
+
video.addEventListener("pause", listeners.pause);
|
|
7261
|
+
video.addEventListener("error", listeners.error);
|
|
7262
|
+
video.muted = true;
|
|
7263
|
+
video.loop = true;
|
|
7264
|
+
video.playsInline = true;
|
|
7265
|
+
video.autoplay = this.threadsExampleOverviewVideoState !== "deferred" && !this.threadsExampleOverviewVideoReducedMotion;
|
|
7266
|
+
}
|
|
7267
|
+
/** Tears down gates, listeners, playback, and source in cleanup order. */
|
|
7268
|
+
cleanupThreadsExampleOverviewVideo() {
|
|
7269
|
+
const video = this.threadsExampleOverviewVideoElement;
|
|
7270
|
+
if (video) this.threadsExampleOverviewVideoLifecycleGeneration += 1;
|
|
7271
|
+
this.invalidateThreadsExampleOverviewVideoPlay();
|
|
7272
|
+
this.cancelThreadsExampleOverviewVideoGate();
|
|
7273
|
+
this.threadsExampleOverviewVideoPlayOnNextBind = false;
|
|
7274
|
+
const listeners = this.threadsExampleOverviewVideoListeners;
|
|
7275
|
+
if (video && listeners) {
|
|
7276
|
+
video.removeEventListener("loadeddata", listeners.loadeddata);
|
|
7277
|
+
video.removeEventListener("play", listeners.play);
|
|
7278
|
+
video.removeEventListener("pause", listeners.pause);
|
|
7279
|
+
video.removeEventListener("error", listeners.error);
|
|
7280
|
+
}
|
|
7281
|
+
this.threadsExampleOverviewVideoElement = null;
|
|
7282
|
+
this.threadsExampleOverviewVideoListeners = null;
|
|
7283
|
+
if (video) {
|
|
7284
|
+
try {
|
|
7285
|
+
video.pause();
|
|
7286
|
+
} catch (_unused19) {}
|
|
7287
|
+
video.removeAttribute("src");
|
|
7288
|
+
try {
|
|
7289
|
+
video.load();
|
|
7290
|
+
} catch (_unused20) {}
|
|
7291
|
+
}
|
|
7292
|
+
this.threadsExampleOverviewVideoLoaded = false;
|
|
7293
|
+
this.threadsExampleOverviewVideoState = "deferred";
|
|
7294
|
+
}
|
|
7295
|
+
/** Reconciles the rendered media node with its current lifecycle. */
|
|
7296
|
+
syncThreadsExampleOverviewVideo() {
|
|
7297
|
+
var _this$shadowRoot5;
|
|
7298
|
+
const video = (_this$shadowRoot5 = this.shadowRoot) === null || _this$shadowRoot5 === void 0 ? void 0 : _this$shadowRoot5.querySelector(".cpk-threads-overview-video");
|
|
7299
|
+
if (!video) {
|
|
7300
|
+
if (this.threadsExampleOverviewVideoElement || this.threadsExampleOverviewVideoState !== "deferred" || this.threadsExampleOverviewVideoLoadTimer !== null || this.threadsExampleOverviewVideoIdleCallbackId !== null || this.threadsExampleOverviewVideoPlayOnNextBind) this.cleanupThreadsExampleOverviewVideo();
|
|
7301
|
+
return;
|
|
7302
|
+
}
|
|
7303
|
+
if (this.threadsExampleOverviewVideoElement !== video) {
|
|
7304
|
+
if (this.threadsExampleOverviewVideoElement) this.cleanupThreadsExampleOverviewVideo();
|
|
7305
|
+
this.bindThreadsExampleOverviewVideo(video);
|
|
7306
|
+
}
|
|
7307
|
+
if (this.threadsExampleOverviewVideoPlayOnNextBind) {
|
|
7308
|
+
this.threadsExampleOverviewVideoPlayOnNextBind = false;
|
|
7309
|
+
this.activateThreadsExampleOverviewVideo(video, this.threadsExampleOverviewVideoLifecycleGeneration, true);
|
|
7310
|
+
return;
|
|
7311
|
+
}
|
|
7312
|
+
this.scheduleThreadsExampleOverviewVideoLoad();
|
|
6217
7313
|
}
|
|
6218
7314
|
renderThreadsExampleOverviewVideo() {
|
|
6219
|
-
this.
|
|
7315
|
+
const isPlaying = this.threadsExampleOverviewVideoState === "playing";
|
|
7316
|
+
const sourceIsAttached = this.threadsExampleOverviewVideoState !== "deferred";
|
|
7317
|
+
const video = lit.html`<video
|
|
7318
|
+
class="cpk-threads-overview-video"
|
|
7319
|
+
data-loaded=${this.threadsExampleOverviewVideoLoaded}
|
|
7320
|
+
?autoplay=${sourceIsAttached && !this.threadsExampleOverviewVideoReducedMotion}
|
|
7321
|
+
.autoplay=${sourceIsAttached && !this.threadsExampleOverviewVideoReducedMotion}
|
|
7322
|
+
loop
|
|
7323
|
+
.loop=${true}
|
|
7324
|
+
muted
|
|
7325
|
+
.muted=${true}
|
|
7326
|
+
playsinline
|
|
7327
|
+
.playsInline=${true}
|
|
7328
|
+
preload="metadata"
|
|
7329
|
+
></video>`;
|
|
6220
7330
|
return lit.html`
|
|
6221
7331
|
<div class="cpk-threads-overview-video-frame" aria-hidden="true">
|
|
6222
|
-
${this.
|
|
6223
|
-
<video
|
|
6224
|
-
class="cpk-threads-overview-video"
|
|
6225
|
-
data-ready=${this.threadsExampleOverviewVideoReady}
|
|
6226
|
-
src=${THREADS_EXAMPLE_OVERVIEW_VIDEO_URL}
|
|
6227
|
-
autoplay
|
|
6228
|
-
loop
|
|
6229
|
-
muted
|
|
6230
|
-
playsinline
|
|
6231
|
-
preload="metadata"
|
|
6232
|
-
@loadeddata=${this.handleThreadsExampleOverviewVideoLoaded}
|
|
6233
|
-
></video>
|
|
6234
|
-
` : lit.nothing}
|
|
7332
|
+
${this.threadsExampleOverviewVideoLifecycleGeneration % 2 === 0 ? lit.html`<!-- cpk-video-generation-even -->${video}` : lit.html`<!-- cpk-video-generation-odd -->${video}`}
|
|
6235
7333
|
</div>
|
|
7334
|
+
<button
|
|
7335
|
+
class="cpk-threads-overview-video-control"
|
|
7336
|
+
type="button"
|
|
7337
|
+
aria-pressed=${isPlaying ? "false" : "true"}
|
|
7338
|
+
@click=${this.handleThreadsExampleOverviewVideoControl}
|
|
7339
|
+
>
|
|
7340
|
+
${isPlaying ? "Pause demo" : "Play demo"}
|
|
7341
|
+
</button>
|
|
7342
|
+
${this.threadsExampleOverviewVideoState === "failed" ? lit.html`
|
|
7343
|
+
<p class="cpk-threads-overview-video-fallback" role="status">
|
|
7344
|
+
${THREADS_EXAMPLE_OVERVIEW_VIDEO_FALLBACK}
|
|
7345
|
+
</p>
|
|
7346
|
+
` : lit.nothing}
|
|
6236
7347
|
`;
|
|
6237
7348
|
}
|
|
6238
|
-
|
|
7349
|
+
/** Show a copy result briefly and announce it to assistive technology. */
|
|
7350
|
+
showThreadsSetupPromptCopyState(state, generation) {
|
|
7351
|
+
if (!this.isConnected || generation !== this.threadsSetupPromptCopyGeneration) return;
|
|
7352
|
+
if (this.threadsSetupPromptCopyResetTimeoutId !== null) window.clearTimeout(this.threadsSetupPromptCopyResetTimeoutId);
|
|
7353
|
+
this.threadsSetupPromptCopyState = state;
|
|
7354
|
+
this.requestUpdate();
|
|
7355
|
+
this.threadsSetupPromptCopyResetTimeoutId = window.setTimeout(() => {
|
|
7356
|
+
if (!this.isConnected || generation !== this.threadsSetupPromptCopyGeneration) return;
|
|
7357
|
+
this.threadsSetupPromptCopyState = "idle";
|
|
7358
|
+
this.threadsSetupPromptCopyResetTimeoutId = null;
|
|
7359
|
+
this.requestUpdate();
|
|
7360
|
+
}, 2e3);
|
|
7361
|
+
}
|
|
7362
|
+
renderThreadsExampleOverview(locked) {
|
|
7363
|
+
var _lockedCopy$heading, _lockedCopy$descripti;
|
|
7364
|
+
const lockedCopy = locked ? this.getThreadsLockedCopy() : void 0;
|
|
7365
|
+
const { lockedAction } = this.inspectorMetadataProjection;
|
|
7366
|
+
const onboardingAction = this.getThreadsEmptyOnboardingAction();
|
|
6239
7367
|
return lit.html`
|
|
6240
7368
|
<div
|
|
6241
7369
|
style="
|
|
@@ -6258,7 +7386,7 @@ ${argsString}</pre
|
|
|
6258
7386
|
color: #010507;
|
|
6259
7387
|
"
|
|
6260
7388
|
>
|
|
6261
|
-
Threads are persistent, inspectable conversations
|
|
7389
|
+
${(_lockedCopy$heading = lockedCopy === null || lockedCopy === void 0 ? void 0 : lockedCopy.heading) !== null && _lockedCopy$heading !== void 0 ? _lockedCopy$heading : "Threads are persistent, inspectable conversations"}
|
|
6262
7390
|
</h2>
|
|
6263
7391
|
${this.renderThreadsExampleOverviewVideo()}
|
|
6264
7392
|
<p
|
|
@@ -6269,61 +7397,90 @@ ${argsString}</pre
|
|
|
6269
7397
|
color: #57575b;
|
|
6270
7398
|
"
|
|
6271
7399
|
>
|
|
6272
|
-
Take a tour with the example threads in the sidebar. Then, start
|
|
6273
|
-
chatting in your app to create the first real thread.
|
|
7400
|
+
${(_lockedCopy$descripti = lockedCopy === null || lockedCopy === void 0 ? void 0 : lockedCopy.description) !== null && _lockedCopy$descripti !== void 0 ? _lockedCopy$descripti : "Take a tour with the example threads in the sidebar. Then, start chatting in your app to create the first real thread."}
|
|
6274
7401
|
</p>
|
|
6275
7402
|
<div style="display:flex;flex-wrap:wrap;gap:8px;">
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
7403
|
+
${locked ? lit.html`
|
|
7404
|
+
${this.inspectorMetadataProjection.licenseState === "valid" ? lit.html`
|
|
7405
|
+
<button
|
|
7406
|
+
data-inspector-threads-setup-prompt
|
|
7407
|
+
type="button"
|
|
7408
|
+
aria-label=${this.threadsSetupPromptCopyState === "copied" ? "Setup prompt copied" : this.threadsSetupPromptCopyState === "error" ? "Copy setup prompt failed. Try again" : "Copy setup prompt for your coding agent"}
|
|
7409
|
+
@click=${this.handleThreadsSetupPromptCopy}
|
|
7410
|
+
>
|
|
7411
|
+
${this.renderIcon(this.threadsSetupPromptCopyState === "copied" ? "Check" : "Copy")}
|
|
7412
|
+
${this.threadsSetupPromptCopyState === "copied" ? "Copied" : this.threadsSetupPromptCopyState === "error" ? "Copy blocked" : "Copy prompt for your agent"}
|
|
7413
|
+
</button>
|
|
7414
|
+
<a
|
|
7415
|
+
data-inspector-threads-setup-link
|
|
7416
|
+
href=${this.getThreadsRuntimeSetupDocsUrl()}
|
|
7417
|
+
target="_blank"
|
|
7418
|
+
rel="noopener"
|
|
7419
|
+
aria-label="Open setup guide (opens in a new tab)"
|
|
7420
|
+
>
|
|
7421
|
+
Open setup guide
|
|
7422
|
+
</a>
|
|
7423
|
+
<span
|
|
7424
|
+
class="sr-only"
|
|
7425
|
+
data-inspector-threads-setup-copy-status
|
|
7426
|
+
aria-live="polite"
|
|
7427
|
+
>${this.threadsSetupPromptCopyState === "copied" ? "Setup prompt copied." : this.threadsSetupPromptCopyState === "error" ? "Setup prompt copy failed. Open the setup guide and copy it manually." : ""}</span
|
|
7428
|
+
>
|
|
7429
|
+
` : lit.nothing}
|
|
7430
|
+
${lockedAction ? this.renderInspectorAction(lockedAction, "locked") : lit.nothing}
|
|
7431
|
+
` : lit.html`
|
|
7432
|
+
<a
|
|
7433
|
+
href=${this.getThreadsDocsUrl()}
|
|
7434
|
+
target="_blank"
|
|
7435
|
+
rel="noopener"
|
|
7436
|
+
style="
|
|
7437
|
+
display: inline-flex;
|
|
7438
|
+
align-items: center;
|
|
7439
|
+
justify-content: center;
|
|
7440
|
+
gap: 6px;
|
|
7441
|
+
min-height: 34px;
|
|
7442
|
+
border-radius: 6px;
|
|
7443
|
+
background: #010507;
|
|
7444
|
+
padding: 8px 12px;
|
|
7445
|
+
font-size: 12px;
|
|
7446
|
+
font-weight: 600;
|
|
7447
|
+
color: #ffffff;
|
|
7448
|
+
text-decoration: none;
|
|
7449
|
+
"
|
|
7450
|
+
>
|
|
7451
|
+
Learn how Threads work
|
|
7452
|
+
</a>
|
|
7453
|
+
<a
|
|
7454
|
+
href=${onboardingAction.href}
|
|
7455
|
+
target="_blank"
|
|
7456
|
+
rel="noopener"
|
|
7457
|
+
style="
|
|
7458
|
+
display: inline-flex;
|
|
7459
|
+
align-items: center;
|
|
7460
|
+
justify-content: center;
|
|
7461
|
+
gap: 6px;
|
|
7462
|
+
min-height: 34px;
|
|
7463
|
+
border-radius: 6px;
|
|
7464
|
+
border: 1px solid #dbdbe5;
|
|
7465
|
+
background: #ffffff;
|
|
7466
|
+
padding: 8px 12px;
|
|
7467
|
+
font-size: 12px;
|
|
7468
|
+
font-weight: 600;
|
|
7469
|
+
color: #010507;
|
|
7470
|
+
text-decoration: none;
|
|
7471
|
+
"
|
|
7472
|
+
>
|
|
7473
|
+
${onboardingAction.label}
|
|
7474
|
+
</a>
|
|
7475
|
+
`}
|
|
6319
7476
|
</div>
|
|
6320
7477
|
</div>
|
|
6321
7478
|
</div>
|
|
6322
7479
|
`;
|
|
6323
7480
|
}
|
|
6324
7481
|
renderThreadsExampleTour() {
|
|
6325
|
-
var
|
|
6326
|
-
if (!this.selectedThreadId ||
|
|
7482
|
+
var _THREADS_EXAMPLE_TOUR2;
|
|
7483
|
+
if (!this.selectedThreadId || this.selectedThreadId !== this.selectedLocalExampleThreadId) return lit.nothing;
|
|
6327
7484
|
if (!this.exampleTourActive) return lit.html`
|
|
6328
7485
|
<button
|
|
6329
7486
|
type="button"
|
|
@@ -6347,7 +7504,7 @@ ${argsString}</pre
|
|
|
6347
7504
|
Show tour
|
|
6348
7505
|
</button>
|
|
6349
7506
|
`;
|
|
6350
|
-
const step = (
|
|
7507
|
+
const step = (_THREADS_EXAMPLE_TOUR2 = THREADS_EXAMPLE_TOUR_STEPS[this.exampleTourStep]) !== null && _THREADS_EXAMPLE_TOUR2 !== void 0 ? _THREADS_EXAMPLE_TOUR2 : THREADS_EXAMPLE_TOUR_STEPS[0];
|
|
6351
7508
|
const isFirst = this.exampleTourStep === 0;
|
|
6352
7509
|
const isLast = this.exampleTourStep === THREADS_EXAMPLE_TOUR_STEPS.length - 1;
|
|
6353
7510
|
return lit.html`
|
|
@@ -6374,7 +7531,7 @@ ${argsString}</pre
|
|
|
6374
7531
|
font-family: 'Spline Sans Mono', monospace;
|
|
6375
7532
|
font-size: 10px;
|
|
6376
7533
|
font-weight: 600;
|
|
6377
|
-
color: #
|
|
7534
|
+
color: #087653;
|
|
6378
7535
|
text-transform: uppercase;
|
|
6379
7536
|
"
|
|
6380
7537
|
>
|
|
@@ -6405,7 +7562,7 @@ ${argsString}</pre
|
|
|
6405
7562
|
>
|
|
6406
7563
|
<button
|
|
6407
7564
|
type="button"
|
|
6408
|
-
style="border:0;background:transparent;color:#
|
|
7565
|
+
style="border:0;background:transparent;color:#68686e;font-size:12px;font-weight:600;cursor:pointer;padding:7px 0;"
|
|
6409
7566
|
@click=${() => this.dismissExampleTour("skip")}
|
|
6410
7567
|
>
|
|
6411
7568
|
Skip
|
|
@@ -6584,124 +7741,25 @@ ${argsString}</pre
|
|
|
6584
7741
|
</div>
|
|
6585
7742
|
`;
|
|
6586
7743
|
}
|
|
6587
|
-
|
|
6588
|
-
this.
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
position: absolute;
|
|
6607
|
-
inset: 0;
|
|
6608
|
-
pointer-events: none;
|
|
6609
|
-
background:
|
|
6610
|
-
radial-gradient(circle at center, rgba(255,255,255,0.9) 0, rgba(255,255,255,0.78) 24%, rgba(255,255,255,0.34) 48%, rgba(255,255,255,0.56) 100%);
|
|
6611
|
-
"
|
|
6612
|
-
></div>
|
|
6613
|
-
<div
|
|
6614
|
-
style="
|
|
6615
|
-
position: relative;
|
|
6616
|
-
z-index: 1;
|
|
6617
|
-
max-width: 440px;
|
|
6618
|
-
text-align: center;
|
|
6619
|
-
color: #57575b;
|
|
6620
|
-
"
|
|
6621
|
-
>
|
|
6622
|
-
<div
|
|
6623
|
-
aria-hidden="true"
|
|
6624
|
-
style="
|
|
6625
|
-
margin: 0 auto 18px;
|
|
6626
|
-
display: flex;
|
|
6627
|
-
justify-content: center;
|
|
6628
|
-
"
|
|
6629
|
-
>
|
|
6630
|
-
<div
|
|
6631
|
-
style="
|
|
6632
|
-
display: flex;
|
|
6633
|
-
height: 44px;
|
|
6634
|
-
width: 44px;
|
|
6635
|
-
align-items: center;
|
|
6636
|
-
justify-content: center;
|
|
6637
|
-
border: 1px solid #dfd6fb;
|
|
6638
|
-
border-radius: 8px;
|
|
6639
|
-
background: #eee6fe;
|
|
6640
|
-
color: #57575b;
|
|
6641
|
-
box-shadow: 0 8px 18px rgba(87, 87, 91, 0.14);
|
|
6642
|
-
"
|
|
6643
|
-
>
|
|
6644
|
-
${this.renderIcon("Lock")}
|
|
6645
|
-
</div>
|
|
6646
|
-
</div>
|
|
6647
|
-
<h2
|
|
6648
|
-
style="
|
|
6649
|
-
margin: 0 0 8px;
|
|
6650
|
-
font-size: 16px;
|
|
6651
|
-
line-height: 1.35;
|
|
6652
|
-
font-weight: 600;
|
|
6653
|
-
color: #010507;
|
|
6654
|
-
"
|
|
6655
|
-
>
|
|
6656
|
-
Enable Intelligence to inspect Threads.
|
|
6657
|
-
</h2>
|
|
6658
|
-
<p
|
|
6659
|
-
style="
|
|
6660
|
-
margin: 0 auto 18px;
|
|
6661
|
-
max-width: 380px;
|
|
6662
|
-
font-size: 13px;
|
|
6663
|
-
line-height: 1.55;
|
|
6664
|
-
color: #57575b;
|
|
6665
|
-
"
|
|
6666
|
-
>
|
|
6667
|
-
Persist conversations and inspect saved thread history from the
|
|
6668
|
-
Inspector.
|
|
6669
|
-
</p>
|
|
6670
|
-
<div
|
|
6671
|
-
style="
|
|
6672
|
-
display: flex;
|
|
6673
|
-
flex-wrap: wrap;
|
|
6674
|
-
justify-content: center;
|
|
6675
|
-
gap: 8px;
|
|
6676
|
-
"
|
|
6677
|
-
>
|
|
6678
|
-
<a
|
|
6679
|
-
href=${this.getThreadsIntelligenceSignupUrl()}
|
|
6680
|
-
target="_blank"
|
|
6681
|
-
rel="noopener"
|
|
6682
|
-
style="
|
|
6683
|
-
display: inline-flex;
|
|
6684
|
-
min-height: 34px;
|
|
6685
|
-
align-items: center;
|
|
6686
|
-
justify-content: center;
|
|
6687
|
-
gap: 6px;
|
|
6688
|
-
border-radius: 6px;
|
|
6689
|
-
border: 1px solid #dbdbe5;
|
|
6690
|
-
background: #ffffff;
|
|
6691
|
-
padding: 8px 12px;
|
|
6692
|
-
font-size: 12px;
|
|
6693
|
-
font-weight: 600;
|
|
6694
|
-
color: #57575b;
|
|
6695
|
-
text-decoration: none;
|
|
6696
|
-
"
|
|
6697
|
-
@click=${this.handleThreadsIntelligenceSignupClick}
|
|
6698
|
-
>
|
|
6699
|
-
Sign up for Intelligence
|
|
6700
|
-
</a>
|
|
6701
|
-
</div>
|
|
6702
|
-
</div>
|
|
6703
|
-
</div>
|
|
6704
|
-
`;
|
|
7744
|
+
getThreadsLockedCopy() {
|
|
7745
|
+
switch (this.inspectorMetadataProjection.licenseState) {
|
|
7746
|
+
case "valid": return {
|
|
7747
|
+
heading: "Finish setting up Rich Threads",
|
|
7748
|
+
description: "Copy this prompt into your coding agent to finish the setup."
|
|
7749
|
+
};
|
|
7750
|
+
case "none": return {
|
|
7751
|
+
heading: "Enable Intelligence to inspect Threads.",
|
|
7752
|
+
description: "Persist conversations and inspect saved thread history from the Inspector."
|
|
7753
|
+
};
|
|
7754
|
+
case "expired": return {
|
|
7755
|
+
heading: "Renew Intelligence to inspect Threads.",
|
|
7756
|
+
description: "Your Intelligence access has expired. Renew it to inspect saved thread history."
|
|
7757
|
+
};
|
|
7758
|
+
case "unknown": return {
|
|
7759
|
+
heading: "Threads are unavailable.",
|
|
7760
|
+
description: "This runtime does not expose Threads for the Inspector."
|
|
7761
|
+
};
|
|
7762
|
+
}
|
|
6705
7763
|
}
|
|
6706
7764
|
/**
|
|
6707
7765
|
* Renders the realtime-connection indicator in the memory-store header.
|
|
@@ -6721,7 +7779,7 @@ ${argsString}</pre
|
|
|
6721
7779
|
gap: 4px;
|
|
6722
7780
|
font-size: 10px;
|
|
6723
7781
|
font-weight: 500;
|
|
6724
|
-
color: ${connected ? "#57575b" : "#
|
|
7782
|
+
color: ${connected ? "#57575b" : "#68686e"};
|
|
6725
7783
|
"
|
|
6726
7784
|
>
|
|
6727
7785
|
<span
|
|
@@ -6885,7 +7943,7 @@ ${argsString}</pre
|
|
|
6885
7943
|
align-items: center;
|
|
6886
7944
|
justify-content: center;
|
|
6887
7945
|
gap: 8px;
|
|
6888
|
-
color: #
|
|
7946
|
+
color: #68686e;
|
|
6889
7947
|
"
|
|
6890
7948
|
>
|
|
6891
7949
|
<svg
|
|
@@ -6927,7 +7985,7 @@ ${argsString}</pre
|
|
|
6927
7985
|
align-items: center;
|
|
6928
7986
|
justify-content: center;
|
|
6929
7987
|
gap: 8px;
|
|
6930
|
-
color: #
|
|
7988
|
+
color: #68686e;
|
|
6931
7989
|
"
|
|
6932
7990
|
>
|
|
6933
7991
|
<svg
|
|
@@ -7019,18 +8077,66 @@ ${argsString}</pre
|
|
|
7019
8077
|
></cpk-memory-list>
|
|
7020
8078
|
</div>
|
|
7021
8079
|
</div>
|
|
8080
|
+
`;
|
|
8081
|
+
}
|
|
8082
|
+
/** Renders trusted Threads usage and its independent plan action. */
|
|
8083
|
+
renderThreadsUsageFooter() {
|
|
8084
|
+
const { usage, threadsFooterAction } = this.inspectorMetadataProjection;
|
|
8085
|
+
if (!usage && !threadsFooterAction) return lit.nothing;
|
|
8086
|
+
let countLabel;
|
|
8087
|
+
let progressMax;
|
|
8088
|
+
let progressValue;
|
|
8089
|
+
const capacityState = this.getThreadsCapacityState();
|
|
8090
|
+
if (usage) if (usage.limit.kind === "finite") {
|
|
8091
|
+
countLabel = `${usage.used > usage.limit.value ? `${usage.limit.value}+` : String(usage.used)} / ${usage.limit.value} Threads`;
|
|
8092
|
+
progressMax = usage.limit.value;
|
|
8093
|
+
progressValue = Math.min(usage.used, usage.limit.value);
|
|
8094
|
+
} else if (usage.limit.kind === "unlimited") countLabel = `${usage.used} Threads · Unlimited`;
|
|
8095
|
+
else countLabel = `${usage.used} Threads · Limit unavailable`;
|
|
8096
|
+
return lit.html`
|
|
8097
|
+
<footer
|
|
8098
|
+
class="inspector-threads-footer"
|
|
8099
|
+
data-inspector-threads-footer
|
|
8100
|
+
role="group"
|
|
8101
|
+
aria-label="Threads usage"
|
|
8102
|
+
>
|
|
8103
|
+
${usage && countLabel ? lit.html`
|
|
8104
|
+
<div class="inspector-threads-usage">
|
|
8105
|
+
<span data-inspector-thread-count>${countLabel}</span>
|
|
8106
|
+
${progressMax !== void 0 && progressValue !== void 0 ? lit.html`
|
|
8107
|
+
<progress
|
|
8108
|
+
class="inspector-thread-progress"
|
|
8109
|
+
data-inspector-thread-progress
|
|
8110
|
+
data-inspector-thread-capacity=${capacityState}
|
|
8111
|
+
max=${progressMax}
|
|
8112
|
+
value=${progressValue}
|
|
8113
|
+
aria-label=${capacityState === "warning" ? `${countLabel}. Near thread limit.` : capacityState === "critical" ? `${countLabel}. Thread limit reached.` : countLabel}
|
|
8114
|
+
>${countLabel}</progress
|
|
8115
|
+
>
|
|
8116
|
+
` : lit.nothing}
|
|
8117
|
+
${usage.expiringSoonCount !== void 0 ? lit.html`
|
|
8118
|
+
<span data-inspector-thread-expiry
|
|
8119
|
+
>${usage.expiringSoonCount} Expiring Soon</span
|
|
8120
|
+
>
|
|
8121
|
+
` : lit.nothing}
|
|
8122
|
+
</div>
|
|
8123
|
+
` : lit.nothing}
|
|
8124
|
+
${threadsFooterAction ? this.renderInspectorAction(threadsFooterAction, "threads-footer", capacityState === "warning" || capacityState === "critical" ? "Upgrade Your Plan" : threadsFooterAction.label) : lit.nothing}
|
|
8125
|
+
</footer>
|
|
7022
8126
|
`;
|
|
7023
8127
|
}
|
|
7024
8128
|
renderThreadsView() {
|
|
7025
|
-
var _visibleThreads$find, _this$_core$runtimeUr, _this$
|
|
7026
|
-
|
|
7027
|
-
const { displayThreads, threadsErrorMessage } = this.getActiveThreadsState();
|
|
7028
|
-
const
|
|
7029
|
-
const
|
|
8129
|
+
var _visibleThreads$find, _this$_core$runtimeUr, _this$_core6, _this$_core$headers, _this$_core7, _this$_core8, _this$liveMessageVers2, _this$agentEvents$get6;
|
|
8130
|
+
const locked = !this.areThreadEndpointsAvailable();
|
|
8131
|
+
const { displayThreads, threadsErrorMessage, threadsLoading } = this.getActiveThreadsState();
|
|
8132
|
+
const loadingWithoutRows = !locked && threadsLoading && !threadsErrorMessage && displayThreads.length === 0;
|
|
8133
|
+
const showingExamples = this.shouldRenderExampleThreads(locked, displayThreads, threadsErrorMessage, threadsLoading);
|
|
8134
|
+
const visibleThreads = !locked && (threadsErrorMessage || loadingWithoutRows) ? [] : showingExamples ? THREADS_EXAMPLE_THREADS : displayThreads;
|
|
7030
8135
|
if (showingExamples) this.trackThreadsExampleViewedOnce();
|
|
7031
8136
|
const selectedThread = this.selectedThreadId != null ? (_visibleThreads$find = visibleThreads.find((t) => t.id === this.selectedThreadId)) !== null && _visibleThreads$find !== void 0 ? _visibleThreads$find : null : null;
|
|
7032
|
-
const
|
|
7033
|
-
if (
|
|
8137
|
+
const selectedThreadIsLocalExample = selectedThread !== null && selectedThread.id === this.selectedLocalExampleThreadId;
|
|
8138
|
+
if (locked) this.trackThreadsViewStateOnce("locked");
|
|
8139
|
+
else if (!threadsErrorMessage && (!threadsLoading || displayThreads.length > 0)) this.trackThreadsViewStateOnce(displayThreads.length === 0 ? "empty_enabled" : "enabled");
|
|
7034
8140
|
return lit.html`
|
|
7035
8141
|
<div style="display:flex;height:100%;overflow:hidden;flex-direction:column;">
|
|
7036
8142
|
<div style="display:flex;min-height:0;flex:1;overflow:hidden;">
|
|
@@ -7039,14 +8145,16 @@ ${argsString}</pre
|
|
|
7039
8145
|
style="width:${this.threadListWidth}px;flex-shrink:0;overflow:hidden;display:flex;flex-direction:column;border-right:1px solid #DBDBE5;"
|
|
7040
8146
|
>
|
|
7041
8147
|
<cpk-thread-list
|
|
7042
|
-
style="height:
|
|
8148
|
+
style="min-height:0;flex:1;"
|
|
7043
8149
|
.threads=${visibleThreads}
|
|
7044
8150
|
.selectedThreadId=${this.selectedThreadId}
|
|
7045
8151
|
.errorMessage=${threadsErrorMessage}
|
|
8152
|
+
.suppressEmptyState=${loadingWithoutRows}
|
|
7046
8153
|
@threadSelected=${(e) => {
|
|
7047
8154
|
this.handleThreadsThreadSelected(e.detail, showingExamples);
|
|
7048
8155
|
}}
|
|
7049
8156
|
></cpk-thread-list>
|
|
8157
|
+
${this.renderThreadsUsageFooter()}
|
|
7050
8158
|
</div>
|
|
7051
8159
|
|
|
7052
8160
|
<!-- Resize divider -->
|
|
@@ -7060,19 +8168,53 @@ ${argsString}</pre
|
|
|
7060
8168
|
|
|
7061
8169
|
<!-- Center + right: thread details or empty state -->
|
|
7062
8170
|
<div style="flex:1;min-width:0;overflow:hidden;display:flex;position:relative;">
|
|
7063
|
-
${
|
|
8171
|
+
${!locked && threadsErrorMessage ? lit.html`
|
|
8172
|
+
<div
|
|
8173
|
+
role="alert"
|
|
8174
|
+
style="
|
|
8175
|
+
display: flex;
|
|
8176
|
+
flex: 1;
|
|
8177
|
+
flex-direction: column;
|
|
8178
|
+
align-items: center;
|
|
8179
|
+
justify-content: center;
|
|
8180
|
+
gap: 6px;
|
|
8181
|
+
padding: 24px;
|
|
8182
|
+
color: #c0333a;
|
|
8183
|
+
text-align: center;
|
|
8184
|
+
"
|
|
8185
|
+
>
|
|
8186
|
+
<strong style="font-size:13px;">Failed to load threads</strong>
|
|
8187
|
+
<span style="max-width:440px;font-size:12px;line-height:1.5;"
|
|
8188
|
+
>${threadsErrorMessage}</span
|
|
8189
|
+
>
|
|
8190
|
+
</div>
|
|
8191
|
+
` : loadingWithoutRows ? lit.html`
|
|
8192
|
+
<div
|
|
8193
|
+
role="status"
|
|
8194
|
+
style="
|
|
8195
|
+
display: flex;
|
|
8196
|
+
flex: 1;
|
|
8197
|
+
align-items: center;
|
|
8198
|
+
justify-content: center;
|
|
8199
|
+
color: #57575b;
|
|
8200
|
+
font-size: 13px;
|
|
8201
|
+
"
|
|
8202
|
+
>
|
|
8203
|
+
Loading threads…
|
|
8204
|
+
</div>
|
|
8205
|
+
` : selectedThread ? lit.html`<cpk-thread-details
|
|
7064
8206
|
style="flex:1;min-width:0;"
|
|
7065
8207
|
.threadId=${selectedThread.id}
|
|
7066
8208
|
.thread=${selectedThread}
|
|
7067
|
-
.provider=${
|
|
7068
|
-
.runtimeUrl=${(_this$_core$runtimeUr = (_this$
|
|
7069
|
-
.headers=${(_this$_core$headers = (_this$
|
|
7070
|
-
.threadInspectionAvailable=${
|
|
8209
|
+
.provider=${selectedThreadIsLocalExample ? this.getExampleThreadProvider(selectedThread.id) : null}
|
|
8210
|
+
.runtimeUrl=${selectedThreadIsLocalExample ? "" : (_this$_core$runtimeUr = (_this$_core6 = this._core) === null || _this$_core6 === void 0 ? void 0 : _this$_core6.runtimeUrl) !== null && _this$_core$runtimeUr !== void 0 ? _this$_core$runtimeUr : ""}
|
|
8211
|
+
.headers=${(_this$_core$headers = (_this$_core7 = this._core) === null || _this$_core7 === void 0 ? void 0 : _this$_core7.headers) !== null && _this$_core$headers !== void 0 ? _this$_core$headers : {}}
|
|
8212
|
+
.threadInspectionAvailable=${selectedThreadIsLocalExample || this.areThreadEndpointsAvailable() && ((_this$_core8 = this._core) === null || _this$_core8 === void 0 || (_this$_core8 = _this$_core8.threadEndpoints) === null || _this$_core8 === void 0 ? void 0 : _this$_core8.inspect) !== false}
|
|
7071
8213
|
.liveMessageVersion=${(_this$liveMessageVers2 = this.liveMessageVersion.get(selectedThread.id)) !== null && _this$liveMessageVers2 !== void 0 ? _this$liveMessageVers2 : 0}
|
|
7072
8214
|
.agentStateInput=${this.getLatestStateForAgent(selectedThread.agentId)}
|
|
7073
8215
|
.agentEventsInput=${(_this$agentEvents$get6 = this.agentEvents.get(selectedThread.agentId)) !== null && _this$agentEvents$get6 !== void 0 ? _this$agentEvents$get6 : []}
|
|
7074
8216
|
></cpk-thread-details>
|
|
7075
|
-
${
|
|
8217
|
+
${selectedThreadIsLocalExample ? this.renderThreadsExampleTour() : lit.nothing}` : showingExamples ? this.renderThreadsExampleOverview(locked) : lit.html`
|
|
7076
8218
|
<div
|
|
7077
8219
|
style="
|
|
7078
8220
|
flex: 1;
|
|
@@ -7081,7 +8223,7 @@ ${argsString}</pre
|
|
|
7081
8223
|
align-items: center;
|
|
7082
8224
|
justify-content: center;
|
|
7083
8225
|
gap: 8px;
|
|
7084
|
-
color: #
|
|
8226
|
+
color: #68686e;
|
|
7085
8227
|
"
|
|
7086
8228
|
>
|
|
7087
8229
|
<svg
|
|
@@ -7611,9 +8753,12 @@ ${prettyEvent}</pre
|
|
|
7611
8753
|
`;
|
|
7612
8754
|
}
|
|
7613
8755
|
handleMenuSelect(key) {
|
|
7614
|
-
if (
|
|
8756
|
+
if (!this.menuItems.some((item) => item.key === key)) return;
|
|
7615
8757
|
const previousMenu = this.selectedMenu;
|
|
8758
|
+
this.pendingPersistedMenu = null;
|
|
7616
8759
|
this.selectedMenu = key;
|
|
8760
|
+
this.settingsOpen = false;
|
|
8761
|
+
this.lastSelectedMenuByGroup[this.getGroupForMenu(key)] = key;
|
|
7617
8762
|
if (key === "agents" && this.selectedContext === "all-agents") {
|
|
7618
8763
|
const agentOptions = this.contextOptions.filter((opt) => opt.key !== "all-agents");
|
|
7619
8764
|
if (agentOptions.length > 0) {
|
|
@@ -7642,8 +8787,8 @@ ${prettyEvent}</pre
|
|
|
7642
8787
|
if (previousMenu !== "memories" && !((_this$core29 = this.core) === null || _this$core29 === void 0 ? void 0 : _this$core29.telemetryDisabled)) trackMemoriesTabClicked(this.getMemoriesTelemetryProps());
|
|
7643
8788
|
}
|
|
7644
8789
|
if (key === "ag-ui-events" || key === "agents") requestAnimationFrame(() => {
|
|
7645
|
-
var _this$
|
|
7646
|
-
const scroller = (_this$
|
|
8790
|
+
var _this$shadowRoot6;
|
|
8791
|
+
const scroller = (_this$shadowRoot6 = this.shadowRoot) === null || _this$shadowRoot6 === void 0 ? void 0 : _this$shadowRoot6.getElementById("cpk-main-scroll");
|
|
7647
8792
|
if (scroller) scroller.scrollTop = 0;
|
|
7648
8793
|
});
|
|
7649
8794
|
this.contextMenuOpen = false;
|
|
@@ -7661,6 +8806,7 @@ ${prettyEvent}</pre
|
|
|
7661
8806
|
if (this.selectedContext !== key) {
|
|
7662
8807
|
this.selectedContext = key;
|
|
7663
8808
|
this.expandedRows.clear();
|
|
8809
|
+
this.autoSelectLatestThread();
|
|
7664
8810
|
}
|
|
7665
8811
|
this.contextMenuOpen = false;
|
|
7666
8812
|
this.persistState();
|
|
@@ -8050,9 +9196,9 @@ ${prettyEvent}</pre
|
|
|
8050
9196
|
let currentSchema = schema;
|
|
8051
9197
|
let def = currentSchema._def;
|
|
8052
9198
|
while (def.typeName === "ZodOptional" || def.typeName === "ZodNullable" || def.typeName === "ZodDefault") {
|
|
8053
|
-
var
|
|
9199
|
+
var _ref10;
|
|
8054
9200
|
if (def.typeName === "ZodDefault" && def.defaultValue !== void 0) info.defaultValue = typeof def.defaultValue === "function" ? def.defaultValue() : def.defaultValue;
|
|
8055
|
-
currentSchema = (
|
|
9201
|
+
currentSchema = (_ref10 = def.innerType) !== null && _ref10 !== void 0 ? _ref10 : currentSchema;
|
|
8056
9202
|
if (!(currentSchema === null || currentSchema === void 0 ? void 0 : currentSchema._def)) break;
|
|
8057
9203
|
def = currentSchema._def;
|
|
8058
9204
|
}
|
|
@@ -8222,13 +9368,13 @@ ${prettyEvent}</pre
|
|
|
8222
9368
|
if (typeof value === "function") return value.toString();
|
|
8223
9369
|
try {
|
|
8224
9370
|
return JSON.stringify(value, null, 2);
|
|
8225
|
-
} catch (
|
|
9371
|
+
} catch (_unused21) {
|
|
8226
9372
|
return String(value);
|
|
8227
9373
|
}
|
|
8228
9374
|
}
|
|
8229
9375
|
async copyContextValue(value, contextId) {
|
|
8230
|
-
var _navigator$
|
|
8231
|
-
if (typeof navigator === "undefined" || !((_navigator$
|
|
9376
|
+
var _navigator$clipboard3;
|
|
9377
|
+
if (typeof navigator === "undefined" || !((_navigator$clipboard3 = navigator.clipboard) === null || _navigator$clipboard3 === void 0 ? void 0 : _navigator$clipboard3.writeText)) {
|
|
8232
9378
|
console.warn("Clipboard API is not available in this environment.");
|
|
8233
9379
|
return;
|
|
8234
9380
|
}
|
|
@@ -8439,7 +9585,7 @@ ${prettyEvent}</pre
|
|
|
8439
9585
|
try {
|
|
8440
9586
|
const url = new URL(href, typeof window !== "undefined" ? window.location.href : "https://copilotkit.ai");
|
|
8441
9587
|
return url.protocol === "http:" || url.protocol === "https:" || url.protocol === "mailto:";
|
|
8442
|
-
} catch (
|
|
9588
|
+
} catch (_unused22) {
|
|
8443
9589
|
return false;
|
|
8444
9590
|
}
|
|
8445
9591
|
}
|
|
@@ -8469,7 +9615,7 @@ ${prettyEvent}</pre
|
|
|
8469
9615
|
}
|
|
8470
9616
|
if (isRootRelative) return `${url.pathname}${url.search}${url.hash}`;
|
|
8471
9617
|
return url.toString();
|
|
8472
|
-
} catch (
|
|
9618
|
+
} catch (_unused23) {
|
|
8473
9619
|
return href;
|
|
8474
9620
|
}
|
|
8475
9621
|
}
|
|
@@ -8488,7 +9634,7 @@ ${prettyEvent}</pre
|
|
|
8488
9634
|
const parsed = JSON.parse(raw);
|
|
8489
9635
|
if (parsed && typeof parsed.timestamp === "string") return parsed.timestamp;
|
|
8490
9636
|
return null;
|
|
8491
|
-
} catch (
|
|
9637
|
+
} catch (_unused24) {}
|
|
8492
9638
|
return null;
|
|
8493
9639
|
}
|
|
8494
9640
|
persistAnnouncementTimestamp(timestamp) {
|
|
@@ -8496,7 +9642,7 @@ ${prettyEvent}</pre
|
|
|
8496
9642
|
try {
|
|
8497
9643
|
const payload = JSON.stringify({ timestamp });
|
|
8498
9644
|
window.localStorage.setItem(ANNOUNCEMENT_STORAGE_KEY, payload);
|
|
8499
|
-
} catch (
|
|
9645
|
+
} catch (_unused25) {}
|
|
8500
9646
|
}
|
|
8501
9647
|
markAnnouncementSeen() {
|
|
8502
9648
|
this.hasUnseenAnnouncement = false;
|
|
@@ -8678,7 +9824,7 @@ ${prettyEvent}</pre
|
|
|
8678
9824
|
align-items: center;
|
|
8679
9825
|
justify-content: center;
|
|
8680
9826
|
border-radius: 6px;
|
|
8681
|
-
color: #
|
|
9827
|
+
color: #68686e;
|
|
8682
9828
|
cursor: pointer;
|
|
8683
9829
|
transition:
|
|
8684
9830
|
background 120ms ease,
|
|
@@ -8699,7 +9845,7 @@ ${prettyEvent}</pre
|
|
|
8699
9845
|
background: none;
|
|
8700
9846
|
border: none;
|
|
8701
9847
|
cursor: pointer;
|
|
8702
|
-
color: #
|
|
9848
|
+
color: #68686e;
|
|
8703
9849
|
width: 28px;
|
|
8704
9850
|
height: 28px;
|
|
8705
9851
|
display: flex;
|
|
@@ -8748,7 +9894,7 @@ ${prettyEvent}</pre
|
|
|
8748
9894
|
height: 24px;
|
|
8749
9895
|
border-radius: 50%;
|
|
8750
9896
|
background-color: #f0f0f4;
|
|
8751
|
-
color: #
|
|
9897
|
+
color: #68686e;
|
|
8752
9898
|
flex-shrink: 0;
|
|
8753
9899
|
transition: transform 0.2s;
|
|
8754
9900
|
}
|
|
@@ -8865,7 +10011,7 @@ ${prettyEvent}</pre
|
|
|
8865
10011
|
}
|
|
8866
10012
|
|
|
8867
10013
|
.announcement-content a {
|
|
8868
|
-
color: #
|
|
10014
|
+
color: #5558b2;
|
|
8869
10015
|
text-decoration: underline;
|
|
8870
10016
|
}
|
|
8871
10017
|
|
|
@@ -8989,7 +10135,7 @@ ${prettyEvent}</pre
|
|
|
8989
10135
|
font-family: "Plus Jakarta Sans", system-ui, sans-serif;
|
|
8990
10136
|
font-size: 12px;
|
|
8991
10137
|
font-weight: 500;
|
|
8992
|
-
color: #
|
|
10138
|
+
color: #5558b2;
|
|
8993
10139
|
cursor: pointer;
|
|
8994
10140
|
text-align: center;
|
|
8995
10141
|
}
|
|
@@ -9060,14 +10206,14 @@ ${prettyEvent}</pre
|
|
|
9060
10206
|
align-items: center;
|
|
9061
10207
|
}
|
|
9062
10208
|
.cpk-tab-active .cpk-tab-icon {
|
|
9063
|
-
color: #
|
|
10209
|
+
color: #5558b2;
|
|
9064
10210
|
}
|
|
9065
10211
|
.cpk-tab-inactive {
|
|
9066
10212
|
background-color: transparent;
|
|
9067
10213
|
color: #2b2b2b;
|
|
9068
10214
|
}
|
|
9069
10215
|
.cpk-tab-inactive .cpk-tab-icon {
|
|
9070
|
-
color: #
|
|
10216
|
+
color: #68686e;
|
|
9071
10217
|
}
|
|
9072
10218
|
.cpk-tab-inactive:hover {
|
|
9073
10219
|
background-color: rgba(190, 194, 255, 0.08);
|
|
@@ -9100,24 +10246,40 @@ ${prettyEvent}</pre
|
|
|
9100
10246
|
width: 100%;
|
|
9101
10247
|
height: 100%;
|
|
9102
10248
|
object-fit: cover;
|
|
9103
|
-
opacity: 0;
|
|
9104
|
-
transition: opacity 220ms ease;
|
|
9105
|
-
}
|
|
9106
|
-
.cpk-threads-overview-video[data-ready="true"] {
|
|
9107
|
-
opacity: 1;
|
|
9108
10249
|
}
|
|
9109
10250
|
|
|
9110
|
-
/* ── Header
|
|
9111
|
-
.drag-handle > div
|
|
9112
|
-
color: #
|
|
10251
|
+
/* ── Header controls on the dark account strip ──────────────── */
|
|
10252
|
+
.drag-handle > div[data-inspector-account-strip] button {
|
|
10253
|
+
color: #afafb7 !important;
|
|
10254
|
+
cursor: pointer;
|
|
9113
10255
|
}
|
|
9114
|
-
.drag-handle > div
|
|
9115
|
-
|
|
9116
|
-
|
|
10256
|
+
.drag-handle > div[data-inspector-account-strip] button,
|
|
10257
|
+
.inspector-nav-control,
|
|
10258
|
+
[data-inspector-thread-cta] {
|
|
10259
|
+
outline: 2px solid transparent;
|
|
10260
|
+
outline-offset: 2px;
|
|
9117
10261
|
}
|
|
9118
|
-
.drag-handle > div
|
|
10262
|
+
.drag-handle > div[data-inspector-account-strip] button:hover {
|
|
10263
|
+
background-color: rgba(255, 255, 255, 0.12) !important;
|
|
10264
|
+
color: #ffffff !important;
|
|
10265
|
+
}
|
|
10266
|
+
.drag-handle > div[data-inspector-account-strip] button:focus-visible {
|
|
9119
10267
|
outline-color: #bec2ff !important;
|
|
9120
10268
|
}
|
|
10269
|
+
.drag-handle > div[data-inspector-account-strip] button:focus,
|
|
10270
|
+
.drag-handle > div[data-inspector-account-strip] button:focus-visible {
|
|
10271
|
+
outline: 2px solid #bec2ff !important;
|
|
10272
|
+
outline-offset: 2px;
|
|
10273
|
+
}
|
|
10274
|
+
.inspector-nav-control:focus,
|
|
10275
|
+
.inspector-nav-control:focus-visible,
|
|
10276
|
+
[data-inspector-thread-cta]:focus,
|
|
10277
|
+
[data-inspector-thread-cta]:focus-visible,
|
|
10278
|
+
[data-inspector-action-placement="threads-footer"]:focus,
|
|
10279
|
+
[data-inspector-action-placement="threads-footer"]:focus-visible {
|
|
10280
|
+
outline: 2px solid #6430ab !important;
|
|
10281
|
+
outline-offset: 2px;
|
|
10282
|
+
}
|
|
9121
10283
|
|
|
9122
10284
|
/* ── Agent/context dropdown ──────────────────────────────────── */
|
|
9123
10285
|
[data-context-dropdown-root="true"] > button {
|
|
@@ -9129,7 +10291,7 @@ ${prettyEvent}</pre
|
|
|
9129
10291
|
background-color: #f7f7f9 !important;
|
|
9130
10292
|
}
|
|
9131
10293
|
[data-context-dropdown-root="true"] > button > span:last-child {
|
|
9132
|
-
color: #
|
|
10294
|
+
color: #68686e !important;
|
|
9133
10295
|
}
|
|
9134
10296
|
[data-context-dropdown-root="true"] > div {
|
|
9135
10297
|
border-color: #dbdbe5 !important;
|
|
@@ -9139,6 +10301,28 @@ ${prettyEvent}</pre
|
|
|
9139
10301
|
[data-context-dropdown-root="true"] > div button:focus {
|
|
9140
10302
|
background-color: #f7f7f9 !important;
|
|
9141
10303
|
}
|
|
10304
|
+
[data-inspector-account-strip]
|
|
10305
|
+
.inspector-agent-selector
|
|
10306
|
+
> [data-context-dropdown-root="true"]
|
|
10307
|
+
> button {
|
|
10308
|
+
border-color: rgba(255, 255, 255, 0.28) !important;
|
|
10309
|
+
background-color: transparent !important;
|
|
10310
|
+
color: #e7e7ec !important;
|
|
10311
|
+
}
|
|
10312
|
+
[data-inspector-account-strip]
|
|
10313
|
+
.inspector-agent-selector
|
|
10314
|
+
> [data-context-dropdown-root="true"]
|
|
10315
|
+
> button:hover {
|
|
10316
|
+
border-color: rgba(190, 194, 255, 0.7) !important;
|
|
10317
|
+
background-color: rgba(255, 255, 255, 0.08) !important;
|
|
10318
|
+
}
|
|
10319
|
+
[data-inspector-account-strip]
|
|
10320
|
+
.inspector-agent-selector
|
|
10321
|
+
> [data-context-dropdown-root="true"]
|
|
10322
|
+
> button
|
|
10323
|
+
> span:last-child {
|
|
10324
|
+
color: #afafb7 !important;
|
|
10325
|
+
}
|
|
9142
10326
|
|
|
9143
10327
|
/* ── Status bar (bottom chrome) ──────────────────────────────── */
|
|
9144
10328
|
.inspector-window > div > div:last-child {
|
|
@@ -9148,7 +10332,7 @@ ${prettyEvent}</pre
|
|
|
9148
10332
|
|
|
9149
10333
|
/* ── Resize handle ───────────────────────────────────────────── */
|
|
9150
10334
|
.resize-handle {
|
|
9151
|
-
color: #
|
|
10335
|
+
color: #68686e !important;
|
|
9152
10336
|
}
|
|
9153
10337
|
.resize-handle:hover {
|
|
9154
10338
|
color: #57575b !important;
|
|
@@ -9169,7 +10353,7 @@ ${prettyEvent}</pre
|
|
|
9169
10353
|
/* Copy "copied" state: generic green → brand mint */
|
|
9170
10354
|
button[class*="bg-green-100"] {
|
|
9171
10355
|
background-color: rgba(133, 236, 206, 0.2) !important;
|
|
9172
|
-
color: #
|
|
10356
|
+
color: #087653 !important;
|
|
9173
10357
|
}
|
|
9174
10358
|
|
|
9175
10359
|
/* ── Agents tab ──────────────────────────────────────────────── */
|
|
@@ -9178,14 +10362,14 @@ ${prettyEvent}</pre
|
|
|
9178
10362
|
background-color: rgba(190, 194, 255, 0.15) !important;
|
|
9179
10363
|
}
|
|
9180
10364
|
span[class*="text-blue-600"] {
|
|
9181
|
-
color: #
|
|
10365
|
+
color: #5558b2 !important;
|
|
9182
10366
|
}
|
|
9183
10367
|
/* Running badge: emerald → mint */
|
|
9184
10368
|
span[class*="bg-emerald-50"] {
|
|
9185
10369
|
background-color: rgba(133, 236, 206, 0.15) !important;
|
|
9186
10370
|
}
|
|
9187
10371
|
span[class*="text-emerald-700"] {
|
|
9188
|
-
color: #
|
|
10372
|
+
color: #087653 !important;
|
|
9189
10373
|
}
|
|
9190
10374
|
/* Running status dot */
|
|
9191
10375
|
span[class*="bg-emerald-500"] {
|
|
@@ -9205,7 +10389,7 @@ ${prettyEvent}</pre
|
|
|
9205
10389
|
span[class*="bg-green-100"][class*="text-green-800"] {
|
|
9206
10390
|
background-color: rgba(133, 236, 206, 0.18) !important;
|
|
9207
10391
|
border: 1px solid rgba(133, 236, 206, 0.4) !important;
|
|
9208
|
-
color: #
|
|
10392
|
+
color: #087653 !important;
|
|
9209
10393
|
}
|
|
9210
10394
|
/* Tool role badge (amber → orange brand) */
|
|
9211
10395
|
span[class*="bg-amber-100"][class*="text-amber-800"] {
|
|
@@ -9246,13 +10430,17 @@ ${prettyEvent}</pre
|
|
|
9246
10430
|
> div:last-child:has(div[class*="bg-emerald-50"]) {
|
|
9247
10431
|
background-color: rgba(91, 228, 187, 0.08) !important;
|
|
9248
10432
|
border-top-color: rgba(91, 228, 187, 0.3) !important;
|
|
9249
|
-
color: #
|
|
10433
|
+
color: #087653 !important;
|
|
9250
10434
|
}
|
|
9251
10435
|
/* Inner badge — slightly more opaque on the mint bg */
|
|
9252
10436
|
div[class*="bg-emerald-50"][class*="border-emerald-200"] {
|
|
9253
10437
|
background-color: rgba(91, 228, 187, 0.12) !important;
|
|
9254
10438
|
border-color: rgba(91, 228, 187, 0.4) !important;
|
|
9255
|
-
color: #
|
|
10439
|
+
color: #087653 !important;
|
|
10440
|
+
}
|
|
10441
|
+
div[class*="bg-emerald-50"][class*="border-emerald-200"]
|
|
10442
|
+
span[class*="opacity-80"] {
|
|
10443
|
+
opacity: 1 !important;
|
|
9256
10444
|
}
|
|
9257
10445
|
/* Icon bubble inside connected badge → mint tint */
|
|
9258
10446
|
div[class*="bg-emerald-50"] span[class*="bg-white"] {
|
|
@@ -9267,7 +10455,7 @@ ${prettyEvent}</pre
|
|
|
9267
10455
|
span[class*="bg-slate-900"],
|
|
9268
10456
|
div[class*="bg-slate-900"] {
|
|
9269
10457
|
background-color: #eee6fe !important;
|
|
9270
|
-
color: #
|
|
10458
|
+
color: #5558b2 !important;
|
|
9271
10459
|
}
|
|
9272
10460
|
span[class*="text-slate-800"],
|
|
9273
10461
|
div[class*="text-slate-800"] {
|