@mxmweb/aichat 1.3.0 → 1.3.2
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/index.js +78 -76
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -43101,7 +43101,7 @@ function O2({
|
|
|
43101
43101
|
disabledText: "#808080",
|
|
43102
43102
|
shadow: "#000000",
|
|
43103
43103
|
appBackground: "transparent"
|
|
43104
|
-
}, h = n.map((v, d) => /* @__PURE__ */ k.jsxs("div", { className: "relative flex flex-col gap-2.5 items-center justify-center", children: [
|
|
43104
|
+
}, h = n.map((v, d) => (console.log(v, "fffffffff"), /* @__PURE__ */ k.jsxs("div", { className: "relative flex flex-col gap-2.5 items-center justify-center", children: [
|
|
43105
43105
|
/* @__PURE__ */ k.jsx("div", { className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ k.jsx(
|
|
43106
43106
|
Sh,
|
|
43107
43107
|
{
|
|
@@ -43134,7 +43134,7 @@ function O2({
|
|
|
43134
43134
|
kh,
|
|
43135
43135
|
{
|
|
43136
43136
|
file_type: Th(v.file.name || v.name),
|
|
43137
|
-
file_name: v.file.name,
|
|
43137
|
+
file_name: v.name || v.file.name,
|
|
43138
43138
|
url: v.url,
|
|
43139
43139
|
retrieve_tags: [],
|
|
43140
43140
|
styles: i,
|
|
@@ -43143,7 +43143,7 @@ function O2({
|
|
|
43143
43143
|
parse_url: v.convertedFilePath
|
|
43144
43144
|
}
|
|
43145
43145
|
)
|
|
43146
|
-
] }, v.file.name + d)), p = r.map((v, d) => {
|
|
43146
|
+
] }, v.file.name + d))), p = r.map((v, d) => {
|
|
43147
43147
|
const b = v.file.name.split(".").pop() || "", y = El(b, i);
|
|
43148
43148
|
return /* @__PURE__ */ k.jsx(
|
|
43149
43149
|
$2,
|
|
@@ -45203,7 +45203,26 @@ function F2({
|
|
|
45203
45203
|
display: "flex",
|
|
45204
45204
|
flexDirection: "column"
|
|
45205
45205
|
}, children: [
|
|
45206
|
-
/* @__PURE__ */ k.
|
|
45206
|
+
d && /* @__PURE__ */ k.jsx(
|
|
45207
|
+
"div",
|
|
45208
|
+
{
|
|
45209
|
+
style: {
|
|
45210
|
+
position: "absolute",
|
|
45211
|
+
inset: 0,
|
|
45212
|
+
background: H.colors.primary + "14",
|
|
45213
|
+
border: `4px dashed ${H.colors.primary}`,
|
|
45214
|
+
display: "flex",
|
|
45215
|
+
alignItems: "center",
|
|
45216
|
+
justifyContent: "center",
|
|
45217
|
+
zIndex: 50,
|
|
45218
|
+
pointerEvents: "none",
|
|
45219
|
+
userSelect: "none",
|
|
45220
|
+
borderRadius: W
|
|
45221
|
+
},
|
|
45222
|
+
children: /* @__PURE__ */ k.jsx("div", { style: { color: H.colors.primary, fontSize: Gm.lg, fontWeight: 700 }, children: "\u677E\u5F00\u6587\u4EF6\u4EE5\u4E0A\u4F20" })
|
|
45223
|
+
}
|
|
45224
|
+
),
|
|
45225
|
+
/* @__PURE__ */ k.jsx(
|
|
45207
45226
|
"div",
|
|
45208
45227
|
{
|
|
45209
45228
|
style: {
|
|
@@ -45217,73 +45236,52 @@ function F2({
|
|
|
45217
45236
|
onDrop: F,
|
|
45218
45237
|
onDragOver: A,
|
|
45219
45238
|
onDragLeave: B,
|
|
45220
|
-
children:
|
|
45221
|
-
|
|
45222
|
-
|
|
45223
|
-
{
|
|
45224
|
-
|
|
45225
|
-
|
|
45226
|
-
|
|
45227
|
-
|
|
45228
|
-
|
|
45229
|
-
|
|
45230
|
-
|
|
45231
|
-
|
|
45232
|
-
|
|
45233
|
-
|
|
45234
|
-
|
|
45235
|
-
|
|
45236
|
-
|
|
45237
|
-
|
|
45238
|
-
|
|
45239
|
-
|
|
45240
|
-
|
|
45241
|
-
|
|
45242
|
-
|
|
45243
|
-
|
|
45244
|
-
|
|
45245
|
-
|
|
45246
|
-
|
|
45247
|
-
|
|
45248
|
-
|
|
45249
|
-
|
|
45250
|
-
|
|
45251
|
-
|
|
45252
|
-
|
|
45253
|
-
|
|
45254
|
-
|
|
45255
|
-
|
|
45256
|
-
|
|
45257
|
-
|
|
45258
|
-
|
|
45259
|
-
|
|
45260
|
-
|
|
45261
|
-
|
|
45262
|
-
|
|
45263
|
-
|
|
45264
|
-
|
|
45265
|
-
|
|
45266
|
-
flexDirection: "column",
|
|
45267
|
-
alignItems: "center"
|
|
45268
|
-
},
|
|
45269
|
-
children: [
|
|
45270
|
-
/* @__PURE__ */ k.jsx("div", { style: { flexGrow: 1, flexShrink: 1, flex: 1 } }),
|
|
45271
|
-
/* @__PURE__ */ k.jsx("div", { style: { width: "100%", maxWidth: 1200 }, children: /* @__PURE__ */ k.jsx(
|
|
45272
|
-
iW,
|
|
45273
|
-
{
|
|
45274
|
-
status: r.display,
|
|
45275
|
-
messages: D,
|
|
45276
|
-
eventsEmit: n,
|
|
45277
|
-
renderAiChatBox: a == null ? void 0 : a.AiChatBox,
|
|
45278
|
-
renderUserChatBox: a == null ? void 0 : a.UserChatBox
|
|
45279
|
-
}
|
|
45280
|
-
) })
|
|
45281
|
-
]
|
|
45282
|
-
}
|
|
45283
|
-
)
|
|
45284
|
-
}
|
|
45285
|
-
)
|
|
45286
|
-
]
|
|
45239
|
+
children: /* @__PURE__ */ k.jsx(
|
|
45240
|
+
"div",
|
|
45241
|
+
{
|
|
45242
|
+
style: {
|
|
45243
|
+
width: "100%",
|
|
45244
|
+
minWidth: 520,
|
|
45245
|
+
margin: "0 auto",
|
|
45246
|
+
flex: 1,
|
|
45247
|
+
display: "flex",
|
|
45248
|
+
flexDirection: "column",
|
|
45249
|
+
height: "100%",
|
|
45250
|
+
overflow: "hidden"
|
|
45251
|
+
},
|
|
45252
|
+
children: e.isNew ? a != null && a.WelcomeComponent ? /* @__PURE__ */ k.jsx(a.WelcomeComponent, {}) : /* @__PURE__ */ k.jsx(bW, {}) : r.display === "loading" ? a != null && a.DisplayLoading ? /* @__PURE__ */ k.jsx(a.DisplayLoading, {}) : /* @__PURE__ */ k.jsx(vW, {}) : r.display === "error" ? a != null && a.DisplayError ? /* @__PURE__ */ k.jsx(a.DisplayError, {}) : /* @__PURE__ */ k.jsx(hW, {}) : /* @__PURE__ */ k.jsxs(
|
|
45253
|
+
"div",
|
|
45254
|
+
{
|
|
45255
|
+
ref: f,
|
|
45256
|
+
className: "relative px-8",
|
|
45257
|
+
style: {
|
|
45258
|
+
direction: "rtl",
|
|
45259
|
+
transform: "rotate(180deg)",
|
|
45260
|
+
flex: 1,
|
|
45261
|
+
overflowY: "scroll",
|
|
45262
|
+
paddingTop: 230,
|
|
45263
|
+
paddingBottom: 20,
|
|
45264
|
+
display: "flex",
|
|
45265
|
+
flexDirection: "column",
|
|
45266
|
+
alignItems: "center"
|
|
45267
|
+
},
|
|
45268
|
+
children: [
|
|
45269
|
+
/* @__PURE__ */ k.jsx("div", { style: { flexGrow: 1, flexShrink: 1, flex: 1 } }),
|
|
45270
|
+
/* @__PURE__ */ k.jsx("div", { style: { width: "100%", maxWidth: 1200 }, children: /* @__PURE__ */ k.jsx(
|
|
45271
|
+
iW,
|
|
45272
|
+
{
|
|
45273
|
+
status: r.display,
|
|
45274
|
+
messages: D,
|
|
45275
|
+
eventsEmit: n,
|
|
45276
|
+
renderAiChatBox: a == null ? void 0 : a.AiChatBox,
|
|
45277
|
+
renderUserChatBox: a == null ? void 0 : a.UserChatBox
|
|
45278
|
+
}
|
|
45279
|
+
) })
|
|
45280
|
+
]
|
|
45281
|
+
}
|
|
45282
|
+
)
|
|
45283
|
+
}
|
|
45284
|
+
)
|
|
45287
45285
|
}
|
|
45288
45286
|
),
|
|
45289
45287
|
/* @__PURE__ */ k.jsx(
|
|
@@ -59563,18 +59561,22 @@ function KQ(e = F2) {
|
|
|
59563
59561
|
}, [f]);
|
|
59564
59562
|
function be(ce, se) {
|
|
59565
59563
|
const ye = /* @__PURE__ */ new Map();
|
|
59566
|
-
return ce.forEach((xe) => ye.set(xe.uid, we(xe))), se.forEach((xe) => ye.set(xe.uid, we(xe))), Array.from(ye.values());
|
|
59564
|
+
return ce.forEach((xe) => ye.set(xe.uid, we(xe))), se.forEach((xe) => ye.set(xe.uid, we(xe))), console.log(Array.from(ye.values()), "``````````````````9929312830918309812903819023890128390"), Array.from(ye.values());
|
|
59567
59565
|
}
|
|
59568
59566
|
function we(ce) {
|
|
59569
|
-
|
|
59567
|
+
if (!ce || ce.file && ce.file.name) return ce;
|
|
59568
|
+
const se = ce.name || ce.fileName || "";
|
|
59569
|
+
return {
|
|
59570
59570
|
...ce,
|
|
59571
59571
|
url: ce.filePath || "",
|
|
59572
59572
|
uid: ce.uid || "",
|
|
59573
59573
|
file: {
|
|
59574
|
-
name:
|
|
59574
|
+
name: se,
|
|
59575
59575
|
size: typeof ce.size == "string" && ce.size.endsWith("MB") ? Number(ce.size.replace("MB", "")) * 1024 * 1024 : ce.size || 0,
|
|
59576
59576
|
type: ce.type || ""
|
|
59577
|
-
}
|
|
59577
|
+
},
|
|
59578
|
+
name: se
|
|
59579
|
+
// 兜底 name 字段,供 UI 使用
|
|
59578
59580
|
};
|
|
59579
59581
|
}
|
|
59580
59582
|
Ct(() => {
|
|
@@ -60211,7 +60213,7 @@ function KQ(e = F2) {
|
|
|
60211
60213
|
selectedId: B,
|
|
60212
60214
|
onSelectAssistant: R
|
|
60213
60215
|
}
|
|
60214
|
-
), [
|
|
60216
|
+
), [B]), Ge = {
|
|
60215
60217
|
...ae.useMemo(() => ({
|
|
60216
60218
|
AiChatBox: (ce, se) => {
|
|
60217
60219
|
var Ne, Re;
|