@assistant-ui/react-ai-sdk 0.11.1 → 0.11.3
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/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +3 -1
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/use-chat/useChatRuntime.d.ts +3 -0
- package/dist/ui/use-chat/useChatRuntime.d.ts.map +1 -0
- package/dist/ui/use-chat/useChatRuntime.js +14 -0
- package/dist/ui/use-chat/useChatRuntime.js.map +1 -0
- package/package.json +4 -4
- package/src/ui/index.ts +1 -0
- package/src/ui/use-chat/useChatRuntime.tsx +13 -0
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/ui/index.js
CHANGED
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/index.ts"],"sourcesContent":["export { useAISDKRuntime } from \"./use-chat/useAISDKRuntime\";\n"],"mappings":";AAAA,SAAS,uBAAuB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/ui/index.ts"],"sourcesContent":["export { useAISDKRuntime } from \"./use-chat/useAISDKRuntime\";\nexport { useChatRuntime } from \"./use-chat/useChatRuntime\";\n"],"mappings":";AAAA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type UIMessage, type UseChatOptions } from "@ai-sdk/react";
|
|
2
|
+
export declare const useChatRuntime: <UI_MESSAGE extends UIMessage = UIMessage>(options?: UseChatOptions<UI_MESSAGE>) => import("@assistant-ui/react").AssistantRuntime;
|
|
3
|
+
//# sourceMappingURL=useChatRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChatRuntime.d.ts","sourceRoot":"","sources":["../../../src/ui/use-chat/useChatRuntime.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAI7E,eAAO,MAAM,cAAc,GAAI,UAAU,SAAS,SAAS,GAAG,SAAS,EACrE,UAAU,cAAc,CAAC,UAAU,CAAC,mDAKrC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/use-chat/useChatRuntime.tsx
|
|
4
|
+
import { useChat } from "@ai-sdk/react";
|
|
5
|
+
import { useAISDKRuntime } from "./useAISDKRuntime.js";
|
|
6
|
+
var useChatRuntime = (options) => {
|
|
7
|
+
const chat = useChat(options);
|
|
8
|
+
const runtime = useAISDKRuntime(chat);
|
|
9
|
+
return runtime;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
useChatRuntime
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useChatRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/use-chat/useChatRuntime.tsx"],"sourcesContent":["\"use client\";\n\nimport { useChat, type UIMessage, type UseChatOptions } from \"@ai-sdk/react\";\n\nimport { useAISDKRuntime } from \"./useAISDKRuntime\";\n\nexport const useChatRuntime = <UI_MESSAGE extends UIMessage = UIMessage>(\n options?: UseChatOptions<UI_MESSAGE>,\n) => {\n const chat = useChat(options);\n const runtime = useAISDKRuntime(chat as any);\n return runtime;\n};\n"],"mappings":";;;AAEA,SAAS,eAAoD;AAE7D,SAAS,uBAAuB;AAEzB,IAAM,iBAAiB,CAC5B,YACG;AACH,QAAM,OAAO,QAAQ,OAAO;AAC5B,QAAM,UAAU,gBAAgB,IAAW;AAC3C,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/react-ai-sdk",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"zustand": "^5.0.7"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@assistant-ui/react": "^0.10.
|
|
32
|
+
"@assistant-ui/react": "^0.10.37",
|
|
33
33
|
"@types/react": "*",
|
|
34
34
|
"react": "^18 || ^19 || ^19.0.0-rc"
|
|
35
35
|
},
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"eslint-config-next": "15.4.5",
|
|
46
46
|
"react": "19.1.1",
|
|
47
47
|
"tsx": "^4.20.3",
|
|
48
|
-
"@assistant-ui/
|
|
49
|
-
"@assistant-ui/
|
|
48
|
+
"@assistant-ui/react": "0.10.37",
|
|
49
|
+
"@assistant-ui/x-buildutils": "0.0.1"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public",
|
package/src/ui/index.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useChat, type UIMessage, type UseChatOptions } from "@ai-sdk/react";
|
|
4
|
+
|
|
5
|
+
import { useAISDKRuntime } from "./useAISDKRuntime";
|
|
6
|
+
|
|
7
|
+
export const useChatRuntime = <UI_MESSAGE extends UIMessage = UIMessage>(
|
|
8
|
+
options?: UseChatOptions<UI_MESSAGE>,
|
|
9
|
+
) => {
|
|
10
|
+
const chat = useChat(options);
|
|
11
|
+
const runtime = useAISDKRuntime(chat as any);
|
|
12
|
+
return runtime;
|
|
13
|
+
};
|