mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-26 23:27:51 +00:00
fix(whatsapp): align CLI surface and prompt snapshots with forceDocument schema
Follow-up to the previous commit on this branch. The agent message-tool schema now describes forceDocument/asDocument as a cross-channel knob, so the public CLI help and the user-facing CLI docs need to match, and the regenerated prompt snapshot fixtures need to drop the stale "Telegram only" string the schema no longer emits. * src/cli/program/message/register.send.ts: rephrase the `--force-document` CLI option help from "Send media as document to avoid Telegram compression (Telegram only)" to "Send media as document to avoid channel compression (Telegram, WhatsApp)" so `openclaw message send --help` no longer claims Telegram exclusivity. * docs/cli/message.md: change the per-flag entry under `send` from "Telegram only: --force-document (...avoid Telegram compression)" to "Telegram + WhatsApp: --force-document (...avoid channel compression)" so the public docs match both the schema and the CLI help. * test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/*: regenerate via `pnpm prompt:snapshots:gen` so the captured tool descriptions, dynamic-tools JSON, and rough-token counts reflect the new schema strings. Six fixtures change in lockstep: - discord-group-codex-message-tool.md - telegram-direct-codex-message-tool.md - telegram-heartbeat-codex-tool.md - codex-dynamic-tools.discord-group.json - codex-dynamic-tools.telegram-direct.json - codex-dynamic-tools.heartbeat-turn.json Verified locally: * `pnpm prompt:snapshots:check` reports 7 files current. * `pnpm exec oxfmt --check --threads=1` is clean for both touched ts files plus docs/cli/message.md and CHANGELOG.md. * `pnpm test extensions/whatsapp/src/send.test.ts extensions/whatsapp/src/inbound/send-api.test.ts` keeps the 51-case WhatsApp send/inbound suite green, including the three new forceDocument/asDocument cases from the previous commit.
This commit is contained in:
@@ -72,7 +72,7 @@ Name lookup:
|
||||
- Optional: `--media`, `--presentation`, `--delivery`, `--pin`, `--reply-to`, `--thread-id`, `--gif-playback`, `--force-document`, `--silent`
|
||||
- Shared presentation payloads: `--presentation` sends semantic blocks (`text`, `context`, `divider`, `buttons`, `select`) that core renders through the selected channel's declared capabilities. See [Message Presentation](/plugins/message-presentation).
|
||||
- Generic delivery preferences: `--delivery` accepts delivery hints such as `{ "pin": true }`; `--pin` is shorthand for pinned delivery when the channel supports it.
|
||||
- Telegram only: `--force-document` (send images, GIFs, and videos as documents to avoid Telegram compression)
|
||||
- Telegram + WhatsApp: `--force-document` (send images, GIFs, and videos as documents to avoid channel compression)
|
||||
- Telegram only: `--thread-id` (forum topic id)
|
||||
- Slack only: `--thread-id` (thread timestamp; `--reply-to` uses the same field)
|
||||
- Telegram + Discord: `--silent`
|
||||
|
||||
@@ -26,7 +26,7 @@ export function registerMessageSendCommand(message: Command, helpers: MessageCli
|
||||
.option("--gif-playback", "Treat video media as GIF playback (WhatsApp only).", false)
|
||||
.option(
|
||||
"--force-document",
|
||||
"Send media as document to avoid Telegram compression (Telegram only). Applies to images and GIFs.",
|
||||
"Send media as document to avoid channel compression (Telegram, WhatsApp). Applies to images and GIFs.",
|
||||
false,
|
||||
)
|
||||
.option(
|
||||
|
||||
@@ -625,7 +625,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"asDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression. Alias for forceDocument (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression. Alias for forceDocument.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"asVoice": {
|
||||
@@ -702,7 +702,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"forceDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"gatewayToken": {
|
||||
|
||||
@@ -625,7 +625,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"asDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression. Alias for forceDocument (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression. Alias for forceDocument.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"asVoice": {
|
||||
@@ -702,7 +702,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"forceDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"gatewayToken": {
|
||||
|
||||
@@ -625,7 +625,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"asDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression. Alias for forceDocument (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression. Alias for forceDocument.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"asVoice": {
|
||||
@@ -702,7 +702,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"forceDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"gatewayToken": {
|
||||
|
||||
@@ -602,7 +602,7 @@ Full JSON: `codex-dynamic-tools.discord-group.json`
|
||||
"type": "string"
|
||||
},
|
||||
"asDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression. Alias for forceDocument (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression. Alias for forceDocument.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"asVoice": {
|
||||
@@ -679,7 +679,7 @@ Full JSON: `codex-dynamic-tools.discord-group.json`
|
||||
"type": "string"
|
||||
},
|
||||
"forceDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"gatewayToken": {
|
||||
|
||||
@@ -579,7 +579,7 @@ Full JSON: `codex-dynamic-tools.telegram-direct.json`
|
||||
"type": "string"
|
||||
},
|
||||
"asDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression. Alias for forceDocument (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression. Alias for forceDocument.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"asVoice": {
|
||||
@@ -656,7 +656,7 @@ Full JSON: `codex-dynamic-tools.telegram-direct.json`
|
||||
"type": "string"
|
||||
},
|
||||
"forceDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"gatewayToken": {
|
||||
|
||||
@@ -596,7 +596,7 @@ Full JSON: `codex-dynamic-tools.heartbeat-turn.json`
|
||||
"type": "string"
|
||||
},
|
||||
"asDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression. Alias for forceDocument (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression. Alias for forceDocument.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"asVoice": {
|
||||
@@ -673,7 +673,7 @@ Full JSON: `codex-dynamic-tools.heartbeat-turn.json`
|
||||
"type": "string"
|
||||
},
|
||||
"forceDocument": {
|
||||
"description": "Send image/GIF as document to avoid Telegram compression (Telegram only).",
|
||||
"description": "Send image/GIF as document to avoid channel compression.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"gatewayToken": {
|
||||
|
||||
Reference in New Issue
Block a user