@yeaft/webchat-agent 0.1.969 → 0.1.970

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.969",
3
+ "version": "0.1.970",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -629,7 +629,7 @@ function projectPersistedToHistoryEntry(m) {
629
629
  if (m.ts) entry.ts = m.ts;
630
630
  else if (m.time) entry.ts = m.time;
631
631
  if (Array.isArray(m.attachments) && m.attachments.length > 0) entry.attachments = m.attachments;
632
- if ((entry.role === 'user' || entry.role === 'assistant') && !entry.content && !entry.attachments) return null;
632
+ if ((entry.role === 'user' || entry.role === 'assistant') && !entry.content && !entry.attachments && !entry.toolCalls) return null;
633
633
  return entry;
634
634
  }
635
635
 
@@ -4013,6 +4013,20 @@ export async function handleYeaftLoadHistory(msg) {
4013
4013
  message: { id: entry.id || null, content: [{ type: 'text', text: entry.content }] },
4014
4014
  ts: entry.ts || null,
4015
4015
  }, envelopeOpts);
4016
+ if (Array.isArray(entry.toolCalls) && entry.toolCalls.length > 0) {
4017
+ sendSessionOutputFrame({
4018
+ type: 'assistant',
4019
+ message: {
4020
+ content: [{
4021
+ type: 'tool_summary',
4022
+ count: entry.toolCalls.length,
4023
+ omittedCount: entry.toolCalls.length,
4024
+ source: 'history',
4025
+ }],
4026
+ },
4027
+ ts: entry.ts || null,
4028
+ }, envelopeOpts);
4029
+ }
4016
4030
  sendSessionOutputFrame({ type: 'result', result_text: '' }, envelopeOpts);
4017
4031
  }
4018
4032
  }