@gendive/chatllm 0.13.0 → 0.13.1
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
CHANGED
|
@@ -1190,6 +1190,7 @@ var parsePollFromContent = (content) => {
|
|
|
1190
1190
|
return { pollBlock: null, cleanContent: content };
|
|
1191
1191
|
}
|
|
1192
1192
|
console.log("[pollParser] Total polls parsed:", polls.length, polls.map((p) => p.question));
|
|
1193
|
+
cleanContent = cleanContent.replace(/\n{3,}/g, "\n\n");
|
|
1193
1194
|
return {
|
|
1194
1195
|
pollBlock: {
|
|
1195
1196
|
id: generateId(),
|
|
@@ -5658,6 +5659,7 @@ var DeepResearchProgressUI = ({ progress }) => {
|
|
|
5658
5659
|
// src/react/components/PollCard.tsx
|
|
5659
5660
|
var import_react11 = require("react");
|
|
5660
5661
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
5662
|
+
var stripMarkdown = (text) => text.replace(/\*\*(.+?)\*\*/g, "$1").replace(/__(.+?)__/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/_(.+?)_/g, "$1").replace(/`(.+?)`/g, "$1").replace(/~~(.+?)~~/g, "$1");
|
|
5661
5663
|
var PollCard = ({
|
|
5662
5664
|
questions,
|
|
5663
5665
|
onSubmit,
|
|
@@ -5787,7 +5789,10 @@ var PollCard = ({
|
|
|
5787
5789
|
},
|
|
5788
5790
|
children: [
|
|
5789
5791
|
hasSelection && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconSvg, { name: "check-line", size: 14, color: "var(--chatllm-success, #22c55e)" }),
|
|
5790
|
-
|
|
5792
|
+
(() => {
|
|
5793
|
+
const t = stripMarkdown(q.question);
|
|
5794
|
+
return t.length > 15 ? t.substring(0, 15) + "..." : t;
|
|
5795
|
+
})()
|
|
5791
5796
|
]
|
|
5792
5797
|
},
|
|
5793
5798
|
q.id
|
|
@@ -5811,7 +5816,7 @@ var PollCard = ({
|
|
|
5811
5816
|
fontWeight: 600,
|
|
5812
5817
|
color: "var(--chatllm-text, #1e293b)"
|
|
5813
5818
|
},
|
|
5814
|
-
children: currentQuestion.question
|
|
5819
|
+
children: stripMarkdown(currentQuestion.question)
|
|
5815
5820
|
}
|
|
5816
5821
|
),
|
|
5817
5822
|
currentQuestion.multiSelect && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -5879,7 +5884,7 @@ var PollCard = ({
|
|
|
5879
5884
|
color: "var(--chatllm-text, #1e293b)",
|
|
5880
5885
|
lineHeight: "1.4"
|
|
5881
5886
|
},
|
|
5882
|
-
children: option.label
|
|
5887
|
+
children: stripMarkdown(option.label)
|
|
5883
5888
|
}
|
|
5884
5889
|
),
|
|
5885
5890
|
option.description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -5891,7 +5896,7 @@ var PollCard = ({
|
|
|
5891
5896
|
marginTop: "2px",
|
|
5892
5897
|
lineHeight: "1.3"
|
|
5893
5898
|
},
|
|
5894
|
-
children: option.description
|
|
5899
|
+
children: stripMarkdown(option.description)
|
|
5895
5900
|
}
|
|
5896
5901
|
)
|
|
5897
5902
|
] })
|