@assistant-ui/react-ai-sdk 0.10.11 → 0.10.12
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/useChatRuntime.d.ts +1 -2
- package/dist/useChatRuntime.d.ts.map +1 -1
- package/dist/useChatRuntime.js.map +1 -1
- package/dist/useCloudRuntime.d.ts +12 -0
- package/dist/useCloudRuntime.d.ts.map +1 -0
- package/dist/useCloudRuntime.js +15 -0
- package/dist/useCloudRuntime.js.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/useChatRuntime.ts +4 -1
- package/src/useCloudRuntime.ts +21 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./rsc";
|
|
2
2
|
export * from "./ui";
|
|
3
3
|
export * from "./useChatRuntime";
|
|
4
|
+
export * from "./useCloudRuntime";
|
|
4
5
|
export { toLanguageModelMessages, toLanguageModelTools, fromLanguageModelMessages, fromLanguageModelTools, useDangerousInBrowserRuntime, } from "@assistant-ui/react-edge";
|
|
5
6
|
export { frontendTools } from "./frontendTools";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,MAAM,CAAC;AACrB,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,MAAM,CAAC;AACrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./rsc\";\nexport * from \"./ui\";\nexport * from \"./useChatRuntime\";\n\nexport {\n toLanguageModelMessages,\n toLanguageModelTools,\n fromLanguageModelMessages,\n fromLanguageModelTools,\n useDangerousInBrowserRuntime,\n} from \"@assistant-ui/react-edge\";\nexport { frontendTools } from \"./frontendTools\";\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AAEd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./rsc\";\nexport * from \"./ui\";\nexport * from \"./useChatRuntime\";\nexport * from \"./useCloudRuntime\";\n\nexport {\n toLanguageModelMessages,\n toLanguageModelTools,\n fromLanguageModelMessages,\n fromLanguageModelTools,\n useDangerousInBrowserRuntime,\n} from \"@assistant-ui/react-edge\";\nexport { frontendTools } from \"./frontendTools\";\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;","names":[]}
|
package/dist/useChatRuntime.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EdgeRuntimeOptions } from "@assistant-ui/react-edge";
|
|
2
|
-
type UseChatRuntimeOptions = Omit<EdgeRuntimeOptions, "unstable_AISDKInterop">;
|
|
2
|
+
export type UseChatRuntimeOptions = Omit<EdgeRuntimeOptions, "unstable_AISDKInterop">;
|
|
3
3
|
export declare const useChatRuntime: (options: UseChatRuntimeOptions) => import("@assistant-ui/react").AssistantRuntime;
|
|
4
|
-
export {};
|
|
5
4
|
//# sourceMappingURL=useChatRuntime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatRuntime.d.ts","sourceRoot":"","sources":["../src/useChatRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,0BAA0B,CAAC;AAE9E,
|
|
1
|
+
{"version":3,"file":"useChatRuntime.d.ts","sourceRoot":"","sources":["../src/useChatRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,0BAA0B,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,kBAAkB,EAClB,uBAAuB,CACxB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,qBAAqB,mDAK5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useChatRuntime.ts"],"sourcesContent":["import { EdgeRuntimeOptions, useEdgeRuntime } from \"@assistant-ui/react-edge\";\n\
|
|
1
|
+
{"version":3,"sources":["../src/useChatRuntime.ts"],"sourcesContent":["import { EdgeRuntimeOptions, useEdgeRuntime } from \"@assistant-ui/react-edge\";\n\nexport type UseChatRuntimeOptions = Omit<\n EdgeRuntimeOptions,\n \"unstable_AISDKInterop\"\n>;\n\nexport const useChatRuntime = (options: UseChatRuntimeOptions) => {\n return useEdgeRuntime({\n ...options,\n unstable_AISDKInterop: \"v2\",\n });\n};\n"],"mappings":";AAAA,SAA6B,sBAAsB;AAO5C,IAAM,iBAAiB,CAAC,YAAmC;AAChE,SAAO,eAAe;AAAA,IACpB,GAAG;AAAA,IACH,uBAAuB;AAAA,EACzB,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AssistantCloud } from "@assistant-ui/react";
|
|
2
|
+
import { UseChatRuntimeOptions } from "./useChatRuntime";
|
|
3
|
+
type UseCloudRuntimeOptions = Omit<UseChatRuntimeOptions, "api"> & {
|
|
4
|
+
cloud: AssistantCloud;
|
|
5
|
+
assistantId: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated This is under active development and not yet ready for prod use.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useCloudRuntime: (options: UseCloudRuntimeOptions) => import("@assistant-ui/react").AssistantRuntime;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=useCloudRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCloudRuntime.d.ts","sourceRoot":"","sources":["../src/useCloudRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAkB,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzE,KAAK,sBAAsB,GAAG,IAAI,CAAC,qBAAqB,EAAE,KAAK,CAAC,GAAG;IACjE,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,sBAAsB,mDAS9D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/useCloudRuntime.ts
|
|
2
|
+
import { useChatRuntime } from "./useChatRuntime.js";
|
|
3
|
+
var useCloudRuntime = (options) => {
|
|
4
|
+
const opts = options.cloud.runs.__internal_getAssistantOptions(
|
|
5
|
+
options.assistantId
|
|
6
|
+
);
|
|
7
|
+
return useChatRuntime({
|
|
8
|
+
...options,
|
|
9
|
+
...opts
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
useCloudRuntime
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useCloudRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/useCloudRuntime.ts"],"sourcesContent":["import { AssistantCloud } from \"@assistant-ui/react\";\nimport { useChatRuntime, UseChatRuntimeOptions } from \"./useChatRuntime\";\n\ntype UseCloudRuntimeOptions = Omit<UseChatRuntimeOptions, \"api\"> & {\n cloud: AssistantCloud;\n assistantId: string;\n};\n\n/**\n * @deprecated This is under active development and not yet ready for prod use. \n */\nexport const useCloudRuntime = (options: UseCloudRuntimeOptions) => {\n const opts = options.cloud.runs.__internal_getAssistantOptions(\n options.assistantId,\n );\n\n return useChatRuntime({\n ...options,\n ...opts,\n });\n};\n"],"mappings":";AACA,SAAS,sBAA6C;AAU/C,IAAM,kBAAkB,CAAC,YAAoC;AAClE,QAAM,OAAO,QAAQ,MAAM,KAAK;AAAA,IAC9B,QAAQ;AAAA,EACV;AAEA,SAAO,eAAe;AAAA,IACpB,GAAG;AAAA,IACH,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/react-ai-sdk",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@assistant-ui/react-edge": "0.2.10"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@assistant-ui/react": "^0.10.
|
|
30
|
+
"@assistant-ui/react": "^0.10.13",
|
|
31
31
|
"@types/react": "*",
|
|
32
32
|
"react": "^18 || ^19 || ^19.0.0-rc"
|
|
33
33
|
},
|
package/src/index.ts
CHANGED
package/src/useChatRuntime.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { EdgeRuntimeOptions, useEdgeRuntime } from "@assistant-ui/react-edge";
|
|
2
2
|
|
|
3
|
-
type UseChatRuntimeOptions = Omit<
|
|
3
|
+
export type UseChatRuntimeOptions = Omit<
|
|
4
|
+
EdgeRuntimeOptions,
|
|
5
|
+
"unstable_AISDKInterop"
|
|
6
|
+
>;
|
|
4
7
|
|
|
5
8
|
export const useChatRuntime = (options: UseChatRuntimeOptions) => {
|
|
6
9
|
return useEdgeRuntime({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AssistantCloud } from "@assistant-ui/react";
|
|
2
|
+
import { useChatRuntime, UseChatRuntimeOptions } from "./useChatRuntime";
|
|
3
|
+
|
|
4
|
+
type UseCloudRuntimeOptions = Omit<UseChatRuntimeOptions, "api"> & {
|
|
5
|
+
cloud: AssistantCloud;
|
|
6
|
+
assistantId: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated This is under active development and not yet ready for prod use.
|
|
11
|
+
*/
|
|
12
|
+
export const useCloudRuntime = (options: UseCloudRuntimeOptions) => {
|
|
13
|
+
const opts = options.cloud.runs.__internal_getAssistantOptions(
|
|
14
|
+
options.assistantId,
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
return useChatRuntime({
|
|
18
|
+
...options,
|
|
19
|
+
...opts,
|
|
20
|
+
});
|
|
21
|
+
};
|