@yeaft/webchat-agent 1.0.453 → 1.0.454

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.
Binary file
@@ -16,6 +16,6 @@
16
16
  </head>
17
17
  <body>
18
18
  <div id="app"></div>
19
- <script type="module" src="app.bundle.js?v=1ef42512"></script>
19
+ <script type="module" src="app.bundle.js?v=1ad1700c"></script>
20
20
  </body>
21
21
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "1.0.453",
3
+ "version": "1.0.454",
4
4
  "description": "Remote worker agent for Yeaft Web Code Agent — connects the native Yeaft engine, CLI providers, and workbench tools",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/yeaft/engine.js CHANGED
@@ -4616,6 +4616,18 @@ export class Engine {
4616
4616
  // Loop back to call adapter again with tool results
4617
4617
  }
4618
4618
 
4619
+ // Store the final provider-call count on the response row itself. Debug
4620
+ // events are transient; the response card must retain the count after a
4621
+ // reload without inventing a second counter.
4622
+ const llmCountMessage = lastPersistedAssistantTextMessage || lastPersistedAssistantMessage;
4623
+ if (llmCountMessage && typeof this.#conversationStore?.update === 'function') {
4624
+ const updated = this.#conversationStore.update(llmCountMessage, {
4625
+ llmCallCount: turnNumber,
4626
+ });
4627
+ if (updated?.id === lastPersistedAssistantTextMessage?.id) lastPersistedAssistantTextMessage = updated;
4628
+ if (updated?.id === lastPersistedAssistantMessage?.id) lastPersistedAssistantMessage = updated;
4629
+ }
4630
+
4619
4631
  // feat-6af5f9f1 PR B: turn closed. Emits final totals so the debug
4620
4632
  // panel can show "Turn done · 4 loops · 12.4s · 5.0k tok" without
4621
4633
  // having to reduce the loops itself. Always fires (every break path
@@ -1349,6 +1349,7 @@ function projectPersistedToHistoryEntry(m, { includeReflections = false } = {})
1349
1349
  if (m.turnId) entry.turnId = m.turnId;
1350
1350
  if (m.imageAssetAnchor) entry.imageAssetAnchor = true;
1351
1351
  if (m.responseKind === 'progress' || m.responseKind === 'result') entry.responseKind = m.responseKind;
1352
+ if (Number.isInteger(m.llmCallCount) && m.llmCallCount > 0) entry.llmCallCount = m.llmCallCount;
1352
1353
  if (m.incomplete === true) entry.incomplete = true;
1353
1354
  if (typeof m.stopReason === 'string' && m.stopReason) entry.stopReason = m.stopReason;
1354
1355
  if (m.sessionId) entry.sessionId = m.sessionId;
@@ -1489,6 +1490,7 @@ function projectVisibleHistoryChunkMessages(messages = []) {
1489
1490
  ...(Array.isArray(m.images) && m.images.length > 0 ? { images: m.images } : {}),
1490
1491
  ...(m.speakerVpId ? { speakerVpId: m.speakerVpId } : {}),
1491
1492
  ...(m.responseKind === 'progress' || m.responseKind === 'result' ? { responseKind: m.responseKind } : {}),
1493
+ ...(Number.isInteger(m.llmCallCount) && m.llmCallCount > 0 ? { llmCallCount: m.llmCallCount } : {}),
1492
1494
  ...(m.incomplete === true ? { incomplete: true } : {}),
1493
1495
  ...(typeof m.stopReason === 'string' && m.stopReason ? { stopReason: m.stopReason } : {}),
1494
1496
  ...(Array.isArray(m.todos) ? { todos: m.todos } : {}),