@liveblocks/core 2.25.0-aiprivatebeta15 → 2.25.0-aiprivatebeta17
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.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -17
- package/dist/index.d.ts +35 -17
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "2.25.0-
|
|
9
|
+
var PKG_VERSION = "2.25.0-aiprivatebeta17";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -3925,12 +3925,13 @@ function createStore_forChatMessages(toolsStore, setToolResult) {
|
|
|
3925
3925
|
}
|
|
3926
3926
|
seenToolCallIds.add(toolCall.invocationId);
|
|
3927
3927
|
const toolDef = toolsStore.getTool\u03A3(toolCall.name, message.chatId).get();
|
|
3928
|
-
const respondSync = (
|
|
3928
|
+
const respondSync = (...args) => {
|
|
3929
|
+
const [result] = args;
|
|
3929
3930
|
setToolResult(
|
|
3930
3931
|
message.chatId,
|
|
3931
3932
|
message.id,
|
|
3932
3933
|
toolCall.invocationId,
|
|
3933
|
-
result
|
|
3934
|
+
_nullishCoalesce(result, () => ( { data: {} }))
|
|
3934
3935
|
// TODO Pass in AiGenerationOptions here, or make the backend use the same options
|
|
3935
3936
|
).catch((err) => {
|
|
3936
3937
|
error2(
|
|
@@ -3945,7 +3946,7 @@ function createStore_forChatMessages(toolsStore, setToolResult) {
|
|
|
3945
3946
|
name: toolCall.name,
|
|
3946
3947
|
invocationId: toolCall.invocationId
|
|
3947
3948
|
});
|
|
3948
|
-
respondSync(result);
|
|
3949
|
+
respondSync(_nullishCoalesce(result, () => ( void 0)));
|
|
3949
3950
|
})().catch((err) => {
|
|
3950
3951
|
error2(
|
|
3951
3952
|
`Error trying to respond to tool-call: ${String(err)} (in execute())`
|
|
@@ -4459,7 +4460,7 @@ function makeCreateSocketDelegateForAi(baseUrl, WebSocketPolyfill) {
|
|
|
4459
4460
|
}
|
|
4460
4461
|
const url2 = new URL(baseUrl);
|
|
4461
4462
|
url2.protocol = url2.protocol === "http:" ? "ws" : "wss";
|
|
4462
|
-
url2.pathname = "/ai/
|
|
4463
|
+
url2.pathname = "/ai/v4";
|
|
4463
4464
|
if (authValue.type === "secret") {
|
|
4464
4465
|
url2.searchParams.set("tok", authValue.token.raw);
|
|
4465
4466
|
} else if (authValue.type === "public") {
|