@ynhcj/xiaoyi-channel 1.1.23 → 1.1.24

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.
@@ -158,14 +158,13 @@ function createRetryingStream(createStream, cronJob) {
158
158
  }
159
159
  if (event.type === "error") {
160
160
  console.log(`[xiaoyiprovider] stream error after content: ${event.error?.errorMessage}`);
161
- resultResolve(event.error);
162
- yield event;
163
- return;
161
+ errorResult = event.error;
162
+ break; // break inner loop, proceed to retry decision
164
163
  }
165
164
  yield event;
166
165
  }
167
166
  }
168
- // Stream ended during buffer phase — decide whether to retry
167
+ // Stream ended (buffer or streaming phase) — decide whether to retry
169
168
  if (errorResult?.stopReason === "error" && isRetryableProviderError(errorResult.errorMessage)) {
170
169
  if (attempt < MAX_RETRY_ATTEMPTS - 1) {
171
170
  const delayMs = getRetryDelayMs(attempt + 1, cronJob);
@@ -192,6 +191,7 @@ function createRetryingStream(createStream, cronJob) {
192
191
  }
193
192
  if (errorResult && buffer.every(b => b.type !== "done" && b.type !== "error")) {
194
193
  resultResolve(errorResult);
194
+ yield { type: "error", reason: "error", error: errorResult };
195
195
  }
196
196
  return;
197
197
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",