@copilotkit/web-inspector 1.76.0 → 1.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +223 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +224 -126
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +248 -134
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/persistence.cjs +24 -7
- package/dist/lib/persistence.cjs.map +1 -1
- package/dist/lib/persistence.mjs +24 -8
- package/dist/lib/persistence.mjs.map +1 -1
- package/dist/lib/telemetry.cjs.map +1 -1
- package/dist/lib/telemetry.mjs.map +1 -1
- 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 +3 -3
package/dist/index.cjs
CHANGED
|
@@ -126,8 +126,10 @@ const HUD_LEARNING_LABEL = "Automatic Learning";
|
|
|
126
126
|
const HUD_LEARN_MORE_LABEL = "Click to learn more";
|
|
127
127
|
const INSPECTOR_DISMISSAL_MS = {
|
|
128
128
|
day: 1440 * 60 * 1e3,
|
|
129
|
-
week:
|
|
129
|
+
week: 10080 * 60 * 1e3,
|
|
130
|
+
forever: require_persistence.INSPECTOR_DISMISSAL_MAX_DURATION_MS
|
|
130
131
|
};
|
|
132
|
+
const MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
|
|
131
133
|
const LAUNCHER_SIGNALS = {
|
|
132
134
|
"whats-new": {
|
|
133
135
|
tone: "news",
|
|
@@ -1866,6 +1868,13 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
1866
1868
|
flex-direction: column;
|
|
1867
1869
|
gap: 12px;
|
|
1868
1870
|
}
|
|
1871
|
+
.cpk-td__panel--conversation {
|
|
1872
|
+
width: 100%;
|
|
1873
|
+
max-width: 800px;
|
|
1874
|
+
min-width: 0;
|
|
1875
|
+
margin-inline: auto;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1869
1878
|
.cpk-td__panel > * {
|
|
1870
1879
|
flex-shrink: 0;
|
|
1871
1880
|
}
|
|
@@ -1984,123 +1993,148 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
1984
1993
|
border: 0;
|
|
1985
1994
|
}
|
|
1986
1995
|
|
|
1987
|
-
/*
|
|
1996
|
+
/* Tool activity stays compact in the conversation; raw data is opt-in. */
|
|
1988
1997
|
.cpk-td__tool-block {
|
|
1989
|
-
|
|
1990
|
-
|
|
1998
|
+
min-width: 0;
|
|
1999
|
+
}
|
|
2000
|
+
.cpk-td__tool-block:has(> .cpk-td__tool-header[aria-expanded="true"]) {
|
|
2001
|
+
border-radius: 10px;
|
|
1991
2002
|
overflow: hidden;
|
|
2003
|
+
background: #ffffff;
|
|
2004
|
+
box-shadow: 0 0 0 1px oklch(0 0 0 / 0.08);
|
|
1992
2005
|
}
|
|
1993
|
-
|
|
1994
2006
|
.cpk-td__tool-header {
|
|
1995
2007
|
display: flex;
|
|
1996
2008
|
align-items: center;
|
|
1997
|
-
gap:
|
|
1998
|
-
padding: 12px;
|
|
1999
|
-
background:
|
|
2000
|
-
color: #
|
|
2009
|
+
gap: 10px;
|
|
2010
|
+
padding: 10px 12px;
|
|
2011
|
+
background: transparent;
|
|
2012
|
+
color: #68686e;
|
|
2001
2013
|
cursor: pointer;
|
|
2002
2014
|
width: 100%;
|
|
2003
2015
|
border: 0;
|
|
2004
2016
|
font-family: inherit;
|
|
2005
2017
|
text-align: left;
|
|
2006
|
-
font-size:
|
|
2007
|
-
|
|
2018
|
+
font-size: 12px;
|
|
2019
|
+
}
|
|
2020
|
+
.cpk-td__tool-header > svg {
|
|
2021
|
+
flex-shrink: 0;
|
|
2008
2022
|
}
|
|
2009
|
-
|
|
2010
2023
|
.cpk-td__tool-header:focus-visible {
|
|
2011
2024
|
outline: 2px solid var(--cpk-primary-color, #7076b3);
|
|
2012
2025
|
outline-offset: -2px;
|
|
2013
2026
|
}
|
|
2014
|
-
|
|
2015
2027
|
.cpk-td__tool-header:hover {
|
|
2016
|
-
background: #
|
|
2028
|
+
background: #f7f7f9;
|
|
2029
|
+
border-radius: 8px;
|
|
2030
|
+
}
|
|
2031
|
+
.cpk-td__tool-block:has(> .cpk-td__tool-header[aria-expanded="true"])
|
|
2032
|
+
.cpk-td__tool-header:hover {
|
|
2033
|
+
border-radius: 0;
|
|
2034
|
+
}
|
|
2035
|
+
.cpk-td__tool-copy {
|
|
2036
|
+
flex: 1;
|
|
2037
|
+
min-width: 0;
|
|
2038
|
+
}
|
|
2039
|
+
.cpk-td__tool-title {
|
|
2040
|
+
display: flex;
|
|
2041
|
+
flex-wrap: wrap;
|
|
2042
|
+
align-items: baseline;
|
|
2043
|
+
min-width: 0;
|
|
2017
2044
|
}
|
|
2018
|
-
|
|
2019
2045
|
.cpk-td__tool-name {
|
|
2020
2046
|
font-size: 13px;
|
|
2021
2047
|
font-weight: 500;
|
|
2022
|
-
|
|
2048
|
+
line-height: 1.6;
|
|
2049
|
+
color: #57575b;
|
|
2023
2050
|
overflow-wrap: anywhere;
|
|
2024
|
-
min-width: 0;
|
|
2025
|
-
flex: 1;
|
|
2026
2051
|
}
|
|
2027
|
-
|
|
2028
2052
|
.cpk-td__tool-status {
|
|
2029
|
-
|
|
2030
|
-
font-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
background: #d1fae5;
|
|
2034
|
-
color: #065f46;
|
|
2053
|
+
display: block;
|
|
2054
|
+
font-size: 11px;
|
|
2055
|
+
line-height: 1.6;
|
|
2056
|
+
color: #68686e;
|
|
2035
2057
|
}
|
|
2036
|
-
|
|
2037
2058
|
.cpk-td__tool-status--pending {
|
|
2038
|
-
background: #fef3c7;
|
|
2039
2059
|
color: #8a5900;
|
|
2040
2060
|
}
|
|
2041
|
-
|
|
2042
2061
|
.cpk-td__tool-chevron {
|
|
2043
|
-
|
|
2044
|
-
|
|
2062
|
+
flex-shrink: 0;
|
|
2063
|
+
transition: transform 150ms;
|
|
2064
|
+
}
|
|
2065
|
+
.cpk-td__tool-header[aria-expanded="true"] .cpk-td__tool-chevron {
|
|
2066
|
+
transform: rotate(90deg);
|
|
2067
|
+
}
|
|
2068
|
+
.cpk-td__tool-name--streaming {
|
|
2069
|
+
width: fit-content;
|
|
2070
|
+
background: linear-gradient(100deg, #68686e 35%, #c9c9d5 50%, #68686e 65%);
|
|
2071
|
+
background-size: 250% 100%;
|
|
2072
|
+
background-clip: text;
|
|
2073
|
+
-webkit-background-clip: text;
|
|
2074
|
+
color: transparent;
|
|
2075
|
+
animation: cpk-tool-shimmer 2s linear infinite;
|
|
2076
|
+
}
|
|
2077
|
+
@keyframes cpk-tool-shimmer {
|
|
2078
|
+
from {
|
|
2079
|
+
background-position: 150% 0;
|
|
2080
|
+
}
|
|
2081
|
+
to {
|
|
2082
|
+
background-position: -100% 0;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2086
|
+
.cpk-td__tool-name--streaming {
|
|
2087
|
+
animation: none;
|
|
2088
|
+
background: none;
|
|
2089
|
+
color: inherit;
|
|
2090
|
+
}
|
|
2091
|
+
.cpk-td__tool-chevron {
|
|
2092
|
+
transition: none;
|
|
2093
|
+
}
|
|
2045
2094
|
}
|
|
2046
|
-
|
|
2047
2095
|
.cpk-td__tool-body {
|
|
2048
|
-
|
|
2096
|
+
min-width: 0;
|
|
2097
|
+
padding-top: 4px;
|
|
2049
2098
|
border-top: 1px solid #e9e9ef;
|
|
2050
|
-
background: #ffffff;
|
|
2051
2099
|
}
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
font-family: "Spline Sans Mono", monospace;
|
|
2055
|
-
font-size: 9px;
|
|
2056
|
-
font-weight: 500;
|
|
2100
|
+
.cpk-td__tool-identifier {
|
|
2101
|
+
margin-left: 0.35em;
|
|
2057
2102
|
color: #68686e;
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2103
|
+
font:
|
|
2104
|
+
11px/1.6 "Spline Sans Mono",
|
|
2105
|
+
monospace;
|
|
2106
|
+
overflow-wrap: anywhere;
|
|
2061
2107
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2108
|
+
.cpk-td__tool-data {
|
|
2109
|
+
display: grid;
|
|
2110
|
+
gap: 0;
|
|
2111
|
+
}
|
|
2112
|
+
.cpk-td__tool-section-label {
|
|
2113
|
+
font-family: "Plus Jakarta Sans", sans-serif;
|
|
2114
|
+
font-size: 12px;
|
|
2115
|
+
font-weight: 600;
|
|
2116
|
+
line-height: 1.65;
|
|
2117
|
+
color: #68686e;
|
|
2064
2118
|
margin: 0;
|
|
2065
|
-
|
|
2119
|
+
padding: 8px 12px;
|
|
2120
|
+
}
|
|
2121
|
+
.cpk-td__tool-body .cpk-json-block {
|
|
2066
2122
|
font-size: 12px;
|
|
2067
|
-
background: #f7f7f9;
|
|
2068
|
-
padding: 10px 12px;
|
|
2069
|
-
border-radius: 6px;
|
|
2070
|
-
overflow-x: auto;
|
|
2071
|
-
white-space: pre-wrap;
|
|
2072
|
-
overflow-wrap: anywhere;
|
|
2073
|
-
word-break: normal;
|
|
2074
|
-
color: #010507;
|
|
2075
2123
|
line-height: 1.65;
|
|
2076
2124
|
}
|
|
2077
|
-
|
|
2078
|
-
|
|
2125
|
+
.cpk-td__tool-result {
|
|
2126
|
+
border-top: 1px solid #e9e9ef;
|
|
2127
|
+
}
|
|
2079
2128
|
.cpk-td__tool-group {
|
|
2080
|
-
|
|
2081
|
-
border-radius: 7px;
|
|
2082
|
-
overflow: hidden;
|
|
2129
|
+
min-width: 0;
|
|
2083
2130
|
}
|
|
2084
|
-
|
|
2085
2131
|
.cpk-td__tool-group-header {
|
|
2086
|
-
padding:
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
font-size: 10px;
|
|
2090
|
-
color: #087653;
|
|
2091
|
-
text-transform: uppercase;
|
|
2092
|
-
font-weight: 500;
|
|
2093
|
-
border-bottom: 1px solid #e9e9ef;
|
|
2132
|
+
padding: 4px 12px;
|
|
2133
|
+
font-size: 11px;
|
|
2134
|
+
color: #68686e;
|
|
2094
2135
|
}
|
|
2095
|
-
|
|
2096
2136
|
.cpk-td__tool-group .cpk-td__tool-block {
|
|
2097
|
-
|
|
2098
|
-
border-bottom: 1px solid #e9e9ef;
|
|
2099
|
-
border-radius: 0;
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
.cpk-td__tool-group .cpk-td__tool-block:last-child {
|
|
2103
|
-
border-bottom: none;
|
|
2137
|
+
margin-left: 12px;
|
|
2104
2138
|
}
|
|
2105
2139
|
|
|
2106
2140
|
/* ── Inline chips (reasoning / state update) ─────────────────────── */
|
|
@@ -2386,17 +2420,24 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
2386
2420
|
}
|
|
2387
2421
|
|
|
2388
2422
|
:host([data-color-scheme="dark"]) .cpk-td__tool-header {
|
|
2423
|
+
background: transparent;
|
|
2424
|
+
}
|
|
2425
|
+
:host([data-color-scheme="dark"])
|
|
2426
|
+
.cpk-td__tool-block:has(> .cpk-td__tool-header[aria-expanded="true"]) {
|
|
2389
2427
|
background: #191c24;
|
|
2428
|
+
box-shadow: 0 0 0 1px oklch(1 0 0 / 0.12);
|
|
2429
|
+
}
|
|
2430
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-body,
|
|
2431
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-result {
|
|
2432
|
+
border-top-color: #343742;
|
|
2390
2433
|
}
|
|
2391
2434
|
:host([data-color-scheme="dark"]) .cpk-td__tool-name {
|
|
2392
2435
|
color: #f4f4f5;
|
|
2393
2436
|
}
|
|
2394
2437
|
:host([data-color-scheme="dark"]) .cpk-td__tool-status {
|
|
2395
|
-
|
|
2396
|
-
color: #6ee7b7;
|
|
2438
|
+
color: #a1a1aa;
|
|
2397
2439
|
}
|
|
2398
2440
|
:host([data-color-scheme="dark"]) .cpk-td__tool-status--pending {
|
|
2399
|
-
background: #3d3019;
|
|
2400
2441
|
color: #fbbf24;
|
|
2401
2442
|
}
|
|
2402
2443
|
|
|
@@ -2619,9 +2660,6 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
2619
2660
|
:host([data-color-scheme="dark"]) .cpk-td__metadata-strip,
|
|
2620
2661
|
:host([data-color-scheme="dark"]) .cpk-td__metadata-pill,
|
|
2621
2662
|
:host([data-color-scheme="dark"]) .cpk-td__try-from-here,
|
|
2622
|
-
:host([data-color-scheme="dark"]) .cpk-td__tool-block,
|
|
2623
|
-
:host([data-color-scheme="dark"]) .cpk-td__tool-header,
|
|
2624
|
-
:host([data-color-scheme="dark"]) .cpk-td__tool-body,
|
|
2625
2663
|
:host([data-color-scheme="dark"]) .cpk-td__event,
|
|
2626
2664
|
:host([data-color-scheme="dark"]) .cpk-td__event-payload,
|
|
2627
2665
|
:host([data-color-scheme="dark"]) .cpk-td__timeline-item,
|
|
@@ -2637,7 +2675,6 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
2637
2675
|
|
|
2638
2676
|
:host([data-color-scheme="dark"]) .cpk-td__metadata-pill,
|
|
2639
2677
|
:host([data-color-scheme="dark"]) .cpk-td__try-from-here,
|
|
2640
|
-
:host([data-color-scheme="dark"]) .cpk-td__tool-block,
|
|
2641
2678
|
:host([data-color-scheme="dark"]) .cpk-td__event,
|
|
2642
2679
|
:host([data-color-scheme="dark"]) .cpk-td__genui-card,
|
|
2643
2680
|
:host([data-color-scheme="dark"]) .cpk-td__timeline-item,
|
|
@@ -2647,16 +2684,10 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
2647
2684
|
background: #191c24;
|
|
2648
2685
|
}
|
|
2649
2686
|
|
|
2650
|
-
:host([data-color-scheme="dark"]) .cpk-td__timeline-header
|
|
2651
|
-
:host([data-color-scheme="dark"]) .cpk-td__tool-body {
|
|
2687
|
+
:host([data-color-scheme="dark"]) .cpk-td__timeline-header {
|
|
2652
2688
|
background: #171a22;
|
|
2653
2689
|
}
|
|
2654
2690
|
|
|
2655
|
-
:host([data-color-scheme="dark"]) .cpk-td__tool-pre {
|
|
2656
|
-
background: #111319;
|
|
2657
|
-
color: #f3f4f8;
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
2691
|
:host([data-color-scheme="dark"]) .cpk-td__panel-toggle:hover,
|
|
2661
2692
|
:host([data-color-scheme="dark"]) .cpk-td__tool-header:hover,
|
|
2662
2693
|
:host([data-color-scheme="dark"]) .cpk-td__timeline-bulk-toggle:hover,
|
|
@@ -2790,7 +2821,6 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
2790
2821
|
:host([data-color-scheme="dark"]) .cpk-td__tab--active,
|
|
2791
2822
|
:host([data-color-scheme="dark"]) .cpk-td__metadata-value,
|
|
2792
2823
|
:host([data-color-scheme="dark"]) .cpk-td__tool-name,
|
|
2793
|
-
:host([data-color-scheme="dark"]) .cpk-td__tool-pre,
|
|
2794
2824
|
:host([data-color-scheme="dark"]) .cpk-td__timeline-title,
|
|
2795
2825
|
:host([data-color-scheme="dark"]) .cpk-td__timeline-bulk-toggle,
|
|
2796
2826
|
:host([data-color-scheme="dark"]) .cpk-td__timeline-details-toggle,
|
|
@@ -2799,6 +2829,28 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
2799
2829
|
color: #f3f4f8;
|
|
2800
2830
|
}
|
|
2801
2831
|
|
|
2832
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-status,
|
|
2833
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-section-label,
|
|
2834
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-identifier,
|
|
2835
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-group-header {
|
|
2836
|
+
color: #aeb1bd;
|
|
2837
|
+
}
|
|
2838
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-name--streaming {
|
|
2839
|
+
color: transparent;
|
|
2840
|
+
background-image: linear-gradient(
|
|
2841
|
+
100deg,
|
|
2842
|
+
#aeb1bd 35%,
|
|
2843
|
+
#ffffff 50%,
|
|
2844
|
+
#aeb1bd 65%
|
|
2845
|
+
);
|
|
2846
|
+
}
|
|
2847
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2848
|
+
:host([data-color-scheme="dark"]) .cpk-td__tool-name--streaming {
|
|
2849
|
+
background: none;
|
|
2850
|
+
color: #f3f4f8;
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2802
2854
|
:host([data-color-scheme="dark"]) .cpk-td__event-payload,
|
|
2803
2855
|
:host([data-color-scheme="dark"]) .cpk-td__json-block,
|
|
2804
2856
|
:host([data-color-scheme="dark"]) .cpk-json-block {
|
|
@@ -3632,7 +3684,7 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
3632
3684
|
` : lit.nothing}
|
|
3633
3685
|
${CpkThreadInspector.TAB_LIST.map((tab) => this._activatedTabs.has(tab.id) ? lit.html`<div
|
|
3634
3686
|
id=${this.panelDomId(tab.id)}
|
|
3635
|
-
class="cpk-td__panel"
|
|
3687
|
+
class="cpk-td__panel ${tab.id === "timeline" && !this._showEventTimeline && this._conversation.length > 0 ? "cpk-td__panel--conversation" : ""}"
|
|
3636
3688
|
role="tabpanel"
|
|
3637
3689
|
aria-labelledby=${this.tabDomId(tab.id)}
|
|
3638
3690
|
?hidden=${this._tab !== tab.id || this._panelInitializing}
|
|
@@ -3906,11 +3958,13 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
3906
3958
|
`;
|
|
3907
3959
|
const items = this.renderItems;
|
|
3908
3960
|
const errors = this.conversationRunErrors(items);
|
|
3961
|
+
const streamingTools = this.streamingToolCallIds();
|
|
3909
3962
|
return this.cachedPanelTpl("timeline-fallback", [
|
|
3910
3963
|
this._conversation,
|
|
3911
3964
|
this._expandedTools,
|
|
3912
3965
|
this._expandedMessages,
|
|
3913
3966
|
JSON.stringify(errors),
|
|
3967
|
+
JSON.stringify([...streamingTools]),
|
|
3914
3968
|
this._expandedTimelineDetails
|
|
3915
3969
|
], () => {
|
|
3916
3970
|
const errorsAfter = /* @__PURE__ */ new Map();
|
|
@@ -3922,10 +3976,29 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
3922
3976
|
const renderErrors = (after) => errorsAfter.get(after)?.map((item) => this.renderTimelineItem(item));
|
|
3923
3977
|
return lit.html`
|
|
3924
3978
|
${renderErrors(-1)}
|
|
3925
|
-
${items.map((item, index) => lit.html`${this.renderRenderItem(item)}${renderErrors(index)}`)}
|
|
3979
|
+
${items.map((item, index) => lit.html`${this.renderRenderItem(item, streamingTools)}${renderErrors(index)}`)}
|
|
3926
3980
|
`;
|
|
3927
3981
|
});
|
|
3928
3982
|
}
|
|
3983
|
+
streamingToolCallIds() {
|
|
3984
|
+
const streaming = /* @__PURE__ */ new Set();
|
|
3985
|
+
let currentThread = false;
|
|
3986
|
+
for (let i = this.agentEventsInput.length - 1; i >= 0; i--) {
|
|
3987
|
+
const event = this.agentEventsInput[i];
|
|
3988
|
+
const payload = event.payload.event && typeof event.payload.event === "object" ? event.payload.event : event.payload;
|
|
3989
|
+
if (event.type === "RUN_STARTED") {
|
|
3990
|
+
streaming.clear();
|
|
3991
|
+
currentThread = payload.threadId === this.threadId;
|
|
3992
|
+
} else if (event.type === "RUN_FINISHED" || event.type === "RUN_ERROR") {
|
|
3993
|
+
streaming.clear();
|
|
3994
|
+
currentThread = false;
|
|
3995
|
+
} else if (currentThread && typeof payload.toolCallId === "string") {
|
|
3996
|
+
if (event.type === "TOOL_CALL_START") streaming.add(payload.toolCallId);
|
|
3997
|
+
if (event.type === "TOOL_CALL_END" || event.type === "TOOL_CALL_RESULT") streaming.delete(payload.toolCallId);
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
return streaming;
|
|
4001
|
+
}
|
|
3929
4002
|
conversationRunErrors(items) {
|
|
3930
4003
|
const positions = /* @__PURE__ */ new Map();
|
|
3931
4004
|
items.forEach((item, index) => {
|
|
@@ -3983,12 +4056,12 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
3983
4056
|
if (cached && cached.key.length === key.length && cached.key.every((v, i) => v === key[i])) return cached.tpl;
|
|
3984
4057
|
return null;
|
|
3985
4058
|
}
|
|
3986
|
-
renderRenderItem(item) {
|
|
4059
|
+
renderRenderItem(item, streamingTools) {
|
|
3987
4060
|
switch (item.type) {
|
|
3988
4061
|
case "user":
|
|
3989
4062
|
case "assistant": return this.renderBubble(item);
|
|
3990
|
-
case "tool_call": return this.renderToolBlock(item);
|
|
3991
|
-
case "tool_call_group": return this.renderToolGroup(item);
|
|
4063
|
+
case "tool_call": return this.renderToolBlock(item, streamingTools.has(item.toolCallId));
|
|
4064
|
+
case "tool_call_group": return this.renderToolGroup(item, streamingTools);
|
|
3992
4065
|
case "reasoning": return lit.html`<div class="cpk-td__inline-chip">
|
|
3993
4066
|
<span>Reasoned for ${item.duration}</span>
|
|
3994
4067
|
</div>`;
|
|
@@ -4027,7 +4100,10 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
4027
4100
|
</div>
|
|
4028
4101
|
`;
|
|
4029
4102
|
}
|
|
4030
|
-
renderToolBlock(item) {
|
|
4103
|
+
renderToolBlock(item, streaming = false) {
|
|
4104
|
+
streaming = streaming && !item.hasResult;
|
|
4105
|
+
const label = item.toolName.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ");
|
|
4106
|
+
const readableName = label.charAt(0).toUpperCase() + label.slice(1);
|
|
4031
4107
|
const expanded = this._expandedTools.has(item.id);
|
|
4032
4108
|
return lit.html`
|
|
4033
4109
|
<div class="cpk-td__tool-block">
|
|
@@ -4046,45 +4122,41 @@ var CpkThreadInspector = class CpkThreadInspector extends PortableLitElement {
|
|
|
4046
4122
|
stroke-linejoin="round"
|
|
4047
4123
|
/>
|
|
4048
4124
|
</svg>
|
|
4049
|
-
<span class="cpk-td__tool-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
>No result recorded</span
|
|
4059
|
-
>
|
|
4060
|
-
`}
|
|
4061
|
-
<span class="cpk-td__tool-chevron">${expanded ? "▾" : "▸"}</span>
|
|
4125
|
+
<span class="cpk-td__tool-copy">
|
|
4126
|
+
<span class="cpk-td__tool-title">
|
|
4127
|
+
<span class="cpk-td__tool-name ${streaming ? "cpk-td__tool-name--streaming" : ""}">${readableName}</span><code class="cpk-td__tool-identifier">(${item.toolName})</code>
|
|
4128
|
+
</span>
|
|
4129
|
+
<span class="cpk-td__tool-status ${item.resultUnreadable || !item.hasResult && !streaming ? "cpk-td__tool-status--pending" : ""}">${streaming ? "Receiving arguments" : item.resultUnreadable ? "Result unreadable" : item.hasResult ? "Result received" : "No result recorded"}</span>
|
|
4130
|
+
</span>
|
|
4131
|
+
<svg class="cpk-td__tool-chevron" width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
4132
|
+
<path d="m9 6 6 6-6 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
4133
|
+
</svg>
|
|
4062
4134
|
</button>
|
|
4063
4135
|
${expanded ? lit.html`
|
|
4064
4136
|
<div class="cpk-td__tool-body">
|
|
4065
|
-
<div class="cpk-td__tool-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
</div>
|
|
4137
|
+
<div class="cpk-td__tool-data">
|
|
4138
|
+
<section>
|
|
4139
|
+
<div class="cpk-td__tool-section-label">Arguments</div>
|
|
4140
|
+
${renderHighlightedJsonBlock(item.arguments)}
|
|
4141
|
+
</section>
|
|
4142
|
+
${item.hasResult ? lit.html`
|
|
4143
|
+
<section class="cpk-td__tool-result">
|
|
4144
|
+
<div class="cpk-td__tool-section-label">Result</div>
|
|
4074
4145
|
${renderHighlightedJsonBlock(item.result)}
|
|
4075
|
-
|
|
4146
|
+
</section>` : lit.nothing}
|
|
4147
|
+
</div>
|
|
4076
4148
|
</div>
|
|
4077
4149
|
` : lit.nothing}
|
|
4078
4150
|
</div>
|
|
4079
4151
|
`;
|
|
4080
4152
|
}
|
|
4081
|
-
renderToolGroup(group) {
|
|
4153
|
+
renderToolGroup(group, streamingTools) {
|
|
4082
4154
|
return lit.html`
|
|
4083
4155
|
<div class="cpk-td__tool-group">
|
|
4084
4156
|
<div class="cpk-td__tool-group-header">
|
|
4085
4157
|
${group.items.length} tool call${group.items.length !== 1 ? "s" : ""}
|
|
4086
4158
|
</div>
|
|
4087
|
-
${group.items.map((tc) => this.renderToolBlock(tc))}
|
|
4159
|
+
${group.items.map((tc) => this.renderToolBlock(tc, streamingTools.has(tc.toolCallId)))}
|
|
4088
4160
|
</div>
|
|
4089
4161
|
`;
|
|
4090
4162
|
}
|
|
@@ -5379,9 +5451,13 @@ var WebInspectorElement = class WebInspectorElement extends lit.LitElement {
|
|
|
5379
5451
|
const service = this.getHomeFeaturePromptTarget("memory");
|
|
5380
5452
|
if (!service || !this.core?.runtimeUrl) return;
|
|
5381
5453
|
const request = ++this.learningSetupCopyRequest;
|
|
5382
|
-
const
|
|
5454
|
+
const runId = this.getOnboardingRunId();
|
|
5455
|
+
const copied = await this.copyFeaturePromptToClipboard(service, event, runId);
|
|
5383
5456
|
if (request !== this.learningSetupCopyRequest) return;
|
|
5384
|
-
if (!this.core.telemetryDisabled) require_telemetry.trackLearningSetupPromptClicked({
|
|
5457
|
+
if (!this.core.telemetryDisabled) require_telemetry.trackLearningSetupPromptClicked({
|
|
5458
|
+
outcome: copied ? "success" : "failure",
|
|
5459
|
+
onboarding_run_id: runId
|
|
5460
|
+
});
|
|
5385
5461
|
if (!copied) {
|
|
5386
5462
|
if (recopy) {
|
|
5387
5463
|
this.cancelLearningPromptRecopyReset();
|
|
@@ -9813,7 +9889,7 @@ var WebInspectorElement = class WebInspectorElement extends lit.LitElement {
|
|
|
9813
9889
|
scheduleInspectorDismissalExpiry() {
|
|
9814
9890
|
this.clearInspectorDismissalTimer();
|
|
9815
9891
|
if (this.inspectorDismissedUntil === null) return;
|
|
9816
|
-
const delay = Math.max(0, this.inspectorDismissedUntil - Date.now() + 25);
|
|
9892
|
+
const delay = Math.min(MAX_TIMER_DELAY_MS, Math.max(0, this.inspectorDismissedUntil - Date.now() + 25));
|
|
9817
9893
|
this.inspectorDismissalTimer = setTimeout(() => {
|
|
9818
9894
|
this.inspectorDismissalTimer = null;
|
|
9819
9895
|
this.refreshInspectorDismissalState();
|
|
@@ -9846,7 +9922,8 @@ var WebInspectorElement = class WebInspectorElement extends lit.LitElement {
|
|
|
9846
9922
|
dismissInspectorFor(duration) {
|
|
9847
9923
|
const now = Date.now();
|
|
9848
9924
|
const until = now + INSPECTOR_DISMISSAL_MS[duration];
|
|
9849
|
-
require_persistence.
|
|
9925
|
+
if (duration === "forever") require_persistence.saveInspectorDismissedForever(now);
|
|
9926
|
+
else require_persistence.saveInspectorDismissedUntil(until, now);
|
|
9850
9927
|
this.inspectorDismissedUntil = until;
|
|
9851
9928
|
this.scheduleInspectorDismissalExpiry();
|
|
9852
9929
|
this.settingsOpen = false;
|
|
@@ -12893,7 +12970,7 @@ var WebInspectorElement = class WebInspectorElement extends lit.LitElement {
|
|
|
12893
12970
|
</span>
|
|
12894
12971
|
<div>
|
|
12895
12972
|
<h2 id="inspector-settings-visibility-title">Visibility</h2>
|
|
12896
|
-
<p>
|
|
12973
|
+
<p>Hide the Inspector on this domain.</p>
|
|
12897
12974
|
</div>
|
|
12898
12975
|
</div>
|
|
12899
12976
|
|
|
@@ -12915,6 +12992,27 @@ var WebInspectorElement = class WebInspectorElement extends lit.LitElement {
|
|
|
12915
12992
|
Hide Inspector for one week
|
|
12916
12993
|
</button>
|
|
12917
12994
|
</div>
|
|
12995
|
+
|
|
12996
|
+
<div class="inspector-settings-visibility">
|
|
12997
|
+
<div>
|
|
12998
|
+
<h3>Hide the Inspector indefinitely</h3>
|
|
12999
|
+
<p>
|
|
13000
|
+
Keep the Inspector hidden on this domain until you bring it
|
|
13001
|
+
back. To restore it, delete the
|
|
13002
|
+
<code>cpk_inspector_dismissed_until</code> cookie and the
|
|
13003
|
+
<code>cpk:inspector:dismissed_until</code> localStorage entry.
|
|
13004
|
+
</p>
|
|
13005
|
+
</div>
|
|
13006
|
+
<button
|
|
13007
|
+
type="button"
|
|
13008
|
+
class="inspector-settings-dismiss"
|
|
13009
|
+
data-cpk-dismiss-inspector="forever"
|
|
13010
|
+
@click=${() => this.dismissInspectorFor("forever")}
|
|
13011
|
+
>
|
|
13012
|
+
<span aria-hidden="true">${this.renderIcon("EyeOff")}</span>
|
|
13013
|
+
Always hide Inspector
|
|
13014
|
+
</button>
|
|
13015
|
+
</div>
|
|
12918
13016
|
</section>
|
|
12919
13017
|
</div>
|
|
12920
13018
|
`;
|