@lvce-editor/chat-debug-view 10.5.0 → 10.6.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.
|
@@ -3934,6 +3934,18 @@ const getPreviewMessageText = event => {
|
|
|
3934
3934
|
return text;
|
|
3935
3935
|
};
|
|
3936
3936
|
|
|
3937
|
+
const getContent = value => {
|
|
3938
|
+
if (!value || typeof value !== 'object') {
|
|
3939
|
+
return undefined;
|
|
3940
|
+
}
|
|
3941
|
+
const {
|
|
3942
|
+
content
|
|
3943
|
+
} = value;
|
|
3944
|
+
if (typeof content !== 'string') {
|
|
3945
|
+
return undefined;
|
|
3946
|
+
}
|
|
3947
|
+
return content;
|
|
3948
|
+
};
|
|
3937
3949
|
const getReadFilePreviewText = (event, name) => {
|
|
3938
3950
|
if (name !== 'read_file') {
|
|
3939
3951
|
return undefined;
|
|
@@ -3941,10 +3953,17 @@ const getReadFilePreviewText = (event, name) => {
|
|
|
3941
3953
|
const {
|
|
3942
3954
|
result
|
|
3943
3955
|
} = event;
|
|
3944
|
-
if (typeof result
|
|
3956
|
+
if (typeof result === 'string') {
|
|
3957
|
+
return result;
|
|
3958
|
+
}
|
|
3959
|
+
const content = getContent(result);
|
|
3960
|
+
if (content !== undefined) {
|
|
3961
|
+
return content;
|
|
3962
|
+
}
|
|
3963
|
+
if (!Array.isArray(result) || result.length !== 1) {
|
|
3945
3964
|
return undefined;
|
|
3946
3965
|
}
|
|
3947
|
-
return result;
|
|
3966
|
+
return getContent(result[0]);
|
|
3948
3967
|
};
|
|
3949
3968
|
|
|
3950
3969
|
const getSseResponseCompletedPreviewEvent = event => {
|
|
@@ -6547,6 +6566,7 @@ const renderEventListeners = () => {
|
|
|
6547
6566
|
}, {
|
|
6548
6567
|
name: HandleTableWheel,
|
|
6549
6568
|
params: ['handleTableWheel', 'event.deltaY'],
|
|
6569
|
+
passive: true,
|
|
6550
6570
|
preventDefault: true
|
|
6551
6571
|
}, {
|
|
6552
6572
|
name: HandleTimelinePointerDown,
|