@burtson-labs/bandit-engine 2.0.89 → 2.0.92

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.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-PROLD2QV.mjs";
3
+ } from "./chunk-JJNPBLJ7.mjs";
4
4
  import "./chunk-ONQMRE2G.mjs";
5
- import "./chunk-OB2W4OR4.mjs";
5
+ import "./chunk-RUMVTVNM.mjs";
6
6
  import "./chunk-L2EKYO4F.mjs";
7
- import "./chunk-4VTF3MY4.mjs";
7
+ import "./chunk-IVLVUNIB.mjs";
8
8
  import "./chunk-J2PMXOV2.mjs";
9
9
  import "./chunk-LWHSOEPR.mjs";
10
10
  import "./chunk-H3BYFEIE.mjs";
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
13
13
  export {
14
14
  chat_default as default
15
15
  };
16
- //# sourceMappingURL=chat-NRUN7HOH.mjs.map
16
+ //# sourceMappingURL=chat-L3VMBI6A.mjs.map
@@ -24,7 +24,7 @@ import {
24
24
  useNotificationService,
25
25
  useTTS,
26
26
  useVoiceStore
27
- } from "./chunk-4VTF3MY4.mjs";
27
+ } from "./chunk-IVLVUNIB.mjs";
28
28
  import {
29
29
  brandingService_default,
30
30
  toTitleCase,
@@ -2803,4 +2803,4 @@ export {
2803
2803
  MAX_WINDOWED_HEIGHT,
2804
2804
  chat_modal_default
2805
2805
  };
2806
- //# sourceMappingURL=chunk-BDD6YEWH.mjs.map
2806
+ //# sourceMappingURL=chunk-AGT77Z3A.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StreamingMarkdown_default
3
- } from "./chunk-OB2W4OR4.mjs";
3
+ } from "./chunk-RUMVTVNM.mjs";
4
4
  import {
5
5
  aiProviderInitService
6
6
  } from "./chunk-ZLXWNTFK.mjs";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-L2EKYO4F.mjs";
15
15
  import {
16
16
  chat_modal_default
17
- } from "./chunk-BDD6YEWH.mjs";
17
+ } from "./chunk-AGT77Z3A.mjs";
18
18
  import {
19
19
  AddIcon,
20
20
  ArchiveIcon,
@@ -86,7 +86,7 @@ import {
86
86
  predefinedThemes,
87
87
  useNotificationService,
88
88
  useVoiceStore
89
- } from "./chunk-4VTF3MY4.mjs";
89
+ } from "./chunk-IVLVUNIB.mjs";
90
90
  import {
91
91
  TOPICS,
92
92
  authenticationService,
@@ -9741,7 +9741,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
9741
9741
 
9742
9742
  // src/management/management.tsx
9743
9743
  import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
9744
- var preloadChatPage = () => import("./chat-NRUN7HOH.mjs");
9744
+ var preloadChatPage = () => import("./chat-L3VMBI6A.mjs");
9745
9745
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
9746
9746
  const trimmed = gatewayApiUrl.replace(/\/$/, "");
9747
9747
  if (trimmed.endsWith("/api")) {
@@ -11107,4 +11107,4 @@ export {
11107
11107
  useGatewayMemory,
11108
11108
  management_default
11109
11109
  };
11110
- //# sourceMappingURL=chunk-GAOJ4PB2.mjs.map
11110
+ //# sourceMappingURL=chunk-AS6WS4H2.mjs.map
@@ -20,6 +20,19 @@ import {
20
20
  debugLogger
21
21
  } from "./chunk-KCI46M23.mjs";
22
22
 
23
+ // src/store/canvasStore.ts
24
+ import { create } from "zustand";
25
+ var useCanvasStore = create((set) => ({
26
+ open: false,
27
+ title: "",
28
+ content: "",
29
+ language: void 0,
30
+ openCanvas: ({ content, title, language }) => set({ open: true, content, title: title?.trim() || "Untitled", language }),
31
+ setContent: (content) => set({ content }),
32
+ setTitle: (title) => set({ title }),
33
+ close: () => set({ open: false })
34
+ }));
35
+
23
36
  // src/icons/lucide-icons.tsx
24
37
  import React from "react";
25
38
  import { Box } from "@mui/material";
@@ -396,9 +409,9 @@ import { Observable as Observable2, BehaviorSubject, Subject } from "rxjs";
396
409
  import { Observable, Subscription } from "rxjs";
397
410
 
398
411
  // src/store/voiceStore.ts
399
- import { create } from "zustand";
412
+ import { create as create2 } from "zustand";
400
413
  var autoInitialized = false;
401
- var useVoiceStore = create((set, get) => ({
414
+ var useVoiceStore = create2((set, get) => ({
402
415
  availableVoices: [],
403
416
  selectedVoice: "",
404
417
  defaultVoice: "",
@@ -2524,10 +2537,19 @@ import {
2524
2537
  // src/modals/chat-modal/ai-response-action-bar.tsx
2525
2538
  import { useState as useState4, useEffect as useEffect4 } from "react";
2526
2539
  import { Box as Box4, CircularProgress as CircularProgress2, IconButton as IconButton3, Tooltip as Tooltip3 } from "@mui/material";
2527
- import { Check as CheckIcon2, ThumbsUp as ThumbUpIcon, ThumbsDown as ThumbDownIcon, Copy as ContentCopyIcon2, Megaphone as CampaignOutlined, Megaphone as CampaignRounded, Square as StopIcon, Pause as PauseIcon, Play as PlayArrowIcon2 } from "lucide-react";
2540
+ import { Check as CheckIcon2, ThumbsUp as ThumbUpIcon, ThumbsDown as ThumbDownIcon, Copy as ContentCopyIcon2, Megaphone as CampaignOutlined, Megaphone as CampaignRounded, Square as StopIcon, Pause as PauseIcon, Play as PlayArrowIcon2, PanelRight as CanvasIcon } from "lucide-react";
2528
2541
  import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
2529
2542
  var AiResponseActionsBar = ({ text }) => {
2530
2543
  const [copied, setCopied] = useState4(false);
2544
+ const openCanvas = useCanvasStore((s) => s.openCanvas);
2545
+ const openInCanvas = () => {
2546
+ const plain = text || "";
2547
+ const firstHeading = plain.match(/^#{1,3}\s+(.+)$/m)?.[1];
2548
+ const firstLine = plain.split("\n").map((l) => l.trim()).find(Boolean) || "";
2549
+ const rawTitle = (firstHeading || firstLine).replace(/[#*_>]/g, "").replace(/\s+/g, " ").trim();
2550
+ const title = rawTitle.length > 60 ? `${rawTitle.slice(0, 57)}\u2026` : rawTitle || "Untitled";
2551
+ openCanvas({ content: plain, title });
2552
+ };
2531
2553
  const [feedback, setFeedback] = useState4(null);
2532
2554
  const {
2533
2555
  isPlaying,
@@ -2614,6 +2636,20 @@ var AiResponseActionsBar = ({ text }) => {
2614
2636
  children: copied ? /* @__PURE__ */ jsx4(CheckIcon2, { size: 18 }) : /* @__PURE__ */ jsx4(ContentCopyIcon2, { size: 18 })
2615
2637
  }
2616
2638
  ) }),
2639
+ /* @__PURE__ */ jsx4(Tooltip3, { title: "Open in canvas \u2014 edit & export", children: /* @__PURE__ */ jsx4(
2640
+ IconButton3,
2641
+ {
2642
+ onClick: openInCanvas,
2643
+ size: "small",
2644
+ sx: {
2645
+ color: (theme) => theme.palette.mode === "dark" ? "#ccc" : "#555",
2646
+ "&:hover": {
2647
+ color: (theme) => theme.palette.mode === "dark" ? "#fff" : "#000"
2648
+ }
2649
+ },
2650
+ children: /* @__PURE__ */ jsx4(CanvasIcon, { size: 18 })
2651
+ }
2652
+ ) }),
2617
2653
  isTTSAvailable && /* @__PURE__ */ jsxs3(Fragment2, { children: [
2618
2654
  /* @__PURE__ */ jsx4(
2619
2655
  Tooltip3,
@@ -8890,6 +8926,10 @@ var MemoryModal = ({ open, onClose }) => {
8890
8926
  var memory_modal_default = MemoryModal;
8891
8927
 
8892
8928
  export {
8929
+ useCanvasStore,
8930
+ getHighlightTree,
8931
+ markdownSanitizeSchema,
8932
+ renderLowlightChildren,
8893
8933
  AddIcon,
8894
8934
  CloudDoneIcon,
8895
8935
  CloudOffIcon,
@@ -8979,9 +9019,6 @@ export {
8979
9019
  DragIndicatorIcon,
8980
9020
  MicIcon,
8981
9021
  DocumentCard_default,
8982
- getHighlightTree,
8983
- markdownSanitizeSchema,
8984
- renderLowlightChildren,
8985
9022
  knowledge_file_modal_default,
8986
9023
  VoiceService,
8987
9024
  voiceService,
@@ -9006,4 +9043,4 @@ export {
9006
9043
  FeedbackButton,
9007
9044
  useNotificationService
9008
9045
  };
9009
- //# sourceMappingURL=chunk-4VTF3MY4.mjs.map
9046
+ //# sourceMappingURL=chunk-IVLVUNIB.mjs.map