@yeaft/webchat-agent 0.1.572 → 0.1.573

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.572",
3
+ "version": "0.1.573",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1130,6 +1130,11 @@ export async function handleUnifyGroupChat(msg) {
1130
1130
  // Per target: emit `group_message` tagged with `speakerVpId` (the VP
1131
1131
  // being addressed — F3's GroupSelector binding consumes this) + dispatch
1132
1132
  // through the Engine via handleUnifyChat with an `@vp-<id>` prompt prefix.
1133
+ //
1134
+ // task-fix: bracket each per-VP dispatch with `vp_typing_start` /
1135
+ // `vp_typing_end` events so the frontend can render a per-speaker typing
1136
+ // dot next to that VP's avatar (matching IM apps). Avoids the old
1137
+ // "one global running cat for N concurrent speakers" ambiguity.
1133
1138
  for (const { vpId, envelope } of captured) {
1134
1139
  try {
1135
1140
  sendUnifyEvent({
@@ -1144,6 +1149,15 @@ export async function handleUnifyGroupChat(msg) {
1144
1149
  });
1145
1150
  } catch { /* never crash WS pipeline */ }
1146
1151
 
1152
+ try {
1153
+ sendUnifyEvent({
1154
+ type: 'vp_typing_start',
1155
+ groupId,
1156
+ vpId,
1157
+ ts: Date.now(),
1158
+ });
1159
+ } catch { /* never crash WS pipeline */ }
1160
+
1147
1161
  try {
1148
1162
  await handleUnifyChat({
1149
1163
  ...msg,
@@ -1154,6 +1168,15 @@ export async function handleUnifyGroupChat(msg) {
1154
1168
  });
1155
1169
  } catch (err) {
1156
1170
  console.warn('[Unify] unify_group_chat: per-vp dispatch failed', vpId, err?.message || err);
1171
+ } finally {
1172
+ try {
1173
+ sendUnifyEvent({
1174
+ type: 'vp_typing_end',
1175
+ groupId,
1176
+ vpId,
1177
+ ts: Date.now(),
1178
+ });
1179
+ } catch { /* never crash WS pipeline */ }
1157
1180
  }
1158
1181
  }
1159
1182
  }