@lvce-editor/chat-debug-view 10.5.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.
@@ -2373,9 +2373,7 @@ const mergeToolExecutionEvents = (startedEvent, finishedEvent, type = mergedEven
2373
2373
  ...(ended === undefined ? {} : {
2374
2374
  ended
2375
2375
  }),
2376
- ...(eventId === undefined ? {} : {
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 handleInput = (state, name, value, checked) => {
3659
- if (name === Filter) {
3660
- const nextState = {
3661
- ...state,
3662
- filterValue: value
3663
- };
3664
- return withPreservedSelection(state, nextState);
3665
- }
3666
- if (name === EventCategoryFilter) {
3667
- const categoryFilters = selectCategoryFilter(state.categoryFilters, value || All);
3668
- if (categoryFilters === state.categoryFilters) {
3669
- return state;
3670
- }
3671
- const nextState = {
3672
- ...state,
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
- if (name === TimelineRangePreset) {
3737
- const nextState = {
3738
- ...state,
3739
- ...parseTimelineRangePreset$1(value)
3740
- };
3741
- return withPreservedSelection(state, nextState);
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
- if (name === CloseDetails) {
3744
- return applyVirtualTableState({
3745
- ...state,
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
- if (name === DetailTab) {
3754
- if (!isDetailTab(value)) {
3755
- return state;
3756
- }
3757
- const detailTabs = selectDetailTab$1(state.detailTabs, value);
3758
- if (detailTabs === state.detailTabs) {
3759
- return state;
3760
- }
3761
- return {
3762
- ...state,
3763
- detailTabs
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) => {
@@ -3934,6 +3940,18 @@ const getPreviewMessageText = event => {
3934
3940
  return text;
3935
3941
  };
3936
3942
 
3943
+ const getContent = value => {
3944
+ if (!value || typeof value !== 'object') {
3945
+ return undefined;
3946
+ }
3947
+ const {
3948
+ content
3949
+ } = value;
3950
+ if (typeof content !== 'string') {
3951
+ return undefined;
3952
+ }
3953
+ return content;
3954
+ };
3937
3955
  const getReadFilePreviewText = (event, name) => {
3938
3956
  if (name !== 'read_file') {
3939
3957
  return undefined;
@@ -3941,10 +3959,17 @@ const getReadFilePreviewText = (event, name) => {
3941
3959
  const {
3942
3960
  result
3943
3961
  } = event;
3944
- if (typeof result !== 'string') {
3962
+ if (typeof result === 'string') {
3963
+ return result;
3964
+ }
3965
+ const content = getContent(result);
3966
+ if (content !== undefined) {
3967
+ return content;
3968
+ }
3969
+ if (!Array.isArray(result) || result.length !== 1) {
3945
3970
  return undefined;
3946
3971
  }
3947
- return result;
3972
+ return getContent(result[0]);
3948
3973
  };
3949
3974
 
3950
3975
  const getSseResponseCompletedPreviewEvent = event => {
@@ -4600,7 +4625,10 @@ const getCss = state => {
4600
4625
  const tableContentWidth = Math.max(0, tableWidth - (showScrollBar ? devtoolsTableScrollBarWidth : 0));
4601
4626
  const detailsWidth = hasSelectedEvent ? getDetailsWidth(state.width, state.tableWidth) : 0;
4602
4627
  const detailsLineNumberWidth = getDetailsLineNumberWidth(state);
4603
- const topSize = state.width >= state.largeBreakpoint ? 30 : state.width >= state.mediumBreakpoint ? 60 : 60;
4628
+ let topSize = 60;
4629
+ if (state.width >= state.largeBreakpoint) {
4630
+ topSize = 30;
4631
+ }
4604
4632
  const tableColumnLayout = getTableColumnLayout(tableContentWidth, getVisibleTableColumns(state.tableColumns), state.tableColumnWidths);
4605
4633
  const [tableColZeroWidth = 0, tableColOneWidth = 0, tableColTwoWidth = 0] = tableColumnLayout.visibleColumnWidths;
4606
4634
  const resizerOneLeft = tableColumnLayout.resizerLefts[0] ?? 0;
@@ -4934,7 +4962,6 @@ const diffChildren = (oldChildren, newChildren, patches) => {
4934
4962
  patches.push({
4935
4963
  type: NavigateParent
4936
4964
  });
4937
- currentChildIndex = -1;
4938
4965
  }
4939
4966
  // Add remove patches in reverse order (highest index first)
4940
4967
  // This ensures indices remain valid as we remove
@@ -5328,44 +5355,110 @@ const isDigit = character => {
5328
5355
  const isWhitespace = character => {
5329
5356
  return character === ' ' || character === '\n' || character === '\r' || character === '\t';
5330
5357
  };
5331
- const getNumberEnd = (json, start) => {
5358
+ const getIntegerEnd = (json, start) => {
5332
5359
  let i = start;
5333
5360
  if (json[i] === '-') {
5334
5361
  i++;
5335
5362
  }
5336
5363
  if (json[i] === '0') {
5364
+ return i + 1;
5365
+ }
5366
+ if (!isDigit(json[i])) {
5367
+ return start;
5368
+ }
5369
+ while (isDigit(json[i])) {
5337
5370
  i++;
5338
- } else {
5339
- if (!isDigit(json[i])) {
5340
- return start;
5341
- }
5342
- while (isDigit(json[i])) {
5343
- i++;
5344
- }
5345
5371
  }
5346
- if (json[i] === '.') {
5347
- const decimalStart = i;
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])) {
5348
5384
  i++;
5349
- if (!isDigit(json[i])) {
5350
- return decimalStart;
5351
- }
5352
- while (isDigit(json[i])) {
5353
- i++;
5354
- }
5355
5385
  }
5356
- if (json[i] === 'e' || json[i] === 'E') {
5357
- const exponentStart = i;
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] === '-') {
5358
5395
  i++;
5359
- if (json[i] === '+' || json[i] === '-') {
5360
- i++;
5361
- }
5362
- if (!isDigit(json[i])) {
5363
- return exponentStart;
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;
5364
5419
  }
5365
- while (isDigit(json[i])) {
5366
- i++;
5420
+ if (currentCharacter === '"') {
5421
+ return i + 1;
5367
5422
  }
5423
+ i++;
5424
+ }
5425
+ return i;
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
+ };
5368
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);
5369
5462
  return i;
5370
5463
  };
5371
5464
  const forEachTokenSegment = (json, onToken) => {
@@ -5373,26 +5466,7 @@ const forEachTokenSegment = (json, onToken) => {
5373
5466
  while (i < json.length) {
5374
5467
  const character = json[i];
5375
5468
  if (character === '"') {
5376
- const start = i;
5377
- i++;
5378
- while (i < json.length) {
5379
- const currentCharacter = json[i];
5380
- if (currentCharacter === '\\') {
5381
- i += 2;
5382
- continue;
5383
- }
5384
- if (currentCharacter === '"') {
5385
- i++;
5386
- break;
5387
- }
5388
- i++;
5389
- }
5390
- let lookAheadIndex = i;
5391
- while (lookAheadIndex < json.length && isWhitespace(json[lookAheadIndex])) {
5392
- lookAheadIndex++;
5393
- }
5394
- const className = json[lookAheadIndex] === ':' ? TokenKey : TokenString;
5395
- onToken(className, json.slice(start, i));
5469
+ i = emitStringToken(json, i, onToken);
5396
5470
  continue;
5397
5471
  }
5398
5472
  const numberEnd = getNumberEnd(json, i);
@@ -5401,19 +5475,10 @@ const forEachTokenSegment = (json, onToken) => {
5401
5475
  i = numberEnd;
5402
5476
  continue;
5403
5477
  }
5404
- if (json.startsWith('true', i)) {
5405
- onToken(TokenBoolean, 'true');
5406
- i += 4;
5407
- continue;
5408
- }
5409
- if (json.startsWith('false', i)) {
5410
- onToken(TokenBoolean, 'false');
5411
- i += 5;
5412
- continue;
5413
- }
5414
- if (json.startsWith('null', i)) {
5415
- onToken(TokenBoolean, 'null');
5416
- i += 4;
5478
+ const literalToken = getLiteralToken(json, i);
5479
+ if (literalToken) {
5480
+ onToken(literalToken.className, literalToken.value);
5481
+ i += literalToken.value.length;
5417
5482
  continue;
5418
5483
  }
5419
5484
  onToken(TokenText, character);
@@ -5726,6 +5791,54 @@ const getNormalizedDetailTabs = (selectedEvent, detailTabs) => {
5726
5791
  }
5727
5792
  return createDetailTabs(getSelectedDetailTab(detailTabs), selectedEvent);
5728
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
+ };
5729
5842
  const getDetailsDom = (previewEventNodes, payloadEventNodes = previewEventNodes, responseEventNodes = payloadEventNodes, selectedEvent = null, detailTabs = createDetailTabs(), previewTextCursorRowIndex = null, previewTextCursorColumnIndex = null) => {
5730
5843
  if (previewEventNodes.length === 0 && payloadEventNodes.length === 0 && responseEventNodes.length === 0) {
5731
5844
  return [];
@@ -5734,43 +5847,7 @@ const getDetailsDom = (previewEventNodes, payloadEventNodes = previewEventNodes,
5734
5847
  const safeSelectedDetailTab = getSelectedDetailTab(normalizedDetailTabs);
5735
5848
  const selectedDetailTab = normalizedDetailTabs.find(detailTab => detailTab.name === safeSelectedDetailTab) ?? normalizedDetailTabs[0];
5736
5849
  const getDetailContentDom = () => {
5737
- const getDetailContentDomTiming = () => {
5738
- if (selectedEvent === null) {
5739
- return responseEventNodes;
5740
- }
5741
- return getTimingDetailsDom(selectedEvent);
5742
- };
5743
- const getDetailContentDomPreview = () => {
5744
- if (previewEventNodes.length > 0) {
5745
- return previewEventNodes;
5746
- }
5747
- if (selectedEvent === null) {
5748
- return [];
5749
- }
5750
- return getPreviewEventNodes(getPreviewEvent(selectedEvent), selectedEvent, previewTextCursorRowIndex === null || previewTextCursorColumnIndex === null ? null : {
5751
- columnIndex: previewTextCursorColumnIndex,
5752
- rowIndex: previewTextCursorRowIndex
5753
- });
5754
- };
5755
- const getDetailContentDomPayload = () => {
5756
- if (payloadEventNodes.length > 0) {
5757
- return payloadEventNodes;
5758
- }
5759
- if (selectedEvent === null) {
5760
- return [];
5761
- }
5762
- return getEventNode(getPayloadEvent(selectedEvent));
5763
- };
5764
- const getDetailContentDomResponse = () => {
5765
- if (responseEventNodes.length > 0) {
5766
- return responseEventNodes;
5767
- }
5768
- if (selectedEvent === null) {
5769
- return [];
5770
- }
5771
- return getEventNode(selectedEvent);
5772
- };
5773
- const contentNodes = safeSelectedDetailTab === Timing ? getDetailContentDomTiming() : safeSelectedDetailTab === Preview ? getDetailContentDomPreview() : safeSelectedDetailTab === Payload ? getDetailContentDomPayload() : getDetailContentDomResponse();
5850
+ const contentNodes = getSelectedContentNodes(safeSelectedDetailTab, previewEventNodes, payloadEventNodes, responseEventNodes, selectedEvent, previewTextCursorRowIndex, previewTextCursorColumnIndex);
5774
5851
  return [{
5775
5852
  'aria-label': selectedDetailTab.label,
5776
5853
  childCount: getDirectChildCount$1(contentNodes),
@@ -6547,6 +6624,7 @@ const renderEventListeners = () => {
6547
6624
  }, {
6548
6625
  name: HandleTableWheel,
6549
6626
  params: ['handleTableWheel', 'event.deltaY'],
6627
+ passive: true,
6550
6628
  preventDefault: true
6551
6629
  }, {
6552
6630
  name: HandleTimelinePointerDown,
@@ -6731,12 +6809,12 @@ const commandMap = {
6731
6809
  'ChatDebug.getMenuEntries': wrapGetter(getMenuEntries2),
6732
6810
  'ChatDebug.getMenuIds': getMenuIds,
6733
6811
  'ChatDebug.handleClickRefresh': wrapCommand(handleClickRefresh),
6734
- 'ChatDebug.handleCloseDetails': wrapCommand(handleCloseDetails),
6812
+ 'ChatDebug.handleCloseDetails': wrapCommand(handleCloseDetails$1),
6735
6813
  'ChatDebug.handleDetailsContextMenu': wrapCommand(handleDetailsContextMenu),
6736
6814
  'ChatDebug.handleDetailsTopContextMenu': wrapCommand(handleDetailsTopContextMenu),
6737
6815
  'ChatDebug.handleDetailTabsFocus': wrapCommand(handleDetailTabsFocus),
6738
6816
  'ChatDebug.handleEscape': wrapCommand(handleEscape),
6739
- 'ChatDebug.handleEventCategoryFilter': wrapCommand(handleEventCategoryFilter),
6817
+ 'ChatDebug.handleEventCategoryFilter': wrapCommand(handleEventCategoryFilter$1),
6740
6818
  'ChatDebug.handleEventRowClick': wrapCommand(handleEventRowClick),
6741
6819
  'ChatDebug.handleEventRowClickAt': wrapCommand(handleEventRowClickAt),
6742
6820
  'ChatDebug.handleHeaderContextMenu': wrapCommand(handleHeaderContextMenu),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/chat-debug-view",
3
- "version": "10.5.0",
3
+ "version": "10.7.0",
4
4
  "description": "Chat Debug View Worker",
5
5
  "repository": {
6
6
  "type": "git",