@burtson-labs/bandit-engine 2.0.44 → 2.0.49

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 (54) hide show
  1. package/README.md +7 -5
  2. package/dist/{aiProviderStore-UQI33C5E.mjs → aiProviderStore-3N3VE6D4.mjs} +2 -2
  3. package/dist/chat-647M6BRG.mjs +15 -0
  4. package/dist/chat-provider.js +45 -10
  5. package/dist/chat-provider.js.map +1 -1
  6. package/dist/chat-provider.mjs +6 -6
  7. package/dist/{chunk-UXE67LR7.mjs → chunk-6WZUQHZT.mjs} +11 -7
  8. package/dist/chunk-6WZUQHZT.mjs.map +1 -0
  9. package/dist/{chunk-QV4ELNLP.mjs → chunk-7HXARU5R.mjs} +58 -19
  10. package/dist/chunk-7HXARU5R.mjs.map +1 -0
  11. package/dist/{chunk-XUBYA5I7.mjs → chunk-7ZDS33S2.mjs} +34 -6
  12. package/dist/chunk-7ZDS33S2.mjs.map +1 -0
  13. package/dist/{chunk-SBNENBUQ.mjs → chunk-AXFX2HUK.mjs} +12 -12
  14. package/dist/{chunk-SBNENBUQ.mjs.map → chunk-AXFX2HUK.mjs.map} +1 -1
  15. package/dist/{chunk-54ZQ3FSN.mjs → chunk-BENL3EF2.mjs} +7 -4
  16. package/dist/chunk-BENL3EF2.mjs.map +1 -0
  17. package/dist/{chunk-RTQDQ6TC.mjs → chunk-EHNWQ4T3.mjs} +2 -2
  18. package/dist/{chunk-KBKWVG7X.mjs → chunk-HKJTRBWC.mjs} +5 -5
  19. package/dist/{chunk-JRGCRBWE.mjs → chunk-JCLL7AGP.mjs} +63 -45
  20. package/dist/chunk-JCLL7AGP.mjs.map +1 -0
  21. package/dist/{chunk-ERV7GLY3.mjs → chunk-TVF45U7B.mjs} +5 -5
  22. package/dist/{chunk-H4PBQ5LJ.mjs → chunk-VL3CMSDO.mjs} +4 -4
  23. package/dist/cli.js +44 -44
  24. package/dist/cli.js.map +1 -1
  25. package/dist/{gateway-5yt_3QDP.d.mts → gateway-oScD5tvE.d.mts} +4 -3
  26. package/dist/{gateway-5yt_3QDP.d.ts → gateway-oScD5tvE.d.ts} +4 -3
  27. package/dist/index.d.mts +2 -2
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.js +159 -67
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +10 -10
  32. package/dist/management/management.js +159 -67
  33. package/dist/management/management.js.map +1 -1
  34. package/dist/management/management.mjs +8 -8
  35. package/dist/modals/chat-modal/chat-modal.js +53 -18
  36. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  37. package/dist/modals/chat-modal/chat-modal.mjs +5 -5
  38. package/dist/{modelStore-UMJBDSEF.mjs → modelStore-XWFHNTBT.mjs} +2 -2
  39. package/dist/public-types.d.mts +2 -1
  40. package/dist/public-types.d.ts +2 -1
  41. package/package.json +1 -1
  42. package/dist/chat-7U633EWN.mjs +0 -15
  43. package/dist/chunk-54ZQ3FSN.mjs.map +0 -1
  44. package/dist/chunk-JRGCRBWE.mjs.map +0 -1
  45. package/dist/chunk-QV4ELNLP.mjs.map +0 -1
  46. package/dist/chunk-UXE67LR7.mjs.map +0 -1
  47. package/dist/chunk-XUBYA5I7.mjs.map +0 -1
  48. /package/dist/{aiProviderStore-UQI33C5E.mjs.map → aiProviderStore-3N3VE6D4.mjs.map} +0 -0
  49. /package/dist/{chat-7U633EWN.mjs.map → chat-647M6BRG.mjs.map} +0 -0
  50. /package/dist/{chunk-RTQDQ6TC.mjs.map → chunk-EHNWQ4T3.mjs.map} +0 -0
  51. /package/dist/{chunk-KBKWVG7X.mjs.map → chunk-HKJTRBWC.mjs.map} +0 -0
  52. /package/dist/{chunk-ERV7GLY3.mjs.map → chunk-TVF45U7B.mjs.map} +0 -0
  53. /package/dist/{chunk-H4PBQ5LJ.mjs.map → chunk-VL3CMSDO.mjs.map} +0 -0
  54. /package/dist/{modelStore-UMJBDSEF.mjs.map → modelStore-XWFHNTBT.mjs.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ONQMRE2G.mjs";
4
4
  import {
5
5
  useMCPToolsStore
6
- } from "./chunk-RTQDQ6TC.mjs";
6
+ } from "./chunk-EHNWQ4T3.mjs";
7
7
  import {
8
8
  FeedbackButton,
9
9
  FeedbackModal,
@@ -19,11 +19,12 @@ import {
19
19
  useNotificationService,
20
20
  useTTS,
21
21
  useVoiceStore
22
- } from "./chunk-SBNENBUQ.mjs";
22
+ } from "./chunk-AXFX2HUK.mjs";
23
23
  import {
24
24
  authenticationService,
25
25
  brandingService_default,
26
26
  detectMessageMood,
27
+ detectTransparency,
27
28
  detectUserInterestAndExcitement,
28
29
  determineRelevantDocuments,
29
30
  embeddingService,
@@ -43,16 +44,16 @@ import {
43
44
  useMemoryStore,
44
45
  useProjectStore,
45
46
  useVectorStore
46
- } from "./chunk-UXE67LR7.mjs";
47
+ } from "./chunk-6WZUQHZT.mjs";
47
48
  import {
48
49
  indexedDBService_default,
49
50
  useModelStore,
50
51
  usePackageSettingsStore,
51
52
  usePreferencesStore
52
- } from "./chunk-XUBYA5I7.mjs";
53
+ } from "./chunk-7ZDS33S2.mjs";
53
54
  import {
54
55
  useAIProviderStore
55
- } from "./chunk-54ZQ3FSN.mjs";
56
+ } from "./chunk-BENL3EF2.mjs";
56
57
  import {
57
58
  debugLogger
58
59
  } from "./chunk-KCI46M23.mjs";
@@ -82,7 +83,20 @@ var Logo = ({ visible, atTop = false }) => {
82
83
  const brandingData = await brandingService_default.getBranding();
83
84
  if (brandingData) {
84
85
  setLogoBase64(brandingData.logoBase64 || null);
85
- setHasTransparentLogo(brandingData.hasTransparentLogo ?? true);
86
+ if (brandingData.logoBase64) {
87
+ try {
88
+ const detected = await detectTransparency(brandingData.logoBase64);
89
+ const isPng = brandingData.logoBase64.startsWith("data:image/png");
90
+ const finalTransparent = detected || isPng || brandingData.hasTransparentLogo === true;
91
+ setHasTransparentLogo(finalTransparent);
92
+ } catch {
93
+ const isPng = brandingData.logoBase64.startsWith("data:image/png");
94
+ const finalTransparent = brandingData.hasTransparentLogo === true || isPng;
95
+ setHasTransparentLogo(finalTransparent);
96
+ }
97
+ } else {
98
+ setHasTransparentLogo(brandingData.hasTransparentLogo ?? true);
99
+ }
86
100
  }
87
101
  } catch (e) {
88
102
  debugLogger.error("Failed to load branding from service", { error: e });
@@ -92,7 +106,7 @@ var Logo = ({ visible, atTop = false }) => {
92
106
  };
93
107
  loadBranding();
94
108
  }, []);
95
- return logoBase64 && /* @__PURE__ */ jsx(Fragment, { children: loading ? null : hasTransparentLogo ? /* @__PURE__ */ jsx(
109
+ return logoBase64 && /* @__PURE__ */ jsx(Fragment, { children: loading ? null : hasTransparentLogo !== false ? /* @__PURE__ */ jsx(
96
110
  Box,
97
111
  {
98
112
  component: "img",
@@ -104,7 +118,8 @@ var Logo = ({ visible, atTop = false }) => {
104
118
  maxWidth: 600,
105
119
  aspectRatio: "1 / 1",
106
120
  margin: "0 auto",
107
- mt: atTop ? 2 : 6
121
+ mt: atTop ? 2 : 6,
122
+ display: "block"
108
123
  }
109
124
  }
110
125
  ) : /* @__PURE__ */ jsx(
@@ -144,8 +159,8 @@ var ChatScrollToBottomButton = ({
144
159
  drawerOpen = false,
145
160
  isMobile = false
146
161
  }) => {
147
- const verticalBuffer = isMobile ? 36 : 56;
148
- const bottomOffset = Math.max(inputHeight + verticalBuffer, verticalBuffer + 72);
162
+ const verticalBuffer = isMobile ? 28 : 48;
163
+ const bottomOffset = Math.max(inputHeight + verticalBuffer, verticalBuffer + 64);
149
164
  return /* @__PURE__ */ jsx2(
150
165
  IconButton,
151
166
  {
@@ -161,9 +176,12 @@ var ChatScrollToBottomButton = ({
161
176
  borderColor: (theme) => theme.palette.divider,
162
177
  zIndex: (theme) => Math.max(theme.zIndex.modal + 1, 1400),
163
178
  boxShadow: 3,
164
- transition: "bottom 0.3s ease, left 0.3s ease-in-out",
179
+ transition: "bottom 0.25s ease, left 0.3s ease-in-out, transform 0.2s ease",
165
180
  "&:hover": {
166
181
  bgcolor: (theme) => theme.palette.action.hover
182
+ },
183
+ "&:active": {
184
+ transform: "translateX(-50%) translateY(1px)"
167
185
  }
168
186
  },
169
187
  children: /* @__PURE__ */ jsx2(ArrowDownwardIcon, { sx: { color: "inherit" } })
@@ -7281,9 +7299,18 @@ var ChatAppBar = ({
7281
7299
  const currentModel = useModelStore((s) => s.availableModels.find((m) => m.name === selectedModel));
7282
7300
  const currentAvatar = currentModel?.avatarBase64 || modelAvatars[selectedModel] || banditHead;
7283
7301
  const pendingModelAvatar = useModelStore.getState().availableModels.find((m) => m.name === pendingModel)?.avatarBase64 || modelAvatars[pendingModel || ""] || banditHead;
7302
+ const resolvedHomeUrl = preferences.homeUrl?.trim() || packageSettings?.homeUrl?.trim() || "";
7303
+ const homeTooltip = (() => {
7304
+ if (!resolvedHomeUrl) return "Home";
7305
+ try {
7306
+ return `Home (${new URL(resolvedHomeUrl).hostname})`;
7307
+ } catch {
7308
+ return "Home";
7309
+ }
7310
+ })();
7284
7311
  function goToHome() {
7285
- if (preferences.homeUrl && preferences.homeUrl.trim()) {
7286
- window.location.href = preferences.homeUrl;
7312
+ if (resolvedHomeUrl) {
7313
+ window.location.href = resolvedHomeUrl;
7287
7314
  return;
7288
7315
  }
7289
7316
  if (typeof window !== "undefined") {
@@ -7346,7 +7373,7 @@ var ChatAppBar = ({
7346
7373
  }
7347
7374
  },
7348
7375
  children: [
7349
- /* @__PURE__ */ jsx14(Tooltip5, { title: preferences.homeUrl && preferences.homeUrl.trim() ? `Home (${new URL(preferences.homeUrl).hostname})` : "Home", arrow: true, children: /* @__PURE__ */ jsx14(
7376
+ /* @__PURE__ */ jsx14(Tooltip5, { title: homeTooltip, arrow: true, children: /* @__PURE__ */ jsx14(
7350
7377
  IconButton10,
7351
7378
  {
7352
7379
  onClick: goToHome,
@@ -7630,9 +7657,15 @@ var ChatAppBar = ({
7630
7657
  (async () => {
7631
7658
  try {
7632
7659
  const storeConfigs = [{ name: "config", keyPath: "id" }];
7633
- const current = await indexedDBService_default.get("banditConfig", 1, "config", "main", storeConfigs);
7660
+ const current = await indexedDBService_default.get(
7661
+ "banditConfig",
7662
+ 1,
7663
+ "config",
7664
+ "main",
7665
+ storeConfigs
7666
+ );
7634
7667
  const updated = {
7635
- ...current,
7668
+ ...current ?? {},
7636
7669
  id: "main",
7637
7670
  model: {
7638
7671
  ...current?.model || {},
@@ -7824,9 +7857,15 @@ var ChatAppBar = ({
7824
7857
  (async () => {
7825
7858
  try {
7826
7859
  const storeConfigs = [{ name: "config", keyPath: "id" }];
7827
- const current = await indexedDBService_default.get("banditConfig", 1, "config", "main", storeConfigs);
7860
+ const current = await indexedDBService_default.get(
7861
+ "banditConfig",
7862
+ 1,
7863
+ "config",
7864
+ "main",
7865
+ storeConfigs
7866
+ );
7828
7867
  const updated = {
7829
- ...current,
7868
+ ...current ?? {},
7830
7869
  id: "main",
7831
7870
  model: {
7832
7871
  ...current?.model || {},
@@ -9570,4 +9609,4 @@ var chat_default = Chat;
9570
9609
  export {
9571
9610
  chat_default
9572
9611
  };
9573
- //# sourceMappingURL=chunk-QV4ELNLP.mjs.map
9612
+ //# sourceMappingURL=chunk-7HXARU5R.mjs.map