@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.js
CHANGED
|
@@ -15140,7 +15140,7 @@ ${listMarkdown}`;
|
|
|
15140
15140
|
});
|
|
15141
15141
|
|
|
15142
15142
|
// src/chat/source-chips.tsx
|
|
15143
|
-
var import_react17, import_material10, import_jsx_runtime13, parseWebSources, domainOf, SourceChip, SourceChips, source_chips_default;
|
|
15143
|
+
var import_react17, import_material10, import_jsx_runtime13, parseWebSources, stripSourcesForDisplay, domainOf, SourceChip, SourceChips, source_chips_default;
|
|
15144
15144
|
var init_source_chips = __esm({
|
|
15145
15145
|
"src/chat/source-chips.tsx"() {
|
|
15146
15146
|
"use strict";
|
|
@@ -15164,6 +15164,17 @@ var init_source_chips = __esm({
|
|
|
15164
15164
|
const seen = /* @__PURE__ */ new Set();
|
|
15165
15165
|
return out.filter((s) => seen.has(s.url) ? false : (seen.add(s.url), true));
|
|
15166
15166
|
};
|
|
15167
|
+
stripSourcesForDisplay = (content) => {
|
|
15168
|
+
if (!content) return content;
|
|
15169
|
+
let c = content;
|
|
15170
|
+
const idx = c.lastIndexOf("**Sources**");
|
|
15171
|
+
if (idx !== -1) c = c.slice(0, idx);
|
|
15172
|
+
c = c.replace(
|
|
15173
|
+
/\n*(?:---|\*\*\*|___)[ \t]*\n[\s\S]*$/u,
|
|
15174
|
+
(m) => /[¹²³⁴⁵⁶⁷⁸⁹⁰]/u.test(m) && /\]\(https?:/i.test(m) ? "" : m
|
|
15175
|
+
);
|
|
15176
|
+
return c.replace(/\s+$/u, "");
|
|
15177
|
+
};
|
|
15167
15178
|
domainOf = (url) => {
|
|
15168
15179
|
try {
|
|
15169
15180
|
return new URL(url).hostname.replace(/^www\./, "");
|
|
@@ -15361,7 +15372,7 @@ var init_chat_messages = __esm({
|
|
|
15361
15372
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
15362
15373
|
StreamingMarkdown_default,
|
|
15363
15374
|
{
|
|
15364
|
-
content,
|
|
15375
|
+
content: isStreaming && isLast ? content : stripSourcesForDisplay(content),
|
|
15365
15376
|
isStreaming: isStreaming && isLast,
|
|
15366
15377
|
sources: sourceSummaries
|
|
15367
15378
|
}
|
|
@@ -21603,7 +21614,7 @@ ${r.output}`).join("\n\n");
|
|
|
21603
21614
|
${toolResultsText}
|
|
21604
21615
|
===END TOOL RESULTS===
|
|
21605
21616
|
|
|
21606
|
-
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
|
|
21617
|
+
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.`
|
|
21607
21618
|
}
|
|
21608
21619
|
];
|
|
21609
21620
|
const streamTurn = (req) => new Promise((resolve) => {
|
|
@@ -21749,7 +21760,7 @@ That step failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
|
21749
21760
|
${roundOut.join("\n\n")}
|
|
21750
21761
|
===END TOOL RESULTS===
|
|
21751
21762
|
|
|
21752
|
-
Now give your final answer to my original request, or call another tool if you still genuinely need to. Do NOT add a
|
|
21763
|
+
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.`
|
|
21753
21764
|
});
|
|
21754
21765
|
}
|
|
21755
21766
|
setIsThinking?.(false);
|
|
@@ -24328,8 +24339,8 @@ var init_conversation_drawer = __esm({
|
|
|
24328
24339
|
flex: 1,
|
|
24329
24340
|
display: "flex",
|
|
24330
24341
|
flexDirection: "column",
|
|
24331
|
-
alignItems:
|
|
24332
|
-
textAlign:
|
|
24342
|
+
alignItems: "flex-start",
|
|
24343
|
+
textAlign: "left",
|
|
24333
24344
|
gap: 0.25
|
|
24334
24345
|
},
|
|
24335
24346
|
children: [
|
|
@@ -24355,11 +24366,20 @@ var init_conversation_drawer = __esm({
|
|
|
24355
24366
|
}
|
|
24356
24367
|
),
|
|
24357
24368
|
user2 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
24358
|
-
|
|
24369
|
+
import_material22.Box,
|
|
24359
24370
|
{
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24371
|
+
sx: {
|
|
24372
|
+
flexShrink: 0,
|
|
24373
|
+
display: "flex",
|
|
24374
|
+
alignItems: "center",
|
|
24375
|
+
justifyContent: "center",
|
|
24376
|
+
width: 30,
|
|
24377
|
+
height: 30,
|
|
24378
|
+
borderRadius: "50%",
|
|
24379
|
+
border: `1px solid ${(0, import_material22.alpha)(theme.palette.divider, 0.8)}`,
|
|
24380
|
+
color: theme.palette.text.secondary
|
|
24381
|
+
},
|
|
24382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.Settings, { size: 16 })
|
|
24363
24383
|
}
|
|
24364
24384
|
)
|
|
24365
24385
|
]
|