@oyasmi/pipiclaw 0.9.0-beta.3 → 0.9.0-beta.4

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.
@@ -3,6 +3,10 @@ import { errorMessage } from "../shared/text-utils.js";
3
3
  const MIN_UPDATE_INTERVAL_MS = 800;
4
4
  const ROLLING_WINDOW_SIZE = 3;
5
5
  const NO_CONTENT = "";
6
+ // DingTalk's markdown line break: "\n" padded with a space on each side (per DingTalk's
7
+ // own markdown guide). A bare blank line reads as a full paragraph break (too much
8
+ // vertical gap between progress entries); a bare "\n" is swallowed by the renderer.
9
+ const PROGRESS_LINE_BREAK = " \n ";
6
10
  // Last-resort ceiling on how long flush() will block a caller. Outbound HTTP now
7
11
  // has its own timeout, so the sync loop is already bounded; this only guards against
8
12
  // an unforeseen stall so run()'s finally can never hang the channel forever.
@@ -127,7 +131,7 @@ class ChannelDeliveryController {
127
131
  this.toolCallCount++;
128
132
  }
129
133
  if (this.progressSegments.length > 0) {
130
- this.progressSegments.push("\n");
134
+ this.progressSegments.push(PROGRESS_LINE_BREAK);
131
135
  }
132
136
  this.progressSegments.push(text);
133
137
  this.progressTextDirty = true;
@@ -390,7 +394,7 @@ class ChannelDeliveryController {
390
394
  trimToRecentEntries(maxEntries) {
391
395
  let entryCount = 0;
392
396
  for (const segment of this.progressSegments) {
393
- if (segment !== "\n") {
397
+ if (segment !== PROGRESS_LINE_BREAK) {
394
398
  entryCount++;
395
399
  }
396
400
  }
@@ -401,11 +405,11 @@ class ChannelDeliveryController {
401
405
  let removedEntries = 0;
402
406
  while (removedEntries < entriesToRemove && this.progressSegments.length > 0) {
403
407
  const segment = this.progressSegments.shift();
404
- if (segment !== "\n") {
408
+ if (segment !== PROGRESS_LINE_BREAK) {
405
409
  removedEntries++;
406
410
  }
407
411
  }
408
- while (this.progressSegments[0] === "\n") {
412
+ while (this.progressSegments[0] === PROGRESS_LINE_BREAK) {
409
413
  this.progressSegments.shift();
410
414
  }
411
415
  this.progressTextDirty = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oyasmi/pipiclaw",
3
- "version": "0.9.0-beta.3",
3
+ "version": "0.9.0-beta.4",
4
4
  "description": "An AI assistant runtime for coding and team workflows, with DingTalk AI Cards, sub-agents, memory, and scheduled events.",
5
5
  "type": "module",
6
6
  "bin": {