@midscene/visualizer 0.30.10 → 1.0.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.
Files changed (123) hide show
  1. package/dist/es/component/blackboard/index.css +8 -0
  2. package/dist/es/component/blackboard/index.mjs +137 -68
  3. package/dist/es/component/config-selector/index.mjs +102 -4
  4. package/dist/es/component/context-preview/index.mjs +1 -2
  5. package/dist/es/component/env-config/index.mjs +1 -2
  6. package/dist/es/component/env-config-reminder/index.css +8 -0
  7. package/dist/es/component/env-config-reminder/index.mjs +1 -2
  8. package/dist/es/component/form-field/index.mjs +5 -10
  9. package/dist/es/component/history-selector/index.css +38 -1
  10. package/dist/es/component/history-selector/index.mjs +1 -2
  11. package/dist/es/component/logo/index.mjs +7 -3
  12. package/dist/es/component/misc/index.mjs +1 -4
  13. package/dist/es/component/nav-actions/index.mjs +1 -2
  14. package/dist/es/component/nav-actions/style.css +1 -1
  15. package/dist/es/component/player/index.css +26 -0
  16. package/dist/es/component/player/index.mjs +376 -364
  17. package/dist/es/component/playground/index.css +291 -31
  18. package/dist/es/component/playground-result/index.css +10 -0
  19. package/dist/es/component/playground-result/index.mjs +129 -10
  20. package/dist/es/component/prompt-input/index.css +281 -31
  21. package/dist/es/component/prompt-input/index.mjs +83 -25
  22. package/dist/es/component/screenshot-viewer/index.css +214 -0
  23. package/dist/es/component/screenshot-viewer/index.mjs +282 -0
  24. package/dist/es/component/service-mode-control/index.mjs +1 -2
  25. package/dist/es/component/shiny-text/index.css +35 -3
  26. package/dist/es/component/shiny-text/index.mjs +3 -3
  27. package/dist/es/component/universal-playground/index.css +61 -1
  28. package/dist/es/component/universal-playground/index.mjs +106 -83
  29. package/dist/es/component/universal-playground/providers/context-provider.mjs +56 -18
  30. package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +213 -139
  31. package/dist/es/component/universal-playground/providers/storage-provider.mjs +199 -121
  32. package/dist/es/hooks/usePlaygroundExecution.mjs +297 -146
  33. package/dist/es/hooks/usePlaygroundState.mjs +141 -75
  34. package/dist/es/hooks/useSafeOverrideAIConfig.mjs +2 -6
  35. package/dist/es/hooks/useServerValid.mjs +37 -12
  36. package/dist/es/hooks/useTheme.mjs +25 -0
  37. package/dist/es/icons/avatar.mjs +46 -4
  38. package/dist/es/icons/close.mjs +46 -4
  39. package/dist/es/icons/global-perspective.mjs +47 -5
  40. package/dist/es/icons/history.mjs +48 -6
  41. package/dist/es/icons/magnifying-glass.mjs +47 -5
  42. package/dist/es/icons/player-setting.mjs +48 -6
  43. package/dist/es/icons/setting.mjs +47 -5
  44. package/dist/es/icons/show-marker.mjs +47 -5
  45. package/dist/es/index.mjs +4 -4
  46. package/dist/es/store/history.mjs +46 -7
  47. package/dist/es/store/store.mjs +68 -2
  48. package/dist/es/types.mjs +1 -1
  49. package/dist/es/utils/constants.mjs +7 -3
  50. package/dist/es/utils/index.mjs +4 -1
  51. package/dist/es/utils/pixi-loader.mjs +37 -11
  52. package/dist/es/utils/replay-scripts.mjs +160 -111
  53. package/dist/lib/component/blackboard/index.css +8 -0
  54. package/dist/lib/component/blackboard/index.js +139 -70
  55. package/dist/lib/component/config-selector/index.js +103 -5
  56. package/dist/lib/component/context-preview/index.js +3 -4
  57. package/dist/lib/component/env-config/index.js +3 -4
  58. package/dist/lib/component/env-config-reminder/index.css +8 -0
  59. package/dist/lib/component/env-config-reminder/index.js +3 -4
  60. package/dist/lib/component/form-field/index.js +10 -15
  61. package/dist/lib/component/history-selector/index.css +38 -1
  62. package/dist/lib/component/history-selector/index.js +3 -4
  63. package/dist/lib/component/index.js +6 -8
  64. package/dist/lib/component/logo/index.js +9 -5
  65. package/dist/lib/component/misc/index.js +6 -9
  66. package/dist/lib/component/nav-actions/index.js +3 -4
  67. package/dist/lib/component/nav-actions/style.css +1 -1
  68. package/dist/lib/component/player/index.css +26 -0
  69. package/dist/lib/component/player/index.js +376 -365
  70. package/dist/lib/component/playground/index.css +291 -31
  71. package/dist/lib/component/playground/index.js +31 -33
  72. package/dist/lib/component/playground-result/index.css +10 -0
  73. package/dist/lib/component/playground-result/index.js +131 -12
  74. package/dist/lib/component/prompt-input/index.css +281 -31
  75. package/dist/lib/component/prompt-input/index.js +84 -26
  76. package/dist/lib/component/screenshot-viewer/index.css +214 -0
  77. package/dist/lib/component/screenshot-viewer/index.js +316 -0
  78. package/dist/lib/component/service-mode-control/index.js +3 -4
  79. package/dist/lib/component/shiny-text/index.css +35 -3
  80. package/dist/lib/component/shiny-text/index.js +5 -5
  81. package/dist/lib/component/universal-playground/index.css +61 -1
  82. package/dist/lib/component/universal-playground/index.js +108 -84
  83. package/dist/lib/component/universal-playground/providers/context-provider.js +58 -20
  84. package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +217 -143
  85. package/dist/lib/component/universal-playground/providers/storage-provider.js +207 -129
  86. package/dist/lib/hooks/usePlaygroundExecution.js +299 -148
  87. package/dist/lib/hooks/usePlaygroundState.js +143 -77
  88. package/dist/lib/hooks/useSafeOverrideAIConfig.js +4 -8
  89. package/dist/lib/hooks/useServerValid.js +39 -14
  90. package/dist/lib/hooks/useTheme.js +59 -0
  91. package/dist/lib/icons/avatar.js +48 -6
  92. package/dist/lib/icons/close.js +48 -6
  93. package/dist/lib/icons/global-perspective.js +49 -7
  94. package/dist/lib/icons/history.js +50 -8
  95. package/dist/lib/icons/magnifying-glass.js +49 -7
  96. package/dist/lib/icons/player-setting.js +50 -8
  97. package/dist/lib/icons/setting.js +49 -7
  98. package/dist/lib/icons/show-marker.js +49 -7
  99. package/dist/lib/index.js +44 -34
  100. package/dist/lib/store/history.js +48 -9
  101. package/dist/lib/store/store.js +74 -8
  102. package/dist/lib/types.js +3 -3
  103. package/dist/lib/utils/color.js +2 -2
  104. package/dist/lib/utils/constants.js +20 -4
  105. package/dist/lib/utils/index.js +10 -4
  106. package/dist/lib/utils/pixi-loader.js +41 -15
  107. package/dist/lib/utils/playground-utils.js +4 -4
  108. package/dist/lib/utils/replay-scripts.js +164 -115
  109. package/dist/types/component/config-selector/index.d.ts +2 -0
  110. package/dist/types/component/player/index.d.ts +0 -1
  111. package/dist/types/component/playground-result/index.d.ts +1 -0
  112. package/dist/types/component/prompt-input/index.d.ts +2 -1
  113. package/dist/types/component/screenshot-viewer/index.d.ts +15 -0
  114. package/dist/types/hooks/usePlaygroundExecution.d.ts +1 -1
  115. package/dist/types/hooks/usePlaygroundState.d.ts +3 -3
  116. package/dist/types/hooks/useTheme.d.ts +7 -0
  117. package/dist/types/index.d.ts +3 -3
  118. package/dist/types/store/store.d.ts +18 -1
  119. package/dist/types/types.d.ts +14 -4
  120. package/dist/types/utils/constants.d.ts +5 -1
  121. package/dist/types/utils/index.d.ts +1 -0
  122. package/dist/types/utils/replay-scripts.d.ts +1 -1
  123. package/package.json +12 -22
@@ -24,11 +24,37 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- IndexedDBStorageProvider: ()=>IndexedDBStorageProvider,
27
+ MemoryStorageProvider: ()=>MemoryStorageProvider,
28
28
  NoOpStorageProvider: ()=>NoOpStorageProvider,
29
- MemoryStorageProvider: ()=>MemoryStorageProvider
29
+ IndexedDBStorageProvider: ()=>IndexedDBStorageProvider
30
30
  });
31
31
  const baseDB_namespaceObject = require("@midscene/shared/baseDB");
32
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
33
+ try {
34
+ var info = gen[key](arg);
35
+ var value = info.value;
36
+ } catch (error) {
37
+ reject(error);
38
+ return;
39
+ }
40
+ if (info.done) resolve(value);
41
+ else Promise.resolve(value).then(_next, _throw);
42
+ }
43
+ function _async_to_generator(fn) {
44
+ return function() {
45
+ var self = this, args = arguments;
46
+ return new Promise(function(resolve, reject) {
47
+ var gen = fn.apply(self, args);
48
+ function _next(value) {
49
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
50
+ }
51
+ function _throw(err) {
52
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
53
+ }
54
+ _next(void 0);
55
+ });
56
+ };
57
+ }
32
58
  function _define_property(obj, key, value) {
33
59
  if (key in obj) Object.defineProperty(obj, key, {
34
60
  value: value,
@@ -39,6 +65,38 @@ function _define_property(obj, key, value) {
39
65
  else obj[key] = value;
40
66
  return obj;
41
67
  }
68
+ function _object_spread(target) {
69
+ for(var i = 1; i < arguments.length; i++){
70
+ var source = null != arguments[i] ? arguments[i] : {};
71
+ var ownKeys = Object.keys(source);
72
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
73
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
74
+ }));
75
+ ownKeys.forEach(function(key) {
76
+ _define_property(target, key, source[key]);
77
+ });
78
+ }
79
+ return target;
80
+ }
81
+ function indexeddb_storage_provider_ownKeys(object, enumerableOnly) {
82
+ var keys = Object.keys(object);
83
+ if (Object.getOwnPropertySymbols) {
84
+ var symbols = Object.getOwnPropertySymbols(object);
85
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
86
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
87
+ });
88
+ keys.push.apply(keys, symbols);
89
+ }
90
+ return keys;
91
+ }
92
+ function _object_spread_props(target, source) {
93
+ source = null != source ? source : {};
94
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
95
+ else indexeddb_storage_provider_ownKeys(Object(source)).forEach(function(key) {
96
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
97
+ });
98
+ return target;
99
+ }
42
100
  const DB_NAME = 'midscene_playground';
43
101
  const DB_VERSION = 1;
44
102
  const MESSAGES_STORE = 'playground_messages';
@@ -46,109 +104,105 @@ const RESULTS_STORE = 'playground_results';
46
104
  const MAX_STORED_MESSAGES = 100;
47
105
  const MAX_STORED_RESULTS = 50;
48
106
  class IndexedDBStorageProvider {
49
- async saveMessages(messages) {
50
- await (0, baseDB_namespaceObject.withErrorHandling)(async ()=>{
51
- await this.dbManager.clear(MESSAGES_STORE);
52
- const messagesToSave = messages.slice(-MAX_STORED_MESSAGES);
53
- await Promise.all(messagesToSave.map((msg, index)=>{
54
- const lightMessage = {
55
- ...msg,
56
- result: void 0
57
- };
58
- const data = {
59
- id: msg.id || `msg-${index}`,
60
- data: lightMessage,
61
- timestamp: msg.timestamp ? msg.timestamp.getTime() : Date.now() + index
62
- };
63
- return this.dbManager.put(MESSAGES_STORE, data);
64
- }));
65
- }, 'Failed to save messages to IndexedDB', void 0, this.messagesCleanup);
66
- }
67
- async loadMessages() {
68
- const result = await (0, baseDB_namespaceObject.withErrorHandling)(async ()=>{
69
- const messages = await this.dbManager.getAll(MESSAGES_STORE, true);
70
- if (0 === messages.length) return [];
71
- return Promise.all(messages.map(async (msg)=>{
72
- const item = msg.data;
73
- const restoredItem = {
74
- ...item,
75
- timestamp: new Date(item.timestamp)
76
- };
77
- if ('result' === item.type && item.id) {
78
- const fullResult = await this.loadResult(item.id);
79
- if (fullResult) {
80
- restoredItem.result = fullResult.result;
81
- restoredItem.replayScriptsInfo = fullResult.replayScriptsInfo;
82
- restoredItem.replayCounter = fullResult.replayCounter;
83
- restoredItem.verticalMode = fullResult.verticalMode;
84
- }
85
- }
86
- return restoredItem;
87
- }));
88
- }, 'Failed to load messages from IndexedDB', [], this.messagesCleanup);
89
- return result || [];
90
- }
91
- async clearMessages() {
92
- await (0, baseDB_namespaceObject.withErrorHandling)(async ()=>{
93
- await Promise.all([
94
- this.dbManager.clear(MESSAGES_STORE),
95
- this.dbManager.clear(RESULTS_STORE)
96
- ]);
97
- }, 'Failed to clear messages from IndexedDB');
98
- }
99
- async saveResult(id, result) {
100
- await (0, baseDB_namespaceObject.withErrorHandling)(async ()=>{
101
- const compressedResult = this.compressResultForStorage(result);
102
- const data = {
103
- id,
104
- data: compressedResult,
105
- timestamp: Date.now(),
106
- size: JSON.stringify(compressedResult).length
107
- };
108
- await this.dbManager.put(RESULTS_STORE, data);
109
- }, 'Failed to save result to IndexedDB', void 0, this.resultsCleanup);
107
+ saveMessages(messages) {
108
+ return _async_to_generator(function*() {
109
+ yield (0, baseDB_namespaceObject.withErrorHandling)(()=>_async_to_generator(function*() {
110
+ yield this.dbManager.clear(MESSAGES_STORE);
111
+ const messagesToSave = messages.slice(-MAX_STORED_MESSAGES);
112
+ yield Promise.all(messagesToSave.map((msg, index)=>{
113
+ const lightMessage = _object_spread_props(_object_spread({}, msg), {
114
+ result: 'result' === msg.type ? void 0 : msg.result
115
+ });
116
+ const data = {
117
+ id: msg.id || `msg-${index}`,
118
+ data: lightMessage,
119
+ timestamp: msg.timestamp ? msg.timestamp.getTime() : Date.now() + index
120
+ };
121
+ return this.dbManager.put(MESSAGES_STORE, data);
122
+ }));
123
+ }).call(this), 'Failed to save messages to IndexedDB', void 0, this.messagesCleanup);
124
+ }).call(this);
125
+ }
126
+ loadMessages() {
127
+ return _async_to_generator(function*() {
128
+ const result = yield (0, baseDB_namespaceObject.withErrorHandling)(()=>_async_to_generator(function*() {
129
+ const messages = yield this.dbManager.getAll(MESSAGES_STORE, true);
130
+ if (0 === messages.length) return [];
131
+ return Promise.all(messages.map((msg)=>_async_to_generator(function*() {
132
+ const item = msg.data;
133
+ const restoredItem = _object_spread_props(_object_spread({}, item), {
134
+ timestamp: new Date(item.timestamp)
135
+ });
136
+ if ('result' === item.type && item.id) {
137
+ const fullResult = yield this.loadResult(item.id);
138
+ if (fullResult) {
139
+ restoredItem.result = fullResult.result;
140
+ restoredItem.replayScriptsInfo = fullResult.replayScriptsInfo;
141
+ restoredItem.replayCounter = fullResult.replayCounter;
142
+ restoredItem.verticalMode = fullResult.verticalMode;
143
+ }
144
+ }
145
+ return restoredItem;
146
+ }).call(this)));
147
+ }).call(this), 'Failed to load messages from IndexedDB', [], this.messagesCleanup);
148
+ return result || [];
149
+ }).call(this);
110
150
  }
111
- async loadResult(id) {
112
- const result = await (0, baseDB_namespaceObject.withErrorHandling)(async ()=>{
113
- const data = await this.dbManager.get(RESULTS_STORE, id);
114
- return (null == data ? void 0 : data.data) || null;
115
- }, 'Failed to load result from IndexedDB', null);
116
- return result || null;
151
+ clearMessages() {
152
+ return _async_to_generator(function*() {
153
+ yield (0, baseDB_namespaceObject.withErrorHandling)(()=>_async_to_generator(function*() {
154
+ yield Promise.all([
155
+ this.dbManager.clear(MESSAGES_STORE),
156
+ this.dbManager.clear(RESULTS_STORE)
157
+ ]);
158
+ }).call(this), 'Failed to clear messages from IndexedDB');
159
+ }).call(this);
160
+ }
161
+ saveResult(id, result) {
162
+ return _async_to_generator(function*() {
163
+ yield (0, baseDB_namespaceObject.withErrorHandling)(()=>_async_to_generator(function*() {
164
+ const compressedResult = this.compressResultForStorage(result);
165
+ const data = {
166
+ id,
167
+ data: compressedResult,
168
+ timestamp: Date.now(),
169
+ size: JSON.stringify(compressedResult).length
170
+ };
171
+ yield this.dbManager.put(RESULTS_STORE, data);
172
+ }).call(this), 'Failed to save result to IndexedDB', void 0, this.resultsCleanup);
173
+ }).call(this);
174
+ }
175
+ loadResult(id) {
176
+ return _async_to_generator(function*() {
177
+ const result = yield (0, baseDB_namespaceObject.withErrorHandling)(()=>_async_to_generator(function*() {
178
+ const data = yield this.dbManager.get(RESULTS_STORE, id);
179
+ return (null == data ? void 0 : data.data) || null;
180
+ }).call(this), 'Failed to load result from IndexedDB', null);
181
+ return result || null;
182
+ }).call(this);
117
183
  }
118
184
  compressResultForStorage(result) {
119
185
  var _result_result_dump, _result_result;
120
- if (!(null == (_result_result = result.result) ? void 0 : null == (_result_result_dump = _result_result.dump) ? void 0 : _result_result_dump.executions)) return result;
121
- const compressedExecutions = result.result.dump.executions.map((execution)=>{
122
- var _execution_tasks;
123
- return {
124
- ...execution,
125
- tasks: (null == (_execution_tasks = execution.tasks) ? void 0 : _execution_tasks.map((task)=>{
126
- var _task_recorder;
127
- var _this_compressScreenshotIfNeeded;
128
- return {
129
- ...task,
130
- uiContext: task.uiContext ? {
131
- ...task.uiContext,
132
- screenshotBase64: null != (_this_compressScreenshotIfNeeded = this.compressScreenshotIfNeeded(task.uiContext.screenshotBase64)) ? _this_compressScreenshotIfNeeded : task.uiContext.screenshotBase64
133
- } : task.uiContext,
134
- recorder: null == (_task_recorder = task.recorder) ? void 0 : _task_recorder.map((record)=>({
135
- ...record,
136
- screenshot: this.compressScreenshotIfNeeded(record.screenshot)
137
- }))
138
- };
139
- })) || []
140
- };
186
+ if (!(null == (_result_result = result.result) ? void 0 : null == (_result_result_dump = _result_result.dump) ? void 0 : _result_result_dump.tasks)) return result;
187
+ const compressedTasks = result.result.dump.tasks.map((task)=>{
188
+ var _task_recorder;
189
+ var _this_compressScreenshotIfNeeded;
190
+ return _object_spread_props(_object_spread({}, task), {
191
+ uiContext: task.uiContext ? _object_spread_props(_object_spread({}, task.uiContext), {
192
+ screenshotBase64: null != (_this_compressScreenshotIfNeeded = this.compressScreenshotIfNeeded(task.uiContext.screenshotBase64)) ? _this_compressScreenshotIfNeeded : task.uiContext.screenshotBase64
193
+ }) : task.uiContext,
194
+ recorder: null == (_task_recorder = task.recorder) ? void 0 : _task_recorder.map((record)=>_object_spread_props(_object_spread({}, record), {
195
+ screenshot: this.compressScreenshotIfNeeded(record.screenshot)
196
+ }))
197
+ });
198
+ });
199
+ return _object_spread_props(_object_spread({}, result), {
200
+ result: _object_spread_props(_object_spread({}, result.result), {
201
+ dump: _object_spread_props(_object_spread({}, result.result.dump), {
202
+ tasks: compressedTasks
203
+ })
204
+ })
141
205
  });
142
- return {
143
- ...result,
144
- result: {
145
- ...result.result,
146
- dump: {
147
- ...result.result.dump,
148
- executions: compressedExecutions
149
- }
150
- }
151
- };
152
206
  }
153
207
  compressScreenshotIfNeeded(screenshot) {
154
208
  if (!screenshot) return screenshot;
@@ -158,30 +212,34 @@ class IndexedDBStorageProvider {
158
212
  }
159
213
  return screenshot;
160
214
  }
161
- async getStorageStats() {
162
- const result = await (0, baseDB_namespaceObject.withErrorHandling)(async ()=>{
163
- const [messageCount, resultCount] = await Promise.all([
164
- this.dbManager.count(MESSAGES_STORE),
165
- this.dbManager.count(RESULTS_STORE)
166
- ]);
167
- return {
168
- messageCount,
169
- resultCount
215
+ getStorageStats() {
216
+ return _async_to_generator(function*() {
217
+ const result = yield (0, baseDB_namespaceObject.withErrorHandling)(()=>_async_to_generator(function*() {
218
+ const [messageCount, resultCount] = yield Promise.all([
219
+ this.dbManager.count(MESSAGES_STORE),
220
+ this.dbManager.count(RESULTS_STORE)
221
+ ]);
222
+ return {
223
+ messageCount,
224
+ resultCount
225
+ };
226
+ }).call(this), 'Failed to get storage statistics', {
227
+ messageCount: 0,
228
+ resultCount: 0
229
+ });
230
+ return result || {
231
+ messageCount: 0,
232
+ resultCount: 0
170
233
  };
171
- }, 'Failed to get storage statistics', {
172
- messageCount: 0,
173
- resultCount: 0
174
- });
175
- return result || {
176
- messageCount: 0,
177
- resultCount: 0
178
- };
179
- }
180
- async cleanup() {
181
- await Promise.all([
182
- this.messagesCleanup(),
183
- this.resultsCleanup()
184
- ]);
234
+ }).call(this);
235
+ }
236
+ cleanup() {
237
+ return _async_to_generator(function*() {
238
+ yield Promise.all([
239
+ this.messagesCleanup(),
240
+ this.resultsCleanup()
241
+ ]);
242
+ }).call(this);
185
243
  }
186
244
  constructor(namespace = 'playground'){
187
245
  _define_property(this, "dbManager", void 0);
@@ -204,22 +262,30 @@ class IndexedDBStorageProvider {
204
262
  }
205
263
  }
206
264
  class MemoryStorageProvider {
207
- async saveMessages(messages) {
208
- this.messages = [
209
- ...messages
210
- ];
265
+ saveMessages(messages) {
266
+ return _async_to_generator(function*() {
267
+ this.messages = [
268
+ ...messages
269
+ ];
270
+ }).call(this);
211
271
  }
212
- async loadMessages() {
213
- return [
214
- ...this.messages
215
- ];
272
+ loadMessages() {
273
+ return _async_to_generator(function*() {
274
+ return [
275
+ ...this.messages
276
+ ];
277
+ }).call(this);
216
278
  }
217
- async clearMessages() {
218
- this.messages = [];
219
- this.results.clear();
279
+ clearMessages() {
280
+ return _async_to_generator(function*() {
281
+ this.messages = [];
282
+ this.results.clear();
283
+ }).call(this);
220
284
  }
221
- async saveResult(id, result) {
222
- this.results.set(id, result);
285
+ saveResult(id, result) {
286
+ return _async_to_generator(function*() {
287
+ this.results.set(id, result);
288
+ }).call(this);
223
289
  }
224
290
  constructor(){
225
291
  _define_property(this, "messages", []);
@@ -227,21 +293,29 @@ class MemoryStorageProvider {
227
293
  }
228
294
  }
229
295
  class NoOpStorageProvider {
230
- async saveMessages(_messages) {}
231
- async loadMessages() {
232
- return [];
296
+ saveMessages(_messages) {
297
+ return _async_to_generator(function*() {})();
298
+ }
299
+ loadMessages() {
300
+ return _async_to_generator(function*() {
301
+ return [];
302
+ })();
303
+ }
304
+ clearMessages() {
305
+ return _async_to_generator(function*() {})();
306
+ }
307
+ saveResult(_id, _result) {
308
+ return _async_to_generator(function*() {})();
233
309
  }
234
- async clearMessages() {}
235
- async saveResult(_id, _result) {}
236
310
  }
237
311
  exports.IndexedDBStorageProvider = __webpack_exports__.IndexedDBStorageProvider;
238
312
  exports.MemoryStorageProvider = __webpack_exports__.MemoryStorageProvider;
239
313
  exports.NoOpStorageProvider = __webpack_exports__.NoOpStorageProvider;
240
- for(var __webpack_i__ in __webpack_exports__)if (-1 === [
314
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
241
315
  "IndexedDBStorageProvider",
242
316
  "MemoryStorageProvider",
243
317
  "NoOpStorageProvider"
244
- ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
318
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
245
319
  Object.defineProperty(exports, '__esModule', {
246
320
  value: true
247
321
  });