@lvce-editor/chat-debug-view 5.0.0 → 5.1.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 +25 -17
- package/package.json +1 -1
|
@@ -1024,12 +1024,16 @@ const {
|
|
|
1024
1024
|
} = create$1();
|
|
1025
1025
|
|
|
1026
1026
|
const Response = 'response';
|
|
1027
|
+
const Preview = 'preview';
|
|
1027
1028
|
const Timing = 'timing';
|
|
1028
|
-
const detailTabs = [Response, Timing];
|
|
1029
|
+
const detailTabs = [Response, Preview, Timing];
|
|
1029
1030
|
const isDetailTab = value => {
|
|
1030
|
-
return value === Response || value === Timing;
|
|
1031
|
+
return value === Response || value === Preview || value === Timing;
|
|
1031
1032
|
};
|
|
1032
1033
|
const getDetailTabLabel = value => {
|
|
1034
|
+
if (value === Preview) {
|
|
1035
|
+
return 'Preview';
|
|
1036
|
+
}
|
|
1033
1037
|
if (value === Timing) {
|
|
1034
1038
|
return 'Timing';
|
|
1035
1039
|
}
|
|
@@ -2901,7 +2905,6 @@ const getCss = state => {
|
|
|
2901
2905
|
white-space: nowrap;
|
|
2902
2906
|
min-width: 0;
|
|
2903
2907
|
font-size: 11px;
|
|
2904
|
-
text-transform: uppercase;
|
|
2905
2908
|
letter-spacing: 0.04em;
|
|
2906
2909
|
opacity: 0.8;
|
|
2907
2910
|
contain: content;
|
|
@@ -2977,6 +2980,10 @@ const getCss = state => {
|
|
|
2977
2980
|
text-align: right;
|
|
2978
2981
|
}
|
|
2979
2982
|
|
|
2983
|
+
.ChatDebugViewCellStatusError {
|
|
2984
|
+
color: var(--vscode-errorForeground, #f14c4c);
|
|
2985
|
+
}
|
|
2986
|
+
|
|
2980
2987
|
.ChatDebugViewDetails {
|
|
2981
2988
|
border: 1px solid var(--vscode-editorWidget-border, #454545);
|
|
2982
2989
|
border-radius: 6px;
|
|
@@ -2995,6 +3002,7 @@ const getCss = state => {
|
|
|
2995
3002
|
gap: 8px;
|
|
2996
3003
|
padding: 0 8px;
|
|
2997
3004
|
border-bottom: 1px solid var(--vscode-editorWidget-border, #454545);
|
|
3005
|
+
background: color-mix(in srgb, var(--vscode-editorWidget-background, transparent) 72%, var(--vscode-list-hoverBackground, rgba(90, 93, 94, 0.18)) 28%);
|
|
2998
3006
|
contain: content;
|
|
2999
3007
|
}
|
|
3000
3008
|
|
|
@@ -3071,7 +3079,7 @@ const getCss = state => {
|
|
|
3071
3079
|
color: var(--vscode-descriptionForeground, var(--vscode-foreground, #cccccc));
|
|
3072
3080
|
cursor: pointer;
|
|
3073
3081
|
white-space: nowrap;
|
|
3074
|
-
contain:
|
|
3082
|
+
contain: content;
|
|
3075
3083
|
}
|
|
3076
3084
|
|
|
3077
3085
|
.ChatDebugViewDetailsTab:hover {
|
|
@@ -3080,7 +3088,7 @@ const getCss = state => {
|
|
|
3080
3088
|
|
|
3081
3089
|
.ChatDebugViewDetailsTabSelected {
|
|
3082
3090
|
border-bottom-color: var(--vscode-focusBorder, #007fd4);
|
|
3083
|
-
color: var(--vscode-
|
|
3091
|
+
color: var(--vscode-focusBorder, #007fd4);
|
|
3084
3092
|
}
|
|
3085
3093
|
|
|
3086
3094
|
.ChatDebugViewDetailsPanel {
|
|
@@ -3138,17 +3146,18 @@ const getCss = state => {
|
|
|
3138
3146
|
.row {
|
|
3139
3147
|
display: flex;
|
|
3140
3148
|
align-items: baseline;
|
|
3149
|
+
gap: 12px;
|
|
3141
3150
|
min-width: 100%;
|
|
3142
3151
|
width: max-content;
|
|
3143
3152
|
white-space: nowrap;
|
|
3144
|
-
contain:
|
|
3153
|
+
contain: strict;
|
|
3154
|
+
height: 20px;
|
|
3145
3155
|
}
|
|
3146
3156
|
|
|
3147
3157
|
.ChatDebugViewEventLineNumber {
|
|
3148
3158
|
display: flex;
|
|
3149
3159
|
justify-content: flex-end;
|
|
3150
3160
|
flex: 0 0 3ch;
|
|
3151
|
-
margin-right: 12px;
|
|
3152
3161
|
opacity: 0.6;
|
|
3153
3162
|
user-select: none;
|
|
3154
3163
|
contain: content;
|
|
@@ -3170,9 +3179,6 @@ const getCss = state => {
|
|
|
3170
3179
|
display: flex;
|
|
3171
3180
|
flex-direction: column;
|
|
3172
3181
|
width: 100%;
|
|
3173
|
-
border: 1px solid var(--vscode-editorWidget-border, #454545);
|
|
3174
|
-
border-radius: 6px;
|
|
3175
|
-
overflow: hidden;
|
|
3176
3182
|
contain: strict;
|
|
3177
3183
|
flex: 1;
|
|
3178
3184
|
}
|
|
@@ -3750,12 +3756,6 @@ const getDetailsDom = (selectedEventNodes, selectedEvent = null, selectedDetailT
|
|
|
3750
3756
|
className: 'ChatDebugViewDetailsTop',
|
|
3751
3757
|
type: Div
|
|
3752
3758
|
}, {
|
|
3753
|
-
'aria-label': 'Detail sections',
|
|
3754
|
-
childCount: detailTabs.length,
|
|
3755
|
-
className: 'ChatDebugViewDetailsTabs',
|
|
3756
|
-
role: 'tablist',
|
|
3757
|
-
type: Div
|
|
3758
|
-
}, ...getTabNodes(selectedDetailTab), {
|
|
3759
3759
|
'aria-label': 'Close details',
|
|
3760
3760
|
childCount: 0,
|
|
3761
3761
|
className: 'ChatDebugViewDetailsClose',
|
|
@@ -3765,8 +3765,15 @@ const getDetailsDom = (selectedEventNodes, selectedEvent = null, selectedDetailT
|
|
|
3765
3765
|
type: Button,
|
|
3766
3766
|
value: 'close'
|
|
3767
3767
|
}, {
|
|
3768
|
+
'aria-label': 'Detail sections',
|
|
3769
|
+
childCount: detailTabs.length,
|
|
3770
|
+
className: 'ChatDebugViewDetailsTabs',
|
|
3771
|
+
role: 'tablist',
|
|
3772
|
+
type: Div
|
|
3773
|
+
}, ...getTabNodes(selectedDetailTab), {
|
|
3768
3774
|
childCount: 1,
|
|
3769
3775
|
className: 'ChatDebugViewDetailsBody',
|
|
3776
|
+
role: 'document',
|
|
3770
3777
|
type: Div
|
|
3771
3778
|
}, {
|
|
3772
3779
|
'aria-labelledby': getTabId(selectedDetailTab),
|
|
@@ -3840,6 +3847,7 @@ const getStatusText = event => {
|
|
|
3840
3847
|
const getDevtoolsRows = (events, selectedEventIndex) => {
|
|
3841
3848
|
return events.flatMap((event, i) => {
|
|
3842
3849
|
const isSelected = selectedEventIndex === i;
|
|
3850
|
+
const isErrorStatus = hasErrorStatus(event);
|
|
3843
3851
|
const rowIndex = String(i);
|
|
3844
3852
|
return [{
|
|
3845
3853
|
childCount: 3,
|
|
@@ -3858,7 +3866,7 @@ const getDevtoolsRows = (events, selectedEventIndex) => {
|
|
|
3858
3866
|
type: Td
|
|
3859
3867
|
}, text(getDurationText(event)), {
|
|
3860
3868
|
childCount: 1,
|
|
3861
|
-
className:
|
|
3869
|
+
className: `ChatDebugViewCell ChatDebugViewCellStatus${isErrorStatus ? ' ChatDebugViewCellStatusError' : ''}`,
|
|
3862
3870
|
'data-index': rowIndex,
|
|
3863
3871
|
type: Td
|
|
3864
3872
|
}, text(getStatusText(event))];
|