@burtson-labs/bandit-engine 2.0.121 → 2.0.123
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-CGZD7ZQF.mjs +16 -0
- package/dist/chat-provider.js +33 -1
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +5 -5
- package/dist/{chunk-THDQFHQZ.mjs → chunk-4RRQQPFZ.mjs} +4 -4
- package/dist/{chunk-26KZF54U.mjs → chunk-4T6HJTYD.mjs} +1842 -1347
- package/dist/chunk-4T6HJTYD.mjs.map +1 -0
- package/dist/{chunk-37JLV5PU.mjs → chunk-6ONL4SRK.mjs} +35 -3
- package/dist/chunk-6ONL4SRK.mjs.map +1 -0
- package/dist/{chunk-LWHSOEPR.mjs → chunk-EORIRPPX.mjs} +2 -2
- package/dist/{chunk-LWHSOEPR.mjs.map → chunk-EORIRPPX.mjs.map} +1 -1
- package/dist/{chunk-HAUDGBUS.mjs → chunk-F7JXIW6T.mjs} +2 -2
- package/dist/{chunk-VCUVOGOO.mjs → chunk-JJTUEC2E.mjs} +98 -248
- package/dist/chunk-JJTUEC2E.mjs.map +1 -0
- package/dist/{chunk-BN3D45E2.mjs → chunk-K2JGFKEB.mjs} +2 -2
- package/dist/{chunk-HLNEVIFS.mjs → chunk-RLMGTTK7.mjs} +9 -9
- package/dist/{chunk-VTKRZNLI.mjs → chunk-SAQUEXYS.mjs} +5 -5
- package/dist/{chunk-W2EPDR5G.mjs → chunk-WSNV6EX5.mjs} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4621 -4232
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/management/management.js +2155 -1766
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +8 -8
- package/dist/modals/chat-modal/chat-modal.js +121 -241
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +4 -4
- package/dist/{modelStore-KCJPXFKO.mjs → modelStore-U57LUIIB.mjs} +2 -2
- package/dist/{public-nrOOzXCZ.d.ts → public-20My32EB.d.mts} +6 -1
- package/dist/{public-nrOOzXCZ.d.mts → public-20My32EB.d.ts} +6 -1
- package/dist/public-types.d.mts +1 -1
- package/dist/public-types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chat-NF4FKMA4.mjs +0 -16
- package/dist/chunk-26KZF54U.mjs.map +0 -1
- package/dist/chunk-37JLV5PU.mjs.map +0 -1
- package/dist/chunk-VCUVOGOO.mjs.map +0 -1
- /package/dist/{chat-NF4FKMA4.mjs.map → chat-CGZD7ZQF.mjs.map} +0 -0
- /package/dist/{chunk-THDQFHQZ.mjs.map → chunk-4RRQQPFZ.mjs.map} +0 -0
- /package/dist/{chunk-HAUDGBUS.mjs.map → chunk-F7JXIW6T.mjs.map} +0 -0
- /package/dist/{chunk-BN3D45E2.mjs.map → chunk-K2JGFKEB.mjs.map} +0 -0
- /package/dist/{chunk-HLNEVIFS.mjs.map → chunk-RLMGTTK7.mjs.map} +0 -0
- /package/dist/{chunk-VTKRZNLI.mjs.map → chunk-SAQUEXYS.mjs.map} +0 -0
- /package/dist/{chunk-W2EPDR5G.mjs.map → chunk-WSNV6EX5.mjs.map} +0 -0
- /package/dist/{modelStore-KCJPXFKO.mjs.map → modelStore-U57LUIIB.mjs.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
indexedDBService_default,
|
|
3
3
|
useModelStore,
|
|
4
4
|
usePackageSettingsStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EORIRPPX.mjs";
|
|
6
6
|
import {
|
|
7
7
|
authenticationService,
|
|
8
8
|
useAIProviderStore,
|
|
@@ -279,6 +279,7 @@ async function loadConversations() {
|
|
|
279
279
|
return (raw || []).map(normalizeConversation);
|
|
280
280
|
}
|
|
281
281
|
async function saveConversation(conversation) {
|
|
282
|
+
if (conversation.incognito) return;
|
|
282
283
|
await indexedDBService_default.put(DB_NAME3, DB_VERSION3, STORE_NAME3, conversation, storeConfigs3);
|
|
283
284
|
}
|
|
284
285
|
async function deleteConversationFromDB(id) {
|
|
@@ -348,6 +349,34 @@ var useConversationStore = create2((set, get) => ({
|
|
|
348
349
|
};
|
|
349
350
|
});
|
|
350
351
|
},
|
|
352
|
+
toggleIncognito: () => {
|
|
353
|
+
const { conversations, currentId } = get();
|
|
354
|
+
const current = conversations.find((c) => c.id === currentId);
|
|
355
|
+
if (current?.incognito) {
|
|
356
|
+
useAIQueryStore.getState().reset();
|
|
357
|
+
set((state) => ({
|
|
358
|
+
conversations: state.conversations.filter((c) => !c.incognito),
|
|
359
|
+
currentId: null
|
|
360
|
+
}));
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
const { selectedModel } = useModelStore.getState();
|
|
364
|
+
const now = /* @__PURE__ */ new Date();
|
|
365
|
+
const newConv = normalizeConversation({
|
|
366
|
+
id: uuidv4(),
|
|
367
|
+
name: "Incognito chat",
|
|
368
|
+
history: [],
|
|
369
|
+
model: selectedModel,
|
|
370
|
+
createdAt: now,
|
|
371
|
+
updatedAt: now,
|
|
372
|
+
version: 0,
|
|
373
|
+
incognito: true
|
|
374
|
+
});
|
|
375
|
+
set((state) => ({
|
|
376
|
+
conversations: [...state.conversations, newConv],
|
|
377
|
+
currentId: newConv.id
|
|
378
|
+
}));
|
|
379
|
+
},
|
|
351
380
|
deleteConversation: (id) => {
|
|
352
381
|
const runHydrate = async () => {
|
|
353
382
|
try {
|
|
@@ -1272,7 +1301,7 @@ function buildProjectMeta(project) {
|
|
|
1272
1301
|
}
|
|
1273
1302
|
function snapshotConversationMetaMap(conversations) {
|
|
1274
1303
|
return new Map(
|
|
1275
|
-
conversations.map((conversation) => [
|
|
1304
|
+
conversations.filter((conversation) => !conversation.incognito).map((conversation) => [
|
|
1276
1305
|
conversation.id,
|
|
1277
1306
|
buildConversationMeta(conversation)
|
|
1278
1307
|
])
|
|
@@ -1303,6 +1332,7 @@ function ensureTrackersInitialized() {
|
|
|
1303
1332
|
}
|
|
1304
1333
|
const nextMeta = snapshotConversationMetaMap(conversations);
|
|
1305
1334
|
for (const conversation of conversations) {
|
|
1335
|
+
if (conversation.incognito) continue;
|
|
1306
1336
|
const previous = conversationsMeta.get(conversation.id);
|
|
1307
1337
|
const updatedAtMs = conversation.updatedAt ? conversation.updatedAt.getTime() : 0;
|
|
1308
1338
|
if (!previous) {
|
|
@@ -1393,6 +1423,8 @@ if (typeof window !== "undefined") {
|
|
|
1393
1423
|
});
|
|
1394
1424
|
}
|
|
1395
1425
|
function queueConversationUpsert(id) {
|
|
1426
|
+
const conversation = useConversationStore.getState().conversations.find((c) => c.id === id);
|
|
1427
|
+
if (conversation?.incognito) return;
|
|
1396
1428
|
useConversationSyncStore.setState((state) => {
|
|
1397
1429
|
const upserts = new Set(state.pendingConversationUpserts);
|
|
1398
1430
|
const deletes = new Set(state.pendingConversationDeletes);
|
|
@@ -5857,4 +5889,4 @@ export {
|
|
|
5857
5889
|
useNotification,
|
|
5858
5890
|
NotificationProvider
|
|
5859
5891
|
};
|
|
5860
|
-
//# sourceMappingURL=chunk-
|
|
5892
|
+
//# sourceMappingURL=chunk-6ONL4SRK.mjs.map
|