call-ai 2.5.10-dev.1 → 2.5.11-dev.1
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/api-core.js +15 -38
- package/api-core.js.map +1 -1
- package/package.json +1 -1
package/api-core.js
CHANGED
|
@@ -1,42 +1,19 @@
|
|
|
1
1
|
function createBackwardCompatStreamingProxy(promise) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
return async function (value) {
|
|
21
|
-
const generator = await promise;
|
|
22
|
-
switch (prop) {
|
|
23
|
-
case "next":
|
|
24
|
-
return generator.next(value);
|
|
25
|
-
case "throw":
|
|
26
|
-
return generator.throw(value);
|
|
27
|
-
case "return":
|
|
28
|
-
return generator.return(value);
|
|
29
|
-
default:
|
|
30
|
-
throw new Error(`Unknown method: ${String(prop)}`);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
if (prop === "then" || prop === "catch" || prop === "finally") {
|
|
35
|
-
return promise[prop].bind(promise);
|
|
36
|
-
}
|
|
37
|
-
return undefined;
|
|
38
|
-
},
|
|
39
|
-
});
|
|
2
|
+
const thenable = promise;
|
|
3
|
+
thenable.next = async (value) => {
|
|
4
|
+
const generator = await promise;
|
|
5
|
+
return generator.next(value);
|
|
6
|
+
};
|
|
7
|
+
thenable.throw = async (value) => {
|
|
8
|
+
const generator = await promise;
|
|
9
|
+
return generator.throw(value);
|
|
10
|
+
};
|
|
11
|
+
thenable.return = async (value) => {
|
|
12
|
+
const generator = await promise;
|
|
13
|
+
return generator.return(value);
|
|
14
|
+
};
|
|
15
|
+
thenable[Symbol.asyncIterator] = () => thenable;
|
|
16
|
+
return thenable;
|
|
40
17
|
}
|
|
41
18
|
export { createBackwardCompatStreamingProxy };
|
|
42
19
|
//# sourceMappingURL=api-core.js.map
|
package/api-core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-core.js","sourceRoot":"","sources":["../jsr/api-core.ts"],"names":[],"mappings":"AAUA,SAAS,kCAAkC,CAAC,OAAgC;
|
|
1
|
+
{"version":3,"file":"api-core.js","sourceRoot":"","sources":["../jsr/api-core.ts"],"names":[],"mappings":"AAUA,SAAS,kCAAkC,CAAC,OAAgC;IAC1E,MAAM,QAAQ,GAAG,OAAiC,CAAC;IAEnD,QAAQ,CAAC,IAAI,GAAG,KAAK,EAAE,KAAc,EAAE,EAAE;QACvC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;QAChC,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC;IAEF,QAAQ,CAAC,KAAK,GAAG,KAAK,EAAE,KAAe,EAAE,EAAE;QACzC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;QAChC,OAAO,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,QAAQ,CAAC,MAAM,GAAG,KAAK,EAAE,KAAmC,EAAE,EAAE;QAC9D,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;QAChC,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC;IAEhD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAGD,OAAO,EAAE,kCAAkC,EAAE,CAAC"}
|