@lvce-editor/test-worker 13.24.0 → 13.26.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/api.d.ts +10 -0
- package/dist/testWorkerMain.js +26 -0
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -71,6 +71,12 @@ export interface ChatDebugEvent {
|
|
|
71
71
|
readonly [key: string]: unknown;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
export interface OpenChatDebugOptions {
|
|
75
|
+
readonly events?: readonly ChatDebugEvent[];
|
|
76
|
+
readonly sessionId: string;
|
|
77
|
+
readonly useDevtoolsLayout: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
74
80
|
export interface Diagnostic {
|
|
75
81
|
readonly columnIndex: number;
|
|
76
82
|
readonly endColumnIndex: number;
|
|
@@ -198,9 +204,13 @@ interface Chat {
|
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
interface ChatDebug {
|
|
207
|
+
readonly appendStoredEventForTest: (event: any) => Promise<void>;
|
|
201
208
|
readonly closeDetails: () => Promise<void>;
|
|
209
|
+
readonly handleClickRefresh: () => Promise<void>;
|
|
202
210
|
readonly handleInput: (name: ChatDebugInputName, value: string, checked: boolean) => Promise<void>;
|
|
203
211
|
readonly open: (sessionId: string) => Promise<void>;
|
|
212
|
+
readonly open2: ({ events, sessionId, useDevtoolsLayout }: OpenChatDebugOptions) => Promise<void>;
|
|
213
|
+
readonly openTabPayload: () => Promise<void>;
|
|
204
214
|
readonly openTabPreview: () => Promise<void>;
|
|
205
215
|
readonly openTabResponse: () => Promise<void>;
|
|
206
216
|
readonly openTabTiming: () => Promise<void>;
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -1959,6 +1959,19 @@ const Chat = {
|
|
|
1959
1959
|
const open$9 = async sessionId => {
|
|
1960
1960
|
await invoke('Main.openUri', `chat-debug://${sessionId}`);
|
|
1961
1961
|
};
|
|
1962
|
+
const open2 = async ({
|
|
1963
|
+
events,
|
|
1964
|
+
sessionId,
|
|
1965
|
+
useDevtoolsLayout
|
|
1966
|
+
}) => {
|
|
1967
|
+
await invoke('Main.openUri', `chat-debug://${sessionId}`);
|
|
1968
|
+
if (events) {
|
|
1969
|
+
await setEvents(events);
|
|
1970
|
+
}
|
|
1971
|
+
if (useDevtoolsLayout) {
|
|
1972
|
+
await handleInput$7('useDevtoolsLayout', '', true);
|
|
1973
|
+
}
|
|
1974
|
+
};
|
|
1962
1975
|
const setEvents = async events => {
|
|
1963
1976
|
await invoke('ChatDebug.setEvents', events);
|
|
1964
1977
|
};
|
|
@@ -2001,6 +2014,9 @@ const closeDetails = async () => {
|
|
|
2001
2014
|
const openTabPreview = async () => {
|
|
2002
2015
|
await invoke('ChatDebug.handleInput', 'detailTab', 'preview', false);
|
|
2003
2016
|
};
|
|
2017
|
+
const openTabPayload = async () => {
|
|
2018
|
+
await invoke('ChatDebug.handleInput', 'detailTab', 'payload', false);
|
|
2019
|
+
};
|
|
2004
2020
|
const openTabResponse = async () => {
|
|
2005
2021
|
await invoke('ChatDebug.handleInput', 'detailTab', 'response', false);
|
|
2006
2022
|
};
|
|
@@ -2010,11 +2026,21 @@ const openTabTiming = async () => {
|
|
|
2010
2026
|
const setSessionId = async sessionId => {
|
|
2011
2027
|
await invoke('ChatDebug.setSessionId', sessionId);
|
|
2012
2028
|
};
|
|
2029
|
+
const appendStoredEventForTest = async event => {
|
|
2030
|
+
await invoke('ChatDebug.appendStoredEventForTest', event);
|
|
2031
|
+
};
|
|
2032
|
+
const handleClickRefresh = async () => {
|
|
2033
|
+
await invoke('ChatDebug.handleClickRefresh');
|
|
2034
|
+
};
|
|
2013
2035
|
|
|
2014
2036
|
const ChatDebug = {
|
|
2037
|
+
appendStoredEventForTest,
|
|
2015
2038
|
closeDetails,
|
|
2039
|
+
handleClickRefresh,
|
|
2016
2040
|
handleInput: handleInput$7,
|
|
2017
2041
|
open: open$9,
|
|
2042
|
+
open2,
|
|
2043
|
+
openTabPayload,
|
|
2018
2044
|
openTabPreview,
|
|
2019
2045
|
openTabResponse,
|
|
2020
2046
|
openTabTiming,
|