@copilotkit/react-ui 1.54.1-next.6 → 1.55.0-next.7
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/CHANGELOG.md +14 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/components/chat/Markdown.tsx +6 -2
- package/src/components/chat/PoweredByTag.tsx +3 -1
- package/tsconfig.json +3 -3
- package/tsdown.config.ts +2 -2
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
|
-
"version": "1.
|
|
13
|
+
"version": "1.55.0-next.7",
|
|
14
14
|
"sideEffects": [
|
|
15
15
|
"**/*.css"
|
|
16
16
|
],
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"rehype-raw": "^7.0.0",
|
|
54
54
|
"remark-gfm": "^4.0.1",
|
|
55
55
|
"remark-math": "^6.0.0",
|
|
56
|
-
"@copilotkit/react-core": "1.
|
|
57
|
-
"@copilotkit/runtime-client-gql": "1.
|
|
58
|
-
"@copilotkit/shared": "1.
|
|
56
|
+
"@copilotkit/react-core": "1.55.0-next.7",
|
|
57
|
+
"@copilotkit/runtime-client-gql": "1.55.0-next.7",
|
|
58
|
+
"@copilotkit/shared": "1.55.0-next.7"
|
|
59
59
|
},
|
|
60
60
|
"keywords": [
|
|
61
61
|
"copilotkit",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, memo } from "react";
|
|
1
|
+
import { FC, memo, useMemo } from "react";
|
|
2
2
|
import ReactMarkdown, { Options, Components } from "react-markdown";
|
|
3
3
|
import { CodeBlock } from "./CodeBlock";
|
|
4
4
|
import remarkGfm from "remark-gfm";
|
|
@@ -136,10 +136,14 @@ type MarkdownProps = {
|
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
export const Markdown = ({ content, components }: MarkdownProps) => {
|
|
139
|
+
const mergedComponents = useMemo(
|
|
140
|
+
() => ({ ...defaultComponents, ...components }),
|
|
141
|
+
[components],
|
|
142
|
+
);
|
|
139
143
|
return (
|
|
140
144
|
<div className="copilotKitMarkdown">
|
|
141
145
|
<MemoizedReactMarkdown
|
|
142
|
-
components={
|
|
146
|
+
components={mergedComponents}
|
|
143
147
|
remarkPlugins={[
|
|
144
148
|
remarkGfm,
|
|
145
149
|
[remarkMath, { singleDollarTextMath: false }],
|
|
@@ -3,8 +3,10 @@ import { useDarkMode } from "../../hooks/use-dark-mode";
|
|
|
3
3
|
|
|
4
4
|
export function PoweredByTag({
|
|
5
5
|
showPoweredBy = true,
|
|
6
|
+
removeBranding = false,
|
|
6
7
|
}: {
|
|
7
8
|
showPoweredBy?: boolean;
|
|
9
|
+
removeBranding?: boolean;
|
|
8
10
|
}) {
|
|
9
11
|
const [mounted, setMounted] = useState(false);
|
|
10
12
|
const isDark = useDarkMode();
|
|
@@ -21,7 +23,7 @@ export function PoweredByTag({
|
|
|
21
23
|
setMounted(true);
|
|
22
24
|
}, []);
|
|
23
25
|
|
|
24
|
-
if (!showPoweredBy) {
|
|
26
|
+
if (!showPoweredBy || removeBranding) {
|
|
25
27
|
return null;
|
|
26
28
|
}
|
|
27
29
|
|
package/tsconfig.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"dist",
|
|
6
6
|
"build",
|
|
7
7
|
"node_modules",
|
|
8
|
-
"**/*.test.ts",
|
|
9
|
-
"**/*.test.tsx",
|
|
10
|
-
"**/__tests__/*"
|
|
8
|
+
"**/*.test.ts",
|
|
9
|
+
"**/*.test.tsx",
|
|
10
|
+
"**/__tests__/*"
|
|
11
11
|
]
|
|
12
12
|
}
|
package/tsdown.config.ts
CHANGED