@burtson-labs/bandit-engine 2.0.50 → 2.0.51
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/{chat-CQWZOJH4.mjs → chat-W5IFNEUC.mjs} +5 -5
- package/dist/chat-provider.js +29 -14
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +3 -3
- package/dist/{chunk-VL3CMSDO.mjs → chunk-EWUUF4GE.mjs} +2 -2
- package/dist/{chunk-AXFX2HUK.mjs → chunk-HETIHZ42.mjs} +2 -2
- package/dist/{chunk-6WZUQHZT.mjs → chunk-IDH2YOW3.mjs} +30 -15
- package/dist/chunk-IDH2YOW3.mjs.map +1 -0
- package/dist/{chunk-ZTTGERUG.mjs → chunk-JBXNXSAH.mjs} +7 -7
- package/dist/{chunk-TVF45U7B.mjs → chunk-LXD3IV6Z.mjs} +3 -3
- package/dist/{chunk-KHKWYHXD.mjs → chunk-N7RMUOFB.mjs} +2 -2
- package/dist/{chunk-HKJTRBWC.mjs → chunk-QFSEZAG6.mjs} +3 -3
- package/dist/{chunk-Q2N7CCZI.mjs → chunk-STMXPFAQ.mjs} +45 -6
- package/dist/chunk-STMXPFAQ.mjs.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +69 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/management/management.js +69 -15
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +6 -6
- package/dist/modals/chat-modal/chat-modal.js +29 -14
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-6WZUQHZT.mjs.map +0 -1
- package/dist/chunk-Q2N7CCZI.mjs.map +0 -1
- /package/dist/{chat-CQWZOJH4.mjs.map → chat-W5IFNEUC.mjs.map} +0 -0
- /package/dist/{chunk-VL3CMSDO.mjs.map → chunk-EWUUF4GE.mjs.map} +0 -0
- /package/dist/{chunk-AXFX2HUK.mjs.map → chunk-HETIHZ42.mjs.map} +0 -0
- /package/dist/{chunk-ZTTGERUG.mjs.map → chunk-JBXNXSAH.mjs.map} +0 -0
- /package/dist/{chunk-TVF45U7B.mjs.map → chunk-LXD3IV6Z.mjs.map} +0 -0
- /package/dist/{chunk-KHKWYHXD.mjs.map → chunk-N7RMUOFB.mjs.map} +0 -0
- /package/dist/{chunk-HKJTRBWC.mjs.map → chunk-QFSEZAG6.mjs.map} +0 -0
package/dist/chat-provider.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatProvider,
|
|
3
3
|
chat_provider_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QFSEZAG6.mjs";
|
|
5
5
|
import "./chunk-ONQMRE2G.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-EWUUF4GE.mjs";
|
|
7
7
|
import "./chunk-EHNWQ4T3.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-IDH2YOW3.mjs";
|
|
9
9
|
import "./chunk-7ZDS33S2.mjs";
|
|
10
10
|
import "./chunk-BENL3EF2.mjs";
|
|
11
11
|
import "./chunk-KCI46M23.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authenticationService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IDH2YOW3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
indexedDBService_default,
|
|
6
6
|
usePackageSettingsStore
|
|
@@ -287,4 +287,4 @@ var aiProviderInitService = AIProviderInitService.getInstance();
|
|
|
287
287
|
export {
|
|
288
288
|
aiProviderInitService
|
|
289
289
|
};
|
|
290
|
-
//# sourceMappingURL=chunk-
|
|
290
|
+
//# sourceMappingURL=chunk-EWUUF4GE.mjs.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useMemoryStore,
|
|
9
9
|
useNotification,
|
|
10
10
|
useVectorStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IDH2YOW3.mjs";
|
|
12
12
|
import {
|
|
13
13
|
useModelStore,
|
|
14
14
|
usePackageSettingsStore,
|
|
@@ -8922,4 +8922,4 @@ export {
|
|
|
8922
8922
|
FeedbackButton,
|
|
8923
8923
|
useNotificationService
|
|
8924
8924
|
};
|
|
8925
|
-
//# sourceMappingURL=chunk-
|
|
8925
|
+
//# sourceMappingURL=chunk-HETIHZ42.mjs.map
|
|
@@ -119,7 +119,18 @@ async function saveStateToDB(state) {
|
|
|
119
119
|
await indexedDBService_default.put(DB_NAME, DB_VERSION, STORE_NAME, state, storeConfigs, STORAGE_KEY);
|
|
120
120
|
}
|
|
121
121
|
async function loadStateFromDB() {
|
|
122
|
-
|
|
122
|
+
let timeoutId;
|
|
123
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
124
|
+
timeoutId = window.setTimeout(() => resolve(void 0), 1200);
|
|
125
|
+
});
|
|
126
|
+
try {
|
|
127
|
+
const getPromise = indexedDBService_default.get(DB_NAME, DB_VERSION, STORE_NAME, STORAGE_KEY, storeConfigs).catch(() => void 0);
|
|
128
|
+
return await Promise.race([getPromise, timeoutPromise]);
|
|
129
|
+
} finally {
|
|
130
|
+
if (timeoutId !== void 0) {
|
|
131
|
+
window.clearTimeout(timeoutId);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
123
134
|
}
|
|
124
135
|
var useAIQueryStore = create2((set, get) => ({
|
|
125
136
|
inputValue: "",
|
|
@@ -175,19 +186,23 @@ var useAIQueryStore = create2((set, get) => ({
|
|
|
175
186
|
saveStateToDB(resetState);
|
|
176
187
|
},
|
|
177
188
|
hydrate: async () => {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
try {
|
|
190
|
+
const storedState = await loadStateFromDB();
|
|
191
|
+
if (storedState) {
|
|
192
|
+
set({
|
|
193
|
+
inputValue: storedState.inputValue ?? "",
|
|
194
|
+
response: storedState.response ?? "",
|
|
195
|
+
previousQuestion: storedState.previousQuestion ?? "",
|
|
196
|
+
position: storedState.position ?? { x: window.innerWidth / 2 - 300, y: window.innerHeight - 350 },
|
|
197
|
+
componentStatus: "Idle",
|
|
198
|
+
history: storedState.history ?? [],
|
|
199
|
+
apiKey: storedState.apiKey ?? "",
|
|
200
|
+
hydrated: true
|
|
201
|
+
});
|
|
202
|
+
} else {
|
|
203
|
+
set({ hydrated: true });
|
|
204
|
+
}
|
|
205
|
+
} catch {
|
|
191
206
|
set({ hydrated: true });
|
|
192
207
|
}
|
|
193
208
|
}
|
|
@@ -5722,4 +5737,4 @@ export {
|
|
|
5722
5737
|
useNotification,
|
|
5723
5738
|
NotificationProvider
|
|
5724
5739
|
};
|
|
5725
|
-
//# sourceMappingURL=chunk-
|
|
5740
|
+
//# sourceMappingURL=chunk-IDH2YOW3.mjs.map
|