@gendive/chatllm 0.17.12 → 0.17.14
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/react/index.js +35 -4
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +35 -4
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -5364,7 +5364,7 @@ var ChatInput = ({
|
|
|
5364
5364
|
color: "#94a3b8",
|
|
5365
5365
|
lineHeight: 1.4
|
|
5366
5366
|
},
|
|
5367
|
-
children: "AI\uC778 \uC800\uB3C4 \uC2E4\uC218\uB97C \uD560 \uC218 \uC788\uC5B4\uC694
|
|
5367
|
+
children: "AI\uC778 \uC800\uB3C4 \uC2E4\uC218\uB97C \uD560 \uC218 \uC788\uC5B4\uC694 \u{1F979}"
|
|
5368
5368
|
}
|
|
5369
5369
|
)
|
|
5370
5370
|
]
|
|
@@ -7038,6 +7038,37 @@ var DeepResearchProgressUI = ({ progress }) => {
|
|
|
7038
7038
|
// src/react/components/PollCard.tsx
|
|
7039
7039
|
import { useState as useState11, useCallback as useCallback6, useEffect as useEffect7 } from "react";
|
|
7040
7040
|
import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
7041
|
+
var renderInlineMarkdown = (text) => {
|
|
7042
|
+
const parts = [];
|
|
7043
|
+
let remaining = text;
|
|
7044
|
+
let key = 0;
|
|
7045
|
+
while (remaining.length > 0) {
|
|
7046
|
+
const match = remaining.match(
|
|
7047
|
+
/(\*\*(.+?)\*\*|__(.+?)__|`(.+?)`|~~(.+?)~~|\*(.+?)\*|_(.+?)_)/
|
|
7048
|
+
);
|
|
7049
|
+
if (!match || match.index === void 0) {
|
|
7050
|
+
parts.push(remaining);
|
|
7051
|
+
break;
|
|
7052
|
+
}
|
|
7053
|
+
if (match.index > 0) {
|
|
7054
|
+
parts.push(remaining.slice(0, match.index));
|
|
7055
|
+
}
|
|
7056
|
+
const fullMatch = match[0];
|
|
7057
|
+
if (match[2] || match[3]) {
|
|
7058
|
+
parts.push(/* @__PURE__ */ jsx9("strong", { children: match[2] || match[3] }, key++));
|
|
7059
|
+
} else if (match[4]) {
|
|
7060
|
+
parts.push(
|
|
7061
|
+
/* @__PURE__ */ jsx9("code", { style: { backgroundColor: "var(--chatllm-bg-tertiary, #f1f5f9)", padding: "1px 4px", borderRadius: "3px", fontSize: "0.9em" }, children: match[4] }, key++)
|
|
7062
|
+
);
|
|
7063
|
+
} else if (match[5]) {
|
|
7064
|
+
parts.push(/* @__PURE__ */ jsx9("s", { children: match[5] }, key++));
|
|
7065
|
+
} else if (match[6] || match[7]) {
|
|
7066
|
+
parts.push(/* @__PURE__ */ jsx9("em", { children: match[6] || match[7] }, key++));
|
|
7067
|
+
}
|
|
7068
|
+
remaining = remaining.slice(match.index + fullMatch.length);
|
|
7069
|
+
}
|
|
7070
|
+
return parts.length === 1 && typeof parts[0] === "string" ? parts[0] : /* @__PURE__ */ jsx9(Fragment5, { children: parts });
|
|
7071
|
+
};
|
|
7041
7072
|
var stripMarkdown = (text) => text.replace(/\*\*(.+?)\*\*/g, "$1").replace(/__(.+?)__/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/_(.+?)_/g, "$1").replace(/`(.+?)`/g, "$1").replace(/~~(.+?)~~/g, "$1");
|
|
7042
7073
|
var PollCard = ({
|
|
7043
7074
|
questions,
|
|
@@ -7196,7 +7227,7 @@ var PollCard = ({
|
|
|
7196
7227
|
fontWeight: 600,
|
|
7197
7228
|
color: "var(--chatllm-text, #1e293b)"
|
|
7198
7229
|
},
|
|
7199
|
-
children:
|
|
7230
|
+
children: renderInlineMarkdown(currentQuestion.question)
|
|
7200
7231
|
}
|
|
7201
7232
|
),
|
|
7202
7233
|
currentQuestion.multiSelect && /* @__PURE__ */ jsx9(
|
|
@@ -7264,7 +7295,7 @@ var PollCard = ({
|
|
|
7264
7295
|
color: "var(--chatllm-text, #1e293b)",
|
|
7265
7296
|
lineHeight: "1.4"
|
|
7266
7297
|
},
|
|
7267
|
-
children:
|
|
7298
|
+
children: renderInlineMarkdown(option.label)
|
|
7268
7299
|
}
|
|
7269
7300
|
),
|
|
7270
7301
|
option.description && /* @__PURE__ */ jsx9(
|
|
@@ -7276,7 +7307,7 @@ var PollCard = ({
|
|
|
7276
7307
|
marginTop: "2px",
|
|
7277
7308
|
lineHeight: "1.3"
|
|
7278
7309
|
},
|
|
7279
|
-
children:
|
|
7310
|
+
children: renderInlineMarkdown(option.description)
|
|
7280
7311
|
}
|
|
7281
7312
|
)
|
|
7282
7313
|
] })
|