@burtson-labs/bandit-engine 2.1.2 → 2.1.4
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/CHANGELOG.md +17 -0
- package/dist/SchedulesTab-YZG3P2GW.mjs +544 -0
- package/dist/SchedulesTab-YZG3P2GW.mjs.map +1 -0
- package/dist/aiProviderStore-ANPQVHGD.mjs +9 -0
- package/dist/chat-W7MDFESE.mjs +15 -0
- package/dist/chunk-4LLCLYLH.mjs +13 -0
- package/dist/chunk-4LLCLYLH.mjs.map +1 -0
- package/dist/chunk-62H3OLTV.mjs +582 -0
- package/dist/chunk-62H3OLTV.mjs.map +1 -0
- package/dist/{chunk-FCQN3LKT.mjs → chunk-6CSFKF34.mjs} +9 -16
- package/dist/chunk-6CSFKF34.mjs.map +1 -0
- package/dist/chunk-DH5A2HT2.mjs +289 -0
- package/dist/chunk-DH5A2HT2.mjs.map +1 -0
- package/dist/{chunk-3UABXOPF.mjs → chunk-GX4FVZNA.mjs} +9 -225
- package/dist/chunk-GX4FVZNA.mjs.map +1 -0
- package/dist/chunk-LMAQWR7Z.mjs +388 -0
- package/dist/chunk-LMAQWR7Z.mjs.map +1 -0
- package/dist/chunk-PSI7RQ54.mjs +1315 -0
- package/dist/chunk-PSI7RQ54.mjs.map +1 -0
- package/dist/chunk-S3DWWUBD.mjs +224 -0
- package/dist/chunk-S3DWWUBD.mjs.map +1 -0
- package/dist/{chunk-WX2HUL3Y.mjs → chunk-W2D454CZ.mjs} +2638 -4183
- package/dist/chunk-W2D454CZ.mjs.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4308 -2813
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1598 -1630
- package/dist/index.mjs.map +1 -1
- package/dist/modelStore-FIVOSLFY.mjs +9 -0
- package/dist/schedule-confirm-card-N4TKLEHL.mjs +292 -0
- package/dist/schedule-confirm-card-N4TKLEHL.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/aiProviderStore-OLMQHX7E.mjs +0 -8
- package/dist/chat-7K5TKTRM.mjs +0 -10
- package/dist/chunk-3UABXOPF.mjs.map +0 -1
- package/dist/chunk-FCQN3LKT.mjs.map +0 -1
- package/dist/chunk-WX2HUL3Y.mjs.map +0 -1
- package/dist/modelStore-SEC34WRM.mjs +0 -8
- /package/dist/{aiProviderStore-OLMQHX7E.mjs.map → aiProviderStore-ANPQVHGD.mjs.map} +0 -0
- /package/dist/{chat-7K5TKTRM.mjs.map → chat-W7MDFESE.mjs.map} +0 -0
- /package/dist/{modelStore-SEC34WRM.mjs.map → modelStore-FIVOSLFY.mjs.map} +0 -0
|
@@ -0,0 +1,1315 @@
|
|
|
1
|
+
import {
|
|
2
|
+
alert_circle_default,
|
|
3
|
+
alert_triangle_default,
|
|
4
|
+
archive_default,
|
|
5
|
+
braces_default,
|
|
6
|
+
check_default,
|
|
7
|
+
chevron_down_default,
|
|
8
|
+
chevron_up_default,
|
|
9
|
+
clock_default,
|
|
10
|
+
copy_default,
|
|
11
|
+
download_default,
|
|
12
|
+
edit_default,
|
|
13
|
+
file_pdf_default,
|
|
14
|
+
file_text_default,
|
|
15
|
+
folder_open_default,
|
|
16
|
+
ghost_default,
|
|
17
|
+
globe_default,
|
|
18
|
+
home_default,
|
|
19
|
+
message_square_default,
|
|
20
|
+
mic_default,
|
|
21
|
+
plus_default,
|
|
22
|
+
refresh_default,
|
|
23
|
+
search_default,
|
|
24
|
+
settings_default,
|
|
25
|
+
sliders_default,
|
|
26
|
+
sparkles_default,
|
|
27
|
+
square_default,
|
|
28
|
+
trash_default,
|
|
29
|
+
upload_default,
|
|
30
|
+
waveform_default,
|
|
31
|
+
wrench_default,
|
|
32
|
+
x_default
|
|
33
|
+
} from "./chunk-LMAQWR7Z.mjs";
|
|
34
|
+
import {
|
|
35
|
+
debugLogger
|
|
36
|
+
} from "./chunk-NI7BKLC7.mjs";
|
|
37
|
+
|
|
38
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui-factory.js
|
|
39
|
+
import { createElement, forwardRef } from "react";
|
|
40
|
+
import * as SvgIconModule from "@mui/material/SvgIcon";
|
|
41
|
+
var SvgIcon = SvgIconModule.default?.default ?? SvgIconModule.default;
|
|
42
|
+
var toProp = (k) => k.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
43
|
+
function createMuiIcon(displayName, node) {
|
|
44
|
+
const Icon = forwardRef(function Icon2({ sx, strokeWidth = 2, title, titleAccess = title, ...props }, ref) {
|
|
45
|
+
return createElement(
|
|
46
|
+
SvgIcon,
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
viewBox: "0 0 24 24",
|
|
50
|
+
stroke: "currentColor",
|
|
51
|
+
strokeWidth,
|
|
52
|
+
strokeLinecap: "round",
|
|
53
|
+
strokeLinejoin: "round",
|
|
54
|
+
titleAccess,
|
|
55
|
+
...props,
|
|
56
|
+
sx: [{ fill: "none" }, ...Array.isArray(sx) ? sx : sx ? [sx] : []]
|
|
57
|
+
},
|
|
58
|
+
...node.map(([tag, attrs], i) => createElement(tag, { key: i, ...Object.fromEntries(Object.entries(attrs).map(([k, v]) => [toProp(k), v])) }))
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
Icon.displayName = displayName;
|
|
62
|
+
Icon.muiName = "SvgIcon";
|
|
63
|
+
return Icon;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/edit.js
|
|
67
|
+
var Edit = /* @__PURE__ */ createMuiIcon("Edit", edit_default);
|
|
68
|
+
|
|
69
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/plus.js
|
|
70
|
+
var Plus = /* @__PURE__ */ createMuiIcon("Plus", plus_default);
|
|
71
|
+
|
|
72
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/refresh.js
|
|
73
|
+
var Refresh = /* @__PURE__ */ createMuiIcon("Refresh", refresh_default);
|
|
74
|
+
|
|
75
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/trash.js
|
|
76
|
+
var Trash = /* @__PURE__ */ createMuiIcon("Trash", trash_default);
|
|
77
|
+
|
|
78
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/x.js
|
|
79
|
+
var X = /* @__PURE__ */ createMuiIcon("X", x_default);
|
|
80
|
+
|
|
81
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/alert-circle.js
|
|
82
|
+
var AlertCircle = /* @__PURE__ */ createMuiIcon("AlertCircle", alert_circle_default);
|
|
83
|
+
|
|
84
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/alert-triangle.js
|
|
85
|
+
var AlertTriangle = /* @__PURE__ */ createMuiIcon("AlertTriangle", alert_triangle_default);
|
|
86
|
+
|
|
87
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/archive.js
|
|
88
|
+
var Archive = /* @__PURE__ */ createMuiIcon("Archive", archive_default);
|
|
89
|
+
|
|
90
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/arrow-down.js
|
|
91
|
+
var arrowDown = [["path", { "d": "M12 4.5v15" }], ["path", { "d": "m6 13.5 6 6 6-6" }]];
|
|
92
|
+
var arrow_down_default = arrowDown;
|
|
93
|
+
|
|
94
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/arrow-down.js
|
|
95
|
+
var ArrowDown = /* @__PURE__ */ createMuiIcon("ArrowDown", arrow_down_default);
|
|
96
|
+
|
|
97
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/arrow-up.js
|
|
98
|
+
var arrowUp = [["path", { "d": "M12 19.5v-15" }], ["path", { "d": "m6 10.5 6-6 6 6" }]];
|
|
99
|
+
var arrow_up_default = arrowUp;
|
|
100
|
+
|
|
101
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/arrow-up.js
|
|
102
|
+
var ArrowUp = /* @__PURE__ */ createMuiIcon("ArrowUp", arrow_up_default);
|
|
103
|
+
|
|
104
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/book-open.js
|
|
105
|
+
var bookOpen = [["path", { "d": "M12 6.5c-1.8-1.4-4.3-2-7.5-2v13c3.2 0 5.7.6 7.5 2 1.8-1.4 4.3-2 7.5-2v-13c-3.2 0-5.7.6-7.5 2z" }], ["path", { "d": "M12 6.5v13" }]];
|
|
106
|
+
var book_open_default = bookOpen;
|
|
107
|
+
|
|
108
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/book-open.js
|
|
109
|
+
var BookOpen = /* @__PURE__ */ createMuiIcon("BookOpen", book_open_default);
|
|
110
|
+
|
|
111
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/book-open-text.js
|
|
112
|
+
var bookOpenText = [["path", { "d": "M12 6.5c-1.8-1.4-4.3-2-7.5-2v13c3.2 0 5.7.6 7.5 2 1.8-1.4 4.3-2 7.5-2v-13c-3.2 0-5.7.6-7.5 2z" }], ["path", { "d": "M12 6.5v13" }], ["path", { "d": "M7 9.5h2.5M7 13h2.5M14.5 9.5H17M14.5 13H17" }]];
|
|
113
|
+
var book_open_text_default = bookOpenText;
|
|
114
|
+
|
|
115
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/book-open-text.js
|
|
116
|
+
var BookOpenText = /* @__PURE__ */ createMuiIcon("BookOpenText", book_open_text_default);
|
|
117
|
+
|
|
118
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/braces.js
|
|
119
|
+
var Braces = /* @__PURE__ */ createMuiIcon("Braces", braces_default);
|
|
120
|
+
|
|
121
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/brush-cleaning.js
|
|
122
|
+
var brushCleaning = [["path", { "d": "m14 3.5-5 8.5" }], ["path", { "d": "M5.5 12h11l1.5 3H4z" }], ["path", { "d": "M5 15l-1 5.5M9 15l-.5 5.5M13 15l.5 5.5M17 15l1 5.5" }]];
|
|
123
|
+
var brush_cleaning_default = brushCleaning;
|
|
124
|
+
|
|
125
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/brush-cleaning.js
|
|
126
|
+
var BrushCleaning = /* @__PURE__ */ createMuiIcon("BrushCleaning", brush_cleaning_default);
|
|
127
|
+
|
|
128
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/check.js
|
|
129
|
+
var Check = /* @__PURE__ */ createMuiIcon("Check", check_default);
|
|
130
|
+
|
|
131
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/check-circle.js
|
|
132
|
+
var checkCircle = [["circle", { "cx": "12", "cy": "12", "r": "9" }], ["path", { "d": "m8.5 12.5 2.5 2.5 4.5-5" }]];
|
|
133
|
+
var check_circle_default = checkCircle;
|
|
134
|
+
|
|
135
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/check-circle.js
|
|
136
|
+
var CheckCircle = /* @__PURE__ */ createMuiIcon("CheckCircle", check_circle_default);
|
|
137
|
+
|
|
138
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/chevron-down.js
|
|
139
|
+
var ChevronDown = /* @__PURE__ */ createMuiIcon("ChevronDown", chevron_down_default);
|
|
140
|
+
|
|
141
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/chevron-left.js
|
|
142
|
+
var chevronLeft = [["path", { "d": "m14.5 6.5-5.5 5.5 5.5 5.5" }]];
|
|
143
|
+
var chevron_left_default = chevronLeft;
|
|
144
|
+
|
|
145
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/chevron-left.js
|
|
146
|
+
var ChevronLeft = /* @__PURE__ */ createMuiIcon("ChevronLeft", chevron_left_default);
|
|
147
|
+
|
|
148
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/chevron-up.js
|
|
149
|
+
var ChevronUp = /* @__PURE__ */ createMuiIcon("ChevronUp", chevron_up_default);
|
|
150
|
+
|
|
151
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/clock.js
|
|
152
|
+
var Clock = /* @__PURE__ */ createMuiIcon("Clock", clock_default);
|
|
153
|
+
|
|
154
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/cloud.js
|
|
155
|
+
var cloud = [["path", { "d": "M7 18.5a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.4 1.3 3.9 3.9 0 0 1-.8 7.7z" }]];
|
|
156
|
+
var cloud_default = cloud;
|
|
157
|
+
|
|
158
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/cloud.js
|
|
159
|
+
var Cloud = /* @__PURE__ */ createMuiIcon("Cloud", cloud_default);
|
|
160
|
+
|
|
161
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/cloud-check.js
|
|
162
|
+
var cloudCheck = [["path", { "d": "M7 18.5a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.4 1.3 3.9 3.9 0 0 1-.8 7.7z" }], ["path", { "d": "m9.5 14 2 2 3.5-3.5" }]];
|
|
163
|
+
var cloud_check_default = cloudCheck;
|
|
164
|
+
|
|
165
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/cloud-check.js
|
|
166
|
+
var CloudCheck = /* @__PURE__ */ createMuiIcon("CloudCheck", cloud_check_default);
|
|
167
|
+
|
|
168
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/cloud-off.js
|
|
169
|
+
var cloudOff = [["path", { "d": "M9.5 6.2A6 6 0 0 1 17.8 10.8 3.9 3.9 0 0 1 19.7 17" }], ["path", { "d": "M16.5 18.5H7a4.5 4.5 0 0 1-.6-9" }], ["path", { "d": "M4 4l16 16" }]];
|
|
170
|
+
var cloud_off_default = cloudOff;
|
|
171
|
+
|
|
172
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/cloud-off.js
|
|
173
|
+
var CloudOff = /* @__PURE__ */ createMuiIcon("CloudOff", cloud_off_default);
|
|
174
|
+
|
|
175
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/cloud-sync.js
|
|
176
|
+
var cloudSync = [["path", { "d": "M7 18.5a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.4 1.3 3.9 3.9 0 0 1-.8 7.7z" }], ["path", { "d": "M9.5 13.5a2.5 2.5 0 0 1 4.5-1.5" }], ["path", { "d": "M14.5 15a2.5 2.5 0 0 1-4.5 1" }]];
|
|
177
|
+
var cloud_sync_default = cloudSync;
|
|
178
|
+
|
|
179
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/cloud-sync.js
|
|
180
|
+
var CloudSync = /* @__PURE__ */ createMuiIcon("CloudSync", cloud_sync_default);
|
|
181
|
+
|
|
182
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/code.js
|
|
183
|
+
var code = [["path", { "d": "m8.5 7.5-4.5 4.5 4.5 4.5" }], ["path", { "d": "m15.5 7.5 4.5 4.5-4.5 4.5" }], ["path", { "d": "M13.5 5.5l-3 13" }]];
|
|
184
|
+
var code_default = code;
|
|
185
|
+
|
|
186
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/code.js
|
|
187
|
+
var Code = /* @__PURE__ */ createMuiIcon("Code", code_default);
|
|
188
|
+
|
|
189
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/copy.js
|
|
190
|
+
var Copy = /* @__PURE__ */ createMuiIcon("Copy", copy_default);
|
|
191
|
+
|
|
192
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/database.js
|
|
193
|
+
var database = [["ellipse", { "cx": "12", "cy": "5.5", "rx": "8", "ry": "3" }], ["path", { "d": "M4 5.5v13c0 1.7 3.6 3 8 3s8-1.3 8-3v-13" }], ["path", { "d": "M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3" }]];
|
|
194
|
+
var database_default = database;
|
|
195
|
+
|
|
196
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/database.js
|
|
197
|
+
var Database = /* @__PURE__ */ createMuiIcon("Database", database_default);
|
|
198
|
+
|
|
199
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/download.js
|
|
200
|
+
var Download = /* @__PURE__ */ createMuiIcon("Download", download_default);
|
|
201
|
+
|
|
202
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/ear-off.js
|
|
203
|
+
var earOff = [["path", { "d": "M6.5 8.5A5.5 5.5 0 0 1 16.3 5" }], ["path", { "d": "M17.5 9.5v.5c0 1.5-.5 2.7-1.2 3.7" }], ["path", { "d": "M14.2 16.2 12.5 19a2.5 2.5 0 0 1-5-1c0-1.2.6-2.3 1.5-3" }], ["path", { "d": "M3.5 3.5l17 17" }]];
|
|
204
|
+
var ear_off_default = earOff;
|
|
205
|
+
|
|
206
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/ear-off.js
|
|
207
|
+
var EarOff = /* @__PURE__ */ createMuiIcon("EarOff", ear_off_default);
|
|
208
|
+
|
|
209
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/edit-square.js
|
|
210
|
+
var editSquare = [["path", { "d": "M11 4.5H6A1.5 1.5 0 0 0 4.5 6v12A1.5 1.5 0 0 0 6 19.5h12a1.5 1.5 0 0 0 1.5-1.5v-5" }], ["path", { "d": "M17 4.5l2.5 2.5-7.5 7.5-3.5 1 1-3.5z" }]];
|
|
211
|
+
var edit_square_default = editSquare;
|
|
212
|
+
|
|
213
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/edit-square.js
|
|
214
|
+
var EditSquare = /* @__PURE__ */ createMuiIcon("EditSquare", edit_square_default);
|
|
215
|
+
|
|
216
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/file-pdf.js
|
|
217
|
+
var FilePdf = /* @__PURE__ */ createMuiIcon("FilePdf", file_pdf_default);
|
|
218
|
+
|
|
219
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/file-text.js
|
|
220
|
+
var FileText = /* @__PURE__ */ createMuiIcon("FileText", file_text_default);
|
|
221
|
+
|
|
222
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/file-up.js
|
|
223
|
+
var fileUp = [["path", { "d": "M13.5 3.5H7A1.5 1.5 0 0 0 5.5 5v14A1.5 1.5 0 0 0 7 20.5h10a1.5 1.5 0 0 0 1.5-1.5V8.5z" }], ["path", { "d": "M13.5 3.5v5h5" }], ["path", { "d": "M12 17.5v-6" }], ["path", { "d": "m9.5 14 2.5-2.5 2.5 2.5" }]];
|
|
224
|
+
var file_up_default = fileUp;
|
|
225
|
+
|
|
226
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/file-up.js
|
|
227
|
+
var FileUp = /* @__PURE__ */ createMuiIcon("FileUp", file_up_default);
|
|
228
|
+
|
|
229
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/folder-open.js
|
|
230
|
+
var FolderOpen = /* @__PURE__ */ createMuiIcon("FolderOpen", folder_open_default);
|
|
231
|
+
|
|
232
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/ghost.js
|
|
233
|
+
var Ghost = /* @__PURE__ */ createMuiIcon("Ghost", ghost_default);
|
|
234
|
+
|
|
235
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/globe.js
|
|
236
|
+
var Globe = /* @__PURE__ */ createMuiIcon("Globe", globe_default);
|
|
237
|
+
|
|
238
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/grip.js
|
|
239
|
+
var grip = [["path", { "d": "M6 6h.01M12 6h.01M18 6h.01M6 12h.01M12 12h.01M18 12h.01M6 18h.01M12 18h.01M18 18h.01" }]];
|
|
240
|
+
var grip_default = grip;
|
|
241
|
+
|
|
242
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/grip.js
|
|
243
|
+
var Grip = /* @__PURE__ */ createMuiIcon("Grip", grip_default);
|
|
244
|
+
|
|
245
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/history.js
|
|
246
|
+
var history = [["path", { "d": "M4.5 12a7.5 7.5 0 1 0 2.2-5.3L4.5 9" }], ["path", { "d": "M4.5 4.5V9H9" }], ["path", { "d": "M12 8v4l2.5 2" }]];
|
|
247
|
+
var history_default = history;
|
|
248
|
+
|
|
249
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/history.js
|
|
250
|
+
var History = /* @__PURE__ */ createMuiIcon("History", history_default);
|
|
251
|
+
|
|
252
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/home.js
|
|
253
|
+
var Home = /* @__PURE__ */ createMuiIcon("Home", home_default);
|
|
254
|
+
|
|
255
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/info.js
|
|
256
|
+
var info = [["circle", { "cx": "12", "cy": "12", "r": "9" }], ["path", { "d": "M12 11v5" }], ["path", { "d": "M12 7.8h.01" }]];
|
|
257
|
+
var info_default = info;
|
|
258
|
+
|
|
259
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/info.js
|
|
260
|
+
var Info = /* @__PURE__ */ createMuiIcon("Info", info_default);
|
|
261
|
+
|
|
262
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/layout-grid.js
|
|
263
|
+
var layoutGrid = [["rect", { "x": "4", "y": "4", "width": "6.5", "height": "6.5", "rx": "1.5" }], ["rect", { "x": "13.5", "y": "4", "width": "6.5", "height": "6.5", "rx": "1.5" }], ["rect", { "x": "4", "y": "13.5", "width": "6.5", "height": "6.5", "rx": "1.5" }], ["rect", { "x": "13.5", "y": "13.5", "width": "6.5", "height": "6.5", "rx": "1.5" }]];
|
|
264
|
+
var layout_grid_default = layoutGrid;
|
|
265
|
+
|
|
266
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/layout-grid.js
|
|
267
|
+
var LayoutGrid = /* @__PURE__ */ createMuiIcon("LayoutGrid", layout_grid_default);
|
|
268
|
+
|
|
269
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/link.js
|
|
270
|
+
var link = [["path", { "d": "M10 13.5a3.5 3.5 0 0 0 5 0l3-3a3.5 3.5 0 0 0-5-5l-1 1" }], ["path", { "d": "M14 10.5a3.5 3.5 0 0 0-5 0l-3 3a3.5 3.5 0 0 0 5 5l1-1" }]];
|
|
271
|
+
var link_default = link;
|
|
272
|
+
|
|
273
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/link.js
|
|
274
|
+
var Link = /* @__PURE__ */ createMuiIcon("Link", link_default);
|
|
275
|
+
|
|
276
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/list.js
|
|
277
|
+
var list = [["path", { "d": "M9 6.5h11M9 12h11M9 17.5h11" }], ["path", { "d": "M4.5 6.5h.01M4.5 12h.01M4.5 17.5h.01" }]];
|
|
278
|
+
var list_default = list;
|
|
279
|
+
|
|
280
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/list.js
|
|
281
|
+
var List = /* @__PURE__ */ createMuiIcon("List", list_default);
|
|
282
|
+
|
|
283
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/lock.js
|
|
284
|
+
var lock = [["rect", { "x": "5", "y": "10.5", "width": "14", "height": "10", "rx": "2" }], ["path", { "d": "M8.5 10.5v-3a3.5 3.5 0 0 1 7 0v3" }]];
|
|
285
|
+
var lock_default = lock;
|
|
286
|
+
|
|
287
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/lock.js
|
|
288
|
+
var Lock = /* @__PURE__ */ createMuiIcon("Lock", lock_default);
|
|
289
|
+
|
|
290
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/maximize.js
|
|
291
|
+
var maximize = [["path", { "d": "M14.5 4.5h5v5" }], ["path", { "d": "M9.5 19.5h-5v-5" }], ["path", { "d": "M19.5 4.5l-6 6" }], ["path", { "d": "M4.5 19.5l6-6" }]];
|
|
292
|
+
var maximize_default = maximize;
|
|
293
|
+
|
|
294
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/maximize.js
|
|
295
|
+
var Maximize = /* @__PURE__ */ createMuiIcon("Maximize", maximize_default);
|
|
296
|
+
|
|
297
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/memory-layers.js
|
|
298
|
+
var memoryLayers = [["path", { "d": "M4 8V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v3M4 13v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3M7 22h10" }], ["path", { "d": "M2 10.5h5l2-3 4 6 2-3h7" }]];
|
|
299
|
+
var memory_layers_default = memoryLayers;
|
|
300
|
+
|
|
301
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/memory-layers.js
|
|
302
|
+
var MemoryLayers = /* @__PURE__ */ createMuiIcon("MemoryLayers", memory_layers_default);
|
|
303
|
+
|
|
304
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/message-square.js
|
|
305
|
+
var MessageSquare = /* @__PURE__ */ createMuiIcon("MessageSquare", message_square_default);
|
|
306
|
+
|
|
307
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/mic.js
|
|
308
|
+
var Mic = /* @__PURE__ */ createMuiIcon("Mic", mic_default);
|
|
309
|
+
|
|
310
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/minimize.js
|
|
311
|
+
var minimize = [["path", { "d": "M14 4.5V10h5.5" }], ["path", { "d": "M10 19.5V14H4.5" }], ["path", { "d": "M20 4l-6 6" }], ["path", { "d": "M4 20l6-6" }]];
|
|
312
|
+
var minimize_default = minimize;
|
|
313
|
+
|
|
314
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/minimize.js
|
|
315
|
+
var Minimize = /* @__PURE__ */ createMuiIcon("Minimize", minimize_default);
|
|
316
|
+
|
|
317
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/minus.js
|
|
318
|
+
var minus = [["path", { "d": "M5.5 12h13" }]];
|
|
319
|
+
var minus_default = minus;
|
|
320
|
+
|
|
321
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/minus.js
|
|
322
|
+
var Minus = /* @__PURE__ */ createMuiIcon("Minus", minus_default);
|
|
323
|
+
|
|
324
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/notebook-pen.js
|
|
325
|
+
var notebookPen = [["path", { "d": "M13 4.5H6.5a1.5 1.5 0 0 0-1.5 1.5v13a1.5 1.5 0 0 0 1.5 1.5h10a1.5 1.5 0 0 0 1.5-1.5v-5" }], ["path", { "d": "M3 8.5h4M3 12.5h4M3 16.5h4" }], ["path", { "d": "M18.2 3.8a1.8 1.8 0 0 1 2.5 2.5l-5.5 5.5-3.2.8.8-3.2z" }]];
|
|
326
|
+
var notebook_pen_default = notebookPen;
|
|
327
|
+
|
|
328
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/notebook-pen.js
|
|
329
|
+
var NotebookPen = /* @__PURE__ */ createMuiIcon("NotebookPen", notebook_pen_default);
|
|
330
|
+
|
|
331
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/palette.js
|
|
332
|
+
var palette = [["path", { "d": "M12 3.5a8.5 8.5 0 0 0 0 17c1.3 0 2-1 1.6-2.2-.5-1.4.5-2.8 2-2.8h2a3.4 3.4 0 0 0 3.4-3.4C21 7.2 17 3.5 12 3.5z" }], ["path", { "d": "M7.5 11h.01M10 7.5h.01M14.5 7.5h.01" }]];
|
|
333
|
+
var palette_default = palette;
|
|
334
|
+
|
|
335
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/palette.js
|
|
336
|
+
var Palette = /* @__PURE__ */ createMuiIcon("Palette", palette_default);
|
|
337
|
+
|
|
338
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/panel-left.js
|
|
339
|
+
var panelLeft = [["rect", { "x": "3.5", "y": "4.5", "width": "17", "height": "15", "rx": "2" }], ["path", { "d": "M9.5 4.5v15" }]];
|
|
340
|
+
var panel_left_default = panelLeft;
|
|
341
|
+
|
|
342
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/panel-left.js
|
|
343
|
+
var PanelLeft = /* @__PURE__ */ createMuiIcon("PanelLeft", panel_left_default);
|
|
344
|
+
|
|
345
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/pin.js
|
|
346
|
+
var pin = [["path", { "d": "M9 4.5h6" }], ["path", { "d": "M10 4.5V10l-3 3.5h10L14 10V4.5" }], ["path", { "d": "M12 13.5v6" }]];
|
|
347
|
+
var pin_default = pin;
|
|
348
|
+
|
|
349
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/pin.js
|
|
350
|
+
var Pin = /* @__PURE__ */ createMuiIcon("Pin", pin_default);
|
|
351
|
+
|
|
352
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/pin-off.js
|
|
353
|
+
var pinOff = [["path", { "d": "M9 4.5h6" }], ["path", { "d": "M14 4.5V10l3 3.5h-3.5" }], ["path", { "d": "M10 7.5V10l-3 3.5h6.5" }], ["path", { "d": "M12 13.5v6" }], ["path", { "d": "M3.5 3.5l17 17" }]];
|
|
354
|
+
var pin_off_default = pinOff;
|
|
355
|
+
|
|
356
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/pin-off.js
|
|
357
|
+
var PinOff = /* @__PURE__ */ createMuiIcon("PinOff", pin_off_default);
|
|
358
|
+
|
|
359
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/rectangle-horizontal.js
|
|
360
|
+
var rectangleHorizontal = [["rect", { "x": "2.5", "y": "6.5", "width": "19", "height": "11", "rx": "2" }]];
|
|
361
|
+
var rectangle_horizontal_default = rectangleHorizontal;
|
|
362
|
+
|
|
363
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/rectangle-horizontal.js
|
|
364
|
+
var RectangleHorizontal = /* @__PURE__ */ createMuiIcon("RectangleHorizontal", rectangle_horizontal_default);
|
|
365
|
+
|
|
366
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/rectangle-vertical.js
|
|
367
|
+
var rectangleVertical = [["rect", { "x": "6.5", "y": "2.5", "width": "11", "height": "19", "rx": "2" }]];
|
|
368
|
+
var rectangle_vertical_default = rectangleVertical;
|
|
369
|
+
|
|
370
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/rectangle-vertical.js
|
|
371
|
+
var RectangleVertical = /* @__PURE__ */ createMuiIcon("RectangleVertical", rectangle_vertical_default);
|
|
372
|
+
|
|
373
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/rotate-ccw.js
|
|
374
|
+
var rotateCcw = [["path", { "d": "M4.5 12a7.5 7.5 0 1 0 2.2-5.3L4.5 9" }], ["path", { "d": "M4.5 4.5V9H9" }]];
|
|
375
|
+
var rotate_ccw_default = rotateCcw;
|
|
376
|
+
|
|
377
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/rotate-ccw.js
|
|
378
|
+
var RotateCcw = /* @__PURE__ */ createMuiIcon("RotateCcw", rotate_ccw_default);
|
|
379
|
+
|
|
380
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/rotate-cw.js
|
|
381
|
+
var rotateCw = [["path", { "d": "M19.5 12a7.5 7.5 0 1 1-2.2-5.3L19.5 9" }], ["path", { "d": "M19.5 4.5V9H15" }]];
|
|
382
|
+
var rotate_cw_default = rotateCw;
|
|
383
|
+
|
|
384
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/rotate-cw.js
|
|
385
|
+
var RotateCw = /* @__PURE__ */ createMuiIcon("RotateCw", rotate_cw_default);
|
|
386
|
+
|
|
387
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/save.js
|
|
388
|
+
var save = [["path", { "d": "M5.5 4.5h10l4 4v10a1 1 0 0 1-1 1h-13a1 1 0 0 1-1-1v-13a1 1 0 0 1 1-1z" }], ["path", { "d": "M8 4.5v4h7v-4" }], ["path", { "d": "M7.5 19.5V14h9v5.5" }]];
|
|
389
|
+
var save_default = save;
|
|
390
|
+
|
|
391
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/save.js
|
|
392
|
+
var Save = /* @__PURE__ */ createMuiIcon("Save", save_default);
|
|
393
|
+
|
|
394
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/scan-face.js
|
|
395
|
+
var scanFace = [["path", { "d": "M3.5 8V5.5a2 2 0 0 1 2-2H8M16 3.5h2.5a2 2 0 0 1 2 2V8M20.5 16v2.5a2 2 0 0 1-2 2H16M8 20.5H5.5a2 2 0 0 1-2-2V16" }], ["path", { "d": "M9 10h.01M15 10h.01" }], ["path", { "d": "M9.5 15a3.5 3.5 0 0 0 5 0" }]];
|
|
396
|
+
var scan_face_default = scanFace;
|
|
397
|
+
|
|
398
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/scan-face.js
|
|
399
|
+
var ScanFace = /* @__PURE__ */ createMuiIcon("ScanFace", scan_face_default);
|
|
400
|
+
|
|
401
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/search.js
|
|
402
|
+
var Search = /* @__PURE__ */ createMuiIcon("Search", search_default);
|
|
403
|
+
|
|
404
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/send.js
|
|
405
|
+
var send = [["path", { "d": "M20 4 3.5 10.5l7 3 3 7z" }], ["path", { "d": "M20 4l-9.5 9.5" }]];
|
|
406
|
+
var send_default = send;
|
|
407
|
+
|
|
408
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/send.js
|
|
409
|
+
var Send = /* @__PURE__ */ createMuiIcon("Send", send_default);
|
|
410
|
+
|
|
411
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/settings.js
|
|
412
|
+
var Settings = /* @__PURE__ */ createMuiIcon("Settings", settings_default);
|
|
413
|
+
|
|
414
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/sliders.js
|
|
415
|
+
var Sliders = /* @__PURE__ */ createMuiIcon("Sliders", sliders_default);
|
|
416
|
+
|
|
417
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/sparkles.js
|
|
418
|
+
var Sparkles = /* @__PURE__ */ createMuiIcon("Sparkles", sparkles_default);
|
|
419
|
+
|
|
420
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/square.js
|
|
421
|
+
var Square = /* @__PURE__ */ createMuiIcon("Square", square_default);
|
|
422
|
+
|
|
423
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/type.js
|
|
424
|
+
var type = [["path", { "d": "M5 7V4.5h14V7" }], ["path", { "d": "M12 4.5v15" }], ["path", { "d": "M9 19.5h6" }]];
|
|
425
|
+
var type_default = type;
|
|
426
|
+
|
|
427
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/type.js
|
|
428
|
+
var Type = /* @__PURE__ */ createMuiIcon("Type", type_default);
|
|
429
|
+
|
|
430
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/upload.js
|
|
431
|
+
var Upload = /* @__PURE__ */ createMuiIcon("Upload", upload_default);
|
|
432
|
+
|
|
433
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/user.js
|
|
434
|
+
var user = [["circle", { "cx": "12", "cy": "8", "r": "3.5" }], ["path", { "d": "M5 20.5a7 7 0 0 1 14 0" }]];
|
|
435
|
+
var user_default = user;
|
|
436
|
+
|
|
437
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/user.js
|
|
438
|
+
var User = /* @__PURE__ */ createMuiIcon("User", user_default);
|
|
439
|
+
|
|
440
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/user-cog.js
|
|
441
|
+
var userCog = [["circle", { "cx": "9", "cy": "8", "r": "3.5" }], ["path", { "d": "M3 20a6 6 0 0 1 10.5-4" }], ["circle", { "cx": "17.5", "cy": "15.5", "r": "2" }], ["path", { "d": "M17.5 11.5v2M17.5 17.5v2M13.5 15.5h2M19.5 15.5h2" }]];
|
|
442
|
+
var user_cog_default = userCog;
|
|
443
|
+
|
|
444
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/user-cog.js
|
|
445
|
+
var UserCog = /* @__PURE__ */ createMuiIcon("UserCog", user_cog_default);
|
|
446
|
+
|
|
447
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/users.js
|
|
448
|
+
var users = [["circle", { "cx": "9", "cy": "8", "r": "3.5" }], ["path", { "d": "M3 20a6 6 0 0 1 12 0" }], ["path", { "d": "M15.5 4.8a3.5 3.5 0 0 1 0 6.4" }], ["path", { "d": "M17.5 14.5a6 6 0 0 1 3.5 5.5" }]];
|
|
449
|
+
var users_default = users;
|
|
450
|
+
|
|
451
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/users.js
|
|
452
|
+
var Users = /* @__PURE__ */ createMuiIcon("Users", users_default);
|
|
453
|
+
|
|
454
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/waveform.js
|
|
455
|
+
var Waveform = /* @__PURE__ */ createMuiIcon("Waveform", waveform_default);
|
|
456
|
+
|
|
457
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/wifi.js
|
|
458
|
+
var wifi = [["path", { "d": "M2.5 9a14 14 0 0 1 19 0" }], ["path", { "d": "M5.5 12.5a9.5 9.5 0 0 1 13 0" }], ["path", { "d": "M8.7 16a5 5 0 0 1 6.6 0" }], ["path", { "d": "M12 19.5h.01" }]];
|
|
459
|
+
var wifi_default = wifi;
|
|
460
|
+
|
|
461
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/wifi.js
|
|
462
|
+
var Wifi = /* @__PURE__ */ createMuiIcon("Wifi", wifi_default);
|
|
463
|
+
|
|
464
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/wifi-off.js
|
|
465
|
+
var wifiOff = [["path", { "d": "M9 5.2a14 14 0 0 1 12.5 3.8" }], ["path", { "d": "M2.5 9a14 14 0 0 1 3-2.2" }], ["path", { "d": "M5.5 12.5A9.5 9.5 0 0 1 9 10.4" }], ["path", { "d": "M15.5 10.7a9.5 9.5 0 0 1 3 1.8" }], ["path", { "d": "M8.7 16a5 5 0 0 1 6.6 0" }], ["path", { "d": "M12 19.5h.01" }], ["path", { "d": "M4 4l16 16" }]];
|
|
466
|
+
var wifi_off_default = wifiOff;
|
|
467
|
+
|
|
468
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/wifi-off.js
|
|
469
|
+
var WifiOff = /* @__PURE__ */ createMuiIcon("WifiOff", wifi_off_default);
|
|
470
|
+
|
|
471
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/wrench.js
|
|
472
|
+
var Wrench = /* @__PURE__ */ createMuiIcon("Wrench", wrench_default);
|
|
473
|
+
|
|
474
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/zoom-in.js
|
|
475
|
+
var zoomIn = [["circle", { "cx": "10.5", "cy": "10.5", "r": "6" }], ["path", { "d": "M15 15l4.5 4.5" }], ["path", { "d": "M10.5 8v5M8 10.5h5" }]];
|
|
476
|
+
var zoom_in_default = zoomIn;
|
|
477
|
+
|
|
478
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/zoom-in.js
|
|
479
|
+
var ZoomIn = /* @__PURE__ */ createMuiIcon("ZoomIn", zoom_in_default);
|
|
480
|
+
|
|
481
|
+
// ../../node_modules/@burtson-labs/icons/dist/nodes/zoom-out.js
|
|
482
|
+
var zoomOut = [["circle", { "cx": "10.5", "cy": "10.5", "r": "6" }], ["path", { "d": "M15 15l4.5 4.5" }], ["path", { "d": "M8 10.5h5" }]];
|
|
483
|
+
var zoom_out_default = zoomOut;
|
|
484
|
+
|
|
485
|
+
// ../../node_modules/@burtson-labs/icons/dist/mui/zoom-out.js
|
|
486
|
+
var ZoomOut = /* @__PURE__ */ createMuiIcon("ZoomOut", zoom_out_default);
|
|
487
|
+
|
|
488
|
+
// src/components/StreamingMarkdown.tsx
|
|
489
|
+
import React2, { useEffect, useMemo, useRef, useState } from "react";
|
|
490
|
+
import { Box as Box2, Tooltip, IconButton } from "@mui/material";
|
|
491
|
+
import ReactMarkdown from "react-markdown";
|
|
492
|
+
import remarkGfm from "remark-gfm";
|
|
493
|
+
import rehypeRaw from "rehype-raw";
|
|
494
|
+
import rehypeSanitize from "rehype-sanitize";
|
|
495
|
+
import { useTheme, alpha } from "@mui/material/styles";
|
|
496
|
+
|
|
497
|
+
// src/utils/lowlight.ts
|
|
498
|
+
import { createLowlight } from "lowlight";
|
|
499
|
+
import javascript from "highlight.js/lib/languages/javascript";
|
|
500
|
+
import typescript from "highlight.js/lib/languages/typescript";
|
|
501
|
+
import json from "highlight.js/lib/languages/json";
|
|
502
|
+
import bash from "highlight.js/lib/languages/bash";
|
|
503
|
+
import shell from "highlight.js/lib/languages/shell";
|
|
504
|
+
import yaml from "highlight.js/lib/languages/yaml";
|
|
505
|
+
import python from "highlight.js/lib/languages/python";
|
|
506
|
+
import css from "highlight.js/lib/languages/css";
|
|
507
|
+
import xml from "highlight.js/lib/languages/xml";
|
|
508
|
+
import markdown from "highlight.js/lib/languages/markdown";
|
|
509
|
+
import sql from "highlight.js/lib/languages/sql";
|
|
510
|
+
import java from "highlight.js/lib/languages/java";
|
|
511
|
+
import csharp from "highlight.js/lib/languages/csharp";
|
|
512
|
+
import cpp from "highlight.js/lib/languages/cpp";
|
|
513
|
+
import go from "highlight.js/lib/languages/go";
|
|
514
|
+
import rust from "highlight.js/lib/languages/rust";
|
|
515
|
+
import kotlin from "highlight.js/lib/languages/kotlin";
|
|
516
|
+
import swift from "highlight.js/lib/languages/swift";
|
|
517
|
+
import scala from "highlight.js/lib/languages/scala";
|
|
518
|
+
import ruby from "highlight.js/lib/languages/ruby";
|
|
519
|
+
import php from "highlight.js/lib/languages/php";
|
|
520
|
+
import powershell from "highlight.js/lib/languages/powershell";
|
|
521
|
+
var lowlight = createLowlight();
|
|
522
|
+
var asLanguage = (language) => language;
|
|
523
|
+
var registrations = {
|
|
524
|
+
javascript: asLanguage(javascript),
|
|
525
|
+
js: asLanguage(javascript),
|
|
526
|
+
jsx: asLanguage(javascript),
|
|
527
|
+
typescript: asLanguage(typescript),
|
|
528
|
+
ts: asLanguage(typescript),
|
|
529
|
+
tsx: asLanguage(typescript),
|
|
530
|
+
json: asLanguage(json),
|
|
531
|
+
bash: asLanguage(bash),
|
|
532
|
+
shell: asLanguage(shell),
|
|
533
|
+
sh: asLanguage(shell),
|
|
534
|
+
yaml: asLanguage(yaml),
|
|
535
|
+
yml: asLanguage(yaml),
|
|
536
|
+
python: asLanguage(python),
|
|
537
|
+
py: asLanguage(python),
|
|
538
|
+
css: asLanguage(css),
|
|
539
|
+
html: asLanguage(xml),
|
|
540
|
+
xml: asLanguage(xml),
|
|
541
|
+
markdown: asLanguage(markdown),
|
|
542
|
+
md: asLanguage(markdown),
|
|
543
|
+
sql: asLanguage(sql),
|
|
544
|
+
java: asLanguage(java),
|
|
545
|
+
csharp: asLanguage(csharp),
|
|
546
|
+
cs: asLanguage(csharp),
|
|
547
|
+
cpp: asLanguage(cpp),
|
|
548
|
+
c: asLanguage(cpp),
|
|
549
|
+
h: asLanguage(cpp),
|
|
550
|
+
go: asLanguage(go),
|
|
551
|
+
rust: asLanguage(rust),
|
|
552
|
+
rs: asLanguage(rust),
|
|
553
|
+
kotlin: asLanguage(kotlin),
|
|
554
|
+
kt: asLanguage(kotlin),
|
|
555
|
+
swift: asLanguage(swift),
|
|
556
|
+
scala: asLanguage(scala),
|
|
557
|
+
ruby: asLanguage(ruby),
|
|
558
|
+
rb: asLanguage(ruby),
|
|
559
|
+
php: asLanguage(php),
|
|
560
|
+
powershell: asLanguage(powershell),
|
|
561
|
+
ps1: asLanguage(powershell)
|
|
562
|
+
};
|
|
563
|
+
Object.entries(registrations).forEach(([name, language]) => {
|
|
564
|
+
if (!lowlight.listLanguages().includes(name)) {
|
|
565
|
+
lowlight.register(name, language);
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
function getHighlightTree(code2, language) {
|
|
569
|
+
const lang = language?.toLowerCase();
|
|
570
|
+
if (lang && lowlight.listLanguages().includes(lang)) {
|
|
571
|
+
return lowlight.highlight(lang, code2);
|
|
572
|
+
}
|
|
573
|
+
return lowlight.highlightAuto(code2);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// src/utils/markdownRendering.tsx
|
|
577
|
+
import React from "react";
|
|
578
|
+
import { Box } from "@mui/material";
|
|
579
|
+
import { defaultSchema } from "rehype-sanitize";
|
|
580
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
581
|
+
var markdownSanitizeSchema = (() => {
|
|
582
|
+
const schema = {
|
|
583
|
+
...defaultSchema,
|
|
584
|
+
attributes: Object.fromEntries(
|
|
585
|
+
Object.entries(defaultSchema.attributes ?? {}).map(([tag, attrs]) => [
|
|
586
|
+
tag,
|
|
587
|
+
[...attrs]
|
|
588
|
+
])
|
|
589
|
+
)
|
|
590
|
+
};
|
|
591
|
+
schema.tagNames = Array.from(
|
|
592
|
+
/* @__PURE__ */ new Set([...schema.tagNames || [], "span", "sup", "sub"])
|
|
593
|
+
);
|
|
594
|
+
schema.attributes = {
|
|
595
|
+
...schema.attributes || {},
|
|
596
|
+
"*": Array.from(
|
|
597
|
+
/* @__PURE__ */ new Set([...schema.attributes?.["*"] || [], "className", "id", "data*"])
|
|
598
|
+
),
|
|
599
|
+
span: Array.from(
|
|
600
|
+
/* @__PURE__ */ new Set([
|
|
601
|
+
...schema.attributes?.span || [],
|
|
602
|
+
"className",
|
|
603
|
+
"data-bl-delay",
|
|
604
|
+
"data*",
|
|
605
|
+
"id"
|
|
606
|
+
])
|
|
607
|
+
),
|
|
608
|
+
code: Array.from(
|
|
609
|
+
/* @__PURE__ */ new Set([
|
|
610
|
+
...schema.attributes?.code || [],
|
|
611
|
+
"className",
|
|
612
|
+
"data-language",
|
|
613
|
+
"data*",
|
|
614
|
+
"id"
|
|
615
|
+
])
|
|
616
|
+
),
|
|
617
|
+
pre: Array.from(
|
|
618
|
+
/* @__PURE__ */ new Set([...schema.attributes?.pre || [], "className", "data*", "id"])
|
|
619
|
+
),
|
|
620
|
+
sup: Array.from(
|
|
621
|
+
/* @__PURE__ */ new Set([...schema.attributes?.sup || [], "className", "data*", "id"])
|
|
622
|
+
),
|
|
623
|
+
a: Array.from(/* @__PURE__ */ new Set([...schema.attributes?.a || [], "className", "data*", "id"]))
|
|
624
|
+
};
|
|
625
|
+
schema.clobberPrefix = "bl";
|
|
626
|
+
schema.allowComments = false;
|
|
627
|
+
schema.strip = ["script", "style"];
|
|
628
|
+
return schema;
|
|
629
|
+
})();
|
|
630
|
+
var MarkdownImage = ({
|
|
631
|
+
src,
|
|
632
|
+
alt
|
|
633
|
+
}) => {
|
|
634
|
+
if (!src) return null;
|
|
635
|
+
return /* @__PURE__ */ jsxs(Box, { component: "span", sx: { display: "block", my: 1 }, children: [
|
|
636
|
+
/* @__PURE__ */ jsx(
|
|
637
|
+
Box,
|
|
638
|
+
{
|
|
639
|
+
component: "img",
|
|
640
|
+
src,
|
|
641
|
+
alt: alt || "Image",
|
|
642
|
+
loading: "lazy",
|
|
643
|
+
sx: {
|
|
644
|
+
display: "block",
|
|
645
|
+
maxWidth: "min(480px, 100%)",
|
|
646
|
+
maxHeight: 420,
|
|
647
|
+
width: "auto",
|
|
648
|
+
height: "auto",
|
|
649
|
+
borderRadius: 2,
|
|
650
|
+
border: "1px solid",
|
|
651
|
+
borderColor: "divider"
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
),
|
|
655
|
+
/* @__PURE__ */ jsx(
|
|
656
|
+
Box,
|
|
657
|
+
{
|
|
658
|
+
component: "a",
|
|
659
|
+
href: src,
|
|
660
|
+
download: true,
|
|
661
|
+
target: "_blank",
|
|
662
|
+
rel: "noreferrer noopener",
|
|
663
|
+
sx: {
|
|
664
|
+
display: "inline-block",
|
|
665
|
+
mt: 0.5,
|
|
666
|
+
fontSize: 13,
|
|
667
|
+
fontWeight: 600,
|
|
668
|
+
color: "primary.main",
|
|
669
|
+
textDecoration: "none",
|
|
670
|
+
"&:hover": { textDecoration: "underline" }
|
|
671
|
+
},
|
|
672
|
+
children: "Save image"
|
|
673
|
+
}
|
|
674
|
+
)
|
|
675
|
+
] });
|
|
676
|
+
};
|
|
677
|
+
var renderLowlightChildren = (nodes, keyPrefix) => nodes.map((node, index) => {
|
|
678
|
+
if (node.type === "text") {
|
|
679
|
+
return node.value;
|
|
680
|
+
}
|
|
681
|
+
if (node.type === "element") {
|
|
682
|
+
const key = `${keyPrefix}-${index}`;
|
|
683
|
+
const { tagName, properties = {}, children = [] } = node;
|
|
684
|
+
const reactProps = { key };
|
|
685
|
+
Object.entries(properties).forEach(([propKey, value]) => {
|
|
686
|
+
if (propKey === "className" && Array.isArray(value)) {
|
|
687
|
+
reactProps.className = value.join(" ");
|
|
688
|
+
} else if (value !== null && value !== void 0) {
|
|
689
|
+
reactProps[propKey] = value;
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
return React.createElement(
|
|
693
|
+
tagName,
|
|
694
|
+
reactProps,
|
|
695
|
+
renderLowlightChildren(children, key)
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
return null;
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
// src/utils/openFileLink.ts
|
|
702
|
+
var FILE_EXT_RE = /\.(docx|pptx|xlsx|csv|json|md|txt|html|xml|ya?ml|pdf|zip)(?:[?#]|$)/i;
|
|
703
|
+
var isStandalonePwa = () => typeof window !== "undefined" && (window.matchMedia?.("(display-mode: standalone)").matches || window.navigator.standalone === true);
|
|
704
|
+
var isFileLink = (href) => Boolean(href && FILE_EXT_RE.test(href));
|
|
705
|
+
var maybeHandleFileLinkClick = (event, href) => {
|
|
706
|
+
if (!href || !isStandalonePwa() || !isFileLink(href)) return;
|
|
707
|
+
event.preventDefault();
|
|
708
|
+
void (async () => {
|
|
709
|
+
try {
|
|
710
|
+
const res = await fetch(href);
|
|
711
|
+
if (!res.ok) throw new Error(`fetch ${res.status}`);
|
|
712
|
+
const blob = await res.blob();
|
|
713
|
+
const rawName = new URL(href, window.location.href).pathname.split("/").pop() || "download";
|
|
714
|
+
const name = decodeURIComponent(rawName);
|
|
715
|
+
const file = new File([blob], name, {
|
|
716
|
+
type: blob.type || "application/octet-stream"
|
|
717
|
+
});
|
|
718
|
+
const nav = navigator;
|
|
719
|
+
if (nav.canShare?.({ files: [file] }) && nav.share) {
|
|
720
|
+
await nav.share({ files: [file], title: name });
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
window.location.href = URL.createObjectURL(blob);
|
|
724
|
+
} catch (error) {
|
|
725
|
+
debugLogger.warn("openFileLink: share flow failed, falling back", {
|
|
726
|
+
error: error instanceof Error ? error.message : String(error)
|
|
727
|
+
});
|
|
728
|
+
if (error?.name === "AbortError") return;
|
|
729
|
+
window.open(href, "_blank", "noopener");
|
|
730
|
+
}
|
|
731
|
+
})();
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
// src/components/StreamingMarkdown.tsx
|
|
735
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
736
|
+
var StreamingMarkdown = ({
|
|
737
|
+
content,
|
|
738
|
+
isStreaming = false,
|
|
739
|
+
sources
|
|
740
|
+
}) => {
|
|
741
|
+
const theme = useTheme();
|
|
742
|
+
const showCursor = isStreaming && content.trim().length > 0;
|
|
743
|
+
const showLoader = isStreaming && content.trim().length === 0;
|
|
744
|
+
const prevSanitizedRef = useRef("");
|
|
745
|
+
const containerRef = useRef(null);
|
|
746
|
+
const stableSourcesRef = useRef([]);
|
|
747
|
+
const effectiveSources = useMemo(() => {
|
|
748
|
+
if (Array.isArray(sources) && sources.length > 0) {
|
|
749
|
+
stableSourcesRef.current = sources;
|
|
750
|
+
return sources;
|
|
751
|
+
}
|
|
752
|
+
if (sources === void 0) {
|
|
753
|
+
return stableSourcesRef.current;
|
|
754
|
+
}
|
|
755
|
+
stableSourcesRef.current = [];
|
|
756
|
+
return [];
|
|
757
|
+
}, [sources]);
|
|
758
|
+
const normalizeTables = (markdown2) => {
|
|
759
|
+
const lines = markdown2.split("\n");
|
|
760
|
+
const output = [];
|
|
761
|
+
let inTable = false;
|
|
762
|
+
let tableRows = [];
|
|
763
|
+
const flushTable = () => {
|
|
764
|
+
if (tableRows.length === 0) return;
|
|
765
|
+
const maxCols = Math.max(...tableRows.map((r) => r.length));
|
|
766
|
+
const padded = tableRows.map((row) => [
|
|
767
|
+
...row,
|
|
768
|
+
...Array(maxCols - row.length).fill("")
|
|
769
|
+
]);
|
|
770
|
+
const header = padded[0];
|
|
771
|
+
const separator = Array(maxCols).fill("---");
|
|
772
|
+
output.push("| " + header.join(" | ") + " |");
|
|
773
|
+
output.push("| " + separator.join(" | ") + " |");
|
|
774
|
+
for (let i = 1; i < padded.length; i++) {
|
|
775
|
+
const row = padded[i];
|
|
776
|
+
if (row.every((cell) => /^-+$/.test(cell))) continue;
|
|
777
|
+
output.push("| " + row.join(" | ") + " |");
|
|
778
|
+
}
|
|
779
|
+
tableRows = [];
|
|
780
|
+
inTable = false;
|
|
781
|
+
};
|
|
782
|
+
for (const line of lines) {
|
|
783
|
+
if (/^\s*\|.*\|\s*$/.test(line)) {
|
|
784
|
+
inTable = true;
|
|
785
|
+
const cells = line.trim().slice(1, -1).split("|").map((c) => c.trim());
|
|
786
|
+
tableRows.push(cells);
|
|
787
|
+
} else {
|
|
788
|
+
if (inTable) flushTable();
|
|
789
|
+
output.push(line);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
if (inTable) flushTable();
|
|
793
|
+
return output.join("\n");
|
|
794
|
+
};
|
|
795
|
+
const sanitizeMarkdown = (raw) => {
|
|
796
|
+
let sanitized = raw.replace(/<[/]?start_of_turn>|<[/]?end[_]?of[_]?turn>/gi, "");
|
|
797
|
+
sanitized = sanitized.replace(
|
|
798
|
+
/<div class="MuiBox-root[^"]*"[^>]*>([\s\S]*?)<\/div>/g,
|
|
799
|
+
(_, inner) => inner.trim()
|
|
800
|
+
).replace(/<div[^>]*>\s*<\/div>/g, "");
|
|
801
|
+
sanitized = sanitized.replace(/\r?\n\s*:\s*/g, ": ");
|
|
802
|
+
sanitized = sanitized.replace(/\r?\n\s*,\s*/g, ", ");
|
|
803
|
+
sanitized = normalizeTables(sanitized);
|
|
804
|
+
return sanitized;
|
|
805
|
+
};
|
|
806
|
+
const sanitizedContent = sanitizeMarkdown(content);
|
|
807
|
+
const contentWithSources = useMemo(() => {
|
|
808
|
+
if (!effectiveSources.length || isStreaming) {
|
|
809
|
+
return sanitizedContent;
|
|
810
|
+
}
|
|
811
|
+
const existingSection = /\*\*Sources?\*\*/i.test(sanitizedContent);
|
|
812
|
+
if (existingSection) {
|
|
813
|
+
return sanitizedContent;
|
|
814
|
+
}
|
|
815
|
+
const listMarkdown = effectiveSources.map((doc, index) => `- ${index + 1}. ${doc.name}`).join("\n");
|
|
816
|
+
return `${sanitizedContent}
|
|
817
|
+
|
|
818
|
+
**Sources**
|
|
819
|
+
${listMarkdown}`;
|
|
820
|
+
}, [sanitizedContent, effectiveSources, isStreaming]);
|
|
821
|
+
const escapeHtml = (str) => str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\"/g, """).replace(/'/g, "'");
|
|
822
|
+
const isPlainAppend = (s) => {
|
|
823
|
+
return !/[`*_\[\]<>|#~]/.test(s);
|
|
824
|
+
};
|
|
825
|
+
let renderContent = contentWithSources;
|
|
826
|
+
if (isStreaming) {
|
|
827
|
+
const prev = prevSanitizedRef.current;
|
|
828
|
+
let i = 0;
|
|
829
|
+
const max = Math.min(prev.length, sanitizedContent.length);
|
|
830
|
+
while (i < max && prev.charCodeAt(i) === sanitizedContent.charCodeAt(i)) i++;
|
|
831
|
+
const base = sanitizedContent.slice(0, i);
|
|
832
|
+
const appended = sanitizedContent.slice(i);
|
|
833
|
+
if (appended && isPlainAppend(appended)) {
|
|
834
|
+
const parts = appended.split(/(\s+)/);
|
|
835
|
+
let delayMs = 0;
|
|
836
|
+
const step = 42;
|
|
837
|
+
const wrapped = parts.map((p) => {
|
|
838
|
+
if (/^\s+$/.test(p) || p === "") return p;
|
|
839
|
+
const safe = escapeHtml(p);
|
|
840
|
+
const out = `<span class="bl-fade-word" data-bl-delay="${delayMs}">${safe}</span>`;
|
|
841
|
+
delayMs += step;
|
|
842
|
+
return out;
|
|
843
|
+
}).join("");
|
|
844
|
+
renderContent = base + wrapped;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
useEffect(() => {
|
|
848
|
+
prevSanitizedRef.current = contentWithSources;
|
|
849
|
+
}, [contentWithSources]);
|
|
850
|
+
useEffect(() => {
|
|
851
|
+
if (!containerRef.current) return;
|
|
852
|
+
const nodes = containerRef.current.querySelectorAll(".bl-fade-word");
|
|
853
|
+
nodes.forEach((node) => {
|
|
854
|
+
const delay = node.getAttribute("data-bl-delay");
|
|
855
|
+
if (delay) {
|
|
856
|
+
node.style.setProperty("--bl-delay", `${delay}ms`);
|
|
857
|
+
node.style.animationDelay = `${delay}ms`;
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
}, [renderContent, sanitizedContent, isStreaming]);
|
|
861
|
+
const MarkRenderer = ({ children, ...props }) => {
|
|
862
|
+
const inlineBg = theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.06) : alpha(theme.palette.text.primary, 0.06);
|
|
863
|
+
const inlineBorder = `1px solid ${alpha(theme.palette.text.primary, 0.15)}`;
|
|
864
|
+
return /* @__PURE__ */ jsx2(
|
|
865
|
+
Box2,
|
|
866
|
+
{
|
|
867
|
+
component: "span",
|
|
868
|
+
sx: {
|
|
869
|
+
display: "inline-block",
|
|
870
|
+
backgroundColor: inlineBg,
|
|
871
|
+
border: inlineBorder,
|
|
872
|
+
color: "inherit",
|
|
873
|
+
padding: "0.15em 0.35em",
|
|
874
|
+
borderRadius: "4px",
|
|
875
|
+
fontWeight: 500,
|
|
876
|
+
fontSize: "0.92em",
|
|
877
|
+
lineHeight: 1.4,
|
|
878
|
+
whiteSpace: "normal",
|
|
879
|
+
width: "fit-content",
|
|
880
|
+
maxWidth: "100%",
|
|
881
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
|
|
882
|
+
},
|
|
883
|
+
...props,
|
|
884
|
+
children
|
|
885
|
+
}
|
|
886
|
+
);
|
|
887
|
+
};
|
|
888
|
+
const LinkRenderer = ({ href, children, ...props }) => /* @__PURE__ */ jsx2(
|
|
889
|
+
"a",
|
|
890
|
+
{
|
|
891
|
+
href,
|
|
892
|
+
target: "_blank",
|
|
893
|
+
rel: "noopener noreferrer",
|
|
894
|
+
onClick: (e) => maybeHandleFileLinkClick(e, href),
|
|
895
|
+
style: {
|
|
896
|
+
color: theme.palette.info?.main ?? theme.palette.primary.main,
|
|
897
|
+
textDecoration: "underline",
|
|
898
|
+
textUnderlineOffset: "2px"
|
|
899
|
+
},
|
|
900
|
+
...props,
|
|
901
|
+
children
|
|
902
|
+
}
|
|
903
|
+
);
|
|
904
|
+
const CodeRenderer = ({
|
|
905
|
+
node: _node,
|
|
906
|
+
className,
|
|
907
|
+
children,
|
|
908
|
+
...props
|
|
909
|
+
}) => {
|
|
910
|
+
const match = /language-([\w-]+)/.exec(className || "");
|
|
911
|
+
const requestedLanguage = match?.[1]?.toLowerCase() ?? "";
|
|
912
|
+
const codeText = String(children).replace(/\n$/, "");
|
|
913
|
+
const isProbablyBlock = codeText.includes("\n") || Boolean(requestedLanguage);
|
|
914
|
+
const [copied, setCopied] = useState(false);
|
|
915
|
+
const handleCopy = () => {
|
|
916
|
+
void navigator.clipboard.writeText(codeText);
|
|
917
|
+
setCopied(true);
|
|
918
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
919
|
+
};
|
|
920
|
+
const highlightTree = useMemo(
|
|
921
|
+
() => isProbablyBlock ? getHighlightTree(codeText, requestedLanguage) : null,
|
|
922
|
+
[isProbablyBlock, codeText, requestedLanguage]
|
|
923
|
+
);
|
|
924
|
+
const highlightedNodes = useMemo(
|
|
925
|
+
() => highlightTree ? renderLowlightChildren(
|
|
926
|
+
(highlightTree.children || []).filter(
|
|
927
|
+
(node) => node.type === "element" || node.type === "text"
|
|
928
|
+
),
|
|
929
|
+
`hl-${requestedLanguage || "auto"}`
|
|
930
|
+
) : [],
|
|
931
|
+
[highlightTree, requestedLanguage]
|
|
932
|
+
);
|
|
933
|
+
const dataLanguage = highlightTree && highlightTree.data && typeof highlightTree.data === "object" && "language" in highlightTree.data ? String(highlightTree.data.language ?? "") : "";
|
|
934
|
+
if (!highlightTree) {
|
|
935
|
+
const inlineBg = theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.06) : alpha(theme.palette.text.primary, 0.06);
|
|
936
|
+
const inlineBorder = `1px solid ${alpha(theme.palette.text.primary, 0.15)}`;
|
|
937
|
+
return /* @__PURE__ */ jsx2(
|
|
938
|
+
"code",
|
|
939
|
+
{
|
|
940
|
+
style: {
|
|
941
|
+
borderRadius: 4,
|
|
942
|
+
fontSize: "0.92em",
|
|
943
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
|
|
944
|
+
backgroundColor: inlineBg,
|
|
945
|
+
border: inlineBorder,
|
|
946
|
+
padding: "0.15em 0.35em"
|
|
947
|
+
},
|
|
948
|
+
...props,
|
|
949
|
+
children
|
|
950
|
+
}
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
const resolvedLanguage = (requestedLanguage || dataLanguage || "code").toString();
|
|
954
|
+
const languageLabel = resolvedLanguage.toUpperCase();
|
|
955
|
+
const languageClass = resolvedLanguage.toLowerCase();
|
|
956
|
+
const highlightColors = theme.palette.mode === "dark" ? {
|
|
957
|
+
background: "#0f172a",
|
|
958
|
+
text: "#e2e8f0",
|
|
959
|
+
keyword: "#c792ea",
|
|
960
|
+
string: "#7fdbca",
|
|
961
|
+
number: "#f78c6c",
|
|
962
|
+
comment: "#64748b",
|
|
963
|
+
function: "#82aaff",
|
|
964
|
+
variable: "#f07178"
|
|
965
|
+
} : {
|
|
966
|
+
background: "#f4f6ff",
|
|
967
|
+
text: "#1e293b",
|
|
968
|
+
keyword: "#7c3aed",
|
|
969
|
+
string: "#0f766e",
|
|
970
|
+
number: "#b45309",
|
|
971
|
+
comment: "#6b7280",
|
|
972
|
+
function: "#2563eb",
|
|
973
|
+
variable: "#d97706"
|
|
974
|
+
};
|
|
975
|
+
return /* @__PURE__ */ jsxs2(
|
|
976
|
+
Box2,
|
|
977
|
+
{
|
|
978
|
+
sx: {
|
|
979
|
+
borderRadius: "4px",
|
|
980
|
+
overflow: "auto",
|
|
981
|
+
my: "0.5rem",
|
|
982
|
+
px: 0,
|
|
983
|
+
py: 0,
|
|
984
|
+
mt: 1,
|
|
985
|
+
mb: 0.5,
|
|
986
|
+
fontSize: "0.9rem",
|
|
987
|
+
position: "relative",
|
|
988
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
|
|
989
|
+
width: "100%",
|
|
990
|
+
maxWidth: "100%"
|
|
991
|
+
},
|
|
992
|
+
children: [
|
|
993
|
+
/* @__PURE__ */ jsxs2(
|
|
994
|
+
Box2,
|
|
995
|
+
{
|
|
996
|
+
sx: {
|
|
997
|
+
px: 2,
|
|
998
|
+
py: 1,
|
|
999
|
+
bgcolor: theme.palette.mode === "dark" ? alpha(theme.palette.common.white, 0.04) : alpha(theme.palette.text.primary, 0.04),
|
|
1000
|
+
color: theme.palette.text.secondary,
|
|
1001
|
+
fontSize: "0.75rem",
|
|
1002
|
+
borderBottom: `1px solid ${alpha(theme.palette.text.primary, 0.1)}`,
|
|
1003
|
+
display: "flex",
|
|
1004
|
+
justifyContent: "space-between",
|
|
1005
|
+
alignItems: "center",
|
|
1006
|
+
fontFamily: "inherit"
|
|
1007
|
+
},
|
|
1008
|
+
children: [
|
|
1009
|
+
/* @__PURE__ */ jsx2("span", { children: languageLabel }),
|
|
1010
|
+
/* @__PURE__ */ jsx2(Tooltip, { title: copied ? "Copied!" : "Copy", arrow: true, children: /* @__PURE__ */ jsx2(
|
|
1011
|
+
IconButton,
|
|
1012
|
+
{
|
|
1013
|
+
size: "small",
|
|
1014
|
+
onClick: handleCopy,
|
|
1015
|
+
sx: {
|
|
1016
|
+
color: copied ? theme.palette.success.main : theme.palette.text.secondary,
|
|
1017
|
+
"&:hover": { color: theme.palette.text.primary },
|
|
1018
|
+
padding: "4px"
|
|
1019
|
+
},
|
|
1020
|
+
children: copied ? /* @__PURE__ */ jsx2(Check, { fontSize: "small" }) : /* @__PURE__ */ jsx2(Copy, { fontSize: "small" })
|
|
1021
|
+
}
|
|
1022
|
+
) })
|
|
1023
|
+
]
|
|
1024
|
+
}
|
|
1025
|
+
),
|
|
1026
|
+
/* @__PURE__ */ jsx2(
|
|
1027
|
+
Box2,
|
|
1028
|
+
{
|
|
1029
|
+
sx: {
|
|
1030
|
+
overflowX: "auto",
|
|
1031
|
+
maxWidth: "100%",
|
|
1032
|
+
"& .hljs": {
|
|
1033
|
+
display: "block",
|
|
1034
|
+
overflowX: "auto",
|
|
1035
|
+
padding: "16px",
|
|
1036
|
+
margin: 0,
|
|
1037
|
+
backgroundColor: highlightColors.background,
|
|
1038
|
+
color: highlightColors.text,
|
|
1039
|
+
fontSize: "0.9rem"
|
|
1040
|
+
},
|
|
1041
|
+
"& .hljs-comment, & .hljs-quote": {
|
|
1042
|
+
color: highlightColors.comment,
|
|
1043
|
+
fontStyle: "italic"
|
|
1044
|
+
},
|
|
1045
|
+
"& .hljs-keyword, & .hljs-selector-tag, & .hljs-literal, & .hljs-built_in": {
|
|
1046
|
+
color: highlightColors.keyword
|
|
1047
|
+
},
|
|
1048
|
+
"& .hljs-string, & .hljs-doctag, & .hljs-template-tag, & .hljs-attr": {
|
|
1049
|
+
color: highlightColors.string
|
|
1050
|
+
},
|
|
1051
|
+
"& .hljs-number, & .hljs-symbol, & .hljs-bullet, & .hljs-meta": {
|
|
1052
|
+
color: highlightColors.number
|
|
1053
|
+
},
|
|
1054
|
+
"& .hljs-title, & .hljs-section, & .hljs-selector-id, & .hljs-function": {
|
|
1055
|
+
color: highlightColors.function
|
|
1056
|
+
},
|
|
1057
|
+
"& .hljs-variable, & .hljs-params, & .hljs-property": {
|
|
1058
|
+
color: highlightColors.variable
|
|
1059
|
+
}
|
|
1060
|
+
},
|
|
1061
|
+
children: /* @__PURE__ */ jsx2("pre", { className: `hljs language-${languageClass}`, ...props, children: /* @__PURE__ */ jsx2("code", { className: "hljs", children: highlightedNodes }) })
|
|
1062
|
+
}
|
|
1063
|
+
)
|
|
1064
|
+
]
|
|
1065
|
+
}
|
|
1066
|
+
);
|
|
1067
|
+
};
|
|
1068
|
+
const EmRenderer = ({ children, ...props }) => {
|
|
1069
|
+
const onlyChild = Array.isArray(children) && children.length === 1 ? children[0] : null;
|
|
1070
|
+
if (onlyChild && React2.isValidElement(onlyChild) && typeof onlyChild.props?.className === "string" && onlyChild.props.className.includes("MuiBox-root")) {
|
|
1071
|
+
const inner = onlyChild.props.children;
|
|
1072
|
+
if (typeof inner === "string" && inner.trim().toUpperCase() === "CODE") {
|
|
1073
|
+
return null;
|
|
1074
|
+
}
|
|
1075
|
+
return /* @__PURE__ */ jsx2(
|
|
1076
|
+
Box2,
|
|
1077
|
+
{
|
|
1078
|
+
sx: {
|
|
1079
|
+
fontFamily: "monospace",
|
|
1080
|
+
fontSize: "0.9rem",
|
|
1081
|
+
backgroundColor: theme.palette.background.default,
|
|
1082
|
+
color: theme.palette.text.primary,
|
|
1083
|
+
padding: "12px 16px",
|
|
1084
|
+
borderRadius: "4px",
|
|
1085
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
1086
|
+
my: 1,
|
|
1087
|
+
display: "inline-block"
|
|
1088
|
+
},
|
|
1089
|
+
children: inner
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
return /* @__PURE__ */ jsx2("em", { ...props, children });
|
|
1094
|
+
};
|
|
1095
|
+
const TableRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx2(Box2, { sx: { overflowX: "auto", my: 1 }, children: /* @__PURE__ */ jsx2("table", { style: { borderCollapse: "collapse", width: "100%" }, ...props, children }) });
|
|
1096
|
+
const OrderedListRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx2("ol", { style: { paddingLeft: 24, marginLeft: 16, listStyleType: "decimal" }, ...props, children });
|
|
1097
|
+
const UnorderedListRenderer = ({
|
|
1098
|
+
children,
|
|
1099
|
+
...props
|
|
1100
|
+
}) => /* @__PURE__ */ jsx2(
|
|
1101
|
+
"ul",
|
|
1102
|
+
{
|
|
1103
|
+
style: {
|
|
1104
|
+
paddingLeft: "1.5rem",
|
|
1105
|
+
marginTop: "0.5rem",
|
|
1106
|
+
marginBottom: "0.25rem",
|
|
1107
|
+
listStyle: "disc"
|
|
1108
|
+
},
|
|
1109
|
+
...props,
|
|
1110
|
+
children
|
|
1111
|
+
}
|
|
1112
|
+
);
|
|
1113
|
+
const BlockQuoteRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx2(
|
|
1114
|
+
Box2,
|
|
1115
|
+
{
|
|
1116
|
+
component: "blockquote",
|
|
1117
|
+
sx: {
|
|
1118
|
+
borderLeft: `4px solid ${theme.palette.divider}`,
|
|
1119
|
+
pl: 2,
|
|
1120
|
+
ml: 0,
|
|
1121
|
+
color: theme.palette.text.secondary
|
|
1122
|
+
},
|
|
1123
|
+
...props,
|
|
1124
|
+
children
|
|
1125
|
+
}
|
|
1126
|
+
);
|
|
1127
|
+
const TableHeaderRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx2(
|
|
1128
|
+
"th",
|
|
1129
|
+
{
|
|
1130
|
+
style: {
|
|
1131
|
+
border: "1px solid #ddd",
|
|
1132
|
+
padding: "8px",
|
|
1133
|
+
backgroundColor: theme.palette.mode === "dark" ? "#333" : "#f2f2f2",
|
|
1134
|
+
textAlign: "left"
|
|
1135
|
+
},
|
|
1136
|
+
...props,
|
|
1137
|
+
children
|
|
1138
|
+
}
|
|
1139
|
+
);
|
|
1140
|
+
const TableCellRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx2(
|
|
1141
|
+
"td",
|
|
1142
|
+
{
|
|
1143
|
+
style: {
|
|
1144
|
+
border: "1px solid #ddd",
|
|
1145
|
+
padding: "8px"
|
|
1146
|
+
},
|
|
1147
|
+
...props,
|
|
1148
|
+
children
|
|
1149
|
+
}
|
|
1150
|
+
);
|
|
1151
|
+
const ParagraphRenderer = ({ children, ...props }) => /* @__PURE__ */ jsx2("p", { style: { marginTop: "0.5rem", marginBottom: "0.5rem" }, ...props, children });
|
|
1152
|
+
const components = {
|
|
1153
|
+
mark: MarkRenderer,
|
|
1154
|
+
code: CodeRenderer,
|
|
1155
|
+
a: LinkRenderer,
|
|
1156
|
+
img: MarkdownImage,
|
|
1157
|
+
em: EmRenderer,
|
|
1158
|
+
table: TableRenderer,
|
|
1159
|
+
ol: OrderedListRenderer,
|
|
1160
|
+
ul: UnorderedListRenderer,
|
|
1161
|
+
blockquote: BlockQuoteRenderer,
|
|
1162
|
+
th: TableHeaderRenderer,
|
|
1163
|
+
td: TableCellRenderer,
|
|
1164
|
+
p: ParagraphRenderer
|
|
1165
|
+
};
|
|
1166
|
+
return /* @__PURE__ */ jsx2(
|
|
1167
|
+
Box2,
|
|
1168
|
+
{
|
|
1169
|
+
ref: containerRef,
|
|
1170
|
+
sx: {
|
|
1171
|
+
// Settle the whole block to full color a beat after streaming ends.
|
|
1172
|
+
transition: "opacity 380ms ease-out, transform 220ms ease-out",
|
|
1173
|
+
"& .cursor": {
|
|
1174
|
+
display: showCursor ? "inline" : "none",
|
|
1175
|
+
animation: "blink 1s step-start infinite"
|
|
1176
|
+
},
|
|
1177
|
+
"@keyframes blink": {
|
|
1178
|
+
"50%": { opacity: 0 }
|
|
1179
|
+
},
|
|
1180
|
+
// Each newly-written word focuses in — blur→sharp, a tiny rise, and fade —
|
|
1181
|
+
// like ink settling onto the page as the typewriter writes.
|
|
1182
|
+
"& .bl-fade-word": {
|
|
1183
|
+
opacity: 0,
|
|
1184
|
+
animation: "bl-fade-in 480ms cubic-bezier(0.22, 1, 0.36, 1) forwards"
|
|
1185
|
+
},
|
|
1186
|
+
"@keyframes bl-fade-in": {
|
|
1187
|
+
from: { opacity: 0, filter: "blur(3px)", transform: "translateY(2px)" },
|
|
1188
|
+
to: { opacity: 1, filter: "blur(0)", transform: "translateY(0)" }
|
|
1189
|
+
},
|
|
1190
|
+
// Dimmed while streaming, then brightens to full color once the answer lands.
|
|
1191
|
+
opacity: isStreaming ? 0.86 : 1,
|
|
1192
|
+
transform: isStreaming ? "translateY(0.25px)" : "none",
|
|
1193
|
+
// Reduce layout jumpiness between updates
|
|
1194
|
+
"& p:last-child": { marginBottom: 0 },
|
|
1195
|
+
// Add min height when showing loader to prevent layout shift
|
|
1196
|
+
minHeight: showLoader ? "40px" : "auto"
|
|
1197
|
+
},
|
|
1198
|
+
children: showLoader ? (
|
|
1199
|
+
// Show loading indicator when streaming but no content yet
|
|
1200
|
+
/* @__PURE__ */ jsx2(Box2, { sx: { display: "flex", alignItems: "center", minHeight: "40px", pl: 2 }, children: /* @__PURE__ */ jsxs2("div", { className: "typing-only", children: [
|
|
1201
|
+
/* @__PURE__ */ jsx2("span", { className: "dot" }),
|
|
1202
|
+
/* @__PURE__ */ jsx2("span", { className: "dot" }),
|
|
1203
|
+
/* @__PURE__ */ jsx2("span", { className: "dot" })
|
|
1204
|
+
] }) })
|
|
1205
|
+
) : /* @__PURE__ */ jsx2(
|
|
1206
|
+
ReactMarkdown,
|
|
1207
|
+
{
|
|
1208
|
+
remarkPlugins: [remarkGfm],
|
|
1209
|
+
rehypePlugins: [rehypeRaw, [rehypeSanitize, markdownSanitizeSchema]],
|
|
1210
|
+
components,
|
|
1211
|
+
children: (renderContent || sanitizedContent) + (showCursor ? " \u258A" : "")
|
|
1212
|
+
}
|
|
1213
|
+
)
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
1216
|
+
};
|
|
1217
|
+
var arePropsEqual = (prev, next) => {
|
|
1218
|
+
if (prev.content !== next.content || prev.isStreaming !== next.isStreaming) {
|
|
1219
|
+
return false;
|
|
1220
|
+
}
|
|
1221
|
+
const a = prev.sources;
|
|
1222
|
+
const b = next.sources;
|
|
1223
|
+
if (a === b) return true;
|
|
1224
|
+
if (!a || !b || a.length !== b.length) return false;
|
|
1225
|
+
return a.every((s, i) => s.id === b[i].id && s.name === b[i].name);
|
|
1226
|
+
};
|
|
1227
|
+
var StreamingMarkdown_default = React2.memo(StreamingMarkdown, arePropsEqual);
|
|
1228
|
+
|
|
1229
|
+
export {
|
|
1230
|
+
getHighlightTree,
|
|
1231
|
+
markdownSanitizeSchema,
|
|
1232
|
+
MarkdownImage,
|
|
1233
|
+
renderLowlightChildren,
|
|
1234
|
+
AlertCircle,
|
|
1235
|
+
AlertTriangle,
|
|
1236
|
+
Archive,
|
|
1237
|
+
ArrowDown,
|
|
1238
|
+
ArrowUp,
|
|
1239
|
+
BookOpen,
|
|
1240
|
+
BookOpenText,
|
|
1241
|
+
Braces,
|
|
1242
|
+
BrushCleaning,
|
|
1243
|
+
Check,
|
|
1244
|
+
CheckCircle,
|
|
1245
|
+
ChevronDown,
|
|
1246
|
+
ChevronLeft,
|
|
1247
|
+
ChevronUp,
|
|
1248
|
+
Clock,
|
|
1249
|
+
Cloud,
|
|
1250
|
+
CloudCheck,
|
|
1251
|
+
CloudOff,
|
|
1252
|
+
CloudSync,
|
|
1253
|
+
Code,
|
|
1254
|
+
Copy,
|
|
1255
|
+
Database,
|
|
1256
|
+
Download,
|
|
1257
|
+
EarOff,
|
|
1258
|
+
Edit,
|
|
1259
|
+
EditSquare,
|
|
1260
|
+
FilePdf,
|
|
1261
|
+
FileText,
|
|
1262
|
+
FileUp,
|
|
1263
|
+
FolderOpen,
|
|
1264
|
+
Ghost,
|
|
1265
|
+
Globe,
|
|
1266
|
+
Grip,
|
|
1267
|
+
History,
|
|
1268
|
+
Home,
|
|
1269
|
+
Info,
|
|
1270
|
+
LayoutGrid,
|
|
1271
|
+
Link,
|
|
1272
|
+
List,
|
|
1273
|
+
Lock,
|
|
1274
|
+
Maximize,
|
|
1275
|
+
MemoryLayers,
|
|
1276
|
+
MessageSquare,
|
|
1277
|
+
Mic,
|
|
1278
|
+
Minimize,
|
|
1279
|
+
Minus,
|
|
1280
|
+
NotebookPen,
|
|
1281
|
+
Palette,
|
|
1282
|
+
PanelLeft,
|
|
1283
|
+
Pin,
|
|
1284
|
+
PinOff,
|
|
1285
|
+
Plus,
|
|
1286
|
+
RectangleHorizontal,
|
|
1287
|
+
RectangleVertical,
|
|
1288
|
+
Refresh,
|
|
1289
|
+
RotateCcw,
|
|
1290
|
+
RotateCw,
|
|
1291
|
+
Save,
|
|
1292
|
+
ScanFace,
|
|
1293
|
+
Search,
|
|
1294
|
+
Send,
|
|
1295
|
+
Settings,
|
|
1296
|
+
Sliders,
|
|
1297
|
+
Sparkles,
|
|
1298
|
+
Square,
|
|
1299
|
+
Trash,
|
|
1300
|
+
Type,
|
|
1301
|
+
Upload,
|
|
1302
|
+
User,
|
|
1303
|
+
UserCog,
|
|
1304
|
+
Users,
|
|
1305
|
+
Waveform,
|
|
1306
|
+
Wifi,
|
|
1307
|
+
WifiOff,
|
|
1308
|
+
Wrench,
|
|
1309
|
+
X,
|
|
1310
|
+
ZoomIn,
|
|
1311
|
+
ZoomOut,
|
|
1312
|
+
maybeHandleFileLinkClick,
|
|
1313
|
+
StreamingMarkdown_default
|
|
1314
|
+
};
|
|
1315
|
+
//# sourceMappingURL=chunk-PSI7RQ54.mjs.map
|