@burtson-labs/bandit-engine 2.0.126 → 2.0.128
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-MLDKHXUH.mjs} +5 -5
- package/dist/chat-provider.js +1 -1
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +2 -2
- package/dist/{chunk-OLKDPUWL.mjs → chunk-BQW7DSJ6.mjs} +2 -2
- package/dist/{chunk-574ILQTT.mjs → chunk-FWFDOSRM.mjs} +2 -2
- package/dist/{chunk-JXFPCLEY.mjs → chunk-LQJ6OD7F.mjs} +332 -509
- package/dist/chunk-LQJ6OD7F.mjs.map +1 -0
- package/dist/{chunk-TQP3GUW5.mjs → chunk-N3TVVQVS.mjs} +3 -3
- package/dist/{chunk-6ONL4SRK.mjs → chunk-NLBZZP3B.mjs} +2 -2
- package/dist/{chunk-6ONL4SRK.mjs.map → chunk-NLBZZP3B.mjs.map} +1 -1
- package/dist/{chunk-SAQUEXYS.mjs → chunk-PU74BI6Y.mjs} +2 -2
- package/dist/{chunk-RKA3X3EY.mjs → chunk-QDTMVQWD.mjs} +23 -6
- package/dist/chunk-QDTMVQWD.mjs.map +1 -0
- package/dist/index.js +423 -581
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/management/management.js +407 -565
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +5 -5
- package/dist/modals/chat-modal/chat-modal.js +1 -1
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-JXFPCLEY.mjs.map +0 -1
- package/dist/chunk-RKA3X3EY.mjs.map +0 -1
- /package/dist/{chat-Z3GRZ7GA.mjs.map → chat-MLDKHXUH.mjs.map} +0 -0
- /package/dist/{chunk-OLKDPUWL.mjs.map → chunk-BQW7DSJ6.mjs.map} +0 -0
- /package/dist/{chunk-574ILQTT.mjs.map → chunk-FWFDOSRM.mjs.map} +0 -0
- /package/dist/{chunk-TQP3GUW5.mjs.map → chunk-N3TVVQVS.mjs.map} +0 -0
- /package/dist/{chunk-SAQUEXYS.mjs.map → chunk-PU74BI6Y.mjs.map} +0 -0
|
@@ -7655,7 +7655,7 @@ var init_conversationStore = __esm({
|
|
|
7655
7655
|
const now = /* @__PURE__ */ new Date();
|
|
7656
7656
|
const newConv = normalizeConversation({
|
|
7657
7657
|
id: (0, import_uuid2.v4)(),
|
|
7658
|
-
name: "
|
|
7658
|
+
name: "Temporary chat",
|
|
7659
7659
|
history: [],
|
|
7660
7660
|
model: selectedModel,
|
|
7661
7661
|
createdAt: now,
|
|
@@ -21662,23 +21662,24 @@ ${sanitize(
|
|
|
21662
21662
|
bgcolor: inputBackground,
|
|
21663
21663
|
borderRadius: "24px",
|
|
21664
21664
|
boxShadow: isMobile ? `0 0 0 1px ${theme.palette.mode === "dark" ? "#444" : "#eee"}` : "0 4px 20px rgba(0, 0, 0, 0.4)",
|
|
21665
|
-
px: isMobile ? compactMobile ? 1 : 1.5 :
|
|
21666
|
-
pt: isMobile ? compactMobile ? 0.6 : 1 :
|
|
21667
|
-
pb: isMobile ? compactMobile ? 0.9 : 1.5 :
|
|
21665
|
+
px: isMobile ? compactMobile ? 1 : 1.5 : 2,
|
|
21666
|
+
pt: isMobile ? compactMobile ? 0.6 : 1 : 0.75,
|
|
21667
|
+
pb: isMobile ? compactMobile ? 0.9 : 1.5 : 0.75,
|
|
21668
21668
|
display: "flex",
|
|
21669
21669
|
flexDirection: "column",
|
|
21670
|
-
gap: isMobile ? compactMobile ? 0.75 : 1 :
|
|
21670
|
+
gap: isMobile ? compactMobile ? 0.75 : 1 : 0.5
|
|
21671
21671
|
},
|
|
21672
21672
|
children: [
|
|
21673
21673
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
21674
21674
|
import_material39.Box,
|
|
21675
21675
|
{
|
|
21676
21676
|
sx: {
|
|
21677
|
-
display: "flex",
|
|
21677
|
+
display: fileInputs.length > 0 || pastedImages.length > 0 ? "flex" : "none",
|
|
21678
21678
|
flexWrap: "wrap",
|
|
21679
21679
|
gap: attachmentsGap,
|
|
21680
21680
|
alignItems: "center",
|
|
21681
|
-
flexDirection: "row"
|
|
21681
|
+
flexDirection: "row",
|
|
21682
|
+
pt: isMobile ? 0 : 0.5
|
|
21682
21683
|
},
|
|
21683
21684
|
children: [
|
|
21684
21685
|
fileInputs.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
@@ -21802,7 +21803,7 @@ ${sanitize(
|
|
|
21802
21803
|
]
|
|
21803
21804
|
}
|
|
21804
21805
|
),
|
|
21805
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
21806
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
21806
21807
|
import_material39.Box,
|
|
21807
21808
|
{
|
|
21808
21809
|
sx: {
|
|
@@ -21815,8 +21816,8 @@ ${sanitize(
|
|
|
21815
21816
|
{
|
|
21816
21817
|
fullWidth: true,
|
|
21817
21818
|
multiline: true,
|
|
21818
|
-
maxRows:
|
|
21819
|
-
placeholder: isIncognito ? "
|
|
21819
|
+
maxRows: compactMobile ? 6 : 12,
|
|
21820
|
+
placeholder: isIncognito ? "Temporary chat \u2014 not saved" : "What's on your mind?",
|
|
21820
21821
|
value: inputValue,
|
|
21821
21822
|
onChange: (e) => setInputValue(e.target.value),
|
|
21822
21823
|
onKeyDown: handleKeyPress,
|
|
@@ -21826,18 +21827,15 @@ ${sanitize(
|
|
|
21826
21827
|
disableUnderline: true,
|
|
21827
21828
|
sx: {
|
|
21828
21829
|
flex: "1 1 auto",
|
|
21829
|
-
maxHeight:
|
|
21830
|
+
maxHeight: compactMobile ? "120px" : "150px",
|
|
21830
21831
|
overflowY: "auto",
|
|
21831
21832
|
color: fileText,
|
|
21832
21833
|
"& .MuiInputBase-inputMultiline": {
|
|
21833
|
-
fontSize:
|
|
21834
|
+
fontSize: compactMobile ? "0.95rem" : "1rem"
|
|
21834
21835
|
}
|
|
21835
21836
|
}
|
|
21836
21837
|
},
|
|
21837
|
-
sx: {
|
|
21838
|
-
flex: 1,
|
|
21839
|
-
"& .MuiInputBase-root": {}
|
|
21840
|
-
}
|
|
21838
|
+
sx: { flex: 1 }
|
|
21841
21839
|
}
|
|
21842
21840
|
)
|
|
21843
21841
|
}
|
|
@@ -21848,9 +21846,9 @@ ${sanitize(
|
|
|
21848
21846
|
sx: {
|
|
21849
21847
|
display: "flex",
|
|
21850
21848
|
justifyContent: "space-between",
|
|
21851
|
-
alignItems: "
|
|
21849
|
+
alignItems: "flex-end",
|
|
21852
21850
|
gap: isMobile ? 0.6 : 1,
|
|
21853
|
-
mt: isMobile ? 0.5 :
|
|
21851
|
+
mt: isMobile ? 0.5 : 0
|
|
21854
21852
|
},
|
|
21855
21853
|
children: [
|
|
21856
21854
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
@@ -21937,26 +21935,53 @@ ${sanitize(
|
|
|
21937
21935
|
]
|
|
21938
21936
|
}
|
|
21939
21937
|
),
|
|
21940
|
-
|
|
21941
|
-
import_material39.
|
|
21938
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
21939
|
+
import_material39.TextField,
|
|
21942
21940
|
{
|
|
21943
|
-
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
21941
|
+
fullWidth: true,
|
|
21942
|
+
multiline: true,
|
|
21943
|
+
maxRows: 6,
|
|
21944
|
+
placeholder: isIncognito ? "Temporary chat \u2014 not saved" : "What's on your mind?",
|
|
21945
|
+
value: inputValue,
|
|
21946
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
21947
|
+
onKeyDown: handleKeyPress,
|
|
21948
|
+
inputRef,
|
|
21949
|
+
variant: "standard",
|
|
21950
|
+
InputProps: {
|
|
21951
|
+
disableUnderline: true,
|
|
21952
|
+
sx: {
|
|
21953
|
+
color: fileText,
|
|
21954
|
+
maxHeight: "160px",
|
|
21955
|
+
overflowY: "auto",
|
|
21956
|
+
"& .MuiInputBase-inputMultiline": { fontSize: "1rem" }
|
|
21957
|
+
}
|
|
21956
21958
|
},
|
|
21957
|
-
|
|
21959
|
+
sx: { flex: 1, alignSelf: "center", mx: 0.5 }
|
|
21958
21960
|
}
|
|
21959
|
-
)
|
|
21961
|
+
),
|
|
21962
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_material39.Box, { sx: { display: "flex", alignItems: "center", gap: isMobile ? 0.6 : 1 }, children: [
|
|
21963
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(engine_picker_default, {}),
|
|
21964
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material39.Tooltip, { title: isStreaming ? "Stop response" : "Send message", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
21965
|
+
import_material39.IconButton,
|
|
21966
|
+
{
|
|
21967
|
+
onClick: isStreaming ? onStop || (() => {
|
|
21968
|
+
}) : handleSubmit,
|
|
21969
|
+
disabled: (isStreaming ? false : isSubmitting) || !isStreaming && !inputValue.trim() && pastedImages.length === 0 && fileInputs.length === 0,
|
|
21970
|
+
sx: {
|
|
21971
|
+
bgcolor: sendButtonBackground,
|
|
21972
|
+
color: sendButtonColor,
|
|
21973
|
+
borderRadius: "50%",
|
|
21974
|
+
width: sendIconSize,
|
|
21975
|
+
height: sendIconSize,
|
|
21976
|
+
boxShadow: sendButtonShadow,
|
|
21977
|
+
transition: "background-color 0.2s ease, box-shadow 0.2s ease",
|
|
21978
|
+
"&:hover": { bgcolor: sendButtonHover },
|
|
21979
|
+
"&.Mui-disabled": { opacity: 0.5 }
|
|
21980
|
+
},
|
|
21981
|
+
children: isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CloseIcon, { fontSize: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ArrowUpwardIcon, { fontSize: "small" })
|
|
21982
|
+
}
|
|
21983
|
+
) }) })
|
|
21984
|
+
] })
|
|
21960
21985
|
]
|
|
21961
21986
|
}
|
|
21962
21987
|
),
|
|
@@ -22003,7 +22028,7 @@ ${sanitize(
|
|
|
22003
22028
|
]
|
|
22004
22029
|
}
|
|
22005
22030
|
),
|
|
22006
|
-
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime39.
|
|
22031
|
+
(!isMobile || isIncognito) && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
22007
22032
|
import_material39.Typography,
|
|
22008
22033
|
{
|
|
22009
22034
|
variant: "caption",
|
|
@@ -22015,10 +22040,7 @@ ${sanitize(
|
|
|
22015
22040
|
textAlign: "center",
|
|
22016
22041
|
pointerEvents: "none"
|
|
22017
22042
|
},
|
|
22018
|
-
children:
|
|
22019
|
-
brandingText || "BanditAI",
|
|
22020
|
-
" may be wrong - double-check important info."
|
|
22021
|
-
]
|
|
22043
|
+
children: isIncognito ? "Temporary chats aren't saved to history, synced, or added to memory." : `${brandingText || "BanditAI"} may be wrong - double-check important info.`
|
|
22022
22044
|
}
|
|
22023
22045
|
)
|
|
22024
22046
|
]
|
|
@@ -22108,13 +22130,14 @@ var init_askUserStore = __esm({
|
|
|
22108
22130
|
});
|
|
22109
22131
|
|
|
22110
22132
|
// src/chat/ask-user-card.tsx
|
|
22111
|
-
var import_react47, import_material40, import_styles25, import_jsx_runtime40, AskUserCard, ask_user_card_default;
|
|
22133
|
+
var import_react47, import_material40, import_styles25, import_lucide_react9, import_jsx_runtime40, AskUserCard, ask_user_card_default;
|
|
22112
22134
|
var init_ask_user_card = __esm({
|
|
22113
22135
|
"src/chat/ask-user-card.tsx"() {
|
|
22114
22136
|
"use strict";
|
|
22115
22137
|
import_react47 = require("react");
|
|
22116
22138
|
import_material40 = require("@mui/material");
|
|
22117
22139
|
import_styles25 = require("@mui/material/styles");
|
|
22140
|
+
import_lucide_react9 = require("lucide-react");
|
|
22118
22141
|
init_askUserStore();
|
|
22119
22142
|
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
22120
22143
|
AskUserCard = () => {
|
|
@@ -22142,57 +22165,142 @@ var init_ask_user_card = __esm({
|
|
|
22142
22165
|
});
|
|
22143
22166
|
submit(final);
|
|
22144
22167
|
};
|
|
22145
|
-
|
|
22168
|
+
const isSingleQuestion = pending.questions.length === 1;
|
|
22169
|
+
const handleOptionTap = (qid, label) => {
|
|
22170
|
+
setFreeform((p) => ({ ...p, [qid]: "" }));
|
|
22171
|
+
if (isSingleQuestion) {
|
|
22172
|
+
submit({ [qid]: label });
|
|
22173
|
+
return;
|
|
22174
|
+
}
|
|
22175
|
+
setSelected((p) => ({ ...p, [qid]: label }));
|
|
22176
|
+
};
|
|
22177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Grow, { in: true, timeout: 300, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Box, { sx: { width: "100%", display: "flex", justifyContent: "center", px: { xs: 1, sm: 2 }, mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
22146
22178
|
import_material40.Paper,
|
|
22147
22179
|
{
|
|
22148
22180
|
elevation: 0,
|
|
22149
22181
|
sx: {
|
|
22150
22182
|
width: "100%",
|
|
22151
22183
|
maxWidth: 760,
|
|
22152
|
-
p: { xs:
|
|
22153
|
-
borderRadius:
|
|
22154
|
-
border: `1px solid ${
|
|
22155
|
-
bgcolor:
|
|
22184
|
+
p: { xs: 2, sm: 2.5 },
|
|
22185
|
+
borderRadius: 3,
|
|
22186
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
22187
|
+
bgcolor: theme.palette.background.paper,
|
|
22188
|
+
boxShadow: `0 8px 32px ${(0, import_styles25.alpha)(theme.palette.common.black, theme.palette.mode === "dark" ? 0.35 : 0.1)}`
|
|
22156
22189
|
},
|
|
22157
22190
|
children: [
|
|
22158
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.
|
|
22159
|
-
|
|
22160
|
-
|
|
22161
|
-
|
|
22162
|
-
|
|
22163
|
-
|
|
22164
|
-
|
|
22165
|
-
|
|
22191
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 0.5 }, children: [
|
|
22192
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22193
|
+
import_material40.Box,
|
|
22194
|
+
{
|
|
22195
|
+
sx: {
|
|
22196
|
+
width: 26,
|
|
22197
|
+
height: 26,
|
|
22198
|
+
borderRadius: "50%",
|
|
22199
|
+
display: "flex",
|
|
22200
|
+
alignItems: "center",
|
|
22201
|
+
justifyContent: "center",
|
|
22202
|
+
bgcolor: (0, import_styles25.alpha)(theme.palette.primary.main, 0.12),
|
|
22203
|
+
color: theme.palette.primary.main,
|
|
22204
|
+
flexShrink: 0
|
|
22205
|
+
},
|
|
22206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react9.CircleHelp, { size: 16 })
|
|
22207
|
+
}
|
|
22208
|
+
),
|
|
22209
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { variant: "body2", sx: { color: theme.palette.text.secondary, fontWeight: 600 }, children: "Quick question before I continue" })
|
|
22210
|
+
] }),
|
|
22211
|
+
pending.questions.map((q) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { mt: 1.75 }, children: [
|
|
22212
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", alignItems: "baseline", gap: 1, flexWrap: "wrap", mb: 1.25 }, children: [
|
|
22213
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { sx: { fontWeight: 600, fontSize: "1.02rem", color: theme.palette.text.primary }, children: q.question }),
|
|
22214
|
+
q.header && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22215
|
+
import_material40.Chip,
|
|
22166
22216
|
{
|
|
22167
|
-
|
|
22168
|
-
|
|
22169
|
-
setFreeform((p) => ({ ...p, [q.id]: "" }));
|
|
22170
|
-
},
|
|
22171
|
-
variant: isSel ? "contained" : "outlined",
|
|
22172
|
-
color: "primary",
|
|
22217
|
+
label: q.header,
|
|
22218
|
+
size: "small",
|
|
22173
22219
|
sx: {
|
|
22174
|
-
|
|
22175
|
-
|
|
22176
|
-
|
|
22177
|
-
|
|
22178
|
-
|
|
22179
|
-
|
|
22180
|
-
|
|
22181
|
-
|
|
22182
|
-
|
|
22183
|
-
|
|
22184
|
-
|
|
22185
|
-
|
|
22186
|
-
|
|
22187
|
-
|
|
22188
|
-
|
|
22189
|
-
|
|
22190
|
-
)
|
|
22191
|
-
] })
|
|
22220
|
+
height: 20,
|
|
22221
|
+
fontSize: "0.7rem",
|
|
22222
|
+
fontWeight: 600,
|
|
22223
|
+
color: theme.palette.text.secondary,
|
|
22224
|
+
bgcolor: (0, import_styles25.alpha)(theme.palette.text.primary, 0.06)
|
|
22225
|
+
}
|
|
22226
|
+
}
|
|
22227
|
+
)
|
|
22228
|
+
] }),
|
|
22229
|
+
q.options && q.options.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22230
|
+
import_material40.Box,
|
|
22231
|
+
{
|
|
22232
|
+
sx: {
|
|
22233
|
+
display: "grid",
|
|
22234
|
+
gridTemplateColumns: { xs: "1fr", sm: q.options.length > 1 ? "1fr 1fr" : "1fr" },
|
|
22235
|
+
gap: 1
|
|
22192
22236
|
},
|
|
22193
|
-
opt
|
|
22194
|
-
|
|
22195
|
-
|
|
22237
|
+
children: q.options.map((opt) => {
|
|
22238
|
+
const isSel = selected[q.id] === opt.label && !freeform[q.id]?.trim();
|
|
22239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
22240
|
+
import_material40.Box,
|
|
22241
|
+
{
|
|
22242
|
+
component: "button",
|
|
22243
|
+
type: "button",
|
|
22244
|
+
onClick: () => handleOptionTap(q.id, opt.label),
|
|
22245
|
+
sx: {
|
|
22246
|
+
font: "inherit",
|
|
22247
|
+
textAlign: "left",
|
|
22248
|
+
cursor: "pointer",
|
|
22249
|
+
display: "flex",
|
|
22250
|
+
alignItems: "flex-start",
|
|
22251
|
+
gap: 1,
|
|
22252
|
+
px: 1.5,
|
|
22253
|
+
py: 1.25,
|
|
22254
|
+
borderRadius: 2,
|
|
22255
|
+
border: `1.5px solid ${isSel ? theme.palette.primary.main : theme.palette.divider}`,
|
|
22256
|
+
bgcolor: isSel ? (0, import_styles25.alpha)(theme.palette.primary.main, 0.08) : "transparent",
|
|
22257
|
+
color: "inherit",
|
|
22258
|
+
transition: "border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease",
|
|
22259
|
+
"&:hover": {
|
|
22260
|
+
borderColor: theme.palette.primary.main,
|
|
22261
|
+
bgcolor: (0, import_styles25.alpha)(theme.palette.primary.main, 0.05)
|
|
22262
|
+
},
|
|
22263
|
+
"&:active": { transform: "scale(0.99)" }
|
|
22264
|
+
},
|
|
22265
|
+
children: [
|
|
22266
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22267
|
+
import_material40.Box,
|
|
22268
|
+
{
|
|
22269
|
+
sx: {
|
|
22270
|
+
width: 18,
|
|
22271
|
+
height: 18,
|
|
22272
|
+
mt: "2px",
|
|
22273
|
+
borderRadius: "50%",
|
|
22274
|
+
flexShrink: 0,
|
|
22275
|
+
display: "flex",
|
|
22276
|
+
alignItems: "center",
|
|
22277
|
+
justifyContent: "center",
|
|
22278
|
+
border: `1.5px solid ${isSel ? theme.palette.primary.main : (0, import_styles25.alpha)(theme.palette.text.secondary, 0.5)}`,
|
|
22279
|
+
bgcolor: isSel ? theme.palette.primary.main : "transparent",
|
|
22280
|
+
color: theme.palette.getContrastText(theme.palette.primary.main),
|
|
22281
|
+
transition: "all 0.15s ease"
|
|
22282
|
+
},
|
|
22283
|
+
children: isSel && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react9.Check, { size: 12, strokeWidth: 3 })
|
|
22284
|
+
}
|
|
22285
|
+
),
|
|
22286
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { minWidth: 0 }, children: [
|
|
22287
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material40.Typography, { sx: { fontWeight: 600, lineHeight: 1.35, fontSize: "0.92rem" }, children: opt.label }),
|
|
22288
|
+
opt.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22289
|
+
import_material40.Typography,
|
|
22290
|
+
{
|
|
22291
|
+
variant: "caption",
|
|
22292
|
+
sx: { color: theme.palette.text.secondary, display: "block", mt: 0.25 },
|
|
22293
|
+
children: opt.description
|
|
22294
|
+
}
|
|
22295
|
+
)
|
|
22296
|
+
] })
|
|
22297
|
+
]
|
|
22298
|
+
},
|
|
22299
|
+
opt.label
|
|
22300
|
+
);
|
|
22301
|
+
})
|
|
22302
|
+
}
|
|
22303
|
+
),
|
|
22196
22304
|
q.allowFreeform !== false && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22197
22305
|
import_material40.TextField,
|
|
22198
22306
|
{
|
|
@@ -22201,17 +22309,45 @@ var init_ask_user_card = __esm({
|
|
|
22201
22309
|
placeholder: q.options && q.options.length ? "Or type your own answer\u2026" : "Type your answer\u2026",
|
|
22202
22310
|
value: freeform[q.id] ?? "",
|
|
22203
22311
|
onChange: (e) => setFreeform((p) => ({ ...p, [q.id]: e.target.value })),
|
|
22204
|
-
|
|
22312
|
+
onKeyDown: (e) => {
|
|
22313
|
+
if (e.key === "Enter" && !e.shiftKey && answerFor(q.id)) {
|
|
22314
|
+
e.preventDefault();
|
|
22315
|
+
if (allAnswered) handleSubmit();
|
|
22316
|
+
}
|
|
22317
|
+
},
|
|
22318
|
+
sx: {
|
|
22319
|
+
mt: q.options && q.options.length ? 1.25 : 0,
|
|
22320
|
+
"& .MuiOutlinedInput-root": { borderRadius: 2 }
|
|
22321
|
+
}
|
|
22205
22322
|
}
|
|
22206
22323
|
)
|
|
22207
22324
|
] }, q.id)),
|
|
22208
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
|
|
22209
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22210
|
-
|
|
22325
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_material40.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 1, mt: 2 }, children: [
|
|
22326
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22327
|
+
import_material40.Button,
|
|
22328
|
+
{
|
|
22329
|
+
onClick: cancel,
|
|
22330
|
+
color: "inherit",
|
|
22331
|
+
size: "small",
|
|
22332
|
+
sx: { textTransform: "none", color: theme.palette.text.secondary },
|
|
22333
|
+
children: "Skip \u2014 use your best judgment"
|
|
22334
|
+
}
|
|
22335
|
+
),
|
|
22336
|
+
(!isSingleQuestion || Object.values(freeform).some((v) => v.trim())) && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
22337
|
+
import_material40.Button,
|
|
22338
|
+
{
|
|
22339
|
+
onClick: handleSubmit,
|
|
22340
|
+
disabled: !allAnswered,
|
|
22341
|
+
variant: "contained",
|
|
22342
|
+
size: "small",
|
|
22343
|
+
sx: { textTransform: "none", borderRadius: 999, px: 2.5 },
|
|
22344
|
+
children: "Answer"
|
|
22345
|
+
}
|
|
22346
|
+
)
|
|
22211
22347
|
] })
|
|
22212
22348
|
]
|
|
22213
22349
|
}
|
|
22214
|
-
) });
|
|
22350
|
+
) }) });
|
|
22215
22351
|
};
|
|
22216
22352
|
ask_user_card_default = AskUserCard;
|
|
22217
22353
|
}
|
|
@@ -24212,14 +24348,14 @@ TOOL USAGE PROTOCOL (conservative approach)
|
|
|
24212
24348
|
* 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)
|
|
24213
24349
|
* image_generation() - ONLY when explicitly asked to create or generate an image
|
|
24214
24350
|
* 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.
|
|
24215
|
-
* ask_user({"questions": [{"question": "...", "header": "Format", "options": [{"label": "Inline (Recommended)"}, {"label": "Download a file"}]}]}) - when you are
|
|
24351
|
+
* 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.
|
|
24216
24352
|
- For general questions about concepts, definitions, explanations, or how-to topics, use your built-in knowledge WITHOUT calling tools.
|
|
24217
24353
|
- Examples of what NOT to use tools for: "who are you?", "what is React?", "explain machine learning", "how does X work?", general programming questions.
|
|
24218
24354
|
- When a tool is truly needed, call exactly ONE tool that best matches the request.
|
|
24219
24355
|
- Begin tool usage with a fenced code block: \`\`\`tool_code
|
|
24220
24356
|
functionName({"param": "value"})
|
|
24221
24357
|
\`\`\`
|
|
24222
|
-
- If you cannot answer with your knowledge and context, and no suitable tool exists, ask a clarifying question.
|
|
24358
|
+
- 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.
|
|
24223
24359
|
|
|
24224
24360
|
Examples of appropriate tool usage:
|
|
24225
24361
|
|
|
@@ -25210,13 +25346,13 @@ var init_useNetworkStatus = __esm({
|
|
|
25210
25346
|
});
|
|
25211
25347
|
|
|
25212
25348
|
// src/chat/project-management-modal.tsx
|
|
25213
|
-
var import_react53, import_material42,
|
|
25349
|
+
var import_react53, import_material42, import_lucide_react10, import_styles26, import_jsx_runtime42, DEFAULT_COLORS2, ProjectManagementModal, project_management_modal_default;
|
|
25214
25350
|
var init_project_management_modal = __esm({
|
|
25215
25351
|
"src/chat/project-management-modal.tsx"() {
|
|
25216
25352
|
"use strict";
|
|
25217
25353
|
import_react53 = require("react");
|
|
25218
25354
|
import_material42 = require("@mui/material");
|
|
25219
|
-
|
|
25355
|
+
import_lucide_react10 = require("lucide-react");
|
|
25220
25356
|
import_styles26 = require("@mui/material/styles");
|
|
25221
25357
|
init_projectStore();
|
|
25222
25358
|
init_conversationStore();
|
|
@@ -25445,7 +25581,7 @@ var init_project_management_modal = __esm({
|
|
|
25445
25581
|
flex: 1
|
|
25446
25582
|
},
|
|
25447
25583
|
children: [
|
|
25448
|
-
showCreateForm && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.IconButton, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25584
|
+
showCreateForm && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.IconButton, { onClick: resetForm, size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.ArrowLeft, { size: 16 }) }),
|
|
25449
25585
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25450
25586
|
import_material42.Typography,
|
|
25451
25587
|
{
|
|
@@ -25463,7 +25599,7 @@ var init_project_management_modal = __esm({
|
|
|
25463
25599
|
]
|
|
25464
25600
|
}
|
|
25465
25601
|
),
|
|
25466
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.IconButton, { onClick: handleClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25602
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.IconButton, { onClick: handleClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.X, {}) })
|
|
25467
25603
|
]
|
|
25468
25604
|
}
|
|
25469
25605
|
),
|
|
@@ -25550,7 +25686,7 @@ var init_project_management_modal = __esm({
|
|
|
25550
25686
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25551
25687
|
import_material42.Button,
|
|
25552
25688
|
{
|
|
25553
|
-
startIcon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25689
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.Plus, {}),
|
|
25554
25690
|
onClick: () => setShowCreateForm(true),
|
|
25555
25691
|
variant: "contained",
|
|
25556
25692
|
sx: {
|
|
@@ -25575,7 +25711,7 @@ var init_project_management_modal = __esm({
|
|
|
25575
25711
|
backgroundColor: subtleSurface
|
|
25576
25712
|
},
|
|
25577
25713
|
children: [
|
|
25578
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25714
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.Folder, { size: 48, style: { marginBottom: 8, opacity: 0.5 } }),
|
|
25579
25715
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Typography, { variant: "body1", sx: { fontWeight: 600 }, children: "No projects yet" }),
|
|
25580
25716
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Typography, { variant: "body2", children: "Create your first project to organize conversations." })
|
|
25581
25717
|
]
|
|
@@ -25610,7 +25746,7 @@ var init_project_management_modal = __esm({
|
|
|
25610
25746
|
height: 36,
|
|
25611
25747
|
fontSize: "1rem"
|
|
25612
25748
|
},
|
|
25613
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25749
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.Folder, { size: 16 })
|
|
25614
25750
|
}
|
|
25615
25751
|
),
|
|
25616
25752
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.Box, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -25661,7 +25797,7 @@ var init_project_management_modal = __esm({
|
|
|
25661
25797
|
mt: 0.25,
|
|
25662
25798
|
zIndex: 1
|
|
25663
25799
|
},
|
|
25664
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.MoreVertical, { size: 16 })
|
|
25665
25801
|
}
|
|
25666
25802
|
)
|
|
25667
25803
|
]
|
|
@@ -25737,7 +25873,7 @@ var init_project_management_modal = __esm({
|
|
|
25737
25873
|
startEdit(selectedProject);
|
|
25738
25874
|
},
|
|
25739
25875
|
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
25740
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25876
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.Pencil, { size: 16 }),
|
|
25741
25877
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Typography, { variant: "body2", color: "inherit", children: "Edit" })
|
|
25742
25878
|
] })
|
|
25743
25879
|
}
|
|
@@ -25751,7 +25887,7 @@ var init_project_management_modal = __esm({
|
|
|
25751
25887
|
},
|
|
25752
25888
|
sx: { color: theme.palette.error.main },
|
|
25753
25889
|
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_material42.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
25754
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
25890
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.Trash2, { size: 16 }),
|
|
25755
25891
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material42.Typography, { variant: "body2", color: "inherit", children: "Delete" })
|
|
25756
25892
|
] })
|
|
25757
25893
|
}
|
|
@@ -25803,13 +25939,13 @@ var init_project_management_modal = __esm({
|
|
|
25803
25939
|
});
|
|
25804
25940
|
|
|
25805
25941
|
// src/chat/move-conversation-modal.tsx
|
|
25806
|
-
var import_react54, import_material43,
|
|
25942
|
+
var import_react54, import_material43, import_lucide_react11, import_styles27, import_jsx_runtime43, MoveConversationModal, move_conversation_modal_default;
|
|
25807
25943
|
var init_move_conversation_modal = __esm({
|
|
25808
25944
|
"src/chat/move-conversation-modal.tsx"() {
|
|
25809
25945
|
"use strict";
|
|
25810
25946
|
import_react54 = require("react");
|
|
25811
25947
|
import_material43 = require("@mui/material");
|
|
25812
|
-
|
|
25948
|
+
import_lucide_react11 = require("lucide-react");
|
|
25813
25949
|
import_styles27 = require("@mui/material/styles");
|
|
25814
25950
|
init_projectStore();
|
|
25815
25951
|
init_conversationStore();
|
|
@@ -25894,7 +26030,7 @@ var init_move_conversation_modal = __esm({
|
|
|
25894
26030
|
width: 32,
|
|
25895
26031
|
height: 32
|
|
25896
26032
|
},
|
|
25897
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
26033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react11.Inbox, {})
|
|
25898
26034
|
}
|
|
25899
26035
|
) }),
|
|
25900
26036
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
@@ -25930,7 +26066,7 @@ var init_move_conversation_modal = __esm({
|
|
|
25930
26066
|
width: 32,
|
|
25931
26067
|
height: 32
|
|
25932
26068
|
},
|
|
25933
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
26069
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react11.Folder, {})
|
|
25934
26070
|
}
|
|
25935
26071
|
) }),
|
|
25936
26072
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
@@ -25974,13 +26110,13 @@ var init_move_conversation_modal = __esm({
|
|
|
25974
26110
|
});
|
|
25975
26111
|
|
|
25976
26112
|
// src/chat/simple-conversation-item.tsx
|
|
25977
|
-
var import_react55, import_material44,
|
|
26113
|
+
var import_react55, import_material44, import_lucide_react12, import_styles28, import_jsx_runtime44, SimpleConversationItem, simple_conversation_item_default;
|
|
25978
26114
|
var init_simple_conversation_item = __esm({
|
|
25979
26115
|
"src/chat/simple-conversation-item.tsx"() {
|
|
25980
26116
|
"use strict";
|
|
25981
26117
|
import_react55 = require("react");
|
|
25982
26118
|
import_material44 = require("@mui/material");
|
|
25983
|
-
|
|
26119
|
+
import_lucide_react12 = require("lucide-react");
|
|
25984
26120
|
import_styles28 = require("@mui/material/styles");
|
|
25985
26121
|
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
25986
26122
|
SimpleConversationItem = ({
|
|
@@ -26208,7 +26344,7 @@ var init_simple_conversation_item = __esm({
|
|
|
26208
26344
|
},
|
|
26209
26345
|
children: [
|
|
26210
26346
|
!isMobile && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
26211
|
-
|
|
26347
|
+
import_lucide_react12.GripVertical,
|
|
26212
26348
|
{
|
|
26213
26349
|
size: 16,
|
|
26214
26350
|
color: theme.palette.text.disabled,
|
|
@@ -26302,7 +26438,7 @@ var init_simple_conversation_item = __esm({
|
|
|
26302
26438
|
}
|
|
26303
26439
|
}
|
|
26304
26440
|
},
|
|
26305
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
26441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react12.MoreVertical, { size: 16 })
|
|
26306
26442
|
}
|
|
26307
26443
|
),
|
|
26308
26444
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
@@ -26333,15 +26469,15 @@ var init_simple_conversation_item = __esm({
|
|
|
26333
26469
|
},
|
|
26334
26470
|
children: [
|
|
26335
26471
|
onRename && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.MenuItem, { onClick: handleEdit, children: [
|
|
26336
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
26472
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react12.Pencil, { size: 16 }) }),
|
|
26337
26473
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemText, { children: "Rename" })
|
|
26338
26474
|
] }),
|
|
26339
26475
|
onMove && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.MenuItem, { onClick: handleMove, children: [
|
|
26340
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
26476
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react12.MailOpen, { size: 16 }) }),
|
|
26341
26477
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemText, { children: "Move to Project" })
|
|
26342
26478
|
] }),
|
|
26343
26479
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.MenuItem, { onClick: handleDelete, children: [
|
|
26344
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
26480
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react12.Trash2, { size: 16 }) }),
|
|
26345
26481
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ListItemText, { children: "Delete" })
|
|
26346
26482
|
] })
|
|
26347
26483
|
]
|
|
@@ -26414,13 +26550,13 @@ var init_simple_conversation_item = __esm({
|
|
|
26414
26550
|
});
|
|
26415
26551
|
|
|
26416
26552
|
// src/chat/project-header.tsx
|
|
26417
|
-
var import_react56, import_material45,
|
|
26553
|
+
var import_react56, import_material45, import_lucide_react13, import_styles29, import_jsx_runtime45, ProjectHeader, project_header_default;
|
|
26418
26554
|
var init_project_header = __esm({
|
|
26419
26555
|
"src/chat/project-header.tsx"() {
|
|
26420
26556
|
"use strict";
|
|
26421
26557
|
import_react56 = require("react");
|
|
26422
26558
|
import_material45 = require("@mui/material");
|
|
26423
|
-
|
|
26559
|
+
import_lucide_react13 = require("lucide-react");
|
|
26424
26560
|
import_styles29 = require("@mui/material/styles");
|
|
26425
26561
|
init_conversationStore();
|
|
26426
26562
|
init_projectStore();
|
|
@@ -26447,7 +26583,7 @@ var init_project_header = __esm({
|
|
|
26447
26583
|
const [renameDraft, setRenameDraft] = (0, import_react56.useState)(projectName);
|
|
26448
26584
|
const renameActionRef = (0, import_react56.useRef)("none");
|
|
26449
26585
|
const isUngrouped = projectId === null;
|
|
26450
|
-
const Icon = isCollapsed ?
|
|
26586
|
+
const Icon = isCollapsed ? import_lucide_react13.Folder : import_lucide_react13.FolderOpen;
|
|
26451
26587
|
const handleAddConversation = (e) => {
|
|
26452
26588
|
e.stopPropagation();
|
|
26453
26589
|
createNewConversation(projectId || void 0);
|
|
@@ -26528,7 +26664,7 @@ var init_project_header = __esm({
|
|
|
26528
26664
|
mr: 1.5
|
|
26529
26665
|
},
|
|
26530
26666
|
children: isUngrouped ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
26531
|
-
|
|
26667
|
+
import_lucide_react13.Inbox,
|
|
26532
26668
|
{
|
|
26533
26669
|
size: 16,
|
|
26534
26670
|
color: theme.palette.text.disabled,
|
|
@@ -26644,7 +26780,7 @@ var init_project_header = __esm({
|
|
|
26644
26780
|
onRenameCancelDelete ? onRenameCancelDelete() : cancelRename();
|
|
26645
26781
|
},
|
|
26646
26782
|
sx: { color: (0, import_material45.alpha)(theme.palette.error.main, 0.9) },
|
|
26647
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
26783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.X, { size: 16 })
|
|
26648
26784
|
}
|
|
26649
26785
|
) }),
|
|
26650
26786
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_material45.Tooltip, { title: "Save", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
@@ -26657,7 +26793,7 @@ var init_project_header = __esm({
|
|
|
26657
26793
|
commitRename();
|
|
26658
26794
|
},
|
|
26659
26795
|
sx: { color: theme.palette.success.main },
|
|
26660
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
26796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.Check, { size: 16 })
|
|
26661
26797
|
}
|
|
26662
26798
|
) })
|
|
26663
26799
|
] }),
|
|
@@ -26678,7 +26814,7 @@ var init_project_header = __esm({
|
|
|
26678
26814
|
},
|
|
26679
26815
|
transition: "all 0.2s ease"
|
|
26680
26816
|
},
|
|
26681
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
26817
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.Plus, { size: 16 })
|
|
26682
26818
|
}
|
|
26683
26819
|
) }),
|
|
26684
26820
|
!isUngrouped && !isRenaming && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
@@ -26689,7 +26825,7 @@ var init_project_header = __esm({
|
|
|
26689
26825
|
color: theme.palette.text.secondary,
|
|
26690
26826
|
transition: "transform 0.2s ease"
|
|
26691
26827
|
},
|
|
26692
|
-
children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
26828
|
+
children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.ChevronDown, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.ChevronUp, { size: 16 })
|
|
26693
26829
|
}
|
|
26694
26830
|
)
|
|
26695
26831
|
]
|
|
@@ -26719,13 +26855,13 @@ var init_tooltips = __esm({
|
|
|
26719
26855
|
});
|
|
26720
26856
|
|
|
26721
26857
|
// src/chat/conversation-drawer.tsx
|
|
26722
|
-
var import_react57, import_material46,
|
|
26858
|
+
var import_react57, import_material46, import_lucide_react14, import_styles30, import_jsx_runtime46, BANDIT_AVATAR, coerceOptionalString, deriveInitials, ConversationDrawer, conversation_drawer_default;
|
|
26723
26859
|
var init_conversation_drawer = __esm({
|
|
26724
26860
|
"src/chat/conversation-drawer.tsx"() {
|
|
26725
26861
|
"use strict";
|
|
26726
26862
|
import_react57 = require("react");
|
|
26727
26863
|
import_material46 = require("@mui/material");
|
|
26728
|
-
|
|
26864
|
+
import_lucide_react14 = require("lucide-react");
|
|
26729
26865
|
import_styles30 = require("@mui/material/styles");
|
|
26730
26866
|
init_conversationStore();
|
|
26731
26867
|
init_projectStore();
|
|
@@ -27098,7 +27234,7 @@ var init_conversation_drawer = __esm({
|
|
|
27098
27234
|
bgcolor: (0, import_material46.alpha)(theme.palette.primary.main, 0.1)
|
|
27099
27235
|
}
|
|
27100
27236
|
},
|
|
27101
|
-
children: syncStatus === "error" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27237
|
+
children: syncStatus === "error" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.CircleAlert, {}) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.RefreshCw, {})
|
|
27102
27238
|
}
|
|
27103
27239
|
) }),
|
|
27104
27240
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Tooltip, { title: "Memories", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
@@ -27114,7 +27250,7 @@ var init_conversation_drawer = __esm({
|
|
|
27114
27250
|
bgcolor: (0, import_material46.alpha)(theme.palette.primary.main, 0.1)
|
|
27115
27251
|
}
|
|
27116
27252
|
},
|
|
27117
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Brain, {})
|
|
27118
27254
|
}
|
|
27119
27255
|
) }),
|
|
27120
27256
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Tooltip, { title: tooltip("manageProjects"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
@@ -27130,7 +27266,7 @@ var init_conversation_drawer = __esm({
|
|
|
27130
27266
|
bgcolor: (0, import_material46.alpha)(theme.palette.primary.main, 0.1)
|
|
27131
27267
|
}
|
|
27132
27268
|
},
|
|
27133
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27269
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Folder, {})
|
|
27134
27270
|
}
|
|
27135
27271
|
) }),
|
|
27136
27272
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Tooltip, { title: tooltip("conversationOptions"), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
@@ -27146,7 +27282,7 @@ var init_conversation_drawer = __esm({
|
|
|
27146
27282
|
bgcolor: (0, import_material46.alpha)(theme.palette.text.primary, 0.1)
|
|
27147
27283
|
}
|
|
27148
27284
|
},
|
|
27149
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.MoreVertical, {})
|
|
27150
27286
|
}
|
|
27151
27287
|
) }),
|
|
27152
27288
|
isMobile && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Tooltip, { title: tooltip("closeConversationsPanel"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
@@ -27166,7 +27302,7 @@ var init_conversation_drawer = __esm({
|
|
|
27166
27302
|
bgcolor: (0, import_material46.alpha)(theme.palette.error.main, 0.1)
|
|
27167
27303
|
}
|
|
27168
27304
|
},
|
|
27169
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27305
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.X, {})
|
|
27170
27306
|
}
|
|
27171
27307
|
) })
|
|
27172
27308
|
]
|
|
@@ -27182,7 +27318,7 @@ var init_conversation_drawer = __esm({
|
|
|
27182
27318
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
27183
27319
|
variant: "outlined",
|
|
27184
27320
|
InputProps: {
|
|
27185
|
-
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27321
|
+
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Search, { size: 16, color: theme.palette.text.secondary }) }),
|
|
27186
27322
|
endAdornment: searchQuery && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Tooltip, { title: tooltip("clearSearch"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27187
27323
|
import_material46.IconButton,
|
|
27188
27324
|
{
|
|
@@ -27191,7 +27327,7 @@ var init_conversation_drawer = __esm({
|
|
|
27191
27327
|
edge: "end",
|
|
27192
27328
|
"aria-label": tooltip("clearSearch"),
|
|
27193
27329
|
sx: { color: theme.palette.text.secondary },
|
|
27194
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.X, { size: 16 })
|
|
27195
27331
|
}
|
|
27196
27332
|
) }) })
|
|
27197
27333
|
},
|
|
@@ -27257,7 +27393,7 @@ var init_conversation_drawer = __esm({
|
|
|
27257
27393
|
justifyContent: "center",
|
|
27258
27394
|
flexShrink: 0
|
|
27259
27395
|
},
|
|
27260
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Folder, { size: 16, color: theme.palette.success.main })
|
|
27261
27397
|
}
|
|
27262
27398
|
),
|
|
27263
27399
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
@@ -27274,7 +27410,7 @@ var init_conversation_drawer = __esm({
|
|
|
27274
27410
|
size: "small",
|
|
27275
27411
|
"aria-label": tooltip("addProject"),
|
|
27276
27412
|
sx: { color: theme.palette.success.main },
|
|
27277
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Plus, { size: 16 })
|
|
27278
27414
|
}
|
|
27279
27415
|
) })
|
|
27280
27416
|
]
|
|
@@ -27296,7 +27432,7 @@ var init_conversation_drawer = __esm({
|
|
|
27296
27432
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.Divider, { sx: { flex: 1, opacity: 0.6 } }),
|
|
27297
27433
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_material46.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
27298
27434
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27299
|
-
|
|
27435
|
+
import_lucide_react14.Inbox,
|
|
27300
27436
|
{
|
|
27301
27437
|
size: 14,
|
|
27302
27438
|
color: theme.palette.text.disabled,
|
|
@@ -27536,7 +27672,7 @@ var init_conversation_drawer = __esm({
|
|
|
27536
27672
|
border: `1px solid ${(0, import_material46.alpha)(theme.palette.divider, 0.8)}`,
|
|
27537
27673
|
color: theme.palette.text.secondary
|
|
27538
27674
|
},
|
|
27539
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.House, { size: 16 })
|
|
27540
27676
|
}
|
|
27541
27677
|
),
|
|
27542
27678
|
user2 && showLimitedAdminPanel() && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
@@ -27555,7 +27691,7 @@ var init_conversation_drawer = __esm({
|
|
|
27555
27691
|
border: `1px solid ${(0, import_material46.alpha)(theme.palette.divider, 0.8)}`,
|
|
27556
27692
|
color: theme.palette.text.secondary
|
|
27557
27693
|
},
|
|
27558
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.SlidersHorizontal, { size: 16 })
|
|
27559
27695
|
}
|
|
27560
27696
|
),
|
|
27561
27697
|
user2 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
@@ -27573,7 +27709,7 @@ var init_conversation_drawer = __esm({
|
|
|
27573
27709
|
border: `1px solid ${(0, import_material46.alpha)(theme.palette.divider, 0.8)}`,
|
|
27574
27710
|
color: theme.palette.text.secondary
|
|
27575
27711
|
},
|
|
27576
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27712
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Settings, { size: 16 })
|
|
27577
27713
|
}
|
|
27578
27714
|
),
|
|
27579
27715
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
@@ -27594,7 +27730,7 @@ var init_conversation_drawer = __esm({
|
|
|
27594
27730
|
color: theme.palette.error.main,
|
|
27595
27731
|
"&:hover": { bgcolor: (0, import_material46.alpha)(theme.palette.error.main, 0.1) }
|
|
27596
27732
|
},
|
|
27597
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.LogOut, { size: 16 })
|
|
27598
27734
|
}
|
|
27599
27735
|
)
|
|
27600
27736
|
] })
|
|
@@ -27644,7 +27780,7 @@ var init_conversation_drawer = __esm({
|
|
|
27644
27780
|
},
|
|
27645
27781
|
sx: { color: theme.palette.error.main },
|
|
27646
27782
|
children: [
|
|
27647
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
27783
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Trash2, { size: 16, color: theme.palette.error.main }) }),
|
|
27648
27784
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_material46.ListItemText, { children: "Clear All Conversations" })
|
|
27649
27785
|
]
|
|
27650
27786
|
}
|
|
@@ -27683,13 +27819,13 @@ var init_conversation_drawer = __esm({
|
|
|
27683
27819
|
});
|
|
27684
27820
|
|
|
27685
27821
|
// src/chat/enhanced-mobile-conversations-modal.tsx
|
|
27686
|
-
var import_react58, import_material47,
|
|
27822
|
+
var import_react58, import_material47, import_lucide_react15, import_styles31, import_jsx_runtime47, BANDIT_AVATAR2, coerceOptionalString2, deriveInitials2, EnhancedMobileConversationsModal, enhanced_mobile_conversations_modal_default;
|
|
27687
27823
|
var init_enhanced_mobile_conversations_modal = __esm({
|
|
27688
27824
|
"src/chat/enhanced-mobile-conversations-modal.tsx"() {
|
|
27689
27825
|
"use strict";
|
|
27690
27826
|
import_react58 = require("react");
|
|
27691
27827
|
import_material47 = require("@mui/material");
|
|
27692
|
-
|
|
27828
|
+
import_lucide_react15 = require("lucide-react");
|
|
27693
27829
|
import_styles31 = require("@mui/material/styles");
|
|
27694
27830
|
init_conversationStore();
|
|
27695
27831
|
init_projectStore();
|
|
@@ -28132,7 +28268,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28132
28268
|
}
|
|
28133
28269
|
}
|
|
28134
28270
|
},
|
|
28135
|
-
children: syncStatus === "error" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28271
|
+
children: syncStatus === "error" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.CircleAlert, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.RefreshCw, {})
|
|
28136
28272
|
}
|
|
28137
28273
|
),
|
|
28138
28274
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -28141,7 +28277,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28141
28277
|
onClick: () => setMemoryModalOpen(true),
|
|
28142
28278
|
"aria-label": "Memory",
|
|
28143
28279
|
sx: { color: theme.palette.text.secondary },
|
|
28144
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Brain, {})
|
|
28145
28281
|
}
|
|
28146
28282
|
),
|
|
28147
28283
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -28149,7 +28285,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28149
28285
|
{
|
|
28150
28286
|
onClick: () => setProjectManagementOpen(true),
|
|
28151
28287
|
sx: { color: theme.palette.text.secondary },
|
|
28152
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28288
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Folder, {})
|
|
28153
28289
|
}
|
|
28154
28290
|
),
|
|
28155
28291
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -28157,7 +28293,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28157
28293
|
{
|
|
28158
28294
|
onClick: handleMenuOpen,
|
|
28159
28295
|
sx: { color: theme.palette.text.secondary },
|
|
28160
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.MoreVertical, {})
|
|
28161
28297
|
}
|
|
28162
28298
|
),
|
|
28163
28299
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -28165,7 +28301,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28165
28301
|
{
|
|
28166
28302
|
onClick: onClose,
|
|
28167
28303
|
sx: { color: theme.palette.text.secondary },
|
|
28168
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.X, {})
|
|
28169
28305
|
}
|
|
28170
28306
|
)
|
|
28171
28307
|
] })
|
|
@@ -28181,7 +28317,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28181
28317
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
28182
28318
|
variant: "outlined",
|
|
28183
28319
|
InputProps: {
|
|
28184
|
-
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28320
|
+
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Search, { size: 16, color: theme.palette.text.secondary }) }),
|
|
28185
28321
|
endAdornment: searchQuery && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28186
28322
|
import_material47.IconButton,
|
|
28187
28323
|
{
|
|
@@ -28189,7 +28325,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28189
28325
|
size: "small",
|
|
28190
28326
|
edge: "end",
|
|
28191
28327
|
sx: { color: theme.palette.text.secondary },
|
|
28192
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.X, { size: 16 })
|
|
28193
28329
|
}
|
|
28194
28330
|
) })
|
|
28195
28331
|
}
|
|
@@ -28345,7 +28481,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28345
28481
|
justifyContent: "center",
|
|
28346
28482
|
flexShrink: 0
|
|
28347
28483
|
},
|
|
28348
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Folder, { size: 16, color: theme.palette.success.main })
|
|
28349
28485
|
}
|
|
28350
28486
|
),
|
|
28351
28487
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -28356,7 +28492,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28356
28492
|
children: "New Project"
|
|
28357
28493
|
}
|
|
28358
28494
|
),
|
|
28359
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.IconButton, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28495
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.IconButton, { size: "small", sx: { color: theme.palette.success.main }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Plus, { size: 16 }) })
|
|
28360
28496
|
]
|
|
28361
28497
|
}
|
|
28362
28498
|
),
|
|
@@ -28376,7 +28512,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28376
28512
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.Divider, { sx: { flex: 1, opacity: 0.6 } }),
|
|
28377
28513
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material47.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
28378
28514
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28379
|
-
|
|
28515
|
+
import_lucide_react15.Inbox,
|
|
28380
28516
|
{
|
|
28381
28517
|
size: 14,
|
|
28382
28518
|
color: theme.palette.text.disabled,
|
|
@@ -28571,7 +28707,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28571
28707
|
createNewConversation();
|
|
28572
28708
|
onClose();
|
|
28573
28709
|
},
|
|
28574
|
-
startIcon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28710
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Plus, { size: 18 }),
|
|
28575
28711
|
sx: {
|
|
28576
28712
|
pointerEvents: "auto",
|
|
28577
28713
|
textTransform: "none",
|
|
@@ -28662,7 +28798,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28662
28798
|
border: `1px solid ${(0, import_styles31.alpha)(theme.palette.divider, 0.8)}`,
|
|
28663
28799
|
color: theme.palette.text.secondary
|
|
28664
28800
|
},
|
|
28665
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.House, { size: 16 })
|
|
28666
28802
|
}
|
|
28667
28803
|
),
|
|
28668
28804
|
user2 && showLimitedAdminPanel() && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -28681,7 +28817,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28681
28817
|
border: `1px solid ${(0, import_styles31.alpha)(theme.palette.divider, 0.8)}`,
|
|
28682
28818
|
color: theme.palette.text.secondary
|
|
28683
28819
|
},
|
|
28684
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28820
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.SlidersHorizontal, { size: 16 })
|
|
28685
28821
|
}
|
|
28686
28822
|
),
|
|
28687
28823
|
user2 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
@@ -28699,7 +28835,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28699
28835
|
border: `1px solid ${(0, import_styles31.alpha)(theme.palette.divider, 0.8)}`,
|
|
28700
28836
|
color: theme.palette.text.secondary
|
|
28701
28837
|
},
|
|
28702
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Settings, { size: 16 })
|
|
28703
28839
|
}
|
|
28704
28840
|
),
|
|
28705
28841
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -28720,7 +28856,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28720
28856
|
color: theme.palette.error.main,
|
|
28721
28857
|
"&:hover": { bgcolor: (0, import_styles31.alpha)(theme.palette.error.main, 0.1) }
|
|
28722
28858
|
},
|
|
28723
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28859
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.LogOut, { size: 16 })
|
|
28724
28860
|
}
|
|
28725
28861
|
)
|
|
28726
28862
|
] })
|
|
@@ -28773,7 +28909,7 @@ var init_enhanced_mobile_conversations_modal = __esm({
|
|
|
28773
28909
|
disabled: visibleConversationCount === 0,
|
|
28774
28910
|
sx: { color: theme.palette.error.main },
|
|
28775
28911
|
children: [
|
|
28776
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28912
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Trash2, { size: 16, color: theme.palette.error.main }) }),
|
|
28777
28913
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_material47.ListItemText, { children: "Clear All Conversations" })
|
|
28778
28914
|
]
|
|
28779
28915
|
}
|
|
@@ -28822,7 +28958,6 @@ var init_chat_app_bar = __esm({
|
|
|
28822
28958
|
import_material49 = require("@mui/material");
|
|
28823
28959
|
import_react_router_dom3 = require("react-router-dom");
|
|
28824
28960
|
init_lucide_icons();
|
|
28825
|
-
init_util();
|
|
28826
28961
|
init_conversation_drawer();
|
|
28827
28962
|
init_enhanced_mobile_conversations_modal();
|
|
28828
28963
|
init_conversationStore();
|
|
@@ -29044,13 +29179,13 @@ var init_chat_app_bar = __esm({
|
|
|
29044
29179
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29045
29180
|
import_material49.Tooltip,
|
|
29046
29181
|
{
|
|
29047
|
-
title: isIncognitoActive ? "End
|
|
29182
|
+
title: isIncognitoActive ? "End temporary chat" : "Temporary chat \u2014 not saved anywhere",
|
|
29048
29183
|
arrow: true,
|
|
29049
29184
|
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29050
29185
|
import_material49.IconButton,
|
|
29051
29186
|
{
|
|
29052
29187
|
onClick: toggleIncognito,
|
|
29053
|
-
"aria-label": isIncognitoActive ? "End
|
|
29188
|
+
"aria-label": isIncognitoActive ? "End temporary chat" : "Start temporary chat",
|
|
29054
29189
|
"aria-pressed": isIncognitoActive,
|
|
29055
29190
|
sx: {
|
|
29056
29191
|
width: 44,
|
|
@@ -29149,35 +29284,11 @@ var init_chat_app_bar = __esm({
|
|
|
29149
29284
|
"aria-label": "Create new conversation",
|
|
29150
29285
|
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AddIcon, {})
|
|
29151
29286
|
}
|
|
29152
|
-
) })
|
|
29153
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29154
|
-
import_material49.Tooltip,
|
|
29155
|
-
{
|
|
29156
|
-
title: isIncognitoActive ? "End incognito chat" : "Start incognito chat \u2014 not saved",
|
|
29157
|
-
arrow: true,
|
|
29158
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29159
|
-
import_material49.IconButton,
|
|
29160
|
-
{
|
|
29161
|
-
onClick: toggleIncognito,
|
|
29162
|
-
"aria-label": isIncognitoActive ? "End incognito chat" : "Start incognito chat",
|
|
29163
|
-
"aria-pressed": isIncognitoActive,
|
|
29164
|
-
sx: {
|
|
29165
|
-
...pillButtonStyles,
|
|
29166
|
-
...isIncognitoActive && {
|
|
29167
|
-
bgcolor: theme.palette.text.primary,
|
|
29168
|
-
color: theme.palette.getContrastText(theme.palette.text.primary),
|
|
29169
|
-
"&:hover": { bgcolor: theme.palette.text.primary }
|
|
29170
|
-
}
|
|
29171
|
-
},
|
|
29172
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(GhostIcon, {})
|
|
29173
|
-
}
|
|
29174
|
-
)
|
|
29175
|
-
}
|
|
29176
|
-
)
|
|
29287
|
+
) })
|
|
29177
29288
|
]
|
|
29178
29289
|
}
|
|
29179
29290
|
),
|
|
29180
|
-
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime48.
|
|
29291
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29181
29292
|
import_material49.Box,
|
|
29182
29293
|
{
|
|
29183
29294
|
sx: {
|
|
@@ -29197,368 +29308,30 @@ var init_chat_app_bar = __esm({
|
|
|
29197
29308
|
boxShadow: theme.palette.mode === "dark" ? "0 6px 20px rgba(0,0,0,0.4)" : "0 6px 20px rgba(0,0,0,0.15)"
|
|
29198
29309
|
}
|
|
29199
29310
|
},
|
|
29200
|
-
children:
|
|
29201
|
-
|
|
29202
|
-
|
|
29203
|
-
|
|
29204
|
-
|
|
29205
|
-
|
|
29206
|
-
...pillButtonStyles,
|
|
29207
|
-
"&:hover": {
|
|
29208
|
-
...pillButtonStyles["&:hover"],
|
|
29209
|
-
"& .MuiAvatar-root": {
|
|
29210
|
-
transform: "scale(1.1)",
|
|
29211
|
-
filter: "brightness(2) saturate(1.2)"
|
|
29212
|
-
}
|
|
29213
|
-
}
|
|
29214
|
-
},
|
|
29215
|
-
"aria-label": `Change AI personality. Currently using ${selectedModel}`,
|
|
29216
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29217
|
-
import_material48.Avatar,
|
|
29218
|
-
{
|
|
29219
|
-
src: currentAvatar,
|
|
29220
|
-
alt: selectedModel,
|
|
29221
|
-
sx: {
|
|
29222
|
-
width: "36px",
|
|
29223
|
-
height: "36px",
|
|
29224
|
-
filter: "brightness(1.7)",
|
|
29225
|
-
transition: "all 0.2s ease-in-out",
|
|
29226
|
-
border: `2px solid ${theme.palette.primary.main}20`
|
|
29227
|
-
},
|
|
29228
|
-
className: "MuiAvatar-root"
|
|
29229
|
-
}
|
|
29230
|
-
)
|
|
29231
|
-
}
|
|
29232
|
-
) }),
|
|
29233
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Tooltip, { title: `Engine \xB7 ${engineDisplay}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29234
|
-
import_material49.IconButton,
|
|
29235
|
-
{
|
|
29236
|
-
onClick: (e) => setEngineAnchorEl(e.currentTarget),
|
|
29237
|
-
sx: pillButtonStyles,
|
|
29238
|
-
"aria-label": `Change base model (engine). Currently ${engineDisplay}`,
|
|
29239
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AutoAwesomeIcon, { fontSize: "small" })
|
|
29240
|
-
}
|
|
29241
|
-
) }),
|
|
29242
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
29243
|
-
import_material49.Menu,
|
|
29244
|
-
{
|
|
29245
|
-
anchorEl: engineAnchorEl,
|
|
29246
|
-
open: Boolean(engineAnchorEl),
|
|
29247
|
-
onClose: () => setEngineAnchorEl(null),
|
|
29248
|
-
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
29249
|
-
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
29250
|
-
children: [
|
|
29251
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "overline", sx: { px: 2, color: theme.palette.text.secondary }, children: "Engine \xB7 base model" }),
|
|
29252
|
-
engines.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "body2", children: "No engines available" }) }),
|
|
29253
|
-
engines.map((engine) => {
|
|
29254
|
-
const badges = [
|
|
29255
|
-
engine.vision && "vision",
|
|
29256
|
-
engine.tools && "tools",
|
|
29257
|
-
engine.thinking && "thinking",
|
|
29258
|
-
engine.cloud && "cloud"
|
|
29259
|
-
].filter(Boolean);
|
|
29260
|
-
const isGated = engine.cloud && !frontierEligible;
|
|
29261
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
29262
|
-
import_material49.MenuItem,
|
|
29263
|
-
{
|
|
29264
|
-
selected: engine.id === resolvedEngineId,
|
|
29265
|
-
disabled: !engine.available || isGated,
|
|
29266
|
-
onClick: () => {
|
|
29267
|
-
if (isGated) return;
|
|
29268
|
-
useEngineStore.getState().setSelectedEngine(engine.id);
|
|
29269
|
-
setEngineAnchorEl(null);
|
|
29270
|
-
},
|
|
29271
|
-
sx: {
|
|
29272
|
-
display: "flex",
|
|
29273
|
-
flexDirection: "column",
|
|
29274
|
-
alignItems: "flex-start",
|
|
29275
|
-
gap: 0.5,
|
|
29276
|
-
py: 1,
|
|
29277
|
-
px: 2,
|
|
29278
|
-
maxWidth: 360,
|
|
29279
|
-
whiteSpace: "normal",
|
|
29280
|
-
// Keep gated rows readable (MUI disabled dims to ~38%) so the
|
|
29281
|
-
// upsell stays legible.
|
|
29282
|
-
...isGated ? { opacity: 1, "&.Mui-disabled": { opacity: 1 } } : {}
|
|
29283
|
-
},
|
|
29284
|
-
children: [
|
|
29285
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_material49.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
29286
|
-
isGated && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29287
|
-
LockIcon,
|
|
29288
|
-
{
|
|
29289
|
-
fontSize: "small",
|
|
29290
|
-
sx: { fontSize: "0.95rem", color: theme.palette.text.secondary }
|
|
29291
|
-
}
|
|
29292
|
-
),
|
|
29293
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29294
|
-
import_material49.Typography,
|
|
29295
|
-
{
|
|
29296
|
-
variant: "body2",
|
|
29297
|
-
sx: {
|
|
29298
|
-
fontWeight: 600,
|
|
29299
|
-
flex: 1,
|
|
29300
|
-
color: isGated ? theme.palette.text.secondary : void 0
|
|
29301
|
-
},
|
|
29302
|
-
children: cleanEngineName(engine.displayName)
|
|
29303
|
-
}
|
|
29304
|
-
),
|
|
29305
|
-
engine.id === resolvedEngineId && !isGated && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Box, { sx: { width: 8, height: 8, borderRadius: "50%", bgcolor: theme.palette.primary.main } })
|
|
29306
|
-
] }),
|
|
29307
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: isGated ? "Premium engine \u2014 available on a paid plan." : engine.available ? engine.description : engine.unavailableReason || "Unavailable" }),
|
|
29308
|
-
isGated && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29309
|
-
import_material49.Button,
|
|
29310
|
-
{
|
|
29311
|
-
size: "small",
|
|
29312
|
-
variant: "text",
|
|
29313
|
-
startIcon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(LockIcon, { sx: { fontSize: "0.85rem" } }),
|
|
29314
|
-
onClick: (e) => {
|
|
29315
|
-
e.stopPropagation();
|
|
29316
|
-
setEngineAnchorEl(null);
|
|
29317
|
-
safeNavigate(plansPath);
|
|
29318
|
-
},
|
|
29319
|
-
sx: {
|
|
29320
|
-
mt: 0.25,
|
|
29321
|
-
px: 0.75,
|
|
29322
|
-
py: 0.1,
|
|
29323
|
-
minWidth: 0,
|
|
29324
|
-
textTransform: "none",
|
|
29325
|
-
fontSize: "0.7rem",
|
|
29326
|
-
fontWeight: 600,
|
|
29327
|
-
color: theme.palette.primary.main,
|
|
29328
|
-
// Re-enable pointer events the disabled MenuItem strips.
|
|
29329
|
-
pointerEvents: "auto"
|
|
29330
|
-
},
|
|
29331
|
-
children: "Upgrade to unlock"
|
|
29332
|
-
}
|
|
29333
|
-
),
|
|
29334
|
-
badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Box, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap", mt: 0.25 }, children: badges.map((b) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29335
|
-
import_material49.Box,
|
|
29336
|
-
{
|
|
29337
|
-
sx: {
|
|
29338
|
-
fontSize: "0.65rem",
|
|
29339
|
-
px: 0.75,
|
|
29340
|
-
py: 0.1,
|
|
29341
|
-
borderRadius: 1,
|
|
29342
|
-
bgcolor: theme.palette.primary.main + "22",
|
|
29343
|
-
color: theme.palette.primary.main
|
|
29344
|
-
},
|
|
29345
|
-
children: b
|
|
29346
|
-
},
|
|
29347
|
-
b
|
|
29348
|
-
)) })
|
|
29349
|
-
]
|
|
29350
|
-
},
|
|
29351
|
-
engine.id
|
|
29352
|
-
);
|
|
29353
|
-
})
|
|
29354
|
-
]
|
|
29355
|
-
}
|
|
29356
|
-
),
|
|
29357
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29358
|
-
import_material49.Menu,
|
|
29359
|
-
{
|
|
29360
|
-
anchorEl: modelAnchorEl,
|
|
29361
|
-
open: Boolean(modelAnchorEl),
|
|
29362
|
-
onClose: () => setModelAnchorEl(null),
|
|
29363
|
-
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
29364
|
-
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
29365
|
-
PaperProps: {
|
|
29366
|
-
sx: {
|
|
29367
|
-
bgcolor: menuBackground,
|
|
29368
|
-
color: menuText,
|
|
29369
|
-
fontSize: "0.875rem",
|
|
29370
|
-
zIndex: 2e4,
|
|
29371
|
-
borderRadius: 2,
|
|
29372
|
-
border: `1px solid ${border}`,
|
|
29373
|
-
boxShadow: theme.palette.mode === "dark" ? "0 8px 32px rgba(0,0,0,0.5)" : "0 8px 32px rgba(0,0,0,0.2)",
|
|
29374
|
-
minWidth: 200,
|
|
29375
|
-
"& .MuiMenuItem-root": {
|
|
29376
|
-
transition: "all 0.15s ease-in-out",
|
|
29377
|
-
borderRadius: "6px",
|
|
29378
|
-
margin: "2px 4px",
|
|
29379
|
-
"&:hover": {
|
|
29380
|
-
bgcolor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.04)",
|
|
29381
|
-
transform: "translateX(2px)"
|
|
29382
|
-
},
|
|
29383
|
-
"&.Mui-selected": {
|
|
29384
|
-
bgcolor: theme.palette.primary.main + "20",
|
|
29385
|
-
color: theme.palette.primary.main,
|
|
29386
|
-
"&:hover": {
|
|
29387
|
-
bgcolor: theme.palette.primary.main + "30"
|
|
29388
|
-
}
|
|
29389
|
-
}
|
|
29390
|
-
}
|
|
29391
|
-
}
|
|
29392
|
-
},
|
|
29393
|
-
children: availableModels.map((model) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
29394
|
-
import_material49.MenuItem,
|
|
29395
|
-
{
|
|
29396
|
-
selected: model.name === selectedModel,
|
|
29397
|
-
onClick: () => {
|
|
29398
|
-
if (!currentConversation?.history.length || currentConversation?.history.length === 0) {
|
|
29399
|
-
handleModelChange(model.name);
|
|
29400
|
-
useModelStore.getState().setSelectedModel(model.name);
|
|
29401
|
-
(async () => {
|
|
29402
|
-
try {
|
|
29403
|
-
const storeConfigs6 = [{ name: "config", keyPath: "id" }];
|
|
29404
|
-
const current = await indexedDBService_default.get(
|
|
29405
|
-
"banditConfig",
|
|
29406
|
-
1,
|
|
29407
|
-
"config",
|
|
29408
|
-
"main",
|
|
29409
|
-
storeConfigs6
|
|
29410
|
-
);
|
|
29411
|
-
const updated = {
|
|
29412
|
-
...current ?? {},
|
|
29413
|
-
id: "main",
|
|
29414
|
-
model: {
|
|
29415
|
-
...current?.model || {},
|
|
29416
|
-
name: model.name,
|
|
29417
|
-
selectedModel: model.name
|
|
29418
|
-
}
|
|
29419
|
-
};
|
|
29420
|
-
await indexedDBService_default.put("banditConfig", 1, "config", updated, storeConfigs6);
|
|
29421
|
-
} catch (err) {
|
|
29422
|
-
debugLogger.error("Failed to persist selectedModel to IndexedDB", { error: err });
|
|
29423
|
-
}
|
|
29424
|
-
})();
|
|
29425
|
-
setModelAnchorEl(null);
|
|
29426
|
-
return;
|
|
29427
|
-
}
|
|
29428
|
-
setPendingModel(model.name);
|
|
29429
|
-
setConfirmModelChangeOpen(true);
|
|
29430
|
-
setModelAnchorEl(null);
|
|
29431
|
-
},
|
|
29432
|
-
sx: {
|
|
29433
|
-
display: "flex",
|
|
29434
|
-
alignItems: "center",
|
|
29435
|
-
gap: 1.5,
|
|
29436
|
-
minHeight: 48,
|
|
29437
|
-
px: 2
|
|
29438
|
-
},
|
|
29439
|
-
children: [
|
|
29440
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29441
|
-
import_material48.Avatar,
|
|
29442
|
-
{
|
|
29443
|
-
src: model.avatarBase64 || modelAvatars3[model.name] || banditHead4,
|
|
29444
|
-
alt: model.name,
|
|
29445
|
-
sx: {
|
|
29446
|
-
width: 28,
|
|
29447
|
-
height: 28,
|
|
29448
|
-
filter: "brightness(1.7)",
|
|
29449
|
-
transition: "all 0.2s ease-in-out"
|
|
29450
|
-
}
|
|
29451
|
-
}
|
|
29452
|
-
),
|
|
29453
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_material49.Box, { sx: { flex: 1 }, children: [
|
|
29454
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "body2", sx: { fontWeight: 500 }, children: model.name.replace("Bandit-", "") }),
|
|
29455
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary, display: "block" }, children: model.name === selectedModel ? "Currently active" : "Switch to this AI" })
|
|
29456
|
-
] }),
|
|
29457
|
-
model.name === selectedModel && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29458
|
-
import_material49.Box,
|
|
29459
|
-
{
|
|
29460
|
-
sx: {
|
|
29461
|
-
width: 8,
|
|
29462
|
-
height: 8,
|
|
29463
|
-
borderRadius: "50%",
|
|
29464
|
-
bgcolor: theme.palette.primary.main
|
|
29465
|
-
}
|
|
29466
|
-
}
|
|
29467
|
-
)
|
|
29468
|
-
]
|
|
29469
|
-
},
|
|
29470
|
-
model.name
|
|
29471
|
-
))
|
|
29472
|
-
}
|
|
29473
|
-
),
|
|
29474
|
-
isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
29475
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Tooltip, { title: `Voice: ${selectedVoice ? toTitleCase(selectedVoice.split("-")[1]) : "Default"}`, arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29312
|
+
import_material49.Tooltip,
|
|
29313
|
+
{
|
|
29314
|
+
title: isIncognitoActive ? "End temporary chat" : "Temporary chat \u2014 not saved anywhere",
|
|
29315
|
+
arrow: true,
|
|
29316
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29476
29317
|
import_material49.IconButton,
|
|
29477
29318
|
{
|
|
29478
|
-
onClick:
|
|
29319
|
+
onClick: toggleIncognito,
|
|
29320
|
+
"aria-label": isIncognitoActive ? "End temporary chat" : "Start temporary chat",
|
|
29321
|
+
"aria-pressed": isIncognitoActive,
|
|
29479
29322
|
sx: {
|
|
29480
29323
|
...pillButtonStyles,
|
|
29481
|
-
|
|
29482
|
-
|
|
29483
|
-
|
|
29484
|
-
|
|
29485
|
-
bgcolor: theme.palette.info.main + "30"
|
|
29324
|
+
...isIncognitoActive && {
|
|
29325
|
+
bgcolor: theme.palette.text.primary,
|
|
29326
|
+
color: theme.palette.getContrastText(theme.palette.text.primary),
|
|
29327
|
+
"&:hover": { bgcolor: theme.palette.text.primary }
|
|
29486
29328
|
}
|
|
29487
29329
|
},
|
|
29488
|
-
|
|
29489
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RecordVoiceOverIcon, { fontSize: "small" })
|
|
29490
|
-
}
|
|
29491
|
-
) }),
|
|
29492
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29493
|
-
import_material49.Menu,
|
|
29494
|
-
{
|
|
29495
|
-
anchorEl: voiceAnchorEl,
|
|
29496
|
-
open: Boolean(voiceAnchorEl),
|
|
29497
|
-
onClose: () => setVoiceAnchorEl(null),
|
|
29498
|
-
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
29499
|
-
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
29500
|
-
PaperProps: {
|
|
29501
|
-
sx: {
|
|
29502
|
-
bgcolor: menuBackground,
|
|
29503
|
-
color: menuText,
|
|
29504
|
-
fontSize: "0.875rem",
|
|
29505
|
-
zIndex: 2e4,
|
|
29506
|
-
borderRadius: 2,
|
|
29507
|
-
border: `1px solid ${border}`,
|
|
29508
|
-
boxShadow: theme.palette.mode === "dark" ? "0 8px 32px rgba(0,0,0,0.5)" : "0 8px 32px rgba(0,0,0,0.2)",
|
|
29509
|
-
minWidth: 180,
|
|
29510
|
-
"& .MuiMenuItem-root": {
|
|
29511
|
-
transition: "all 0.15s ease-in-out",
|
|
29512
|
-
borderRadius: "6px",
|
|
29513
|
-
margin: "2px 4px",
|
|
29514
|
-
minHeight: 40,
|
|
29515
|
-
"&:hover": {
|
|
29516
|
-
bgcolor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.04)",
|
|
29517
|
-
transform: "translateX(2px)"
|
|
29518
|
-
},
|
|
29519
|
-
"&.Mui-selected": {
|
|
29520
|
-
bgcolor: theme.palette.info.main + "20",
|
|
29521
|
-
color: theme.palette.info.main,
|
|
29522
|
-
"&:hover": {
|
|
29523
|
-
bgcolor: theme.palette.info.main + "30"
|
|
29524
|
-
}
|
|
29525
|
-
}
|
|
29526
|
-
}
|
|
29527
|
-
}
|
|
29528
|
-
},
|
|
29529
|
-
children: availableVoices.length > 0 ? availableVoices.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29530
|
-
import_material49.MenuItem,
|
|
29531
|
-
{
|
|
29532
|
-
selected: voice === selectedVoice,
|
|
29533
|
-
onClick: () => {
|
|
29534
|
-
handleVoiceChange(voice);
|
|
29535
|
-
setVoiceAnchorEl(null);
|
|
29536
|
-
},
|
|
29537
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_material49.Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
29538
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RecordVoiceOverIcon, { fontSize: "small", sx: { color: theme.palette.text.secondary } }),
|
|
29539
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_material49.Box, { sx: { flex: 1 }, children: [
|
|
29540
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "body2", children: toTitleCase(voice.split("-")[1]) }),
|
|
29541
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "caption", sx: { color: theme.palette.text.secondary }, children: voice === selectedVoice ? "Currently active" : "Switch to this voice" })
|
|
29542
|
-
] }),
|
|
29543
|
-
voice === selectedVoice && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
29544
|
-
import_material49.Box,
|
|
29545
|
-
{
|
|
29546
|
-
sx: {
|
|
29547
|
-
width: 8,
|
|
29548
|
-
height: 8,
|
|
29549
|
-
borderRadius: "50%",
|
|
29550
|
-
bgcolor: theme.palette.info.main
|
|
29551
|
-
}
|
|
29552
|
-
}
|
|
29553
|
-
)
|
|
29554
|
-
] })
|
|
29555
|
-
},
|
|
29556
|
-
voice
|
|
29557
|
-
)) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.MenuItem, { disabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_material49.Typography, { variant: "body2", color: "text.secondary", children: "No voices available" }) })
|
|
29330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(GhostIcon, {})
|
|
29558
29331
|
}
|
|
29559
29332
|
)
|
|
29560
|
-
|
|
29561
|
-
|
|
29333
|
+
}
|
|
29334
|
+
)
|
|
29562
29335
|
}
|
|
29563
29336
|
)
|
|
29564
29337
|
]
|
|
@@ -30527,7 +30300,8 @@ var init_chat2 = __esm({
|
|
|
30527
30300
|
const [inputHeight, setInputHeight] = (0, import_react62.useState)(80);
|
|
30528
30301
|
const [isSubmitting, setIsSubmitting] = (0, import_react62.useState)(false);
|
|
30529
30302
|
const [pendingMessage, setPendingMessage] = (0, import_react62.useState)(null);
|
|
30530
|
-
const { conversations, currentId, _hasHydrated, hydrate } = useConversationStore();
|
|
30303
|
+
const { conversations, currentId, _hasHydrated, hydrate, toggleIncognito } = useConversationStore();
|
|
30304
|
+
const isTemporaryChat = Boolean(conversations.find((c) => c.id === currentId)?.incognito);
|
|
30531
30305
|
const [isMobile, setIsMobile] = (0, import_react62.useState)(false);
|
|
30532
30306
|
const [drawerOpen, setDrawerOpen] = (0, import_react62.useState)(false);
|
|
30533
30307
|
const [mobileConversationsOpen, setMobileConversationsOpen] = (0, import_react62.useState)(false);
|
|
@@ -31380,12 +31154,11 @@ var init_chat2 = __esm({
|
|
|
31380
31154
|
width: !isMobile && canvasOpen ? `calc(100vw - ${drawerOpen ? "340px" : "0px"} - ${CANVAS_WIDTH})` : drawerOpen && !isMobile ? "calc(100vw - 340px)" : "100vw",
|
|
31381
31155
|
zIndex: 0,
|
|
31382
31156
|
// Claude-style push (mobile only; desktop stays flush): the chat
|
|
31383
|
-
// shell slides right
|
|
31384
|
-
//
|
|
31385
|
-
//
|
|
31386
|
-
// corners clipped at the device edge in the PWA. Width kept in sync
|
|
31157
|
+
// shell slides right as a full-height rounded card — exactly like
|
|
31158
|
+
// Claude iOS, where the card runs edge-to-edge vertically and the
|
|
31159
|
+
// hairline border keeps the corners legible. Width kept in sync
|
|
31387
31160
|
// with the drawer in enhanced-mobile-conversations-modal.tsx.
|
|
31388
|
-
transform: isMobile && mobileConversationsOpen ? "translateX(min(calc(100vw - 56px), 360px))
|
|
31161
|
+
transform: isMobile && mobileConversationsOpen ? "translateX(min(calc(100vw - 56px), 360px))" : "none",
|
|
31389
31162
|
borderRadius: isMobile && mobileConversationsOpen ? "24px" : 0,
|
|
31390
31163
|
// Hairline border so the rounded card reads even when the backdrop
|
|
31391
31164
|
// is the same near-black as the shell.
|
|
@@ -31408,30 +31181,82 @@ var init_chat2 = __esm({
|
|
|
31408
31181
|
onMobileConversationsOpenChange: setMobileConversationsOpen
|
|
31409
31182
|
}
|
|
31410
31183
|
),
|
|
31411
|
-
|
|
31412
|
-
|
|
31413
|
-
|
|
31414
|
-
|
|
31415
|
-
|
|
31416
|
-
|
|
31417
|
-
|
|
31418
|
-
|
|
31419
|
-
|
|
31420
|
-
|
|
31421
|
-
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
|
|
31425
|
-
|
|
31426
|
-
|
|
31427
|
-
|
|
31428
|
-
|
|
31429
|
-
|
|
31430
|
-
|
|
31431
|
-
|
|
31432
|
-
|
|
31433
|
-
|
|
31434
|
-
|
|
31184
|
+
isTemporaryChat && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
31185
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
31186
|
+
import_material53.Box,
|
|
31187
|
+
{
|
|
31188
|
+
sx: (theme) => ({
|
|
31189
|
+
position: "absolute",
|
|
31190
|
+
inset: 0,
|
|
31191
|
+
border: `2px solid ${theme.palette.mode === "dark" ? "rgba(255,255,255,0.45)" : "rgba(0,0,0,0.4)"}`,
|
|
31192
|
+
borderRadius: "inherit",
|
|
31193
|
+
zIndex: 1400,
|
|
31194
|
+
pointerEvents: "none"
|
|
31195
|
+
})
|
|
31196
|
+
}
|
|
31197
|
+
),
|
|
31198
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
31199
|
+
import_material53.Box,
|
|
31200
|
+
{
|
|
31201
|
+
sx: (theme) => ({
|
|
31202
|
+
position: "absolute",
|
|
31203
|
+
top: `calc(${theme.spacing(8)} + env(safe-area-inset-top, 0px))`,
|
|
31204
|
+
left: "50%",
|
|
31205
|
+
transform: "translateX(-50%)",
|
|
31206
|
+
zIndex: 1401,
|
|
31207
|
+
display: "flex",
|
|
31208
|
+
alignItems: "center",
|
|
31209
|
+
gap: 0.75,
|
|
31210
|
+
pl: 1.5,
|
|
31211
|
+
pr: 0.75,
|
|
31212
|
+
py: 0.4,
|
|
31213
|
+
borderRadius: 999,
|
|
31214
|
+
fontSize: "0.78rem",
|
|
31215
|
+
fontWeight: 600,
|
|
31216
|
+
color: theme.palette.text.primary,
|
|
31217
|
+
bgcolor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.12)" : "rgba(0,0,0,0.08)",
|
|
31218
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
31219
|
+
backdropFilter: "blur(8px)",
|
|
31220
|
+
whiteSpace: "nowrap"
|
|
31221
|
+
}),
|
|
31222
|
+
children: [
|
|
31223
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_material53.Box, { component: "span", "aria-hidden": true, sx: { fontSize: "0.9rem", lineHeight: 1 }, children: "\u{1F47B}" }),
|
|
31224
|
+
"Temporary chat",
|
|
31225
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
31226
|
+
import_material53.Box,
|
|
31227
|
+
{
|
|
31228
|
+
component: "button",
|
|
31229
|
+
type: "button",
|
|
31230
|
+
onClick: toggleIncognito,
|
|
31231
|
+
"aria-label": "End temporary chat",
|
|
31232
|
+
sx: (theme) => ({
|
|
31233
|
+
display: "inline-flex",
|
|
31234
|
+
alignItems: "center",
|
|
31235
|
+
justifyContent: "center",
|
|
31236
|
+
width: 20,
|
|
31237
|
+
height: 20,
|
|
31238
|
+
ml: 0.25,
|
|
31239
|
+
p: 0,
|
|
31240
|
+
border: "none",
|
|
31241
|
+
borderRadius: "50%",
|
|
31242
|
+
cursor: "pointer",
|
|
31243
|
+
color: theme.palette.text.secondary,
|
|
31244
|
+
bgcolor: "transparent",
|
|
31245
|
+
font: "inherit",
|
|
31246
|
+
fontSize: "0.85rem",
|
|
31247
|
+
lineHeight: 1,
|
|
31248
|
+
"&:hover": {
|
|
31249
|
+
bgcolor: theme.palette.mode === "dark" ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.1)",
|
|
31250
|
+
color: theme.palette.text.primary
|
|
31251
|
+
}
|
|
31252
|
+
}),
|
|
31253
|
+
children: "\u2715"
|
|
31254
|
+
}
|
|
31255
|
+
)
|
|
31256
|
+
]
|
|
31257
|
+
}
|
|
31258
|
+
)
|
|
31259
|
+
] }),
|
|
31435
31260
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
31436
31261
|
import_material53.Box,
|
|
31437
31262
|
{
|
|
@@ -45206,6 +45031,23 @@ var Management = () => {
|
|
|
45206
45031
|
boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
|
|
45207
45032
|
},
|
|
45208
45033
|
children: [
|
|
45034
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
45035
|
+
import_material54.Button,
|
|
45036
|
+
{
|
|
45037
|
+
onClick: () => navigate("/chat"),
|
|
45038
|
+
onMouseEnter: preloadChatPage,
|
|
45039
|
+
"aria-label": "Back to chat",
|
|
45040
|
+
sx: {
|
|
45041
|
+
minWidth: 48,
|
|
45042
|
+
minHeight: 48,
|
|
45043
|
+
p: 1.5,
|
|
45044
|
+
borderRadius: 2,
|
|
45045
|
+
color: "primary.main",
|
|
45046
|
+
bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.04)"
|
|
45047
|
+
},
|
|
45048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronLeftIcon, { sx: { fontSize: 22 } })
|
|
45049
|
+
}
|
|
45050
|
+
),
|
|
45209
45051
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
45210
45052
|
import_material54.Button,
|
|
45211
45053
|
{
|