@lvce-editor/test-worker 13.6.0 → 13.8.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
@@ -162,6 +162,23 @@ interface Dialog {
162
162
  readonly showSaveFilePicker: () => Promise<void>;
163
163
  }
164
164
 
165
+ interface Chat {
166
+ readonly enterNewLine: () => Promise<void>;
167
+ readonly getSelectedSessionId: () => Promise<string>;
168
+ readonly handleClickBack: () => Promise<void>;
169
+ readonly handleClickClose: () => Promise<void>;
170
+ readonly handleClickNew: () => Promise<void>;
171
+ readonly handleClickSettings: () => Promise<void>;
172
+ readonly handleInput: (text: string) => Promise<void>;
173
+ readonly handleModelChange: (modelId: string) => Promise<void>;
174
+ readonly handleSubmit: () => Promise<void>;
175
+ readonly reset: () => Promise<void>;
176
+ readonly selectIndex: (index: number) => Promise<void>;
177
+ readonly setStreamingEnabled: (enabled: boolean) => Promise<void>;
178
+ readonly show: () => Promise<void>;
179
+ readonly useMockApi: () => Promise<void>;
180
+ }
181
+
165
182
  interface Editor {
166
183
  readonly addAllMissingImports: () => Promise<void>;
167
184
  readonly cancelSelection: () => Promise<void>;
@@ -500,6 +517,7 @@ interface Preview {
500
517
  readonly open: (uri: string) => Promise<void>;
501
518
  readonly setUri: (uri: string) => Promise<void>;
502
519
  readonly waitForClick: () => Promise<void>;
520
+ readonly waitForMutation: () => Promise<void>;
503
521
  }
504
522
 
505
523
  interface Problems {
@@ -673,6 +691,7 @@ export interface TestApi {
673
691
  readonly ContextMenu: ContextMenu
674
692
  readonly Developer: Developer
675
693
  readonly Dialog: Dialog
694
+ readonly Chat: Chat
676
695
  readonly Editor: Editor
677
696
  readonly EditorCompletion: EditorCompletion
678
697
  readonly EditorHover: EditorHover
@@ -1620,13 +1620,13 @@ const {
1620
1620
  expect
1621
1621
  } = Expect$1;
1622
1622
 
1623
- const show$6 = async () => {
1623
+ const show$7 = async () => {
1624
1624
  return invoke('About.showAbout');
1625
1625
  };
1626
1626
  const handleClickOk = async () => {
1627
1627
  return invoke('About.handleClickOk');
1628
1628
  };
1629
- const handleClickClose = async () => {
1629
+ const handleClickClose$1 = async () => {
1630
1630
  return invoke('About.handleClickClose');
1631
1631
  };
1632
1632
  const handleClickCopy = async () => {
@@ -1642,10 +1642,10 @@ const focusPrevious$8 = async () => {
1642
1642
  const About = {
1643
1643
  focusNext: focusNext$9,
1644
1644
  focusPrevious: focusPrevious$8,
1645
- handleClickClose,
1645
+ handleClickClose: handleClickClose$1,
1646
1646
  handleClickCopy,
1647
1647
  handleClickOk,
1648
- show: show$6
1648
+ show: show$7
1649
1649
  };
1650
1650
 
1651
1651
  const focus$2 = async () => {
@@ -1681,7 +1681,7 @@ const setUpdateState = async config => {
1681
1681
  const selectCurrent = async () => {
1682
1682
  await invoke('ActivityBar.selectCurrent');
1683
1683
  };
1684
- const handleClickSettings = async (x, y) => {
1684
+ const handleClickSettings$1 = async (x, y) => {
1685
1685
  await invoke('ActivityBar.handleClickSettings', x, y);
1686
1686
  };
1687
1687
 
@@ -1692,7 +1692,7 @@ const ActivityBar = {
1692
1692
  focusNext: focusNext$8,
1693
1693
  focusPrevious: focusPrevious$7,
1694
1694
  handleClick: handleClick$4,
1695
- handleClickSettings,
1695
+ handleClickSettings: handleClickSettings$1,
1696
1696
  handleContextMenu: handleContextMenu$5,
1697
1697
  selectCurrent,
1698
1698
  setAccountEnabled,
@@ -1834,6 +1834,67 @@ const Dialog = {
1834
1834
  showSaveFilePicker
1835
1835
  };
1836
1836
 
1837
+ const handleClickBack = async () => {
1838
+ await invoke('Chat.handleClickBack');
1839
+ };
1840
+ const handleClickSettings = async () => {
1841
+ await invoke('Chat.handleClickSettings');
1842
+ };
1843
+ const selectIndex$7 = async index => {
1844
+ await invoke('Chat.selectIndex', index);
1845
+ };
1846
+ const handleClickClose = async () => {
1847
+ await invoke('Chat.handleClickClose');
1848
+ };
1849
+ const handleClickNew = async () => {
1850
+ await invoke('Chat.handleClickNew');
1851
+ };
1852
+ const enterNewLine = async () => {
1853
+ await invoke('Chat.enterNewLine');
1854
+ };
1855
+ const show$6 = async () => {
1856
+ await invoke('Layout.showSecondarySideBar');
1857
+ await invoke('Chat.reset');
1858
+ };
1859
+ const getSelectedSessionId = async () => {
1860
+ return invoke('Chat.getSelectedSessionId');
1861
+ };
1862
+ const handleInput$7 = async text => {
1863
+ await invoke('Chat.handleInput', 'composer', text, 'script');
1864
+ };
1865
+ const reset = async () => {
1866
+ await invoke('Chat.reset');
1867
+ };
1868
+ const handleSubmit = async () => {
1869
+ await invoke('Chat.handleSubmit');
1870
+ };
1871
+ const setStreamingEnabled = async enabled => {
1872
+ await invoke('Chat.setStreamingEnabled', enabled);
1873
+ };
1874
+ const useMockApi = async () => {
1875
+ await invoke('Chat.useMockApi', true);
1876
+ };
1877
+ const handleModelChange = async modelId => {
1878
+ await invoke('Chat.handleModelChange', modelId);
1879
+ };
1880
+
1881
+ const Chat = {
1882
+ enterNewLine,
1883
+ getSelectedSessionId,
1884
+ handleClickBack,
1885
+ handleClickClose,
1886
+ handleClickNew,
1887
+ handleClickSettings,
1888
+ handleInput: handleInput$7,
1889
+ handleModelChange,
1890
+ handleSubmit,
1891
+ reset,
1892
+ selectIndex: selectIndex$7,
1893
+ setStreamingEnabled,
1894
+ show: show$6,
1895
+ useMockApi
1896
+ };
1897
+
1837
1898
  const isDiagnosticEqual = (actual, expected) => {
1838
1899
  return actual.rowIndex === expected.rowIndex && actual.columnIndex === expected.columnIndex && actual.endRowIndex === expected.endRowIndex && actual.endColumnIndex === expected.endColumnIndex && actual.message === expected.message && actual.type === expected.type;
1839
1900
  };
@@ -3336,9 +3397,16 @@ const handleKeyDown = async (hdId, key, code) => {
3336
3397
  const setUri = async uri => {
3337
3398
  await invoke('Preview.setUri', uri);
3338
3399
  };
3400
+
3401
+ /**
3402
+ * @deprecated use waitForMutation instead
3403
+ */
3339
3404
  const waitForClick = async () => {
3340
3405
  await invoke('Preview.waitForClick');
3341
3406
  };
3407
+ const waitForMutation = async () => {
3408
+ await invoke('Preview.waitForMutation');
3409
+ };
3342
3410
 
3343
3411
  const Preview = {
3344
3412
  handleClick,
@@ -3349,7 +3417,8 @@ const Preview = {
3349
3417
  handleMouseUp,
3350
3418
  open: open$2,
3351
3419
  setUri,
3352
- waitForClick
3420
+ waitForClick,
3421
+ waitForMutation
3353
3422
  };
3354
3423
 
3355
3424
  const show$3 = async () => {
@@ -3996,6 +4065,7 @@ const createApi = (platform, assetDir) => {
3996
4065
  return assetDir;
3997
4066
  }
3998
4067
  },
4068
+ Chat,
3999
4069
  ClipBoard,
4000
4070
  ColorPicker,
4001
4071
  Command,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "13.6.0",
3
+ "version": "13.8.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",