@kite-copilot/chat-panel 0.2.22 → 0.2.23
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/auto.cjs +4 -0
- package/dist/auto.js +1 -1
- package/dist/{chunk-SIPUO7GU.js → chunk-MIJSRC3X.js} +4 -0
- package/dist/embed.global.js +9 -7
- package/dist/index.cjs +4 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -942,6 +942,9 @@ function DataRenderer({ type, data }) {
|
|
|
942
942
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
943
943
|
var DEFAULT_AGENT_URL = "http://localhost:5002";
|
|
944
944
|
var PANEL_WIDTH = 340;
|
|
945
|
+
function unescapeJsonString(str) {
|
|
946
|
+
return str.replace(/\\\\n/g, "\n").replace(/\\\\t/g, " ").replace(/\\\\"/g, '"').replace(/\\\\\\\\/g, "\\").replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\"/g, '"').replace(/\\\\/g, "\\");
|
|
947
|
+
}
|
|
945
948
|
function renderMarkdown(text) {
|
|
946
949
|
if (!text) return null;
|
|
947
950
|
const lines = text.split("\n");
|
|
@@ -1579,6 +1582,7 @@ function ChatPanel({
|
|
|
1579
1582
|
} catch {
|
|
1580
1583
|
}
|
|
1581
1584
|
}
|
|
1585
|
+
textToStream = unescapeJsonString(textToStream);
|
|
1582
1586
|
const tokens = textToStream.split(" ");
|
|
1583
1587
|
let i = 0;
|
|
1584
1588
|
const intervalId = window.setInterval(() => {
|
package/dist/index.js
CHANGED