@lvce-editor/chat-debug-view 5.2.0 → 5.3.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/chatDebugViewWorkerMain.js +24 -16
- package/package.json +1 -1
|
@@ -2571,6 +2571,21 @@ const refresh = async state => {
|
|
|
2571
2571
|
return refreshEvents(state);
|
|
2572
2572
|
};
|
|
2573
2573
|
|
|
2574
|
+
const Button = 1;
|
|
2575
|
+
const Div = 4;
|
|
2576
|
+
const Input = 6;
|
|
2577
|
+
const Span = 8;
|
|
2578
|
+
const Table = 9;
|
|
2579
|
+
const TBody = 10;
|
|
2580
|
+
const Td = 11;
|
|
2581
|
+
const Text = 12;
|
|
2582
|
+
const Th = 13;
|
|
2583
|
+
const THead = 14;
|
|
2584
|
+
const Tr = 15;
|
|
2585
|
+
const Search = 42;
|
|
2586
|
+
const Label = 66;
|
|
2587
|
+
const Reference = 100;
|
|
2588
|
+
|
|
2574
2589
|
const ClientX = 'event.clientX';
|
|
2575
2590
|
const ClientY = 'event.clientY';
|
|
2576
2591
|
const TargetChecked = 'event.target.checked';
|
|
@@ -3319,21 +3334,6 @@ const renderCss = (oldState, newState) => {
|
|
|
3319
3334
|
return [SetCss, newState.uid, css];
|
|
3320
3335
|
};
|
|
3321
3336
|
|
|
3322
|
-
const Button = 1;
|
|
3323
|
-
const Div = 4;
|
|
3324
|
-
const Input = 6;
|
|
3325
|
-
const Span = 8;
|
|
3326
|
-
const Table = 9;
|
|
3327
|
-
const TBody = 10;
|
|
3328
|
-
const Td = 11;
|
|
3329
|
-
const Text = 12;
|
|
3330
|
-
const Th = 13;
|
|
3331
|
-
const THead = 14;
|
|
3332
|
-
const Tr = 15;
|
|
3333
|
-
const Search = 42;
|
|
3334
|
-
const Label = 66;
|
|
3335
|
-
const Reference = 100;
|
|
3336
|
-
|
|
3337
3337
|
const text = data => {
|
|
3338
3338
|
return {
|
|
3339
3339
|
childCount: 0,
|
|
@@ -4179,6 +4179,9 @@ const getEventsClassName = hasSelectedEvent => {
|
|
|
4179
4179
|
const hasOwn = (event, key) => {
|
|
4180
4180
|
return Object.hasOwn(event, key);
|
|
4181
4181
|
};
|
|
4182
|
+
const isChatMessageUpdatedEvent = event => {
|
|
4183
|
+
return event.type === 'chat-message-updated';
|
|
4184
|
+
};
|
|
4182
4185
|
const getPreviewName = event => {
|
|
4183
4186
|
if (typeof event.name === 'string' && event.name) {
|
|
4184
4187
|
return event.name;
|
|
@@ -4198,6 +4201,9 @@ const shouldIncludeArguments = (event, name) => {
|
|
|
4198
4201
|
return true;
|
|
4199
4202
|
};
|
|
4200
4203
|
const getPreviewEvent = event => {
|
|
4204
|
+
if (isChatMessageUpdatedEvent(event) && typeof event.text === 'string') {
|
|
4205
|
+
return event.text;
|
|
4206
|
+
}
|
|
4201
4207
|
const name = getPreviewName(event);
|
|
4202
4208
|
const previewEvent = {
|
|
4203
4209
|
...(name === undefined ? {} : {
|
|
@@ -4498,10 +4504,12 @@ const getChatDebugViewDom = (errorMessage, filterValue, eventCategoryFilter, eve
|
|
|
4498
4504
|
if (timelineFilterDescription) {
|
|
4499
4505
|
filterDescriptionParts.push(timelineFilterDescription);
|
|
4500
4506
|
}
|
|
4507
|
+
const hasTimelineFilter = Boolean(timelineFilterDescription);
|
|
4501
4508
|
const hasFilterValue = filterDescriptionParts.length > 0;
|
|
4502
4509
|
const filterDescription = filterDescriptionParts.join(' ');
|
|
4503
4510
|
const noFilteredEventsMessage = `no events found matching ${filterDescription}`;
|
|
4504
|
-
const
|
|
4511
|
+
const useNoToolCallEventsMessage = eventCategoryFilter === Tools && !trimmedFilterValue && !hasTimelineFilter;
|
|
4512
|
+
const emptyMessage = events.length === 0 && hasFilterValue ? useNoToolCallEventsMessage ? 'No tool call events.' : noFilteredEventsMessage : 'No events have been found';
|
|
4505
4513
|
const safeSelectedEventIndex = selectedEventIndex === null || selectedEventIndex < 0 || selectedEventIndex >= events.length ? null : selectedEventIndex;
|
|
4506
4514
|
const contentNodes = useDevtoolsLayout ? getDevtoolsDom(events, selectedEvent, safeSelectedEventIndex, timelineEvents, timelineStartSeconds, timelineEndSeconds, emptyMessage, timelineSelectionActive, timelineSelectionAnchorSeconds, timelineSelectionFocusSeconds, isDetailTab(selectedDetailTab) ? selectedDetailTab : Response) : getLegacyEventsDom(errorMessage, emptyMessage, events.flatMap(getEventNode));
|
|
4507
4515
|
const quickFilterNodes = useDevtoolsLayout ? getQuickFilterNodes(eventCategoryFilter, eventCategoryFilterOptions) : [];
|