@copilotkit/web-inspector 1.62.1 → 1.62.2
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 +239 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +17 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +239 -22
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +251 -33
- package/dist/index.umd.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/package.json +2 -2
- package/src/__tests__/web-inspector.spec.ts +96 -1
- package/src/index.ts +308 -30
package/dist/index.umd.js
CHANGED
|
@@ -191,7 +191,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
191
191
|
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region package.json
|
|
194
|
-
var version = "1.62.
|
|
194
|
+
var version = "1.62.2";
|
|
195
195
|
|
|
196
196
|
//#endregion
|
|
197
197
|
//#region src/lib/telemetry.ts
|
|
@@ -772,6 +772,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
772
772
|
this._stateError = null;
|
|
773
773
|
this._expandedTools = /* @__PURE__ */ new Set();
|
|
774
774
|
this._expandedMessages = /* @__PURE__ */ new Set();
|
|
775
|
+
this._expandedTimelineDetails = /* @__PURE__ */ new Set();
|
|
776
|
+
this._expandedRawEvents = /* @__PURE__ */ new Set();
|
|
775
777
|
this._showDetailPanel = false;
|
|
776
778
|
this._detailPanelWidth = 250;
|
|
777
779
|
this._eventsNotAvailable = false;
|
|
@@ -920,6 +922,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
920
922
|
this._liveEventsWithSourceIndexCache = null;
|
|
921
923
|
this._expandedTools = /* @__PURE__ */ new Set();
|
|
922
924
|
this._expandedMessages = /* @__PURE__ */ new Set();
|
|
925
|
+
this._expandedTimelineDetails = /* @__PURE__ */ new Set();
|
|
926
|
+
this._expandedRawEvents = /* @__PURE__ */ new Set();
|
|
923
927
|
(_this$_metadataAbort = this._metadataAbort) === null || _this$_metadataAbort === void 0 || _this$_metadataAbort.abort();
|
|
924
928
|
this._metadataAbort = null;
|
|
925
929
|
(_this$_messagesAbort2 = this._messagesAbort) === null || _this$_messagesAbort2 === void 0 || _this$_messagesAbort2.abort();
|
|
@@ -1474,10 +1478,42 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1474
1478
|
else next.add(id);
|
|
1475
1479
|
this._expandedMessages = next;
|
|
1476
1480
|
}
|
|
1481
|
+
toggleTimelineDetails(id) {
|
|
1482
|
+
const next = new Set(this._expandedTimelineDetails);
|
|
1483
|
+
if (next.has(id)) next.delete(id);
|
|
1484
|
+
else next.add(id);
|
|
1485
|
+
this._expandedTimelineDetails = next;
|
|
1486
|
+
}
|
|
1487
|
+
expandTimelineDetails(ids) {
|
|
1488
|
+
this._expandedTimelineDetails = new Set([...this._expandedTimelineDetails, ...ids]);
|
|
1489
|
+
}
|
|
1490
|
+
collapseTimelineDetails(ids) {
|
|
1491
|
+
const next = new Set(this._expandedTimelineDetails);
|
|
1492
|
+
for (const id of ids) next.delete(id);
|
|
1493
|
+
this._expandedTimelineDetails = next;
|
|
1494
|
+
}
|
|
1495
|
+
toggleRawEventDetails(id) {
|
|
1496
|
+
const next = new Set(this._expandedRawEvents);
|
|
1497
|
+
if (next.has(id)) next.delete(id);
|
|
1498
|
+
else next.add(id);
|
|
1499
|
+
this._expandedRawEvents = next;
|
|
1500
|
+
}
|
|
1501
|
+
expandRawEventDetails(ids) {
|
|
1502
|
+
this._expandedRawEvents = new Set([...this._expandedRawEvents, ...ids]);
|
|
1503
|
+
}
|
|
1504
|
+
collapseRawEventDetails(ids) {
|
|
1505
|
+
const next = new Set(this._expandedRawEvents);
|
|
1506
|
+
for (const id of ids) next.delete(id);
|
|
1507
|
+
this._expandedRawEvents = next;
|
|
1508
|
+
}
|
|
1509
|
+
rawEventId(event) {
|
|
1510
|
+
var _ref, _event$sourceIndex2;
|
|
1511
|
+
return `raw-event-${(_ref = (_event$sourceIndex2 = event.sourceIndex) !== null && _event$sourceIndex2 !== void 0 ? _event$sourceIndex2 : event.timestamp) !== null && _ref !== void 0 ? _ref : event.type}`;
|
|
1512
|
+
}
|
|
1477
1513
|
get activeEvents() {
|
|
1478
|
-
var
|
|
1514
|
+
var _ref2, _this$_fetchedEvents, _this$_liveEventsWith;
|
|
1479
1515
|
if (this._eventsNotAvailable) return [];
|
|
1480
|
-
const events = (
|
|
1516
|
+
const events = (_ref2 = (_this$_fetchedEvents = this._fetchedEvents) !== null && _this$_fetchedEvents !== void 0 ? _this$_fetchedEvents : this.agentEventsInput) !== null && _ref2 !== void 0 ? _ref2 : [];
|
|
1481
1517
|
if (events.every((event) => event.sourceIndex != null)) return events;
|
|
1482
1518
|
if (((_this$_liveEventsWith = this._liveEventsWithSourceIndexCache) === null || _this$_liveEventsWith === void 0 ? void 0 : _this$_liveEventsWith.events) === events) return this._liveEventsWithSourceIndexCache.indexedEvents;
|
|
1483
1519
|
const indexedEvents = events.map((event, index) => event.sourceIndex == null ? {
|
|
@@ -1491,9 +1527,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1491
1527
|
return indexedEvents;
|
|
1492
1528
|
}
|
|
1493
1529
|
get activeState() {
|
|
1494
|
-
var
|
|
1530
|
+
var _ref3, _this$_fetchedState;
|
|
1495
1531
|
if (this._stateNotAvailable) return null;
|
|
1496
|
-
return (
|
|
1532
|
+
return (_ref3 = (_this$_fetchedState = this._fetchedState) !== null && _this$_fetchedState !== void 0 ? _this$_fetchedState : this.agentStateInput) !== null && _ref3 !== void 0 ? _ref3 : null;
|
|
1497
1533
|
}
|
|
1498
1534
|
hasRenderableState() {
|
|
1499
1535
|
const s = this.activeState;
|
|
@@ -1504,8 +1540,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1504
1540
|
return id.length > 20 ? id.slice(0, 8) + "…" : id;
|
|
1505
1541
|
}
|
|
1506
1542
|
get metadata() {
|
|
1507
|
-
var
|
|
1508
|
-
return (
|
|
1543
|
+
var _ref4, _this$_fetchedMetadat;
|
|
1544
|
+
return (_ref4 = (_this$_fetchedMetadat = this._fetchedMetadata) !== null && _this$_fetchedMetadat !== void 0 ? _this$_fetchedMetadat : this.thread) !== null && _ref4 !== void 0 ? _ref4 : null;
|
|
1509
1545
|
}
|
|
1510
1546
|
fmtTime(dateStr) {
|
|
1511
1547
|
if (!dateStr) return "—";
|
|
@@ -1601,22 +1637,73 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1601
1637
|
value: metadata === null || metadata === void 0 ? void 0 : metadata.status
|
|
1602
1638
|
}
|
|
1603
1639
|
].filter((pill) => pill.value != null && pill.value !== "");
|
|
1604
|
-
|
|
1640
|
+
const bulkControls = this.renderActiveBulkControls();
|
|
1641
|
+
if (pills.length === 0 && bulkControls === lit.nothing) return lit.nothing;
|
|
1605
1642
|
return lit.html`
|
|
1606
1643
|
<div class="cpk-td__metadata-strip" aria-label="Thread metadata">
|
|
1607
|
-
|
|
1644
|
+
<div class="cpk-td__metadata-pills">
|
|
1645
|
+
${pills.map((pill) => {
|
|
1608
1646
|
var _pill$value;
|
|
1609
1647
|
return lit.html`
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1648
|
+
<span class="cpk-td__metadata-pill" title=${(_pill$value = pill.value) !== null && _pill$value !== void 0 ? _pill$value : ""}>
|
|
1649
|
+
<span class="cpk-td__metadata-label">${pill.label}</span>
|
|
1650
|
+
<span class="cpk-td__metadata-value"
|
|
1651
|
+
>${this.shortId(pill.value)}</span
|
|
1652
|
+
>
|
|
1653
|
+
</span>
|
|
1654
|
+
`;
|
|
1617
1655
|
})}
|
|
1656
|
+
</div>
|
|
1657
|
+
${bulkControls}
|
|
1618
1658
|
</div>
|
|
1619
1659
|
`;
|
|
1660
|
+
}
|
|
1661
|
+
renderActiveBulkControls() {
|
|
1662
|
+
if (this._eventsNotAvailable) return lit.nothing;
|
|
1663
|
+
if (this._tab === "raw-events") return this.renderRawEventBulkControls();
|
|
1664
|
+
if (this._tab !== "timeline") return lit.nothing;
|
|
1665
|
+
const detailIds = this.timelineItemsForEvents(this.activeEvents).filter((item) => item.details).map((item) => item.id);
|
|
1666
|
+
if (detailIds.length <= 1) return lit.nothing;
|
|
1667
|
+
return lit.html`<div class="cpk-td__timeline-toolbar">
|
|
1668
|
+
<button
|
|
1669
|
+
type="button"
|
|
1670
|
+
class="cpk-td__timeline-bulk-toggle"
|
|
1671
|
+
?disabled=${detailIds.every((id) => this._expandedTimelineDetails.has(id))}
|
|
1672
|
+
@click=${() => this.expandTimelineDetails(detailIds)}
|
|
1673
|
+
>
|
|
1674
|
+
Expand all
|
|
1675
|
+
</button>
|
|
1676
|
+
<button
|
|
1677
|
+
type="button"
|
|
1678
|
+
class="cpk-td__timeline-bulk-toggle"
|
|
1679
|
+
?disabled=${detailIds.every((id) => !this._expandedTimelineDetails.has(id))}
|
|
1680
|
+
@click=${() => this.collapseTimelineDetails(detailIds)}
|
|
1681
|
+
>
|
|
1682
|
+
Collapse all
|
|
1683
|
+
</button>
|
|
1684
|
+
</div>`;
|
|
1685
|
+
}
|
|
1686
|
+
renderRawEventBulkControls() {
|
|
1687
|
+
const eventIds = this.activeEvents.map((event) => this.rawEventId(event));
|
|
1688
|
+
if (eventIds.length <= 1) return lit.nothing;
|
|
1689
|
+
return lit.html`<div class="cpk-td__timeline-toolbar">
|
|
1690
|
+
<button
|
|
1691
|
+
type="button"
|
|
1692
|
+
class="cpk-td__timeline-bulk-toggle"
|
|
1693
|
+
?disabled=${eventIds.every((id) => this._expandedRawEvents.has(id))}
|
|
1694
|
+
@click=${() => this.expandRawEventDetails(eventIds)}
|
|
1695
|
+
>
|
|
1696
|
+
Expand all
|
|
1697
|
+
</button>
|
|
1698
|
+
<button
|
|
1699
|
+
type="button"
|
|
1700
|
+
class="cpk-td__timeline-bulk-toggle"
|
|
1701
|
+
?disabled=${eventIds.every((id) => !this._expandedRawEvents.has(id))}
|
|
1702
|
+
@click=${() => this.collapseRawEventDetails(eventIds)}
|
|
1703
|
+
>
|
|
1704
|
+
Collapse all
|
|
1705
|
+
</button>
|
|
1706
|
+
</div>`;
|
|
1620
1707
|
}
|
|
1621
1708
|
revealSourceEvent(sourceIndex) {
|
|
1622
1709
|
this._activatedTabs = new Set([...this._activatedTabs, "raw-events"]);
|
|
@@ -1649,7 +1736,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1649
1736
|
`;
|
|
1650
1737
|
}
|
|
1651
1738
|
const events = this.activeEvents;
|
|
1652
|
-
const cachedTimeline = this.getCachedPanelTpl("timeline", [events]);
|
|
1739
|
+
const cachedTimeline = this.getCachedPanelTpl("timeline", [events, this._expandedTimelineDetails]);
|
|
1653
1740
|
if (cachedTimeline) return cachedTimeline;
|
|
1654
1741
|
const timelineItems = this.timelineItemsForEvents(events);
|
|
1655
1742
|
if (timelineItems.length === 0) {
|
|
@@ -1665,14 +1752,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1665
1752
|
</div>
|
|
1666
1753
|
`;
|
|
1667
1754
|
}
|
|
1668
|
-
return this.cachedPanelTpl("timeline", [events], () => {
|
|
1669
|
-
return lit.html`${timelineItems.map((item) => this.renderTimelineItem(item))}`;
|
|
1670
|
-
});
|
|
1755
|
+
return this.cachedPanelTpl("timeline", [events, this._expandedTimelineDetails], () => lit.html`${timelineItems.map((item) => this.renderTimelineItem(item))}`);
|
|
1671
1756
|
}
|
|
1672
1757
|
renderTimelineItem(item) {
|
|
1758
|
+
const isWarning = item.kind === "warning";
|
|
1759
|
+
const detailsExpanded = this._expandedTimelineDetails.has(item.id);
|
|
1673
1760
|
return lit.html`
|
|
1674
1761
|
<div
|
|
1675
|
-
class="cpk-td__timeline-item ${
|
|
1762
|
+
class="cpk-td__timeline-item ${isWarning ? "cpk-td__timeline-item--warning" : ""}"
|
|
1676
1763
|
>
|
|
1677
1764
|
<div class="cpk-td__timeline-header">
|
|
1678
1765
|
<span class="cpk-td__timeline-kind"
|
|
@@ -1690,9 +1777,39 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1690
1777
|
>${formatTimestamp(item.timestamp)}</span
|
|
1691
1778
|
>
|
|
1692
1779
|
</div>
|
|
1693
|
-
${item.
|
|
1694
|
-
|
|
1695
|
-
|
|
1780
|
+
${item.details ? lit.html`<button
|
|
1781
|
+
type="button"
|
|
1782
|
+
class="cpk-td__timeline-details-toggle"
|
|
1783
|
+
aria-expanded=${detailsExpanded ? "true" : "false"}
|
|
1784
|
+
@click=${() => this.toggleTimelineDetails(item.id)}
|
|
1785
|
+
>
|
|
1786
|
+
${detailsExpanded ? lit.html`
|
|
1787
|
+
<svg
|
|
1788
|
+
aria-hidden="true"
|
|
1789
|
+
viewBox="0 0 24 24"
|
|
1790
|
+
fill="none"
|
|
1791
|
+
stroke="currentColor"
|
|
1792
|
+
stroke-linecap="round"
|
|
1793
|
+
stroke-linejoin="round"
|
|
1794
|
+
>
|
|
1795
|
+
<path d="m6 9 6 6 6-6" />
|
|
1796
|
+
</svg>
|
|
1797
|
+
` : lit.html`
|
|
1798
|
+
<svg
|
|
1799
|
+
aria-hidden="true"
|
|
1800
|
+
viewBox="0 0 24 24"
|
|
1801
|
+
fill="none"
|
|
1802
|
+
stroke="currentColor"
|
|
1803
|
+
stroke-linecap="round"
|
|
1804
|
+
stroke-linejoin="round"
|
|
1805
|
+
>
|
|
1806
|
+
<path d="m9 18 6-6-6-6" />
|
|
1807
|
+
</svg>
|
|
1808
|
+
`}
|
|
1809
|
+
<span>${detailsExpanded ? "Hide details" : "Show details"}</span>
|
|
1810
|
+
</button>` : lit.nothing}
|
|
1811
|
+
${item.body ? lit.html`<div class="cpk-td__timeline-body">${item.body}</div>` : lit.nothing}
|
|
1812
|
+
${item.details && detailsExpanded ? lit.html`<pre class="cpk-td__timeline-body">${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(item.details))}</pre>` : lit.nothing}
|
|
1696
1813
|
</div>
|
|
1697
1814
|
`;
|
|
1698
1815
|
}
|
|
@@ -1949,10 +2066,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
1949
2066
|
>
|
|
1950
2067
|
</div>
|
|
1951
2068
|
`;
|
|
1952
|
-
return this.cachedPanelTpl("raw-events", [events], () => {
|
|
2069
|
+
return this.cachedPanelTpl("raw-events", [events, this._expandedRawEvents], () => {
|
|
1953
2070
|
return lit.html`${events.map((event) => {
|
|
1954
2071
|
var _event$rawEvent;
|
|
1955
2072
|
const { bg, fg } = eventColors(event.type);
|
|
2073
|
+
const eventId = this.rawEventId(event);
|
|
2074
|
+
const detailsExpanded = this._expandedRawEvents.has(eventId);
|
|
1956
2075
|
return lit.html`
|
|
1957
2076
|
<div class="cpk-td__event" data-source-index=${event.sourceIndex}>
|
|
1958
2077
|
<div class="cpk-td__event-header" style="background:${bg}">
|
|
@@ -1963,9 +2082,38 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(stateValue))}</p
|
|
|
1963
2082
|
>${formatTimestamp(event.timestamp)}</span
|
|
1964
2083
|
>
|
|
1965
2084
|
</div>
|
|
1966
|
-
<
|
|
1967
|
-
|
|
2085
|
+
<button
|
|
2086
|
+
type="button"
|
|
2087
|
+
class="cpk-td__timeline-details-toggle"
|
|
2088
|
+
aria-expanded=${detailsExpanded ? "true" : "false"}
|
|
2089
|
+
@click=${() => this.toggleRawEventDetails(eventId)}
|
|
1968
2090
|
>
|
|
2091
|
+
${detailsExpanded ? lit.html`
|
|
2092
|
+
<svg
|
|
2093
|
+
aria-hidden="true"
|
|
2094
|
+
viewBox="0 0 24 24"
|
|
2095
|
+
fill="none"
|
|
2096
|
+
stroke="currentColor"
|
|
2097
|
+
stroke-linecap="round"
|
|
2098
|
+
stroke-linejoin="round"
|
|
2099
|
+
>
|
|
2100
|
+
<path d="m6 9 6 6 6-6" />
|
|
2101
|
+
</svg>
|
|
2102
|
+
` : lit.html`
|
|
2103
|
+
<svg
|
|
2104
|
+
aria-hidden="true"
|
|
2105
|
+
viewBox="0 0 24 24"
|
|
2106
|
+
fill="none"
|
|
2107
|
+
stroke="currentColor"
|
|
2108
|
+
stroke-linecap="round"
|
|
2109
|
+
stroke-linejoin="round"
|
|
2110
|
+
>
|
|
2111
|
+
<path d="m9 18 6-6-6-6" />
|
|
2112
|
+
</svg>
|
|
2113
|
+
`}
|
|
2114
|
+
<span>${detailsExpanded ? "Hide details" : "Show details"}</span>
|
|
2115
|
+
</button>
|
|
2116
|
+
${detailsExpanded ? lit.html`<pre class="cpk-td__event-payload">${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson((_event$rawEvent = event.rawEvent) !== null && _event$rawEvent !== void 0 ? _event$rawEvent : event))}</pre>` : lit.nothing}
|
|
1969
2117
|
</div>
|
|
1970
2118
|
`;
|
|
1971
2119
|
})}`;
|
|
@@ -2098,6 +2246,8 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson((_event$rawEvent
|
|
|
2098
2246
|
_stateError: { state: true },
|
|
2099
2247
|
_expandedTools: { state: true },
|
|
2100
2248
|
_expandedMessages: { state: true },
|
|
2249
|
+
_expandedTimelineDetails: { state: true },
|
|
2250
|
+
_expandedRawEvents: { state: true },
|
|
2101
2251
|
_showDetailPanel: { state: true },
|
|
2102
2252
|
_detailPanelWidth: { state: true },
|
|
2103
2253
|
_eventsNotAvailable: { state: true },
|
|
@@ -2250,6 +2400,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson((_event$rawEvent
|
|
|
2250
2400
|
|
|
2251
2401
|
.cpk-td__metadata-strip {
|
|
2252
2402
|
display: flex;
|
|
2403
|
+
align-items: center;
|
|
2253
2404
|
gap: 6px;
|
|
2254
2405
|
flex-wrap: wrap;
|
|
2255
2406
|
padding: 10px 16px;
|
|
@@ -2258,6 +2409,14 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson((_event$rawEvent
|
|
|
2258
2409
|
flex-shrink: 0;
|
|
2259
2410
|
}
|
|
2260
2411
|
|
|
2412
|
+
.cpk-td__metadata-pills {
|
|
2413
|
+
display: flex;
|
|
2414
|
+
gap: 6px;
|
|
2415
|
+
flex: 1;
|
|
2416
|
+
flex-wrap: wrap;
|
|
2417
|
+
min-width: 0;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2261
2420
|
.cpk-td__metadata-pill {
|
|
2262
2421
|
display: inline-flex;
|
|
2263
2422
|
align-items: center;
|
|
@@ -2552,13 +2711,44 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson((_event$rawEvent
|
|
|
2552
2711
|
}
|
|
2553
2712
|
|
|
2554
2713
|
.cpk-td__timeline-body {
|
|
2555
|
-
|
|
2714
|
+
margin: 0;
|
|
2715
|
+
padding: 0 10px 9px;
|
|
2556
2716
|
font-size: 12px;
|
|
2557
2717
|
line-height: 1.55;
|
|
2558
2718
|
color: #57575b;
|
|
2559
2719
|
white-space: pre-wrap;
|
|
2560
2720
|
word-break: break-word;
|
|
2561
|
-
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
.cpk-td__timeline-toolbar {
|
|
2724
|
+
display: flex;
|
|
2725
|
+
gap: 6px;
|
|
2726
|
+
margin-left: auto;
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
.cpk-td__timeline-bulk-toggle {
|
|
2730
|
+
margin: 0;
|
|
2731
|
+
padding: 4px 8px;
|
|
2732
|
+
border: 1px solid #dcdce8;
|
|
2733
|
+
border-radius: 6px;
|
|
2734
|
+
background: #ffffff;
|
|
2735
|
+
color: #36363a;
|
|
2736
|
+
cursor: pointer;
|
|
2737
|
+
font-family: "Inter", sans-serif;
|
|
2738
|
+
font-size: 11px;
|
|
2739
|
+
font-weight: 600;
|
|
2740
|
+
line-height: 1.2;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
.cpk-td__timeline-bulk-toggle:hover {
|
|
2744
|
+
border-color: rgba(85, 88, 178, 0.38);
|
|
2745
|
+
background: #f7f7ff;
|
|
2746
|
+
color: #010507;
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
.cpk-td__timeline-bulk-toggle:disabled {
|
|
2750
|
+
cursor: not-allowed;
|
|
2751
|
+
opacity: 0.45;
|
|
2562
2752
|
}
|
|
2563
2753
|
|
|
2564
2754
|
.cpk-td__source-link {
|
|
@@ -2579,6 +2769,34 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson((_event$rawEvent
|
|
|
2579
2769
|
color: #010507;
|
|
2580
2770
|
}
|
|
2581
2771
|
|
|
2772
|
+
.cpk-td__timeline-details-toggle {
|
|
2773
|
+
margin: 0;
|
|
2774
|
+
padding: 5px 10px;
|
|
2775
|
+
border: none;
|
|
2776
|
+
background: #ffffff;
|
|
2777
|
+
color: #5558b2;
|
|
2778
|
+
cursor: pointer;
|
|
2779
|
+
display: inline-flex;
|
|
2780
|
+
align-items: center;
|
|
2781
|
+
gap: 5px;
|
|
2782
|
+
font-family: "Inter", sans-serif;
|
|
2783
|
+
font-size: 12px;
|
|
2784
|
+
font-weight: 600;
|
|
2785
|
+
line-height: 1.2;
|
|
2786
|
+
width: 100%;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
.cpk-td__timeline-details-toggle:hover {
|
|
2790
|
+
background: #f7f7ff;
|
|
2791
|
+
color: #010507;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
.cpk-td__timeline-details-toggle svg {
|
|
2795
|
+
width: 12px;
|
|
2796
|
+
height: 12px;
|
|
2797
|
+
stroke-width: 2;
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2582
2800
|
/* ── Generative UI ──────────────────────────────────────────────── */
|
|
2583
2801
|
@keyframes cpk-genui-enter {
|
|
2584
2802
|
from {
|
|
@@ -3765,8 +3983,8 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson((_event$rawEvent
|
|
|
3765
3983
|
return lit.html`
|
|
3766
3984
|
<div class="mt-2 space-y-2">
|
|
3767
3985
|
${toolCalls.map((call, index) => {
|
|
3768
|
-
var
|
|
3769
|
-
const functionName = (
|
|
3986
|
+
var _ref5, _call$function$name, _call$function, _call$function2;
|
|
3987
|
+
const functionName = (_ref5 = (_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 && _ref5 !== void 0 ? _ref5 : "Unknown function";
|
|
3770
3988
|
const callId = typeof (call === null || call === void 0 ? void 0 : call.id) === "string" ? call.id : `tool-call-${index + 1}`;
|
|
3771
3989
|
const argsString = this.formatToolCallArguments((_call$function2 = call.function) === null || _call$function2 === void 0 ? void 0 : _call$function2.arguments);
|
|
3772
3990
|
return lit.html`
|
|
@@ -5918,9 +6136,9 @@ ${prettyEvent}</pre
|
|
|
5918
6136
|
let currentSchema = schema;
|
|
5919
6137
|
let def = currentSchema._def;
|
|
5920
6138
|
while (def.typeName === "ZodOptional" || def.typeName === "ZodNullable" || def.typeName === "ZodDefault") {
|
|
5921
|
-
var
|
|
6139
|
+
var _ref6;
|
|
5922
6140
|
if (def.typeName === "ZodDefault" && def.defaultValue !== void 0) info.defaultValue = typeof def.defaultValue === "function" ? def.defaultValue() : def.defaultValue;
|
|
5923
|
-
currentSchema = (
|
|
6141
|
+
currentSchema = (_ref6 = def.innerType) !== null && _ref6 !== void 0 ? _ref6 : currentSchema;
|
|
5924
6142
|
if (!(currentSchema === null || currentSchema === void 0 ? void 0 : currentSchema._def)) break;
|
|
5925
6143
|
def = currentSchema._def;
|
|
5926
6144
|
}
|