@marshulll/openclaw-wecom 0.1.13 → 0.1.14
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/package.json +1 -1
- package/wecom/src/wecom-app.ts +4 -4
package/package.json
CHANGED
package/wecom/src/wecom-app.ts
CHANGED
|
@@ -362,7 +362,7 @@ async function processAppMessage(params: {
|
|
|
362
362
|
await writeFile(tempVoicePath, media.buffer);
|
|
363
363
|
mediaContext = { type: "voice", path: tempVoicePath };
|
|
364
364
|
logVerbose(target, `app voice saved (${media.buffer.length} bytes): ${tempVoicePath}`);
|
|
365
|
-
messageText = `[
|
|
365
|
+
messageText = `[用户发送了一条语音消息,已保存到: ${tempVoicePath}]\n\n请根据语音内容回复用户。`;
|
|
366
366
|
}
|
|
367
367
|
} catch (err) {
|
|
368
368
|
target.runtime.error?.(`wecom app voice download failed: ${String(err)}`);
|
|
@@ -407,7 +407,7 @@ async function processAppMessage(params: {
|
|
|
407
407
|
await writeFile(tempImagePath, buffer);
|
|
408
408
|
mediaContext = { type: "image", path: tempImagePath, url: picUrl || undefined };
|
|
409
409
|
logVerbose(target, `app image saved (${buffer.length} bytes): ${tempImagePath}`);
|
|
410
|
-
messageText =
|
|
410
|
+
messageText = `[用户发送了一张图片,已保存到: ${tempImagePath}]\n\n请根据图片内容回复用户。`;
|
|
411
411
|
}
|
|
412
412
|
} else {
|
|
413
413
|
messageText = "[用户发送了一张图片,但下载失败]\n\n请告诉用户图片处理暂时不可用。";
|
|
@@ -446,7 +446,7 @@ async function processAppMessage(params: {
|
|
|
446
446
|
await writeFile(tempVideoPath, media.buffer);
|
|
447
447
|
mediaContext = { type: "video", path: tempVideoPath };
|
|
448
448
|
logVerbose(target, `app video saved (${media.buffer.length} bytes): ${tempVideoPath}`);
|
|
449
|
-
messageText =
|
|
449
|
+
messageText = `[用户发送了一个视频文件,已保存到: ${tempVideoPath}]\n\n请根据视频内容回复用户。`;
|
|
450
450
|
}
|
|
451
451
|
} catch (err) {
|
|
452
452
|
target.runtime.error?.(`wecom app video download failed: ${String(err)}`);
|
|
@@ -478,7 +478,7 @@ async function processAppMessage(params: {
|
|
|
478
478
|
await writeFile(tempFilePath, media.buffer);
|
|
479
479
|
mediaContext = { type: "file", path: tempFilePath };
|
|
480
480
|
logVerbose(target, `app file saved (${media.buffer.length} bytes): ${tempFilePath}`);
|
|
481
|
-
messageText = `[用户发送了一个文件: ${safeName}]\n\n请根据文件内容回复用户。`;
|
|
481
|
+
messageText = `[用户发送了一个文件: ${safeName},已保存到: ${tempFilePath}]\n\n请根据文件内容回复用户。`;
|
|
482
482
|
}
|
|
483
483
|
} catch (err) {
|
|
484
484
|
target.runtime.error?.(`wecom app file download failed: ${String(err)}`);
|