@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.
Files changed (47) hide show
  1. package/dist/chat-CGZD7ZQF.mjs +16 -0
  2. package/dist/chat-provider.js +33 -1
  3. package/dist/chat-provider.js.map +1 -1
  4. package/dist/chat-provider.mjs +5 -5
  5. package/dist/{chunk-THDQFHQZ.mjs → chunk-4RRQQPFZ.mjs} +4 -4
  6. package/dist/{chunk-26KZF54U.mjs → chunk-4T6HJTYD.mjs} +1842 -1347
  7. package/dist/chunk-4T6HJTYD.mjs.map +1 -0
  8. package/dist/{chunk-37JLV5PU.mjs → chunk-6ONL4SRK.mjs} +35 -3
  9. package/dist/chunk-6ONL4SRK.mjs.map +1 -0
  10. package/dist/{chunk-LWHSOEPR.mjs → chunk-EORIRPPX.mjs} +2 -2
  11. package/dist/{chunk-LWHSOEPR.mjs.map → chunk-EORIRPPX.mjs.map} +1 -1
  12. package/dist/{chunk-HAUDGBUS.mjs → chunk-F7JXIW6T.mjs} +2 -2
  13. package/dist/{chunk-VCUVOGOO.mjs → chunk-JJTUEC2E.mjs} +98 -248
  14. package/dist/chunk-JJTUEC2E.mjs.map +1 -0
  15. package/dist/{chunk-BN3D45E2.mjs → chunk-K2JGFKEB.mjs} +2 -2
  16. package/dist/{chunk-HLNEVIFS.mjs → chunk-RLMGTTK7.mjs} +9 -9
  17. package/dist/{chunk-VTKRZNLI.mjs → chunk-SAQUEXYS.mjs} +5 -5
  18. package/dist/{chunk-W2EPDR5G.mjs → chunk-WSNV6EX5.mjs} +2 -2
  19. package/dist/index.d.mts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +4621 -4232
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +10 -10
  24. package/dist/management/management.js +2155 -1766
  25. package/dist/management/management.js.map +1 -1
  26. package/dist/management/management.mjs +8 -8
  27. package/dist/modals/chat-modal/chat-modal.js +121 -241
  28. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  29. package/dist/modals/chat-modal/chat-modal.mjs +4 -4
  30. package/dist/{modelStore-KCJPXFKO.mjs → modelStore-U57LUIIB.mjs} +2 -2
  31. package/dist/{public-nrOOzXCZ.d.ts → public-20My32EB.d.mts} +6 -1
  32. package/dist/{public-nrOOzXCZ.d.mts → public-20My32EB.d.ts} +6 -1
  33. package/dist/public-types.d.mts +1 -1
  34. package/dist/public-types.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/dist/chat-NF4FKMA4.mjs +0 -16
  37. package/dist/chunk-26KZF54U.mjs.map +0 -1
  38. package/dist/chunk-37JLV5PU.mjs.map +0 -1
  39. package/dist/chunk-VCUVOGOO.mjs.map +0 -1
  40. /package/dist/{chat-NF4FKMA4.mjs.map → chat-CGZD7ZQF.mjs.map} +0 -0
  41. /package/dist/{chunk-THDQFHQZ.mjs.map → chunk-4RRQQPFZ.mjs.map} +0 -0
  42. /package/dist/{chunk-HAUDGBUS.mjs.map → chunk-F7JXIW6T.mjs.map} +0 -0
  43. /package/dist/{chunk-BN3D45E2.mjs.map → chunk-K2JGFKEB.mjs.map} +0 -0
  44. /package/dist/{chunk-HLNEVIFS.mjs.map → chunk-RLMGTTK7.mjs.map} +0 -0
  45. /package/dist/{chunk-VTKRZNLI.mjs.map → chunk-SAQUEXYS.mjs.map} +0 -0
  46. /package/dist/{chunk-W2EPDR5G.mjs.map → chunk-WSNV6EX5.mjs.map} +0 -0
  47. /package/dist/{modelStore-KCJPXFKO.mjs.map → modelStore-U57LUIIB.mjs.map} +0 -0
@@ -0,0 +1,16 @@
1
+ import {
2
+ chat_default
3
+ } from "./chunk-4T6HJTYD.mjs";
4
+ import "./chunk-ONQMRE2G.mjs";
5
+ import "./chunk-WSNV6EX5.mjs";
6
+ import "./chunk-K2JGFKEB.mjs";
7
+ import "./chunk-JJTUEC2E.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-CGZD7ZQF.mjs.map
@@ -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);