@assistant-ui/core 0.3.9 → 0.3.10
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/model-context/frame/provider.js +1 -3
- package/dist/model-context/frame/provider.js.map +1 -1
- package/dist/model-context/types.js +4 -2
- package/dist/model-context/types.js.map +1 -1
- package/dist/react/AssistantProvider.js +5 -4
- package/dist/react/AssistantProvider.js.map +1 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.js +2 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.js.map +1 -1
- package/dist/react/client/Interactables.js +12 -10
- package/dist/react/client/Interactables.js.map +1 -1
- package/dist/react/model-context/useInteractable.js.map +1 -1
- package/dist/react/primitives/message/MessageGroupedParts.js +11 -8
- package/dist/react/primitives/message/MessageGroupedParts.js.map +1 -1
- package/dist/react/primitives/message/MessageParts.js +27 -22
- package/dist/react/primitives/message/MessageParts.js.map +1 -1
- package/dist/react/runtimes/cloud/useCloudThreadListAdapter.js +5 -4
- package/dist/react/runtimes/cloud/useCloudThreadListAdapter.js.map +1 -1
- package/dist/react/runtimes/external-message-converter.js +3 -1
- package/dist/react/runtimes/external-message-converter.js.map +1 -1
- package/dist/react/runtimes/useLocalRuntime.js +2 -1
- package/dist/react/runtimes/useLocalRuntime.js.map +1 -1
- package/dist/runtime/api/message-runtime.js +4 -2
- package/dist/runtime/api/message-runtime.js.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js +8 -4
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/local/local-thread-runtime-core.js +9 -6
- package/dist/runtimes/local/local-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.js +31 -28
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.js.map +1 -1
- package/dist/subscribable/subscribable.js +6 -4
- package/dist/subscribable/subscribable.js.map +1 -1
- package/package.json +10 -10
- package/src/runtimes/local/local-thread-runtime-core.test.ts +18 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "Framework-agnostic core runtime for assistant-ui",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assistant",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
],
|
|
60
60
|
"sideEffects": false,
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"assistant-stream": "^0.3.
|
|
63
|
-
"nanoid": "^6.0.
|
|
62
|
+
"assistant-stream": "^0.3.36",
|
|
63
|
+
"nanoid": "^6.0.1"
|
|
64
64
|
},
|
|
65
65
|
"optionalDevDependencies": {
|
|
66
66
|
"@assistant-ui/x-generative-compiler": ">=0.0.3"
|
|
@@ -89,17 +89,17 @@
|
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@testing-library/react": "^16.3.2",
|
|
92
|
-
"@types/react": "^19.2.
|
|
93
|
-
"jsdom": "^
|
|
92
|
+
"@types/react": "^19.2.18",
|
|
93
|
+
"jsdom": "^30.0.1",
|
|
94
94
|
"react": "^19.2.8",
|
|
95
95
|
"react-dom": "^19.2.8",
|
|
96
96
|
"vitest": "^4.1.10",
|
|
97
97
|
"zustand": "^5.0.14",
|
|
98
|
-
"@assistant-ui/
|
|
99
|
-
"@assistant-ui/
|
|
100
|
-
"@assistant-ui/
|
|
101
|
-
"@assistant-ui/x-buildutils": "0.0.
|
|
102
|
-
"assistant-cloud": "0.1.
|
|
98
|
+
"@assistant-ui/store": "0.3.8",
|
|
99
|
+
"@assistant-ui/tap": "0.9.11",
|
|
100
|
+
"@assistant-ui/vite": "0.0.12",
|
|
101
|
+
"@assistant-ui/x-buildutils": "0.0.22",
|
|
102
|
+
"assistant-cloud": "0.1.39"
|
|
103
103
|
},
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public",
|
|
@@ -1186,12 +1186,10 @@ describe("LocalThreadRuntimeCore runs", () => {
|
|
|
1186
1186
|
};
|
|
1187
1187
|
|
|
1188
1188
|
it("appends the user message and the adapter result", async () => {
|
|
1189
|
-
const run = vi.fn(
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
}),
|
|
1194
|
-
);
|
|
1189
|
+
const run = vi.fn(async (): Promise<ChatModelRunResult> => ({
|
|
1190
|
+
content: [{ type: "text", text: "Hello!" }],
|
|
1191
|
+
status: { type: "complete", reason: "stop" },
|
|
1192
|
+
}));
|
|
1195
1193
|
const thread = createPlainThread({ run });
|
|
1196
1194
|
|
|
1197
1195
|
await thread.append(userMessage("Hi"));
|
|
@@ -1247,23 +1245,21 @@ describe("LocalThreadRuntimeCore runs", () => {
|
|
|
1247
1245
|
});
|
|
1248
1246
|
|
|
1249
1247
|
it("does not run again after a tool result once maxSteps is reached", async () => {
|
|
1250
|
-
const run = vi.fn(
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
argsText: "{}",
|
|
1259
|
-
},
|
|
1260
|
-
],
|
|
1261
|
-
status: { type: "requires-action", reason: "tool-calls" },
|
|
1262
|
-
metadata: {
|
|
1263
|
-
steps: [{ usage: { promptTokens: 10, completionTokens: 5 } }],
|
|
1248
|
+
const run = vi.fn(async (): Promise<ChatModelRunResult> => ({
|
|
1249
|
+
content: [
|
|
1250
|
+
{
|
|
1251
|
+
type: "tool-call",
|
|
1252
|
+
toolCallId: "tc1",
|
|
1253
|
+
toolName: "myTool",
|
|
1254
|
+
args: {},
|
|
1255
|
+
argsText: "{}",
|
|
1264
1256
|
},
|
|
1265
|
-
|
|
1266
|
-
|
|
1257
|
+
],
|
|
1258
|
+
status: { type: "requires-action", reason: "tool-calls" },
|
|
1259
|
+
metadata: {
|
|
1260
|
+
steps: [{ usage: { promptTokens: 10, completionTokens: 5 } }],
|
|
1261
|
+
},
|
|
1262
|
+
}));
|
|
1267
1263
|
const thread = createPlainThread({ run }, { maxSteps: 1 });
|
|
1268
1264
|
|
|
1269
1265
|
await thread.append(userMessage("Tool call"));
|