llmz 0.9.3 → 0.9.4
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/chat.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export type MessageHandler = (input: RenderedComponent, metadata: MessageMetadat
|
|
|
42
42
|
* Deltas are provisional: restart deltas retract previews from that iteration
|
|
43
43
|
* after a provider restart, malformed response, or transport failure. Completed
|
|
44
44
|
* `handler` messages and code wait for a valid response and successful transport.
|
|
45
|
+
* A caller abort emits no restart: previews already streamed stay as they are.
|
|
45
46
|
*/
|
|
46
47
|
export type MessageDelta = {
|
|
47
48
|
restart: false;
|
|
@@ -346,7 +346,7 @@ const generateCode = async ({ iteration, ctx, cognitive, controller, metadata, o
|
|
|
346
346
|
} finally {
|
|
347
347
|
streamController.abort("LLM stream closed");
|
|
348
348
|
if (!streamCompleted) stream.return(void 0).catch((err) => {});
|
|
349
|
-
if (!accepted && liveContent.size) await preview({
|
|
349
|
+
if (!accepted && liveContent.size && !controller.signal.aborted) await preview({
|
|
350
350
|
restart: true,
|
|
351
351
|
iterationId: iteration.id,
|
|
352
352
|
attempt: attempt + 1,
|
|
@@ -345,7 +345,7 @@ const generateCode = async ({ iteration, ctx, cognitive, controller, metadata, o
|
|
|
345
345
|
} finally {
|
|
346
346
|
streamController.abort("LLM stream closed");
|
|
347
347
|
if (!streamCompleted) stream.return(void 0).catch((err) => {});
|
|
348
|
-
if (!accepted && liveContent.size) await preview({
|
|
348
|
+
if (!accepted && liveContent.size && !controller.signal.aborted) await preview({
|
|
349
349
|
restart: true,
|
|
350
350
|
iterationId: iteration.id,
|
|
351
351
|
attempt: attempt + 1,
|
package/dist/index.cjs
CHANGED
|
@@ -12,7 +12,7 @@ const require_truncator = require("./truncator-DmCu9M4m.cjs");
|
|
|
12
12
|
const require_quickjs_variant = require("./quickjs-variant-CsIwTVFC.cjs");
|
|
13
13
|
let _bpinternal_zui = require("@bpinternal/zui");
|
|
14
14
|
//#region package.json
|
|
15
|
-
var version = "0.9.
|
|
15
|
+
var version = "0.9.4";
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/hoist.ts
|
|
18
18
|
/**
|
|
@@ -1693,7 +1693,7 @@ const utils = {
|
|
|
1693
1693
|
* })
|
|
1694
1694
|
*/
|
|
1695
1695
|
const execute = async (props) => {
|
|
1696
|
-
const { executeContext } = await Promise.resolve().then(() => require("./execute-
|
|
1696
|
+
const { executeContext } = await Promise.resolve().then(() => require("./execute-Bwl_L33k.cjs"));
|
|
1697
1697
|
return executeContext(props);
|
|
1698
1698
|
};
|
|
1699
1699
|
/**
|
|
@@ -1702,7 +1702,7 @@ const execute = async (props) => {
|
|
|
1702
1702
|
* It's recommended to call this function at the beginning of your application without awaiting it (void init())
|
|
1703
1703
|
*/
|
|
1704
1704
|
const init = async () => {
|
|
1705
|
-
await Promise.resolve().then(() => require("./execute-
|
|
1705
|
+
await Promise.resolve().then(() => require("./execute-Bwl_L33k.cjs"));
|
|
1706
1706
|
await Promise.resolve().then(() => require("./component-CPKXe6Ca.cjs")).then((n) => n.component_exports);
|
|
1707
1707
|
await Promise.resolve().then(() => require("./tool-BLTrA-sL.cjs")).then((n) => n.tool_exports);
|
|
1708
1708
|
await Promise.resolve().then(() => require("./exit-CGLXI0BH.cjs")).then((n) => n.exit_exports);
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { i as wrapContent, n as truncateWrappedContent, t as stripTruncationTags
|
|
|
11
11
|
import { t as configureQuickJS } from "./quickjs-variant-BYhMBpwU.js";
|
|
12
12
|
import { transforms, z } from "@bpinternal/zui";
|
|
13
13
|
//#region package.json
|
|
14
|
-
var version = "0.9.
|
|
14
|
+
var version = "0.9.4";
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/hoist.ts
|
|
17
17
|
/**
|
|
@@ -1692,7 +1692,7 @@ const utils = {
|
|
|
1692
1692
|
* })
|
|
1693
1693
|
*/
|
|
1694
1694
|
const execute = async (props) => {
|
|
1695
|
-
const { executeContext } = await import("./execute-
|
|
1695
|
+
const { executeContext } = await import("./execute-DBhDYqtu.js");
|
|
1696
1696
|
return executeContext(props);
|
|
1697
1697
|
};
|
|
1698
1698
|
/**
|
|
@@ -1701,7 +1701,7 @@ const execute = async (props) => {
|
|
|
1701
1701
|
* It's recommended to call this function at the beginning of your application without awaiting it (void init())
|
|
1702
1702
|
*/
|
|
1703
1703
|
const init = async () => {
|
|
1704
|
-
await import("./execute-
|
|
1704
|
+
await import("./execute-DBhDYqtu.js");
|
|
1705
1705
|
await import("./component-DGG7d_Mz.js").then((n) => n.r);
|
|
1706
1706
|
await import("./tool-B6Pmuk6K.js").then((n) => n.n);
|
|
1707
1707
|
await import("./exit-CDdxDBRT.js").then((n) => n.n);
|
package/dist/index.workerd.js
CHANGED
|
@@ -52,7 +52,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
52
52
|
}) : target, mod));
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region package.json
|
|
55
|
-
var version = "0.9.
|
|
55
|
+
var version = "0.9.4", quoteExample, quotePartialExample, exampleBoundaryInstructions, quoteResponseExample;
|
|
56
56
|
var init_example_format = __esmMin((() => {
|
|
57
57
|
quoteExample = (output) => `"""\n${output}\n"""`;
|
|
58
58
|
quotePartialExample = (output) => quoteExample(`(...)\n${output}\n(...)`);
|
|
@@ -18373,7 +18373,7 @@ var init_generate = __esmMin((() => {
|
|
|
18373
18373
|
} finally {
|
|
18374
18374
|
streamController.abort("LLM stream closed");
|
|
18375
18375
|
if (!streamCompleted) stream.return(void 0).catch((err) => {});
|
|
18376
|
-
if (!accepted && liveContent.size) await preview({
|
|
18376
|
+
if (!accepted && liveContent.size && !controller.signal.aborted) await preview({
|
|
18377
18377
|
restart: true,
|
|
18378
18378
|
iterationId: iteration.id,
|
|
18379
18379
|
attempt: attempt + 1,
|