@ynhcj/xiaoyi-channel 0.0.141-beta → 0.0.142-beta

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.
Files changed (2) hide show
  1. package/dist/src/bot.js +9 -0
  2. package/package.json +1 -1
package/dist/src/bot.js CHANGED
@@ -204,11 +204,19 @@ export async function handleXYMessage(params) {
204
204
  // 回调,onInitComplete 永远不会被触发。如果不释放,后续消息
205
205
  // 会被 globalDispatchInitGate 永久阻塞。
206
206
  params.onInitComplete?.();
207
+ // Steer 也支持文件 —— 提取并下载,附带到 mediaPayload
208
+ const steerFileParts = extractFileParts(parsed.parts);
209
+ const steerDownloadedFiles = await downloadFilesFromParts(steerFileParts);
210
+ const steerMediaPayload = buildXYMediaPayload(steerDownloadedFiles);
211
+ if (steerFileParts.length > 0) {
212
+ logger.log(`[BOT] 📎 Steer message with files: ${steerFileParts.length} file(s)`);
213
+ }
207
214
  logger.log(`[BOT] 🔄 Steer message — enqueuing to streaming-signal queue`);
208
215
  await enqueueSteer({
209
216
  sessionId: parsed.sessionId,
210
217
  sessionKey: route.sessionKey,
211
218
  steerText: textForAgent, // 原始文本,不带 /steer 前缀
219
+ mediaPayload: steerMediaPayload,
212
220
  cfg,
213
221
  runtime,
214
222
  parsed,
@@ -525,6 +533,7 @@ async function dispatchSteerWhenReady(params) {
525
533
  OriginatingChannel: "xiaoyi-channel",
526
534
  OriginatingTo: sessionId,
527
535
  ReplyToBody: undefined,
536
+ ...params.mediaPayload,
528
537
  });
529
538
  const steerState = { steered: true };
530
539
  const { dispatcher, replyOptions } = createXYReplyDispatcher({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.141-beta",
3
+ "version": "0.0.142-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",