@rolder/kit 3.0.0-alpha.26 → 3.0.0-alpha.27
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/ai/ui/chat/File.js
CHANGED
|
@@ -6,7 +6,7 @@ const Message = ({ messageId })=>{
|
|
|
6
6
|
const message = useChatMessage(messageId);
|
|
7
7
|
const part = useChatMessagePart(messageId, 'text');
|
|
8
8
|
const isStreaming = useIsStreaming();
|
|
9
|
-
return /*#__PURE__*/ jsx(Paper, {
|
|
9
|
+
return part ? /*#__PURE__*/ jsx(Paper, {
|
|
10
10
|
radius: "md",
|
|
11
11
|
px: "md",
|
|
12
12
|
py: "sm",
|
|
@@ -18,6 +18,6 @@ const Message = ({ messageId })=>{
|
|
|
18
18
|
isAnimating: isStreaming && 'assistant' === message.role,
|
|
19
19
|
children: part?.text
|
|
20
20
|
})
|
|
21
|
-
});
|
|
21
|
+
}) : null;
|
|
22
22
|
};
|
|
23
23
|
export { Message };
|
|
@@ -3,7 +3,7 @@ export declare const Chat: {
|
|
|
3
3
|
Messages: ({ children, ...props }: import("@mantine/core").StackProps) => import("react/jsx-runtime").JSX.Element[];
|
|
4
4
|
Message: ({ messageId }: {
|
|
5
5
|
messageId: string;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
File: ({ messageId }: {
|
|
8
8
|
messageId: string;
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -7,7 +7,7 @@ export declare const getChatMessages: <T extends UIMessage>() => T[];
|
|
|
7
7
|
export declare const setChatMessages: <T extends UIMessage>(messages: T[]) => void;
|
|
8
8
|
export declare const useChatMessageIds: <T extends UIMessage>(props?: UseChatOptions<T> & ChatInit<T>) => string[];
|
|
9
9
|
export declare const useChatMessage: <T extends UIMessage>(messageId: string) => T;
|
|
10
|
-
export declare const useChatMessagePart: <M extends UIMessage, T extends UIMessagePart<UIDataTypes, UITools>>(messageId: string, type?: T["type"]) => T;
|
|
10
|
+
export declare const useChatMessagePart: <M extends UIMessage, T extends UIMessagePart<UIDataTypes, UITools>>(messageId: string, type?: T["type"]) => T | undefined;
|
|
11
11
|
export type SendMessage = ({ text, file }: {
|
|
12
12
|
text: string;
|
|
13
13
|
file?: FileUIPart;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolder/kit",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "rslib build",
|
|
18
18
|
"dev": "rslib build --watch",
|
|
19
|
-
"
|
|
19
|
+
"prepublishOnly": "bun run build",
|
|
20
20
|
"check": "biome check --write && tsgo --noEmit"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|