@kite-copilot/chat-panel 0.2.19 → 0.2.20
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 +39 -2
- package/dist/auto.js +1 -1
- package/dist/{chunk-5SGUG45C.js → chunk-INXKWC6D.js} +39 -2
- package/dist/embed.global.js +9 -9
- package/dist/index.cjs +39 -2
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/auto.cjs
CHANGED
|
@@ -935,7 +935,7 @@ function renderMarkdown(text) {
|
|
|
935
935
|
"a",
|
|
936
936
|
{
|
|
937
937
|
href: linkMatch[2],
|
|
938
|
-
className: "
|
|
938
|
+
className: "kite-link",
|
|
939
939
|
target: "_blank",
|
|
940
940
|
rel: "noopener noreferrer",
|
|
941
941
|
children: linkMatch[1]
|
|
@@ -946,7 +946,44 @@ function renderMarkdown(text) {
|
|
|
946
946
|
remaining = remaining.slice(linkMatch[0].length);
|
|
947
947
|
continue;
|
|
948
948
|
}
|
|
949
|
-
const
|
|
949
|
+
const urlMatch = remaining.match(/^(https?:\/\/[^\s<>]+|www\.[^\s<>]+)/);
|
|
950
|
+
if (urlMatch) {
|
|
951
|
+
const url = urlMatch[1];
|
|
952
|
+
const href = url.startsWith("www.") ? `https://${url}` : url;
|
|
953
|
+
parts.push(
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
955
|
+
"a",
|
|
956
|
+
{
|
|
957
|
+
href,
|
|
958
|
+
className: "kite-link",
|
|
959
|
+
target: "_blank",
|
|
960
|
+
rel: "noopener noreferrer",
|
|
961
|
+
children: url
|
|
962
|
+
},
|
|
963
|
+
keyIndex++
|
|
964
|
+
)
|
|
965
|
+
);
|
|
966
|
+
remaining = remaining.slice(url.length);
|
|
967
|
+
continue;
|
|
968
|
+
}
|
|
969
|
+
const emailMatch = remaining.match(/^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/);
|
|
970
|
+
if (emailMatch) {
|
|
971
|
+
const email = emailMatch[1];
|
|
972
|
+
parts.push(
|
|
973
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
974
|
+
"a",
|
|
975
|
+
{
|
|
976
|
+
href: `mailto:${email}`,
|
|
977
|
+
className: "kite-link",
|
|
978
|
+
children: email
|
|
979
|
+
},
|
|
980
|
+
keyIndex++
|
|
981
|
+
)
|
|
982
|
+
);
|
|
983
|
+
remaining = remaining.slice(email.length);
|
|
984
|
+
continue;
|
|
985
|
+
}
|
|
986
|
+
const nextSpecial = remaining.search(/[`*\[@h]/);
|
|
950
987
|
if (nextSpecial === -1) {
|
|
951
988
|
parts.push(remaining);
|
|
952
989
|
break;
|
package/dist/auto.js
CHANGED
|
@@ -934,7 +934,7 @@ function renderMarkdown(text) {
|
|
|
934
934
|
"a",
|
|
935
935
|
{
|
|
936
936
|
href: linkMatch[2],
|
|
937
|
-
className: "
|
|
937
|
+
className: "kite-link",
|
|
938
938
|
target: "_blank",
|
|
939
939
|
rel: "noopener noreferrer",
|
|
940
940
|
children: linkMatch[1]
|
|
@@ -945,7 +945,44 @@ function renderMarkdown(text) {
|
|
|
945
945
|
remaining = remaining.slice(linkMatch[0].length);
|
|
946
946
|
continue;
|
|
947
947
|
}
|
|
948
|
-
const
|
|
948
|
+
const urlMatch = remaining.match(/^(https?:\/\/[^\s<>]+|www\.[^\s<>]+)/);
|
|
949
|
+
if (urlMatch) {
|
|
950
|
+
const url = urlMatch[1];
|
|
951
|
+
const href = url.startsWith("www.") ? `https://${url}` : url;
|
|
952
|
+
parts.push(
|
|
953
|
+
/* @__PURE__ */ jsx9(
|
|
954
|
+
"a",
|
|
955
|
+
{
|
|
956
|
+
href,
|
|
957
|
+
className: "kite-link",
|
|
958
|
+
target: "_blank",
|
|
959
|
+
rel: "noopener noreferrer",
|
|
960
|
+
children: url
|
|
961
|
+
},
|
|
962
|
+
keyIndex++
|
|
963
|
+
)
|
|
964
|
+
);
|
|
965
|
+
remaining = remaining.slice(url.length);
|
|
966
|
+
continue;
|
|
967
|
+
}
|
|
968
|
+
const emailMatch = remaining.match(/^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/);
|
|
969
|
+
if (emailMatch) {
|
|
970
|
+
const email = emailMatch[1];
|
|
971
|
+
parts.push(
|
|
972
|
+
/* @__PURE__ */ jsx9(
|
|
973
|
+
"a",
|
|
974
|
+
{
|
|
975
|
+
href: `mailto:${email}`,
|
|
976
|
+
className: "kite-link",
|
|
977
|
+
children: email
|
|
978
|
+
},
|
|
979
|
+
keyIndex++
|
|
980
|
+
)
|
|
981
|
+
);
|
|
982
|
+
remaining = remaining.slice(email.length);
|
|
983
|
+
continue;
|
|
984
|
+
}
|
|
985
|
+
const nextSpecial = remaining.search(/[`*\[@h]/);
|
|
949
986
|
if (nextSpecial === -1) {
|
|
950
987
|
parts.push(remaining);
|
|
951
988
|
break;
|