Carl 2 місяців тому
батько
коміт
1c14ece9fe
1 змінених файлів з 20 додано та 1 видалено
  1. 20 1
      SKILL.md

+ 20 - 1
SKILL.md

@@ -60,7 +60,26 @@ Requirements:
 
 ### Step 4: Return Results
 
-On success, return the generated local image paths and a concise summary of what was generated.
+On success, the JSON output contains both `images` (local paths) and `raw_response.output_images` (public OSS URLs).
+
+**Sending the image — channel-aware logic:**
+
+Check the current channel from inbound metadata (`channel` field).
+
+**Feishu / 飞书:**
+- Send the local file path directly: `message(media=images[0])`
+- No compression needed, Feishu supports large files.
+
+**WeChat (openclaw-weixin) / 微信:**
+- Must compress first to under 130KB, then send local file:
+  ```bash
+  python3.11 ~/.openclaw/workspace/skills/qwen-image-skill/scripts/compress_image.py <input> <input>.compressed.jpg --max-kb 130
+  ```
+  Then: `message(media=<compressed_path>)`
+
+**Other channels (Telegram, Discord, etc.):**
+- Try sending OSS URL first: `message(media=raw_response.output_images[0])`
+- If that fails, fall back to local file path.
 
 On failure: