@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.
Files changed (48) hide show
  1. package/dist/chat-OWN4ESDC.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-32R7DYFL.mjs → chunk-42TFNHCE.mjs} +1801 -1189
  6. package/dist/chunk-42TFNHCE.mjs.map +1 -0
  7. package/dist/{chunk-37JLV5PU.mjs → chunk-6ONL4SRK.mjs} +35 -3
  8. package/dist/chunk-6ONL4SRK.mjs.map +1 -0
  9. package/dist/{chunk-CVBR7PUH.mjs → chunk-AYFWADUJ.mjs} +164 -146
  10. package/dist/chunk-AYFWADUJ.mjs.map +1 -0
  11. package/dist/{chunk-W2EPDR5G.mjs → chunk-CY6WSCRS.mjs} +2 -2
  12. package/dist/{chunk-LWHSOEPR.mjs → chunk-EORIRPPX.mjs} +2 -2
  13. package/dist/{chunk-LWHSOEPR.mjs.map → chunk-EORIRPPX.mjs.map} +1 -1
  14. package/dist/{chunk-HAUDGBUS.mjs → chunk-F7JXIW6T.mjs} +2 -2
  15. package/dist/{chunk-BN3D45E2.mjs → chunk-K2JGFKEB.mjs} +2 -2
  16. package/dist/{chunk-VCUVOGOO.mjs → chunk-LR55TJK5.mjs} +13 -3
  17. package/dist/chunk-LR55TJK5.mjs.map +1 -0
  18. package/dist/{chunk-VTKRZNLI.mjs → chunk-SAQUEXYS.mjs} +5 -5
  19. package/dist/{chunk-THDQFHQZ.mjs → chunk-W2Q2AF45.mjs} +4 -4
  20. package/dist/index.d.mts +2 -2
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.js +4632 -3962
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.mjs +10 -10
  25. package/dist/management/management.js +2155 -1485
  26. package/dist/management/management.js.map +1 -1
  27. package/dist/management/management.mjs +8 -8
  28. package/dist/modals/chat-modal/chat-modal.js +37 -1
  29. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  30. package/dist/modals/chat-modal/chat-modal.mjs +4 -4
  31. package/dist/{modelStore-KCJPXFKO.mjs → modelStore-U57LUIIB.mjs} +2 -2
  32. package/dist/{public-nrOOzXCZ.d.ts → public-20My32EB.d.mts} +6 -1
  33. package/dist/{public-nrOOzXCZ.d.mts → public-20My32EB.d.ts} +6 -1
  34. package/dist/public-types.d.mts +1 -1
  35. package/dist/public-types.d.ts +1 -1
  36. package/package.json +1 -1
  37. package/dist/chat-QOF3GSGB.mjs +0 -16
  38. package/dist/chunk-32R7DYFL.mjs.map +0 -1
  39. package/dist/chunk-37JLV5PU.mjs.map +0 -1
  40. package/dist/chunk-CVBR7PUH.mjs.map +0 -1
  41. package/dist/chunk-VCUVOGOO.mjs.map +0 -1
  42. /package/dist/{chat-QOF3GSGB.mjs.map → chat-OWN4ESDC.mjs.map} +0 -0
  43. /package/dist/{chunk-W2EPDR5G.mjs.map → chunk-CY6WSCRS.mjs.map} +0 -0
  44. /package/dist/{chunk-HAUDGBUS.mjs.map → chunk-F7JXIW6T.mjs.map} +0 -0
  45. /package/dist/{chunk-BN3D45E2.mjs.map → chunk-K2JGFKEB.mjs.map} +0 -0
  46. /package/dist/{chunk-VTKRZNLI.mjs.map → chunk-SAQUEXYS.mjs.map} +0 -0
  47. /package/dist/{chunk-THDQFHQZ.mjs.map → chunk-W2Q2AF45.mjs.map} +0 -0
  48. /package/dist/{modelStore-KCJPXFKO.mjs.map → modelStore-U57LUIIB.mjs.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  management_default
3
- } from "../chunk-CVBR7PUH.mjs";
4
- import "../chunk-W2EPDR5G.mjs";
5
- import "../chunk-HAUDGBUS.mjs";
6
- import "../chunk-BN3D45E2.mjs";
7
- import "../chunk-THDQFHQZ.mjs";
8
- import "../chunk-VCUVOGOO.mjs";
9
- import "../chunk-37JLV5PU.mjs";
10
- import "../chunk-LWHSOEPR.mjs";
3
+ } from "../chunk-AYFWADUJ.mjs";
4
+ import "../chunk-CY6WSCRS.mjs";
5
+ import "../chunk-F7JXIW6T.mjs";
6
+ import "../chunk-K2JGFKEB.mjs";
7
+ import "../chunk-W2Q2AF45.mjs";
8
+ import "../chunk-LR55TJK5.mjs";
9
+ import "../chunk-6ONL4SRK.mjs";
10
+ import "../chunk-EORIRPPX.mjs";
11
11
  import "../chunk-43MLINPL.mjs";
12
12
  import "../chunk-KCI46M23.mjs";
13
13
  import "../chunk-BJTO5JO5.mjs";
@@ -4700,6 +4700,9 @@ var createMuiLucideIcon = (Icon) => {
4700
4700
  return MuiLucideIcon;
4701
4701
  };
4702
4702
  var AddIcon = createMuiLucideIcon(import_lucide_react.Plus);
4703
+ var GhostIcon = createMuiLucideIcon(import_lucide_react.Ghost);
4704
+ var PanelLeftIcon = createMuiLucideIcon(import_lucide_react.PanelLeft);
4705
+ var ComposeIcon = createMuiLucideIcon(import_lucide_react.SquarePen);
4703
4706
  var CloudDoneIcon = createMuiLucideIcon(import_lucide_react.CloudCheck);
4704
4707
  var CloudOffIcon = createMuiLucideIcon(import_lucide_react.CloudOff);
4705
4708
  var ErrorOutlineIcon = createMuiLucideIcon(import_lucide_react.CircleAlert);
@@ -7569,6 +7572,7 @@ async function loadConversations() {
7569
7572
  return (raw || []).map(normalizeConversation);
7570
7573
  }
7571
7574
  async function saveConversation(conversation) {
7575
+ if (conversation.incognito) return;
7572
7576
  await indexedDBService_default.put(DB_NAME4, DB_VERSION3, STORE_NAME4, conversation, storeConfigs4);
7573
7577
  }
7574
7578
  async function deleteConversationFromDB(id) {
@@ -7638,6 +7642,34 @@ var useConversationStore = (0, import_zustand9.create)((set, get) => ({
7638
7642
  };
7639
7643
  });
7640
7644
  },
7645
+ toggleIncognito: () => {
7646
+ const { conversations, currentId } = get();
7647
+ const current = conversations.find((c) => c.id === currentId);
7648
+ if (current?.incognito) {
7649
+ useAIQueryStore.getState().reset();
7650
+ set((state) => ({
7651
+ conversations: state.conversations.filter((c) => !c.incognito),
7652
+ currentId: null
7653
+ }));
7654
+ return;
7655
+ }
7656
+ const { selectedModel } = useModelStore.getState();
7657
+ const now = /* @__PURE__ */ new Date();
7658
+ const newConv = normalizeConversation({
7659
+ id: (0, import_uuid2.v4)(),
7660
+ name: "Incognito chat",
7661
+ history: [],
7662
+ model: selectedModel,
7663
+ createdAt: now,
7664
+ updatedAt: now,
7665
+ version: 0,
7666
+ incognito: true
7667
+ });
7668
+ set((state) => ({
7669
+ conversations: [...state.conversations, newConv],
7670
+ currentId: newConv.id
7671
+ }));
7672
+ },
7641
7673
  deleteConversation: (id) => {
7642
7674
  const runHydrate = async () => {
7643
7675
  try {
@@ -8492,7 +8524,7 @@ function buildProjectMeta(project) {
8492
8524
  }
8493
8525
  function snapshotConversationMetaMap(conversations) {
8494
8526
  return new Map(
8495
- conversations.map((conversation) => [
8527
+ conversations.filter((conversation) => !conversation.incognito).map((conversation) => [
8496
8528
  conversation.id,
8497
8529
  buildConversationMeta(conversation)
8498
8530
  ])
@@ -8523,6 +8555,7 @@ function ensureTrackersInitialized() {
8523
8555
  }
8524
8556
  const nextMeta = snapshotConversationMetaMap(conversations);
8525
8557
  for (const conversation of conversations) {
8558
+ if (conversation.incognito) continue;
8526
8559
  const previous = conversationsMeta.get(conversation.id);
8527
8560
  const updatedAtMs = conversation.updatedAt ? conversation.updatedAt.getTime() : 0;
8528
8561
  if (!previous) {
@@ -8613,6 +8646,8 @@ if (typeof window !== "undefined") {
8613
8646
  });
8614
8647
  }
8615
8648
  function queueConversationUpsert(id) {
8649
+ const conversation = useConversationStore.getState().conversations.find((c) => c.id === id);
8650
+ if (conversation?.incognito) return;
8616
8651
  useConversationSyncStore.setState((state) => {
8617
8652
  const upserts = new Set(state.pendingConversationUpserts);
8618
8653
  const deletes = new Set(state.pendingConversationDeletes);
@@ -14871,6 +14906,7 @@ var MemoryModal = ({ open, onClose }) => {
14871
14906
  },
14872
14907
  disableSwipeToOpen: true,
14873
14908
  ModalProps: { keepMounted: true },
14909
+ sx: { zIndex: 2e3 },
14874
14910
  PaperProps: {
14875
14911
  sx: {
14876
14912
  height: "min(720px, 82vh)",