@lvce-editor/test-worker 13.22.0 → 13.24.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 CHANGED
@@ -201,12 +201,16 @@ interface ChatDebug {
201
201
  readonly closeDetails: () => Promise<void>;
202
202
  readonly handleInput: (name: ChatDebugInputName, value: string, checked: boolean) => Promise<void>;
203
203
  readonly open: (sessionId: string) => Promise<void>;
204
+ readonly openTabPreview: () => Promise<void>;
205
+ readonly openTabResponse: () => Promise<void>;
206
+ readonly openTabTiming: () => Promise<void>;
204
207
  readonly resetIndexedDbSupportForTest: () => Promise<void>;
205
208
  readonly selectEventRow: (index: number) => Promise<void>;
206
209
  readonly setEventCategoryFilter: (value: string) => Promise<void>;
207
210
  readonly setEvents: (events: readonly ChatDebugEvent[]) => Promise<void>;
208
211
  readonly setFilter: (value: string) => Promise<void>;
209
212
  readonly setIndexedDbSupportForTest: (supported: boolean) => Promise<void>;
213
+ readonly setSessionId: (sessionId: string) => Promise<void>;
210
214
  readonly setShowEventStreamFinishedEvents: (enabled: boolean) => Promise<void>;
211
215
  readonly setShowInputEvents: (enabled: boolean) => Promise<void>;
212
216
  readonly setShowResponsePartEvents: (enabled: boolean) => Promise<void>;
@@ -462,6 +466,7 @@ interface FileSystem {
462
466
  readonly createDroppedFileHandle: () => Promise<DroppedFileHandle>;
463
467
  readonly createExecutable: (content: string) => Promise<string>;
464
468
  readonly createExecutableFrom: (uri: string) => Promise<string>;
469
+ readonly getOpfsRoot: () => Promise<FileSystemDirectoryHandle>;
465
470
  readonly getTmpDir: ({ scheme }?: FileSystemTmpDirOptions) => Promise<string>;
466
471
  readonly loadFixture: (url: string) => Promise<string>;
467
472
  readonly mkdir: (uri: string) => Promise<void>;
@@ -1998,17 +1998,33 @@ const setShowEventStreamFinishedEvents = async enabled => {
1998
1998
  const closeDetails = async () => {
1999
1999
  await handleInput$7('closeDetails', 'close', false);
2000
2000
  };
2001
+ const openTabPreview = async () => {
2002
+ await invoke('ChatDebug.handleInput', 'detailTab', 'preview', false);
2003
+ };
2004
+ const openTabResponse = async () => {
2005
+ await invoke('ChatDebug.handleInput', 'detailTab', 'response', false);
2006
+ };
2007
+ const openTabTiming = async () => {
2008
+ await invoke('ChatDebug.handleInput', 'detailTab', 'timing', false);
2009
+ };
2010
+ const setSessionId = async sessionId => {
2011
+ await invoke('ChatDebug.setSessionId', sessionId);
2012
+ };
2001
2013
 
2002
2014
  const ChatDebug = {
2003
2015
  closeDetails,
2004
2016
  handleInput: handleInput$7,
2005
2017
  open: open$9,
2018
+ openTabPreview,
2019
+ openTabResponse,
2020
+ openTabTiming,
2006
2021
  resetIndexedDbSupportForTest,
2007
2022
  selectEventRow,
2008
2023
  setEventCategoryFilter,
2009
2024
  setEvents,
2010
2025
  setFilter,
2011
2026
  setIndexedDbSupportForTest,
2027
+ setSessionId,
2012
2028
  setShowEventStreamFinishedEvents,
2013
2029
  setShowInputEvents,
2014
2030
  setShowResponsePartEvents,
@@ -3165,8 +3181,11 @@ const createExecutableFrom = async uri => {
3165
3181
  const content = await invoke('Ajax.getText', absolutePath);
3166
3182
  return createExecutable(content);
3167
3183
  };
3184
+ const getOpfsRoot = async () => {
3185
+ return navigator.storage.getDirectory();
3186
+ };
3168
3187
  const createDroppedFileHandle = async () => {
3169
- const directory = await navigator.storage.getDirectory();
3188
+ const directory = await getOpfsRoot();
3170
3189
  const fileHandle = await directory.getFileHandle('dropped-file.txt', {
3171
3190
  create: true
3172
3191
  });
@@ -3193,6 +3212,7 @@ const FileSystem = {
3193
3212
  createDroppedFileHandle,
3194
3213
  createExecutable,
3195
3214
  createExecutableFrom,
3215
+ getOpfsRoot,
3196
3216
  getTmpDir,
3197
3217
  loadFixture,
3198
3218
  mkdir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "13.22.0",
3
+ "version": "13.24.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",