@ynhcj/xiaoyi-channel 0.0.143-beta → 0.0.144-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.
- package/dist/src/bot.js +6 -1
- package/package.json +1 -1
package/dist/src/bot.js
CHANGED
|
@@ -503,7 +503,12 @@ async function dispatchSteerWhenReady(params) {
|
|
|
503
503
|
// 3. 构建 dispatch 上下文并 dispatch /steer
|
|
504
504
|
const core = getXYRuntime();
|
|
505
505
|
const speaker = sessionId;
|
|
506
|
-
|
|
506
|
+
// 如果有文件附件,把路径拼到 steer 文本末尾,让模型通过工具读取
|
|
507
|
+
const mediaPaths = params.mediaPayload?.MediaPaths;
|
|
508
|
+
const fileHint = mediaPaths && mediaPaths.length > 0
|
|
509
|
+
? `\n【用户上传附件】:${JSON.stringify(mediaPaths)}`
|
|
510
|
+
: "";
|
|
511
|
+
const steerCommand = `/steer ${steerText}${fileHint}`;
|
|
507
512
|
const messageBody = `${speaker}: ${steerCommand}`;
|
|
508
513
|
const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(params.cfg);
|
|
509
514
|
const body = core.channel.reply.formatAgentEnvelope({
|