@burtson-labs/bandit-engine 2.0.120 → 2.0.122
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-OWN4ESDC.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-32R7DYFL.mjs → chunk-42TFNHCE.mjs} +1801 -1189
- package/dist/chunk-42TFNHCE.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-CVBR7PUH.mjs → chunk-AYFWADUJ.mjs} +164 -146
- package/dist/chunk-AYFWADUJ.mjs.map +1 -0
- package/dist/{chunk-W2EPDR5G.mjs → chunk-CY6WSCRS.mjs} +2 -2
- 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-BN3D45E2.mjs → chunk-K2JGFKEB.mjs} +2 -2
- package/dist/{chunk-VCUVOGOO.mjs → chunk-LR55TJK5.mjs} +13 -3
- package/dist/chunk-LR55TJK5.mjs.map +1 -0
- package/dist/{chunk-VTKRZNLI.mjs → chunk-SAQUEXYS.mjs} +5 -5
- package/dist/{chunk-THDQFHQZ.mjs → chunk-W2Q2AF45.mjs} +4 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4632 -3962
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/management/management.js +2155 -1485
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +8 -8
- package/dist/modals/chat-modal/chat-modal.js +37 -1
- 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-QOF3GSGB.mjs +0 -16
- package/dist/chunk-32R7DYFL.mjs.map +0 -1
- package/dist/chunk-37JLV5PU.mjs.map +0 -1
- package/dist/chunk-CVBR7PUH.mjs.map +0 -1
- package/dist/chunk-VCUVOGOO.mjs.map +0 -1
- /package/dist/{chat-QOF3GSGB.mjs.map → chat-OWN4ESDC.mjs.map} +0 -0
- /package/dist/{chunk-W2EPDR5G.mjs.map → chunk-CY6WSCRS.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-VTKRZNLI.mjs.map → chunk-SAQUEXYS.mjs.map} +0 -0
- /package/dist/{chunk-THDQFHQZ.mjs.map → chunk-W2Q2AF45.mjs.map} +0 -0
- /package/dist/{modelStore-KCJPXFKO.mjs.map → modelStore-U57LUIIB.mjs.map} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
chat_default
|
|
3
|
+
} from "./chunk-42TFNHCE.mjs";
|
|
4
|
+
import "./chunk-ONQMRE2G.mjs";
|
|
5
|
+
import "./chunk-CY6WSCRS.mjs";
|
|
6
|
+
import "./chunk-K2JGFKEB.mjs";
|
|
7
|
+
import "./chunk-LR55TJK5.mjs";
|
|
8
|
+
import "./chunk-6ONL4SRK.mjs";
|
|
9
|
+
import "./chunk-EORIRPPX.mjs";
|
|
10
|
+
import "./chunk-43MLINPL.mjs";
|
|
11
|
+
import "./chunk-KCI46M23.mjs";
|
|
12
|
+
import "./chunk-BJTO5JO5.mjs";
|
|
13
|
+
export {
|
|
14
|
+
chat_default as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chat-OWN4ESDC.mjs.map
|
package/dist/chat-provider.js
CHANGED
|
@@ -4813,6 +4813,7 @@ async function loadConversations() {
|
|
|
4813
4813
|
return (raw || []).map(normalizeConversation);
|
|
4814
4814
|
}
|
|
4815
4815
|
async function saveConversation(conversation) {
|
|
4816
|
+
if (conversation.incognito) return;
|
|
4816
4817
|
await indexedDBService_default.put(DB_NAME3, DB_VERSION3, STORE_NAME3, conversation, storeConfigs3);
|
|
4817
4818
|
}
|
|
4818
4819
|
async function deleteConversationFromDB(id) {
|
|
@@ -4882,6 +4883,34 @@ var useConversationStore = (0, import_zustand6.create)((set, get) => ({
|
|
|
4882
4883
|
};
|
|
4883
4884
|
});
|
|
4884
4885
|
},
|
|
4886
|
+
toggleIncognito: () => {
|
|
4887
|
+
const { conversations, currentId } = get();
|
|
4888
|
+
const current = conversations.find((c) => c.id === currentId);
|
|
4889
|
+
if (current?.incognito) {
|
|
4890
|
+
useAIQueryStore.getState().reset();
|
|
4891
|
+
set((state) => ({
|
|
4892
|
+
conversations: state.conversations.filter((c) => !c.incognito),
|
|
4893
|
+
currentId: null
|
|
4894
|
+
}));
|
|
4895
|
+
return;
|
|
4896
|
+
}
|
|
4897
|
+
const { selectedModel } = useModelStore.getState();
|
|
4898
|
+
const now = /* @__PURE__ */ new Date();
|
|
4899
|
+
const newConv = normalizeConversation({
|
|
4900
|
+
id: (0, import_uuid.v4)(),
|
|
4901
|
+
name: "Incognito chat",
|
|
4902
|
+
history: [],
|
|
4903
|
+
model: selectedModel,
|
|
4904
|
+
createdAt: now,
|
|
4905
|
+
updatedAt: now,
|
|
4906
|
+
version: 0,
|
|
4907
|
+
incognito: true
|
|
4908
|
+
});
|
|
4909
|
+
set((state) => ({
|
|
4910
|
+
conversations: [...state.conversations, newConv],
|
|
4911
|
+
currentId: newConv.id
|
|
4912
|
+
}));
|
|
4913
|
+
},
|
|
4885
4914
|
deleteConversation: (id) => {
|
|
4886
4915
|
const runHydrate = async () => {
|
|
4887
4916
|
try {
|
|
@@ -5820,7 +5849,7 @@ function buildProjectMeta(project) {
|
|
|
5820
5849
|
}
|
|
5821
5850
|
function snapshotConversationMetaMap(conversations) {
|
|
5822
5851
|
return new Map(
|
|
5823
|
-
conversations.map((conversation) => [
|
|
5852
|
+
conversations.filter((conversation) => !conversation.incognito).map((conversation) => [
|
|
5824
5853
|
conversation.id,
|
|
5825
5854
|
buildConversationMeta(conversation)
|
|
5826
5855
|
])
|
|
@@ -5851,6 +5880,7 @@ function ensureTrackersInitialized() {
|
|
|
5851
5880
|
}
|
|
5852
5881
|
const nextMeta = snapshotConversationMetaMap(conversations);
|
|
5853
5882
|
for (const conversation of conversations) {
|
|
5883
|
+
if (conversation.incognito) continue;
|
|
5854
5884
|
const previous = conversationsMeta.get(conversation.id);
|
|
5855
5885
|
const updatedAtMs = conversation.updatedAt ? conversation.updatedAt.getTime() : 0;
|
|
5856
5886
|
if (!previous) {
|
|
@@ -5941,6 +5971,8 @@ if (typeof window !== "undefined") {
|
|
|
5941
5971
|
});
|
|
5942
5972
|
}
|
|
5943
5973
|
function queueConversationUpsert(id) {
|
|
5974
|
+
const conversation = useConversationStore.getState().conversations.find((c) => c.id === id);
|
|
5975
|
+
if (conversation?.incognito) return;
|
|
5944
5976
|
useConversationSyncStore.setState((state) => {
|
|
5945
5977
|
const upserts = new Set(state.pendingConversationUpserts);
|
|
5946
5978
|
const deletes = new Set(state.pendingConversationDeletes);
|