@lvce-editor/chat-debug-view 10.6.0 → 10.7.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 +267 -209
- package/package.json +1 -1
|
@@ -2373,9 +2373,7 @@ const mergeToolExecutionEvents = (startedEvent, finishedEvent, type = mergedEven
|
|
|
2373
2373
|
...(ended === undefined ? {} : {
|
|
2374
2374
|
ended
|
|
2375
2375
|
}),
|
|
2376
|
-
|
|
2377
|
-
eventId
|
|
2378
|
-
}),
|
|
2376
|
+
eventId,
|
|
2379
2377
|
...(started === undefined ? {} : {
|
|
2380
2378
|
started
|
|
2381
2379
|
}),
|
|
@@ -3446,7 +3444,7 @@ const handleClickRefresh = async state => {
|
|
|
3446
3444
|
return handleClickRefreshDependencies.refresh(state);
|
|
3447
3445
|
};
|
|
3448
3446
|
|
|
3449
|
-
const handleCloseDetails = state => {
|
|
3447
|
+
const handleCloseDetails$1 = state => {
|
|
3450
3448
|
return {
|
|
3451
3449
|
...state,
|
|
3452
3450
|
previewTextCursorColumnIndex: null,
|
|
@@ -3542,7 +3540,7 @@ const withPreservedSelection$1 = (state, nextState) => {
|
|
|
3542
3540
|
});
|
|
3543
3541
|
};
|
|
3544
3542
|
|
|
3545
|
-
const handleEventCategoryFilter = (state, value, ctrlKey = false, metaKey = false) => {
|
|
3543
|
+
const handleEventCategoryFilter$1 = (state, value, ctrlKey = false, metaKey = false) => {
|
|
3546
3544
|
const {
|
|
3547
3545
|
categoryFilters
|
|
3548
3546
|
} = state;
|
|
@@ -3655,115 +3653,123 @@ const withPreservedSelection = (state, nextState) => {
|
|
|
3655
3653
|
selectedEventIndex
|
|
3656
3654
|
});
|
|
3657
3655
|
};
|
|
3658
|
-
const
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
categoryFilters
|
|
3674
|
-
};
|
|
3675
|
-
return withPreservedSelection(state, nextState);
|
|
3676
|
-
}
|
|
3677
|
-
if (name === ShowEventStreamFinishedEvents) {
|
|
3678
|
-
const nextState = {
|
|
3679
|
-
...state,
|
|
3680
|
-
showEventStreamFinishedEvents: getBoolean(checked)
|
|
3681
|
-
};
|
|
3682
|
-
return withPreservedSelection(state, nextState);
|
|
3683
|
-
}
|
|
3684
|
-
if (name === ShowInputEvents) {
|
|
3685
|
-
const nextState = {
|
|
3686
|
-
...state,
|
|
3687
|
-
showInputEvents: getBoolean(checked)
|
|
3688
|
-
};
|
|
3689
|
-
return withPreservedSelection(state, nextState);
|
|
3690
|
-
}
|
|
3691
|
-
if (name === ShowResponsePartEvents) {
|
|
3692
|
-
const nextState = {
|
|
3693
|
-
...state,
|
|
3694
|
-
showResponsePartEvents: getBoolean(checked)
|
|
3695
|
-
};
|
|
3696
|
-
return withPreservedSelection(state, nextState);
|
|
3697
|
-
}
|
|
3698
|
-
if (name === UseDevtoolsLayout) {
|
|
3699
|
-
const useDevtoolsLayout = getBoolean(checked);
|
|
3700
|
-
const selectedEventIndex = useDevtoolsLayout ? getSelectedEventIndex(state) : null;
|
|
3701
|
-
return applyVirtualTableState({
|
|
3702
|
-
...state,
|
|
3703
|
-
previewTextCursorColumnIndex: useDevtoolsLayout && selectedEventIndex !== null ? state.previewTextCursorColumnIndex : null,
|
|
3704
|
-
previewTextCursorRowIndex: useDevtoolsLayout && selectedEventIndex !== null ? state.previewTextCursorRowIndex : null,
|
|
3705
|
-
selectedEvent: useDevtoolsLayout && selectedEventIndex !== null ? state.selectedEvent : null,
|
|
3706
|
-
selectedEventId: useDevtoolsLayout && selectedEventIndex !== null ? state.selectedEventId : null,
|
|
3707
|
-
selectedEventIndex,
|
|
3708
|
-
useDevtoolsLayout
|
|
3709
|
-
});
|
|
3710
|
-
}
|
|
3711
|
-
if (name === SelectedEventIndex) {
|
|
3712
|
-
const selectedEventIndex = parseSelectedEventIndex(value);
|
|
3713
|
-
return withSelectedEventVisible({
|
|
3714
|
-
...state,
|
|
3715
|
-
previewTextCursorColumnIndex: selectedEventIndex === null ? null : state.previewTextCursorColumnIndex,
|
|
3716
|
-
previewTextCursorRowIndex: selectedEventIndex === null ? null : state.previewTextCursorRowIndex,
|
|
3717
|
-
selectedEvent: selectedEventIndex === null ? null : state.selectedEvent,
|
|
3718
|
-
selectedEventId: selectedEventIndex === null ? null : state.selectedEventId,
|
|
3719
|
-
selectedEventIndex
|
|
3720
|
-
});
|
|
3721
|
-
}
|
|
3722
|
-
if (name === TimelineStartSeconds) {
|
|
3723
|
-
const nextState = {
|
|
3724
|
-
...state,
|
|
3725
|
-
timelineStartSeconds: value
|
|
3726
|
-
};
|
|
3727
|
-
return withPreservedSelection(state, nextState);
|
|
3728
|
-
}
|
|
3729
|
-
if (name === TimelineEndSeconds) {
|
|
3730
|
-
const nextState = {
|
|
3731
|
-
...state,
|
|
3732
|
-
timelineEndSeconds: value
|
|
3733
|
-
};
|
|
3734
|
-
return withPreservedSelection(state, nextState);
|
|
3656
|
+
const updateWithPreservedSelection = (state, updates) => {
|
|
3657
|
+
return withPreservedSelection(state, {
|
|
3658
|
+
...state,
|
|
3659
|
+
...updates
|
|
3660
|
+
});
|
|
3661
|
+
};
|
|
3662
|
+
const handleFilter = (state, value) => {
|
|
3663
|
+
return updateWithPreservedSelection(state, {
|
|
3664
|
+
filterValue: value
|
|
3665
|
+
});
|
|
3666
|
+
};
|
|
3667
|
+
const handleEventCategoryFilter = (state, value) => {
|
|
3668
|
+
const categoryFilters = selectCategoryFilter(state.categoryFilters, value || All);
|
|
3669
|
+
if (categoryFilters === state.categoryFilters) {
|
|
3670
|
+
return state;
|
|
3735
3671
|
}
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3672
|
+
return updateWithPreservedSelection(state, {
|
|
3673
|
+
categoryFilters
|
|
3674
|
+
});
|
|
3675
|
+
};
|
|
3676
|
+
const handleShowEventStreamFinishedEvents$1 = (state, _value, checked) => {
|
|
3677
|
+
return updateWithPreservedSelection(state, {
|
|
3678
|
+
showEventStreamFinishedEvents: getBoolean(checked)
|
|
3679
|
+
});
|
|
3680
|
+
};
|
|
3681
|
+
const handleShowInputEvents$1 = (state, _value, checked) => {
|
|
3682
|
+
return updateWithPreservedSelection(state, {
|
|
3683
|
+
showInputEvents: getBoolean(checked)
|
|
3684
|
+
});
|
|
3685
|
+
};
|
|
3686
|
+
const handleShowResponsePartEvents$1 = (state, _value, checked) => {
|
|
3687
|
+
return updateWithPreservedSelection(state, {
|
|
3688
|
+
showResponsePartEvents: getBoolean(checked)
|
|
3689
|
+
});
|
|
3690
|
+
};
|
|
3691
|
+
const handleUseDevtoolsLayout = (state, _value, checked) => {
|
|
3692
|
+
const useDevtoolsLayout = getBoolean(checked);
|
|
3693
|
+
const selectedEventIndex = useDevtoolsLayout ? getSelectedEventIndex(state) : null;
|
|
3694
|
+
const hasSelectedEvent = useDevtoolsLayout && selectedEventIndex !== null;
|
|
3695
|
+
return applyVirtualTableState({
|
|
3696
|
+
...state,
|
|
3697
|
+
previewTextCursorColumnIndex: hasSelectedEvent ? state.previewTextCursorColumnIndex : null,
|
|
3698
|
+
previewTextCursorRowIndex: hasSelectedEvent ? state.previewTextCursorRowIndex : null,
|
|
3699
|
+
selectedEvent: hasSelectedEvent ? state.selectedEvent : null,
|
|
3700
|
+
selectedEventId: hasSelectedEvent ? state.selectedEventId : null,
|
|
3701
|
+
selectedEventIndex,
|
|
3702
|
+
useDevtoolsLayout
|
|
3703
|
+
});
|
|
3704
|
+
};
|
|
3705
|
+
const handleSelectedEventIndex = (state, value) => {
|
|
3706
|
+
const selectedEventIndex = parseSelectedEventIndex(value);
|
|
3707
|
+
const hasSelectedEvent = selectedEventIndex !== null;
|
|
3708
|
+
return withSelectedEventVisible({
|
|
3709
|
+
...state,
|
|
3710
|
+
previewTextCursorColumnIndex: hasSelectedEvent ? state.previewTextCursorColumnIndex : null,
|
|
3711
|
+
previewTextCursorRowIndex: hasSelectedEvent ? state.previewTextCursorRowIndex : null,
|
|
3712
|
+
selectedEvent: hasSelectedEvent ? state.selectedEvent : null,
|
|
3713
|
+
selectedEventId: hasSelectedEvent ? state.selectedEventId : null,
|
|
3714
|
+
selectedEventIndex
|
|
3715
|
+
});
|
|
3716
|
+
};
|
|
3717
|
+
const handleTimelineStartSeconds$1 = (state, value) => {
|
|
3718
|
+
return updateWithPreservedSelection(state, {
|
|
3719
|
+
timelineStartSeconds: value
|
|
3720
|
+
});
|
|
3721
|
+
};
|
|
3722
|
+
const handleTimelineEndSeconds$1 = (state, value) => {
|
|
3723
|
+
return updateWithPreservedSelection(state, {
|
|
3724
|
+
timelineEndSeconds: value
|
|
3725
|
+
});
|
|
3726
|
+
};
|
|
3727
|
+
const handleTimelineRangePreset$1 = (state, value) => {
|
|
3728
|
+
return updateWithPreservedSelection(state, parseTimelineRangePreset$1(value));
|
|
3729
|
+
};
|
|
3730
|
+
const handleCloseDetails = state => {
|
|
3731
|
+
return applyVirtualTableState({
|
|
3732
|
+
...state,
|
|
3733
|
+
previewTextCursorColumnIndex: null,
|
|
3734
|
+
previewTextCursorRowIndex: null,
|
|
3735
|
+
selectedEvent: null,
|
|
3736
|
+
selectedEventId: null,
|
|
3737
|
+
selectedEventIndex: null
|
|
3738
|
+
});
|
|
3739
|
+
};
|
|
3740
|
+
const handleDetailTab = (state, value) => {
|
|
3741
|
+
if (!isDetailTab(value)) {
|
|
3742
|
+
return state;
|
|
3742
3743
|
}
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
previewTextCursorColumnIndex: null,
|
|
3747
|
-
previewTextCursorRowIndex: null,
|
|
3748
|
-
selectedEvent: null,
|
|
3749
|
-
selectedEventId: null,
|
|
3750
|
-
selectedEventIndex: null
|
|
3751
|
-
});
|
|
3744
|
+
const detailTabs = selectDetailTab$1(state.detailTabs, value);
|
|
3745
|
+
if (detailTabs === state.detailTabs) {
|
|
3746
|
+
return state;
|
|
3752
3747
|
}
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3748
|
+
return {
|
|
3749
|
+
...state,
|
|
3750
|
+
detailTabs
|
|
3751
|
+
};
|
|
3752
|
+
};
|
|
3753
|
+
const inputHandlers = {
|
|
3754
|
+
[CloseDetails]: handleCloseDetails,
|
|
3755
|
+
[DetailTab]: handleDetailTab,
|
|
3756
|
+
[EventCategoryFilter]: handleEventCategoryFilter,
|
|
3757
|
+
[Filter]: handleFilter,
|
|
3758
|
+
[SelectedEventIndex]: handleSelectedEventIndex,
|
|
3759
|
+
[ShowEventStreamFinishedEvents]: handleShowEventStreamFinishedEvents$1,
|
|
3760
|
+
[ShowInputEvents]: handleShowInputEvents$1,
|
|
3761
|
+
[ShowResponsePartEvents]: handleShowResponsePartEvents$1,
|
|
3762
|
+
[TimelineEndSeconds]: handleTimelineEndSeconds$1,
|
|
3763
|
+
[TimelineRangePreset]: handleTimelineRangePreset$1,
|
|
3764
|
+
[TimelineStartSeconds]: handleTimelineStartSeconds$1,
|
|
3765
|
+
[UseDevtoolsLayout]: handleUseDevtoolsLayout
|
|
3766
|
+
};
|
|
3767
|
+
const handleInput = (state, name, value, checked) => {
|
|
3768
|
+
const handler = inputHandlers[name];
|
|
3769
|
+
if (!handler) {
|
|
3770
|
+
return state;
|
|
3765
3771
|
}
|
|
3766
|
-
return state;
|
|
3772
|
+
return handler(state, value, checked);
|
|
3767
3773
|
};
|
|
3768
3774
|
|
|
3769
3775
|
const getListFilesPreviewEvent = (event, name) => {
|
|
@@ -4619,7 +4625,10 @@ const getCss = state => {
|
|
|
4619
4625
|
const tableContentWidth = Math.max(0, tableWidth - (showScrollBar ? devtoolsTableScrollBarWidth : 0));
|
|
4620
4626
|
const detailsWidth = hasSelectedEvent ? getDetailsWidth(state.width, state.tableWidth) : 0;
|
|
4621
4627
|
const detailsLineNumberWidth = getDetailsLineNumberWidth(state);
|
|
4622
|
-
|
|
4628
|
+
let topSize = 60;
|
|
4629
|
+
if (state.width >= state.largeBreakpoint) {
|
|
4630
|
+
topSize = 30;
|
|
4631
|
+
}
|
|
4623
4632
|
const tableColumnLayout = getTableColumnLayout(tableContentWidth, getVisibleTableColumns(state.tableColumns), state.tableColumnWidths);
|
|
4624
4633
|
const [tableColZeroWidth = 0, tableColOneWidth = 0, tableColTwoWidth = 0] = tableColumnLayout.visibleColumnWidths;
|
|
4625
4634
|
const resizerOneLeft = tableColumnLayout.resizerLefts[0] ?? 0;
|
|
@@ -4953,7 +4962,6 @@ const diffChildren = (oldChildren, newChildren, patches) => {
|
|
|
4953
4962
|
patches.push({
|
|
4954
4963
|
type: NavigateParent
|
|
4955
4964
|
});
|
|
4956
|
-
currentChildIndex = -1;
|
|
4957
4965
|
}
|
|
4958
4966
|
// Add remove patches in reverse order (highest index first)
|
|
4959
4967
|
// This ensures indices remain valid as we remove
|
|
@@ -5347,71 +5355,118 @@ const isDigit = character => {
|
|
|
5347
5355
|
const isWhitespace = character => {
|
|
5348
5356
|
return character === ' ' || character === '\n' || character === '\r' || character === '\t';
|
|
5349
5357
|
};
|
|
5350
|
-
const
|
|
5358
|
+
const getIntegerEnd = (json, start) => {
|
|
5351
5359
|
let i = start;
|
|
5352
5360
|
if (json[i] === '-') {
|
|
5353
5361
|
i++;
|
|
5354
5362
|
}
|
|
5355
5363
|
if (json[i] === '0') {
|
|
5364
|
+
return i + 1;
|
|
5365
|
+
}
|
|
5366
|
+
if (!isDigit(json[i])) {
|
|
5367
|
+
return start;
|
|
5368
|
+
}
|
|
5369
|
+
while (isDigit(json[i])) {
|
|
5356
5370
|
i++;
|
|
5357
|
-
} else {
|
|
5358
|
-
if (!isDigit(json[i])) {
|
|
5359
|
-
return start;
|
|
5360
|
-
}
|
|
5361
|
-
while (isDigit(json[i])) {
|
|
5362
|
-
i++;
|
|
5363
|
-
}
|
|
5364
5371
|
}
|
|
5365
|
-
|
|
5366
|
-
|
|
5372
|
+
return i;
|
|
5373
|
+
};
|
|
5374
|
+
const getFractionEnd = (json, start) => {
|
|
5375
|
+
if (json[start] !== '.') {
|
|
5376
|
+
return start;
|
|
5377
|
+
}
|
|
5378
|
+
const decimalStart = start;
|
|
5379
|
+
let i = start + 1;
|
|
5380
|
+
if (!isDigit(json[i])) {
|
|
5381
|
+
return decimalStart;
|
|
5382
|
+
}
|
|
5383
|
+
while (isDigit(json[i])) {
|
|
5367
5384
|
i++;
|
|
5368
|
-
if (!isDigit(json[i])) {
|
|
5369
|
-
return decimalStart;
|
|
5370
|
-
}
|
|
5371
|
-
while (isDigit(json[i])) {
|
|
5372
|
-
i++;
|
|
5373
|
-
}
|
|
5374
5385
|
}
|
|
5375
|
-
|
|
5376
|
-
|
|
5386
|
+
return i;
|
|
5387
|
+
};
|
|
5388
|
+
const getExponentEnd = (json, start) => {
|
|
5389
|
+
if (json[start] !== 'e' && json[start] !== 'E') {
|
|
5390
|
+
return start;
|
|
5391
|
+
}
|
|
5392
|
+
const exponentStart = start;
|
|
5393
|
+
let i = start + 1;
|
|
5394
|
+
if (json[i] === '+' || json[i] === '-') {
|
|
5377
5395
|
i++;
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5396
|
+
}
|
|
5397
|
+
if (!isDigit(json[i])) {
|
|
5398
|
+
return exponentStart;
|
|
5399
|
+
}
|
|
5400
|
+
while (isDigit(json[i])) {
|
|
5401
|
+
i++;
|
|
5402
|
+
}
|
|
5403
|
+
return i;
|
|
5404
|
+
};
|
|
5405
|
+
const getWhitespaceEnd = (json, start) => {
|
|
5406
|
+
let i = start;
|
|
5407
|
+
while (i < json.length && isWhitespace(json[i])) {
|
|
5408
|
+
i++;
|
|
5409
|
+
}
|
|
5410
|
+
return i;
|
|
5411
|
+
};
|
|
5412
|
+
const getStringEnd = (json, start) => {
|
|
5413
|
+
let i = start + 1;
|
|
5414
|
+
while (i < json.length) {
|
|
5415
|
+
const currentCharacter = json[i];
|
|
5416
|
+
if (currentCharacter === '\\') {
|
|
5417
|
+
i += 2;
|
|
5418
|
+
continue;
|
|
5383
5419
|
}
|
|
5384
|
-
|
|
5385
|
-
i
|
|
5420
|
+
if (currentCharacter === '"') {
|
|
5421
|
+
return i + 1;
|
|
5386
5422
|
}
|
|
5423
|
+
i++;
|
|
5387
5424
|
}
|
|
5388
5425
|
return i;
|
|
5389
5426
|
};
|
|
5427
|
+
const emitStringToken = (json, start, onToken) => {
|
|
5428
|
+
const end = getStringEnd(json, start);
|
|
5429
|
+
const lookAheadIndex = getWhitespaceEnd(json, end);
|
|
5430
|
+
const className = json[lookAheadIndex] === ':' ? TokenKey : TokenString;
|
|
5431
|
+
onToken(className, json.slice(start, end));
|
|
5432
|
+
return end;
|
|
5433
|
+
};
|
|
5434
|
+
const getLiteralToken = (json, start) => {
|
|
5435
|
+
if (json.startsWith('true', start)) {
|
|
5436
|
+
return {
|
|
5437
|
+
className: TokenBoolean,
|
|
5438
|
+
value: 'true'
|
|
5439
|
+
};
|
|
5440
|
+
}
|
|
5441
|
+
if (json.startsWith('false', start)) {
|
|
5442
|
+
return {
|
|
5443
|
+
className: TokenBoolean,
|
|
5444
|
+
value: 'false'
|
|
5445
|
+
};
|
|
5446
|
+
}
|
|
5447
|
+
if (json.startsWith('null', start)) {
|
|
5448
|
+
return {
|
|
5449
|
+
className: TokenBoolean,
|
|
5450
|
+
value: 'null'
|
|
5451
|
+
};
|
|
5452
|
+
}
|
|
5453
|
+
return undefined;
|
|
5454
|
+
};
|
|
5455
|
+
const getNumberEnd = (json, start) => {
|
|
5456
|
+
let i = getIntegerEnd(json, start);
|
|
5457
|
+
if (i === start) {
|
|
5458
|
+
return start;
|
|
5459
|
+
}
|
|
5460
|
+
i = getFractionEnd(json, i);
|
|
5461
|
+
i = getExponentEnd(json, i);
|
|
5462
|
+
return i;
|
|
5463
|
+
};
|
|
5390
5464
|
const forEachTokenSegment = (json, onToken) => {
|
|
5391
5465
|
let i = 0;
|
|
5392
5466
|
while (i < json.length) {
|
|
5393
5467
|
const character = json[i];
|
|
5394
5468
|
if (character === '"') {
|
|
5395
|
-
|
|
5396
|
-
i++;
|
|
5397
|
-
while (i < json.length) {
|
|
5398
|
-
const currentCharacter = json[i];
|
|
5399
|
-
if (currentCharacter === '\\') {
|
|
5400
|
-
i += 2;
|
|
5401
|
-
continue;
|
|
5402
|
-
}
|
|
5403
|
-
if (currentCharacter === '"') {
|
|
5404
|
-
i++;
|
|
5405
|
-
break;
|
|
5406
|
-
}
|
|
5407
|
-
i++;
|
|
5408
|
-
}
|
|
5409
|
-
let lookAheadIndex = i;
|
|
5410
|
-
while (lookAheadIndex < json.length && isWhitespace(json[lookAheadIndex])) {
|
|
5411
|
-
lookAheadIndex++;
|
|
5412
|
-
}
|
|
5413
|
-
const className = json[lookAheadIndex] === ':' ? TokenKey : TokenString;
|
|
5414
|
-
onToken(className, json.slice(start, i));
|
|
5469
|
+
i = emitStringToken(json, i, onToken);
|
|
5415
5470
|
continue;
|
|
5416
5471
|
}
|
|
5417
5472
|
const numberEnd = getNumberEnd(json, i);
|
|
@@ -5420,19 +5475,10 @@ const forEachTokenSegment = (json, onToken) => {
|
|
|
5420
5475
|
i = numberEnd;
|
|
5421
5476
|
continue;
|
|
5422
5477
|
}
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
}
|
|
5428
|
-
if (json.startsWith('false', i)) {
|
|
5429
|
-
onToken(TokenBoolean, 'false');
|
|
5430
|
-
i += 5;
|
|
5431
|
-
continue;
|
|
5432
|
-
}
|
|
5433
|
-
if (json.startsWith('null', i)) {
|
|
5434
|
-
onToken(TokenBoolean, 'null');
|
|
5435
|
-
i += 4;
|
|
5478
|
+
const literalToken = getLiteralToken(json, i);
|
|
5479
|
+
if (literalToken) {
|
|
5480
|
+
onToken(literalToken.className, literalToken.value);
|
|
5481
|
+
i += literalToken.value.length;
|
|
5436
5482
|
continue;
|
|
5437
5483
|
}
|
|
5438
5484
|
onToken(TokenText, character);
|
|
@@ -5745,6 +5791,54 @@ const getNormalizedDetailTabs = (selectedEvent, detailTabs) => {
|
|
|
5745
5791
|
}
|
|
5746
5792
|
return createDetailTabs(getSelectedDetailTab(detailTabs), selectedEvent);
|
|
5747
5793
|
};
|
|
5794
|
+
const getTimingContentNodes = (responseEventNodes, selectedEvent) => {
|
|
5795
|
+
if (selectedEvent === null) {
|
|
5796
|
+
return responseEventNodes;
|
|
5797
|
+
}
|
|
5798
|
+
return getTimingDetailsDom(selectedEvent);
|
|
5799
|
+
};
|
|
5800
|
+
const getPreviewContentNodes = (previewEventNodes, selectedEvent, previewTextCursorRowIndex, previewTextCursorColumnIndex) => {
|
|
5801
|
+
if (previewEventNodes.length > 0) {
|
|
5802
|
+
return previewEventNodes;
|
|
5803
|
+
}
|
|
5804
|
+
if (selectedEvent === null) {
|
|
5805
|
+
return [];
|
|
5806
|
+
}
|
|
5807
|
+
return getPreviewEventNodes(getPreviewEvent(selectedEvent), selectedEvent, previewTextCursorRowIndex === null || previewTextCursorColumnIndex === null ? null : {
|
|
5808
|
+
columnIndex: previewTextCursorColumnIndex,
|
|
5809
|
+
rowIndex: previewTextCursorRowIndex
|
|
5810
|
+
});
|
|
5811
|
+
};
|
|
5812
|
+
const getPayloadContentNodes = (payloadEventNodes, selectedEvent) => {
|
|
5813
|
+
if (payloadEventNodes.length > 0) {
|
|
5814
|
+
return payloadEventNodes;
|
|
5815
|
+
}
|
|
5816
|
+
if (selectedEvent === null) {
|
|
5817
|
+
return [];
|
|
5818
|
+
}
|
|
5819
|
+
return getEventNode(getPayloadEvent(selectedEvent));
|
|
5820
|
+
};
|
|
5821
|
+
const getResponseContentNodes = (responseEventNodes, selectedEvent) => {
|
|
5822
|
+
if (responseEventNodes.length > 0) {
|
|
5823
|
+
return responseEventNodes;
|
|
5824
|
+
}
|
|
5825
|
+
if (selectedEvent === null) {
|
|
5826
|
+
return [];
|
|
5827
|
+
}
|
|
5828
|
+
return getEventNode(selectedEvent);
|
|
5829
|
+
};
|
|
5830
|
+
const getSelectedContentNodes = (safeSelectedDetailTab, previewEventNodes, payloadEventNodes, responseEventNodes, selectedEvent, previewTextCursorRowIndex, previewTextCursorColumnIndex) => {
|
|
5831
|
+
if (safeSelectedDetailTab === Timing) {
|
|
5832
|
+
return getTimingContentNodes(responseEventNodes, selectedEvent);
|
|
5833
|
+
}
|
|
5834
|
+
if (safeSelectedDetailTab === Preview) {
|
|
5835
|
+
return getPreviewContentNodes(previewEventNodes, selectedEvent, previewTextCursorRowIndex, previewTextCursorColumnIndex);
|
|
5836
|
+
}
|
|
5837
|
+
if (safeSelectedDetailTab === Payload) {
|
|
5838
|
+
return getPayloadContentNodes(payloadEventNodes, selectedEvent);
|
|
5839
|
+
}
|
|
5840
|
+
return getResponseContentNodes(responseEventNodes, selectedEvent);
|
|
5841
|
+
};
|
|
5748
5842
|
const getDetailsDom = (previewEventNodes, payloadEventNodes = previewEventNodes, responseEventNodes = payloadEventNodes, selectedEvent = null, detailTabs = createDetailTabs(), previewTextCursorRowIndex = null, previewTextCursorColumnIndex = null) => {
|
|
5749
5843
|
if (previewEventNodes.length === 0 && payloadEventNodes.length === 0 && responseEventNodes.length === 0) {
|
|
5750
5844
|
return [];
|
|
@@ -5753,43 +5847,7 @@ const getDetailsDom = (previewEventNodes, payloadEventNodes = previewEventNodes,
|
|
|
5753
5847
|
const safeSelectedDetailTab = getSelectedDetailTab(normalizedDetailTabs);
|
|
5754
5848
|
const selectedDetailTab = normalizedDetailTabs.find(detailTab => detailTab.name === safeSelectedDetailTab) ?? normalizedDetailTabs[0];
|
|
5755
5849
|
const getDetailContentDom = () => {
|
|
5756
|
-
const
|
|
5757
|
-
if (selectedEvent === null) {
|
|
5758
|
-
return responseEventNodes;
|
|
5759
|
-
}
|
|
5760
|
-
return getTimingDetailsDom(selectedEvent);
|
|
5761
|
-
};
|
|
5762
|
-
const getDetailContentDomPreview = () => {
|
|
5763
|
-
if (previewEventNodes.length > 0) {
|
|
5764
|
-
return previewEventNodes;
|
|
5765
|
-
}
|
|
5766
|
-
if (selectedEvent === null) {
|
|
5767
|
-
return [];
|
|
5768
|
-
}
|
|
5769
|
-
return getPreviewEventNodes(getPreviewEvent(selectedEvent), selectedEvent, previewTextCursorRowIndex === null || previewTextCursorColumnIndex === null ? null : {
|
|
5770
|
-
columnIndex: previewTextCursorColumnIndex,
|
|
5771
|
-
rowIndex: previewTextCursorRowIndex
|
|
5772
|
-
});
|
|
5773
|
-
};
|
|
5774
|
-
const getDetailContentDomPayload = () => {
|
|
5775
|
-
if (payloadEventNodes.length > 0) {
|
|
5776
|
-
return payloadEventNodes;
|
|
5777
|
-
}
|
|
5778
|
-
if (selectedEvent === null) {
|
|
5779
|
-
return [];
|
|
5780
|
-
}
|
|
5781
|
-
return getEventNode(getPayloadEvent(selectedEvent));
|
|
5782
|
-
};
|
|
5783
|
-
const getDetailContentDomResponse = () => {
|
|
5784
|
-
if (responseEventNodes.length > 0) {
|
|
5785
|
-
return responseEventNodes;
|
|
5786
|
-
}
|
|
5787
|
-
if (selectedEvent === null) {
|
|
5788
|
-
return [];
|
|
5789
|
-
}
|
|
5790
|
-
return getEventNode(selectedEvent);
|
|
5791
|
-
};
|
|
5792
|
-
const contentNodes = safeSelectedDetailTab === Timing ? getDetailContentDomTiming() : safeSelectedDetailTab === Preview ? getDetailContentDomPreview() : safeSelectedDetailTab === Payload ? getDetailContentDomPayload() : getDetailContentDomResponse();
|
|
5850
|
+
const contentNodes = getSelectedContentNodes(safeSelectedDetailTab, previewEventNodes, payloadEventNodes, responseEventNodes, selectedEvent, previewTextCursorRowIndex, previewTextCursorColumnIndex);
|
|
5793
5851
|
return [{
|
|
5794
5852
|
'aria-label': selectedDetailTab.label,
|
|
5795
5853
|
childCount: getDirectChildCount$1(contentNodes),
|
|
@@ -6751,12 +6809,12 @@ const commandMap = {
|
|
|
6751
6809
|
'ChatDebug.getMenuEntries': wrapGetter(getMenuEntries2),
|
|
6752
6810
|
'ChatDebug.getMenuIds': getMenuIds,
|
|
6753
6811
|
'ChatDebug.handleClickRefresh': wrapCommand(handleClickRefresh),
|
|
6754
|
-
'ChatDebug.handleCloseDetails': wrapCommand(handleCloseDetails),
|
|
6812
|
+
'ChatDebug.handleCloseDetails': wrapCommand(handleCloseDetails$1),
|
|
6755
6813
|
'ChatDebug.handleDetailsContextMenu': wrapCommand(handleDetailsContextMenu),
|
|
6756
6814
|
'ChatDebug.handleDetailsTopContextMenu': wrapCommand(handleDetailsTopContextMenu),
|
|
6757
6815
|
'ChatDebug.handleDetailTabsFocus': wrapCommand(handleDetailTabsFocus),
|
|
6758
6816
|
'ChatDebug.handleEscape': wrapCommand(handleEscape),
|
|
6759
|
-
'ChatDebug.handleEventCategoryFilter': wrapCommand(handleEventCategoryFilter),
|
|
6817
|
+
'ChatDebug.handleEventCategoryFilter': wrapCommand(handleEventCategoryFilter$1),
|
|
6760
6818
|
'ChatDebug.handleEventRowClick': wrapCommand(handleEventRowClick),
|
|
6761
6819
|
'ChatDebug.handleEventRowClickAt': wrapCommand(handleEventRowClickAt),
|
|
6762
6820
|
'ChatDebug.handleHeaderContextMenu': wrapCommand(handleHeaderContextMenu),
|