@yeaft/webchat-agent 0.1.915 → 0.1.916

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.915",
3
+ "version": "0.1.916",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -320,6 +320,18 @@ export function parseMessage(raw) {
320
320
  case 'threadId': msg.threadId = value; break;
321
321
  case 'sourceThreadId': msg.sourceThreadId = value; break;
322
322
  case 'sessionId': msg.sessionId = value; break;
323
+ // Legacy alias: pre-rename messages stamped `groupId:` (PR #881
324
+ // groups → sessions sweep). Without this case, files in
325
+ // ~/.yeaft/conversation/messages/*.md from before the rename
326
+ // parse with msg.sessionId undefined and #loadSessionHotMessages'
327
+ // `.filter(m => m?.sessionId)` drops every row — LLM replay sees
328
+ // an empty history. `if (!msg.sessionId)` keeps new-key precedence
329
+ // for hand-edited files that carry both keys. See
330
+ // migrate/sessions-v1.js — that pass moved directories but did
331
+ // NOT rewrite per-message frontmatter, which is why this alias
332
+ // has to live forever (or until a frontmatter-rewrite migration
333
+ // lands and the legacy dir is empty).
334
+ case 'groupId': if (!msg.sessionId) msg.sessionId = value; break;
323
335
  case 'chatId': msg.chatId = value; break;
324
336
  case 'speakerVpId': msg.speakerVpId = value; break;
325
337
  case 'attachmentsB64':