@burtson-labs/bandit-engine 2.0.82 → 2.0.84
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-WYUPU7KD.mjs → chat-OY5CLOBW.mjs} +2 -2
- package/dist/{chunk-ZMXWFP65.mjs → chunk-3QYZOCIW.mjs} +2 -2
- package/dist/{chunk-NB3N4BKW.mjs → chunk-RVKERD5O.mjs} +30 -10
- package/dist/chunk-RVKERD5O.mjs.map +1 -0
- package/dist/index.js +30 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +30 -10
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-NB3N4BKW.mjs.map +0 -1
- /package/dist/{chat-WYUPU7KD.mjs.map → chat-OY5CLOBW.mjs.map} +0 -0
- /package/dist/{chunk-ZMXWFP65.mjs.map → chunk-3QYZOCIW.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RVKERD5O.mjs";
|
|
4
4
|
import {
|
|
5
5
|
chat_provider_default
|
|
6
6
|
} from "./chunk-OPN32F2X.mjs";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useGatewayHealth,
|
|
11
11
|
useGatewayMemory,
|
|
12
12
|
useGatewayModels
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3QYZOCIW.mjs";
|
|
14
14
|
import "./chunk-YYYEMVBV.mjs";
|
|
15
15
|
import "./chunk-6ITUH375.mjs";
|
|
16
16
|
import "./chunk-3LT77723.mjs";
|
|
@@ -20117,7 +20117,7 @@ var init_bandit_chat_logo = __esm({
|
|
|
20117
20117
|
});
|
|
20118
20118
|
|
|
20119
20119
|
// src/chat/source-chips.tsx
|
|
20120
|
-
var import_react42, import_material34, import_jsx_runtime34, parseWebSources, domainOf, SourceChip, SourceChips, source_chips_default;
|
|
20120
|
+
var import_react42, import_material34, import_jsx_runtime34, parseWebSources, stripSourcesForDisplay, domainOf, SourceChip, SourceChips, source_chips_default;
|
|
20121
20121
|
var init_source_chips = __esm({
|
|
20122
20122
|
"src/chat/source-chips.tsx"() {
|
|
20123
20123
|
"use strict";
|
|
@@ -20141,6 +20141,17 @@ var init_source_chips = __esm({
|
|
|
20141
20141
|
const seen = /* @__PURE__ */ new Set();
|
|
20142
20142
|
return out.filter((s) => seen.has(s.url) ? false : (seen.add(s.url), true));
|
|
20143
20143
|
};
|
|
20144
|
+
stripSourcesForDisplay = (content) => {
|
|
20145
|
+
if (!content) return content;
|
|
20146
|
+
let c = content;
|
|
20147
|
+
const idx = c.lastIndexOf("**Sources**");
|
|
20148
|
+
if (idx !== -1) c = c.slice(0, idx);
|
|
20149
|
+
c = c.replace(
|
|
20150
|
+
/\n*(?:---|\*\*\*|___)[ \t]*\n[\s\S]*$/u,
|
|
20151
|
+
(m) => /[¹²³⁴⁵⁶⁷⁸⁹⁰]/u.test(m) && /\]\(https?:/i.test(m) ? "" : m
|
|
20152
|
+
);
|
|
20153
|
+
return c.replace(/\s+$/u, "");
|
|
20154
|
+
};
|
|
20144
20155
|
domainOf = (url) => {
|
|
20145
20156
|
try {
|
|
20146
20157
|
return new URL(url).hostname.replace(/^www\./, "");
|
|
@@ -20338,7 +20349,7 @@ var init_chat_messages = __esm({
|
|
|
20338
20349
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
20339
20350
|
StreamingMarkdown_default,
|
|
20340
20351
|
{
|
|
20341
|
-
content,
|
|
20352
|
+
content: isStreaming && isLast ? content : stripSourcesForDisplay(content),
|
|
20342
20353
|
isStreaming: isStreaming && isLast,
|
|
20343
20354
|
sources: sourceSummaries
|
|
20344
20355
|
}
|
|
@@ -23842,7 +23853,7 @@ ${r.output}`).join("\n\n");
|
|
|
23842
23853
|
${toolResultsText}
|
|
23843
23854
|
===END TOOL RESULTS===
|
|
23844
23855
|
|
|
23845
|
-
Use them to fully complete my original request. If you still need to take an action I asked for (for example, actually create a file I want to download), call the appropriate tool now with a \`\`\`tool_code\`\`\` block. Otherwise give your final answer. Do NOT add a
|
|
23856
|
+
Use them to fully complete my original request. If you still need to take an action I asked for (for example, actually create a file I want to download), call the appropriate tool now with a \`\`\`tool_code\`\`\` block. Otherwise give your final answer. Do NOT add citations, footnotes, superscript reference numbers (e.g. \xB9 \xB2 \xB3), or a Sources/References/Citations list \u2014 the sources are attached automatically below your answer. Just write the answer naturally.`
|
|
23846
23857
|
}
|
|
23847
23858
|
];
|
|
23848
23859
|
const streamTurn = (req) => new Promise((resolve) => {
|
|
@@ -23988,7 +23999,7 @@ That step failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
|
23988
23999
|
${roundOut.join("\n\n")}
|
|
23989
24000
|
===END TOOL RESULTS===
|
|
23990
24001
|
|
|
23991
|
-
Now give your final answer to my original request, or call another tool if you still genuinely need to. Do NOT add a
|
|
24002
|
+
Now give your final answer to my original request, or call another tool if you still genuinely need to. Do NOT add citations, footnotes, superscript reference numbers, or a Sources list \u2014 sources are attached automatically.`
|
|
23992
24003
|
});
|
|
23993
24004
|
}
|
|
23994
24005
|
setIsThinking?.(false);
|
|
@@ -26567,8 +26578,8 @@ var init_conversation_drawer = __esm({
|
|
|
26567
26578
|
flex: 1,
|
|
26568
26579
|
display: "flex",
|
|
26569
26580
|
flexDirection: "column",
|
|
26570
|
-
alignItems:
|
|
26571
|
-
textAlign:
|
|
26581
|
+
alignItems: "flex-start",
|
|
26582
|
+
textAlign: "left",
|
|
26572
26583
|
gap: 0.25
|
|
26573
26584
|
},
|
|
26574
26585
|
children: [
|
|
@@ -26594,11 +26605,20 @@ var init_conversation_drawer = __esm({
|
|
|
26594
26605
|
}
|
|
26595
26606
|
),
|
|
26596
26607
|
user2 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
26597
|
-
|
|
26608
|
+
import_material43.Box,
|
|
26598
26609
|
{
|
|
26599
|
-
|
|
26600
|
-
|
|
26601
|
-
|
|
26610
|
+
sx: {
|
|
26611
|
+
flexShrink: 0,
|
|
26612
|
+
display: "flex",
|
|
26613
|
+
alignItems: "center",
|
|
26614
|
+
justifyContent: "center",
|
|
26615
|
+
width: 30,
|
|
26616
|
+
height: 30,
|
|
26617
|
+
borderRadius: "50%",
|
|
26618
|
+
border: `1px solid ${(0, import_material43.alpha)(theme.palette.divider, 0.8)}`,
|
|
26619
|
+
color: theme.palette.text.secondary
|
|
26620
|
+
},
|
|
26621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react10.Settings, { size: 16 })
|
|
26602
26622
|
}
|
|
26603
26623
|
)
|
|
26604
26624
|
]
|