@burtson-labs/bandit-engine 2.0.126 → 2.0.127
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-Z3GRZ7GA.mjs → chat-2XYHFUT2.mjs} +2 -2
- package/dist/{chunk-RKA3X3EY.mjs → chunk-7NBLIL76.mjs} +2 -2
- package/dist/{chunk-JXFPCLEY.mjs → chunk-RRSACJI2.mjs} +203 -67
- package/dist/chunk-RRSACJI2.mjs.map +1 -0
- package/dist/index.js +280 -144
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +264 -128
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-JXFPCLEY.mjs.map +0 -1
- /package/dist/{chat-Z3GRZ7GA.mjs.map → chat-2XYHFUT2.mjs.map} +0 -0
- /package/dist/{chunk-RKA3X3EY.mjs.map → chunk-7NBLIL76.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RRSACJI2.mjs";
|
|
4
4
|
import "./chunk-ONQMRE2G.mjs";
|
|
5
5
|
import "./chunk-574ILQTT.mjs";
|
|
6
6
|
import "./chunk-K2JGFKEB.mjs";
|
|
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
|
|
|
13
13
|
export {
|
|
14
14
|
chat_default as default
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chat-
|
|
16
|
+
//# sourceMappingURL=chat-2XYHFUT2.mjs.map
|
|
@@ -9754,7 +9754,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
|
|
|
9754
9754
|
|
|
9755
9755
|
// src/management/management.tsx
|
|
9756
9756
|
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9757
|
-
var preloadChatPage = () => import("./chat-
|
|
9757
|
+
var preloadChatPage = () => import("./chat-2XYHFUT2.mjs");
|
|
9758
9758
|
var buildCapabilitiesUrl = (gatewayApiUrl) => {
|
|
9759
9759
|
const trimmed = gatewayApiUrl.replace(/\/$/, "");
|
|
9760
9760
|
if (trimmed.endsWith("/api")) {
|
|
@@ -11110,4 +11110,4 @@ export {
|
|
|
11110
11110
|
useGatewayMemory,
|
|
11111
11111
|
management_default
|
|
11112
11112
|
};
|
|
11113
|
-
//# sourceMappingURL=chunk-
|
|
11113
|
+
//# sourceMappingURL=chunk-7NBLIL76.mjs.map
|
|
@@ -1740,23 +1740,24 @@ ${sanitize(
|
|
|
1740
1740
|
bgcolor: inputBackground,
|
|
1741
1741
|
borderRadius: "24px",
|
|
1742
1742
|
boxShadow: isMobile ? `0 0 0 1px ${theme.palette.mode === "dark" ? "#444" : "#eee"}` : "0 4px 20px rgba(0, 0, 0, 0.4)",
|
|
1743
|
-
px: isMobile ? compactMobile ? 1 : 1.5 :
|
|
1744
|
-
pt: isMobile ? compactMobile ? 0.6 : 1 :
|
|
1745
|
-
pb: isMobile ? compactMobile ? 0.9 : 1.5 :
|
|
1743
|
+
px: isMobile ? compactMobile ? 1 : 1.5 : 2,
|
|
1744
|
+
pt: isMobile ? compactMobile ? 0.6 : 1 : 0.75,
|
|
1745
|
+
pb: isMobile ? compactMobile ? 0.9 : 1.5 : 0.75,
|
|
1746
1746
|
display: "flex",
|
|
1747
1747
|
flexDirection: "column",
|
|
1748
|
-
gap: isMobile ? compactMobile ? 0.75 : 1 :
|
|
1748
|
+
gap: isMobile ? compactMobile ? 0.75 : 1 : 0.5
|
|
1749
1749
|
},
|
|
1750
1750
|
children: [
|
|
1751
1751
|
/* @__PURE__ */ jsxs6(
|
|
1752
1752
|
Box6,
|
|
1753
1753
|
{
|
|
1754
1754
|
sx: {
|
|
1755
|
-
display: "flex",
|
|
1755
|
+
display: fileInputs.length > 0 || pastedImages.length > 0 ? "flex" : "none",
|
|
1756
1756
|
flexWrap: "wrap",
|
|
1757
1757
|
gap: attachmentsGap,
|
|
1758
1758
|
alignItems: "center",
|
|
1759
|
-
flexDirection: "row"
|
|
1759
|
+
flexDirection: "row",
|
|
1760
|
+
pt: isMobile ? 0 : 0.5
|
|
1760
1761
|
},
|
|
1761
1762
|
children: [
|
|
1762
1763
|
fileInputs.map((file, idx) => /* @__PURE__ */ jsxs6(
|
|
@@ -1880,7 +1881,7 @@ ${sanitize(
|
|
|
1880
1881
|
]
|
|
1881
1882
|
}
|
|
1882
1883
|
),
|
|
1883
|
-
/* @__PURE__ */ jsx9(
|
|
1884
|
+
isMobile && /* @__PURE__ */ jsx9(
|
|
1884
1885
|
Box6,
|
|
1885
1886
|
{
|
|
1886
1887
|
sx: {
|
|
@@ -1893,7 +1894,7 @@ ${sanitize(
|
|
|
1893
1894
|
{
|
|
1894
1895
|
fullWidth: true,
|
|
1895
1896
|
multiline: true,
|
|
1896
|
-
maxRows:
|
|
1897
|
+
maxRows: compactMobile ? 6 : 12,
|
|
1897
1898
|
placeholder: isIncognito ? "Incognito chat \u2014 not saved" : "What's on your mind?",
|
|
1898
1899
|
value: inputValue,
|
|
1899
1900
|
onChange: (e) => setInputValue(e.target.value),
|
|
@@ -1904,18 +1905,15 @@ ${sanitize(
|
|
|
1904
1905
|
disableUnderline: true,
|
|
1905
1906
|
sx: {
|
|
1906
1907
|
flex: "1 1 auto",
|
|
1907
|
-
maxHeight:
|
|
1908
|
+
maxHeight: compactMobile ? "120px" : "150px",
|
|
1908
1909
|
overflowY: "auto",
|
|
1909
1910
|
color: fileText,
|
|
1910
1911
|
"& .MuiInputBase-inputMultiline": {
|
|
1911
|
-
fontSize:
|
|
1912
|
+
fontSize: compactMobile ? "0.95rem" : "1rem"
|
|
1912
1913
|
}
|
|
1913
1914
|
}
|
|
1914
1915
|
},
|
|
1915
|
-
sx: {
|
|
1916
|
-
flex: 1,
|
|
1917
|
-
"& .MuiInputBase-root": {}
|
|
1918
|
-
}
|
|
1916
|
+
sx: { flex: 1 }
|
|
1919
1917
|
}
|
|
1920
1918
|
)
|
|
1921
1919
|
}
|
|
@@ -1926,9 +1924,9 @@ ${sanitize(
|
|
|
1926
1924
|
sx: {
|
|
1927
1925
|
display: "flex",
|
|
1928
1926
|
justifyContent: "space-between",
|
|
1929
|
-
alignItems: "
|
|
1927
|
+
alignItems: "flex-end",
|
|
1930
1928
|
gap: isMobile ? 0.6 : 1,
|
|
1931
|
-
mt: isMobile ? 0.5 :
|
|
1929
|
+
mt: isMobile ? 0.5 : 0
|
|
1932
1930
|
},
|
|
1933
1931
|
children: [
|
|
1934
1932
|
/* @__PURE__ */ jsxs6(
|
|
@@ -2015,6 +2013,30 @@ ${sanitize(
|
|
|
2015
2013
|
]
|
|
2016
2014
|
}
|
|
2017
2015
|
),
|
|
2016
|
+
!isMobile && /* @__PURE__ */ jsx9(
|
|
2017
|
+
TextField2,
|
|
2018
|
+
{
|
|
2019
|
+
fullWidth: true,
|
|
2020
|
+
multiline: true,
|
|
2021
|
+
maxRows: 6,
|
|
2022
|
+
placeholder: isIncognito ? "Incognito chat \u2014 not saved" : "What's on your mind?",
|
|
2023
|
+
value: inputValue,
|
|
2024
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
2025
|
+
onKeyDown: handleKeyPress,
|
|
2026
|
+
inputRef,
|
|
2027
|
+
variant: "standard",
|
|
2028
|
+
InputProps: {
|
|
2029
|
+
disableUnderline: true,
|
|
2030
|
+
sx: {
|
|
2031
|
+
color: fileText,
|
|
2032
|
+
maxHeight: "160px",
|
|
2033
|
+
overflowY: "auto",
|
|
2034
|
+
"& .MuiInputBase-inputMultiline": { fontSize: "1rem" }
|
|
2035
|
+
}
|
|
2036
|
+
},
|
|
2037
|
+
sx: { flex: 1, alignSelf: "center", mx: 0.5 }
|
|
2038
|
+
}
|
|
2039
|
+
),
|
|
2018
2040
|
/* @__PURE__ */ jsx9(Box6, { sx: { display: "flex", alignItems: "center", gap: isMobile ? 0.6 : 1 }, children: /* @__PURE__ */ jsx9(Tooltip2, { title: isStreaming ? "Stop response" : "Send message", children: /* @__PURE__ */ jsx9("span", { children: /* @__PURE__ */ jsx9(
|
|
2019
2041
|
IconButton5,
|
|
2020
2042
|
{
|
|
@@ -2117,8 +2139,9 @@ var chat_input_default = ChatInput;
|
|
|
2117
2139
|
|
|
2118
2140
|
// src/chat/ask-user-card.tsx
|
|
2119
2141
|
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
2120
|
-
import { Box as Box7, Paper, Typography as Typography4, Button as Button2, TextField as TextField3, Chip,
|
|
2142
|
+
import { Box as Box7, Paper, Typography as Typography4, Button as Button2, TextField as TextField3, Chip, Grow } from "@mui/material";
|
|
2121
2143
|
import { useTheme as useTheme7, alpha as alpha4 } from "@mui/material/styles";
|
|
2144
|
+
import { CircleHelp as QuestionIcon, Check as CheckIcon3 } from "lucide-react";
|
|
2122
2145
|
|
|
2123
2146
|
// src/store/askUserStore.ts
|
|
2124
2147
|
import { create as create3 } from "zustand";
|
|
@@ -2209,57 +2232,142 @@ var AskUserCard = () => {
|
|
|
2209
2232
|
});
|
|
2210
2233
|
submit(final);
|
|
2211
2234
|
};
|
|
2212
|
-
|
|
2235
|
+
const isSingleQuestion = pending.questions.length === 1;
|
|
2236
|
+
const handleOptionTap = (qid, label) => {
|
|
2237
|
+
setFreeform((p) => ({ ...p, [qid]: "" }));
|
|
2238
|
+
if (isSingleQuestion) {
|
|
2239
|
+
submit({ [qid]: label });
|
|
2240
|
+
return;
|
|
2241
|
+
}
|
|
2242
|
+
setSelected((p) => ({ ...p, [qid]: label }));
|
|
2243
|
+
};
|
|
2244
|
+
return /* @__PURE__ */ jsx10(Grow, { in: true, timeout: 300, children: /* @__PURE__ */ jsx10(Box7, { sx: { width: "100%", display: "flex", justifyContent: "center", px: { xs: 1, sm: 2 }, mb: 1.5 }, children: /* @__PURE__ */ jsxs7(
|
|
2213
2245
|
Paper,
|
|
2214
2246
|
{
|
|
2215
2247
|
elevation: 0,
|
|
2216
2248
|
sx: {
|
|
2217
2249
|
width: "100%",
|
|
2218
2250
|
maxWidth: 760,
|
|
2219
|
-
p: { xs:
|
|
2220
|
-
borderRadius:
|
|
2221
|
-
border: `1px solid ${
|
|
2222
|
-
bgcolor:
|
|
2251
|
+
p: { xs: 2, sm: 2.5 },
|
|
2252
|
+
borderRadius: 3,
|
|
2253
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
2254
|
+
bgcolor: theme.palette.background.paper,
|
|
2255
|
+
boxShadow: `0 8px 32px ${alpha4(theme.palette.common.black, theme.palette.mode === "dark" ? 0.35 : 0.1)}`
|
|
2223
2256
|
},
|
|
2224
2257
|
children: [
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2258
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 0.5 }, children: [
|
|
2259
|
+
/* @__PURE__ */ jsx10(
|
|
2260
|
+
Box7,
|
|
2261
|
+
{
|
|
2262
|
+
sx: {
|
|
2263
|
+
width: 26,
|
|
2264
|
+
height: 26,
|
|
2265
|
+
borderRadius: "50%",
|
|
2266
|
+
display: "flex",
|
|
2267
|
+
alignItems: "center",
|
|
2268
|
+
justifyContent: "center",
|
|
2269
|
+
bgcolor: alpha4(theme.palette.primary.main, 0.12),
|
|
2270
|
+
color: theme.palette.primary.main,
|
|
2271
|
+
flexShrink: 0
|
|
2272
|
+
},
|
|
2273
|
+
children: /* @__PURE__ */ jsx10(QuestionIcon, { size: 16 })
|
|
2274
|
+
}
|
|
2275
|
+
),
|
|
2276
|
+
/* @__PURE__ */ jsx10(Typography4, { variant: "body2", sx: { color: theme.palette.text.secondary, fontWeight: 600 }, children: "Quick question before I continue" })
|
|
2277
|
+
] }),
|
|
2278
|
+
pending.questions.map((q) => /* @__PURE__ */ jsxs7(Box7, { sx: { mt: 1.75 }, children: [
|
|
2279
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "baseline", gap: 1, flexWrap: "wrap", mb: 1.25 }, children: [
|
|
2280
|
+
/* @__PURE__ */ jsx10(Typography4, { sx: { fontWeight: 600, fontSize: "1.02rem", color: theme.palette.text.primary }, children: q.question }),
|
|
2281
|
+
q.header && /* @__PURE__ */ jsx10(
|
|
2282
|
+
Chip,
|
|
2233
2283
|
{
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
setFreeform((p) => ({ ...p, [q.id]: "" }));
|
|
2237
|
-
},
|
|
2238
|
-
variant: isSel ? "contained" : "outlined",
|
|
2239
|
-
color: "primary",
|
|
2284
|
+
label: q.header,
|
|
2285
|
+
size: "small",
|
|
2240
2286
|
sx: {
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
)
|
|
2258
|
-
] })
|
|
2287
|
+
height: 20,
|
|
2288
|
+
fontSize: "0.7rem",
|
|
2289
|
+
fontWeight: 600,
|
|
2290
|
+
color: theme.palette.text.secondary,
|
|
2291
|
+
bgcolor: alpha4(theme.palette.text.primary, 0.06)
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
)
|
|
2295
|
+
] }),
|
|
2296
|
+
q.options && q.options.length > 0 && /* @__PURE__ */ jsx10(
|
|
2297
|
+
Box7,
|
|
2298
|
+
{
|
|
2299
|
+
sx: {
|
|
2300
|
+
display: "grid",
|
|
2301
|
+
gridTemplateColumns: { xs: "1fr", sm: q.options.length > 1 ? "1fr 1fr" : "1fr" },
|
|
2302
|
+
gap: 1
|
|
2259
2303
|
},
|
|
2260
|
-
opt
|
|
2261
|
-
|
|
2262
|
-
|
|
2304
|
+
children: q.options.map((opt) => {
|
|
2305
|
+
const isSel = selected[q.id] === opt.label && !freeform[q.id]?.trim();
|
|
2306
|
+
return /* @__PURE__ */ jsxs7(
|
|
2307
|
+
Box7,
|
|
2308
|
+
{
|
|
2309
|
+
component: "button",
|
|
2310
|
+
type: "button",
|
|
2311
|
+
onClick: () => handleOptionTap(q.id, opt.label),
|
|
2312
|
+
sx: {
|
|
2313
|
+
font: "inherit",
|
|
2314
|
+
textAlign: "left",
|
|
2315
|
+
cursor: "pointer",
|
|
2316
|
+
display: "flex",
|
|
2317
|
+
alignItems: "flex-start",
|
|
2318
|
+
gap: 1,
|
|
2319
|
+
px: 1.5,
|
|
2320
|
+
py: 1.25,
|
|
2321
|
+
borderRadius: 2,
|
|
2322
|
+
border: `1.5px solid ${isSel ? theme.palette.primary.main : theme.palette.divider}`,
|
|
2323
|
+
bgcolor: isSel ? alpha4(theme.palette.primary.main, 0.08) : "transparent",
|
|
2324
|
+
color: "inherit",
|
|
2325
|
+
transition: "border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease",
|
|
2326
|
+
"&:hover": {
|
|
2327
|
+
borderColor: theme.palette.primary.main,
|
|
2328
|
+
bgcolor: alpha4(theme.palette.primary.main, 0.05)
|
|
2329
|
+
},
|
|
2330
|
+
"&:active": { transform: "scale(0.99)" }
|
|
2331
|
+
},
|
|
2332
|
+
children: [
|
|
2333
|
+
/* @__PURE__ */ jsx10(
|
|
2334
|
+
Box7,
|
|
2335
|
+
{
|
|
2336
|
+
sx: {
|
|
2337
|
+
width: 18,
|
|
2338
|
+
height: 18,
|
|
2339
|
+
mt: "2px",
|
|
2340
|
+
borderRadius: "50%",
|
|
2341
|
+
flexShrink: 0,
|
|
2342
|
+
display: "flex",
|
|
2343
|
+
alignItems: "center",
|
|
2344
|
+
justifyContent: "center",
|
|
2345
|
+
border: `1.5px solid ${isSel ? theme.palette.primary.main : alpha4(theme.palette.text.secondary, 0.5)}`,
|
|
2346
|
+
bgcolor: isSel ? theme.palette.primary.main : "transparent",
|
|
2347
|
+
color: theme.palette.getContrastText(theme.palette.primary.main),
|
|
2348
|
+
transition: "all 0.15s ease"
|
|
2349
|
+
},
|
|
2350
|
+
children: isSel && /* @__PURE__ */ jsx10(CheckIcon3, { size: 12, strokeWidth: 3 })
|
|
2351
|
+
}
|
|
2352
|
+
),
|
|
2353
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { minWidth: 0 }, children: [
|
|
2354
|
+
/* @__PURE__ */ jsx10(Typography4, { sx: { fontWeight: 600, lineHeight: 1.35, fontSize: "0.92rem" }, children: opt.label }),
|
|
2355
|
+
opt.description && /* @__PURE__ */ jsx10(
|
|
2356
|
+
Typography4,
|
|
2357
|
+
{
|
|
2358
|
+
variant: "caption",
|
|
2359
|
+
sx: { color: theme.palette.text.secondary, display: "block", mt: 0.25 },
|
|
2360
|
+
children: opt.description
|
|
2361
|
+
}
|
|
2362
|
+
)
|
|
2363
|
+
] })
|
|
2364
|
+
]
|
|
2365
|
+
},
|
|
2366
|
+
opt.label
|
|
2367
|
+
);
|
|
2368
|
+
})
|
|
2369
|
+
}
|
|
2370
|
+
),
|
|
2263
2371
|
q.allowFreeform !== false && /* @__PURE__ */ jsx10(
|
|
2264
2372
|
TextField3,
|
|
2265
2373
|
{
|
|
@@ -2268,17 +2376,45 @@ var AskUserCard = () => {
|
|
|
2268
2376
|
placeholder: q.options && q.options.length ? "Or type your own answer\u2026" : "Type your answer\u2026",
|
|
2269
2377
|
value: freeform[q.id] ?? "",
|
|
2270
2378
|
onChange: (e) => setFreeform((p) => ({ ...p, [q.id]: e.target.value })),
|
|
2271
|
-
|
|
2379
|
+
onKeyDown: (e) => {
|
|
2380
|
+
if (e.key === "Enter" && !e.shiftKey && answerFor(q.id)) {
|
|
2381
|
+
e.preventDefault();
|
|
2382
|
+
if (allAnswered) handleSubmit();
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
sx: {
|
|
2386
|
+
mt: q.options && q.options.length ? 1.25 : 0,
|
|
2387
|
+
"& .MuiOutlinedInput-root": { borderRadius: 2 }
|
|
2388
|
+
}
|
|
2272
2389
|
}
|
|
2273
2390
|
)
|
|
2274
2391
|
] }, q.id)),
|
|
2275
|
-
/* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
|
|
2276
|
-
/* @__PURE__ */ jsx10(
|
|
2277
|
-
|
|
2392
|
+
/* @__PURE__ */ jsxs7(Box7, { sx: { display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
|
|
2393
|
+
/* @__PURE__ */ jsx10(
|
|
2394
|
+
Button2,
|
|
2395
|
+
{
|
|
2396
|
+
onClick: cancel,
|
|
2397
|
+
color: "inherit",
|
|
2398
|
+
size: "small",
|
|
2399
|
+
sx: { textTransform: "none", color: theme.palette.text.secondary },
|
|
2400
|
+
children: "Skip \u2014 use your best judgment"
|
|
2401
|
+
}
|
|
2402
|
+
),
|
|
2403
|
+
(!isSingleQuestion || Object.values(freeform).some((v) => v.trim())) && /* @__PURE__ */ jsx10(
|
|
2404
|
+
Button2,
|
|
2405
|
+
{
|
|
2406
|
+
onClick: handleSubmit,
|
|
2407
|
+
disabled: !allAnswered,
|
|
2408
|
+
variant: "contained",
|
|
2409
|
+
size: "small",
|
|
2410
|
+
sx: { textTransform: "none", borderRadius: 999, px: 2.5 },
|
|
2411
|
+
children: "Answer"
|
|
2412
|
+
}
|
|
2413
|
+
)
|
|
2278
2414
|
] })
|
|
2279
2415
|
]
|
|
2280
2416
|
}
|
|
2281
|
-
) });
|
|
2417
|
+
) }) });
|
|
2282
2418
|
};
|
|
2283
2419
|
var ask_user_card_default = AskUserCard;
|
|
2284
2420
|
|
|
@@ -4187,14 +4323,14 @@ TOOL USAGE PROTOCOL (conservative approach)
|
|
|
4187
4323
|
* web_fetch() - to read the FULL contents of a specific URL you already have. Reach for this when the user wants to "tell me more", "go deeper", "read/open that article", or asks for details about a specific source, link, or article from an EARLIER answer: take that item's URL from the previous Sources list in this conversation and fetch it, then answer from the page's actual content (not just the prior summary)
|
|
4188
4324
|
* image_generation() - ONLY when explicitly asked to create or generate an image
|
|
4189
4325
|
* create_file({"content": "...", "filename": "report.docx", "format": "docx"}) - when the user asks for a downloadable FILE (a document, spreadsheet, slides, markdown, code, etc.) or to "export"/"download"/"save" something. Formats: md, txt, csv, json, html, xml, yaml, docx, pptx. PDF is NOT a supported format \u2014 if the user asks for a PDF, create a docx instead. For docx/pptx write well-structured Markdown (use "## " headings to start each slide for pptx). It returns a temporary download link \u2014 ALWAYS tell the user the file expires (~1 hour). If it is unclear whether they want it shown inline vs. as a downloadable file, use ask_user first.
|
|
4190
|
-
* ask_user({"questions": [{"question": "...", "header": "Format", "options": [{"label": "Inline (Recommended)"}, {"label": "Download a file"}]}]}) - when you are
|
|
4326
|
+
* ask_user({"questions": [{"question": "...", "header": "Format", "options": [{"label": "Inline (Recommended)"}, {"label": "Download a file"}]}]}) - when the request is AMBIGUOUS or missing a detail you need to do a good job (unclear scope, audience, format, tone, which of several interpretations they meant), or you are blocked on a decision that is the user's to make and cannot resolve from the request, context, or sensible defaults. Renders clickable options the user answers in one step \u2014 ALWAYS prefer this over asking a clarifying question in prose and ending your turn. Give 1-4 questions, each with 2-4 short options; if one is clearly best, list it first and append " (Recommended)". The user may also type their own answer; act on it directly. Don't overuse it \u2014 when a sensible default exists, take it and note the assumption instead.
|
|
4191
4327
|
- For general questions about concepts, definitions, explanations, or how-to topics, use your built-in knowledge WITHOUT calling tools.
|
|
4192
4328
|
- Examples of what NOT to use tools for: "who are you?", "what is React?", "explain machine learning", "how does X work?", general programming questions.
|
|
4193
4329
|
- When a tool is truly needed, call exactly ONE tool that best matches the request.
|
|
4194
4330
|
- Begin tool usage with a fenced code block: \`\`\`tool_code
|
|
4195
4331
|
functionName({"param": "value"})
|
|
4196
4332
|
\`\`\`
|
|
4197
|
-
- If you cannot answer with your knowledge and context, and no suitable tool exists, ask a clarifying question.
|
|
4333
|
+
- If you cannot answer with your knowledge and context, and no suitable tool exists, use ask_user to ask a clarifying question with clickable options.
|
|
4198
4334
|
|
|
4199
4335
|
Examples of appropriate tool usage:
|
|
4200
4336
|
|
|
@@ -6459,7 +6595,7 @@ import {
|
|
|
6459
6595
|
TextField as TextField6,
|
|
6460
6596
|
alpha as alpha7
|
|
6461
6597
|
} from "@mui/material";
|
|
6462
|
-
import { ChevronDown as ExpandMoreIcon2, ChevronUp as ExpandLessIcon, Plus as AddIcon3, Folder as FolderIcon3, FolderOpen as FolderOpenIcon, Inbox as InboxIcon2, X as CloseIcon5, Check as
|
|
6598
|
+
import { ChevronDown as ExpandMoreIcon2, ChevronUp as ExpandLessIcon, Plus as AddIcon3, Folder as FolderIcon3, FolderOpen as FolderOpenIcon, Inbox as InboxIcon2, X as CloseIcon5, Check as CheckIcon4 } from "lucide-react";
|
|
6463
6599
|
import { useTheme as useTheme12 } from "@mui/material/styles";
|
|
6464
6600
|
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6465
6601
|
var ProjectHeader = ({
|
|
@@ -6693,7 +6829,7 @@ var ProjectHeader = ({
|
|
|
6693
6829
|
commitRename();
|
|
6694
6830
|
},
|
|
6695
6831
|
sx: { color: theme.palette.success.main },
|
|
6696
|
-
children: /* @__PURE__ */ jsx15(
|
|
6832
|
+
children: /* @__PURE__ */ jsx15(CheckIcon4, { size: 16 })
|
|
6697
6833
|
}
|
|
6698
6834
|
) })
|
|
6699
6835
|
] }),
|
|
@@ -11544,4 +11680,4 @@ var chat_default = Chat;
|
|
|
11544
11680
|
export {
|
|
11545
11681
|
chat_default
|
|
11546
11682
|
};
|
|
11547
|
-
//# sourceMappingURL=chunk-
|
|
11683
|
+
//# sourceMappingURL=chunk-RRSACJI2.mjs.map
|