@artooi/ag-ui-web-component 0.41.1 → 0.41.2
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/CHANGELOG.md +28 -1
- package/dist/ag-ui-web-component.bundle.js +6 -6
- package/dist/ag-ui-web-component.bundle.js.map +3 -3
- package/dist/index.js +26 -8
- package/dist/index.js.map +2 -2
- package/dist/ui/history/conversation_history.d.ts +2 -2
- package/dist/ui/history/conversation_history.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ui/history/conversation_history.ts +27 -8
- package/src/version.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -4351,8 +4351,8 @@ var ConversationHistory = class {
|
|
|
4351
4351
|
* Giving them to the replay, rather than leaving the client to add them, is
|
|
4352
4352
|
* what settles each card from its result. The checkpointed call is excluded,
|
|
4353
4353
|
* because the resume path answers it from the page the reload landed on; that
|
|
4354
|
-
* exclusion is held by "
|
|
4355
|
-
*
|
|
4354
|
+
* exclusion is held by "resumes with the landed page's result, and its card says
|
|
4355
|
+
* so" in `ag_ui_chat_reload_mid_run.test.ts`.
|
|
4356
4356
|
*/
|
|
4357
4357
|
async rehydrate() {
|
|
4358
4358
|
this.#generation += 1;
|
|
@@ -4495,15 +4495,33 @@ var ConversationHistory = class {
|
|
|
4495
4495
|
}
|
|
4496
4496
|
return {};
|
|
4497
4497
|
}
|
|
4498
|
-
/**
|
|
4498
|
+
/**
|
|
4499
|
+
* Complete the checkpointed navigating tool call and continue the run.
|
|
4500
|
+
*
|
|
4501
|
+
* The call's card is settled here, from the result the continuation carries.
|
|
4502
|
+
* The restore left it open on purpose -- it is the one call a reload was
|
|
4503
|
+
* expected by -- and nothing after this answers it: the run that follows
|
|
4504
|
+
* streams no result for a call the client answered itself. Left open, it
|
|
4505
|
+
* spun through the whole continuation, and the sweep that closes a run then
|
|
4506
|
+
* found it pending and called it not finished -- on the one call known to
|
|
4507
|
+
* have finished, since the page it moved to is the page doing the asking.
|
|
4508
|
+
*
|
|
4509
|
+
* Settled from the string the stored message holds, and with no outcome,
|
|
4510
|
+
* since `addToolResult` writes none, so the card is the one a later reload
|
|
4511
|
+
* draws from that message. The card can be missing, when the stored
|
|
4512
|
+
* transcript does not hold the call -- a store that kept the checkpoint and
|
|
4513
|
+
* lost the turn that made it -- and then there is nothing to settle. That
|
|
4514
|
+
* guard is held by "resumes a checkpointed navigating tool call on mount" in
|
|
4515
|
+
* `ag_ui_chat.test.ts`, whose transcript never made the call.
|
|
4516
|
+
*/
|
|
4499
4517
|
async #resumeFrom(checkpoint) {
|
|
4500
4518
|
this.#host.conversationStore().saveCheckpoint(this.#threadId, null);
|
|
4501
4519
|
const client = this.#host.ensureClient();
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
// Called on the element, as `this.navigationResult(...)` always was.
|
|
4505
|
-
JSON.stringify(this.#host.navigationResult().call(this.#host.element, checkpoint))
|
|
4520
|
+
const landed = JSON.stringify(
|
|
4521
|
+
this.#host.navigationResult().call(this.#host.element, checkpoint)
|
|
4506
4522
|
);
|
|
4523
|
+
client.addToolResult(checkpoint.toolCallId, landed);
|
|
4524
|
+
this.#host.transcript.card(checkpoint.toolCallId)?.settle(TOOL_CALL_STATUS.DONE, landed);
|
|
4507
4525
|
await client.resume();
|
|
4508
4526
|
}
|
|
4509
4527
|
};
|
|
@@ -18203,7 +18221,7 @@ function setControlValue(el2, value) {
|
|
|
18203
18221
|
}
|
|
18204
18222
|
|
|
18205
18223
|
// src/version.ts
|
|
18206
|
-
var VERSION = "0.41.
|
|
18224
|
+
var VERSION = "0.41.2";
|
|
18207
18225
|
export {
|
|
18208
18226
|
ATTACHMENT_EVENT,
|
|
18209
18227
|
AgUiChat,
|