@yeaft/webchat-agent 0.0.118 → 0.0.119

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.
Files changed (2) hide show
  1. package/crew.js +7 -4
  2. package/package.json +1 -1
package/crew.js CHANGED
@@ -317,7 +317,10 @@ async function saveSessionMeta(session) {
317
317
  createdAt: session.createdAt,
318
318
  updatedAt: Date.now(),
319
319
  userId: session.userId,
320
- username: session.username
320
+ username: session.username,
321
+ costUsd: session.costUsd,
322
+ totalInputTokens: session.totalInputTokens,
323
+ totalOutputTokens: session.totalOutputTokens
321
324
  };
322
325
  await fs.writeFile(join(session.sharedDir, 'session.json'), JSON.stringify(meta, null, 2));
323
326
  // 保存 UI 消息历史(用于恢复时重放)
@@ -431,9 +434,9 @@ export async function resumeCrewSession(msg) {
431
434
  status: 'waiting_human',
432
435
  round: meta.round || 0,
433
436
  maxRounds: meta.maxRounds || 20,
434
- costUsd: 0,
435
- totalInputTokens: 0,
436
- totalOutputTokens: 0,
437
+ costUsd: meta.costUsd || 0,
438
+ totalInputTokens: meta.totalInputTokens || 0,
439
+ totalOutputTokens: meta.totalOutputTokens || 0,
437
440
  messageHistory: [],
438
441
  uiMessages: [], // will be loaded from messages.json
439
442
  humanMessageQueue: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.0.118",
3
+ "version": "0.0.119",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",