@co0ontty/wand 4.72.1 → 4.72.2-beta.g6c641f4

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.
@@ -334,7 +334,7 @@ export class WsBroadcastManager {
334
334
  sendInit(client, sessionId, snapshot, resync) {
335
335
  // 块级窗口客户端(iOS)只下发最近 blockBudget 个块;其余走 turn 级窗口。
336
336
  // 两种都附 offset/total,更早的客户端按需翻页。
337
- const windowed = this.windowForClient(client, snapshot.messages);
337
+ const windowed = this.windowForClient(client, sessionId, snapshot.messages);
338
338
  const seq = (client.outputSeqBySession.get(sessionId) ?? 0) + 1;
339
339
  client.outputSeqBySession.set(sessionId, seq);
340
340
  client.pendingResyncSessions.delete(sessionId);
@@ -353,11 +353,11 @@ export class WsBroadcastManager {
353
353
  * 按客户端偏好窗口化一段完整 messages:opted-in 的块级窗口(iOS)会附带
354
354
  * leadingBlockOffset/leadingBlockTotal;否则 turn 级窗口(字段与改动前一致)。
355
355
  */
356
- windowForClient(client, messages) {
356
+ windowForClient(client, sessionId, messages) {
357
357
  if (!messages) {
358
358
  return { messages: undefined, messageOffset: 0, messageTotal: 0 };
359
359
  }
360
- messages = enrichStructuredMessages(messages);
360
+ messages = enrichStructuredMessages(messages, sessionId);
361
361
  if (client.blockBudget && client.blockBudget > 0) {
362
362
  const w = blockWindowMessagesForTransport(messages, this.getCardDefaults(), client.blockBudget);
363
363
  return {
@@ -397,7 +397,7 @@ export class WsBroadcastManager {
397
397
  if (client.blockBudget && client.blockBudget > 0) {
398
398
  return {
399
399
  ...boundedEvent,
400
- data: { ...data, ...this.windowForClient(client, rawMessages) },
400
+ data: { ...data, ...this.windowForClient(client, event.sessionId, rawMessages) },
401
401
  };
402
402
  }
403
403
  if (!turnWindowedEvent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@co0ontty/wand",
3
- "version": "4.72.1",
3
+ "version": "4.72.2-beta.g6c641f4",
4
4
  "description": "A web console for Claude Code, Codex, OpenCode, and other local CLI tools.",
5
5
  "type": "module",
6
6
  "bin": {