← Back to PRs

#15914: feat: add messages.suppressMediaPlaceholders config option

by Shuai-DaiDai open 2026-02-14 02:12 View on GitHub →
channel: discord channel: imessage channel: signal gateway agents stale size: S
## Problem When sending audio/voice messages via OpenClaw's message tool, the core automatically adds `<media:audio>` as fallback text (#15840). This appears even when explicitly passing an empty message parameter. ## Solution Add `messages.suppressMediaPlaceholders` config option to disable automatic placeholder text. ## Changes - **Config**: Add `suppressMediaPlaceholders?: boolean` to `MessagesConfig` type - **Signal**: Skip placeholder when `suppressMediaPlaceholders` is true - **iMessage**: Skip placeholder when `suppressMediaPlaceholders` is true ## Usage ```json { "messages": { "suppressMediaPlaceholders": true } } ``` With this enabled, voice-only messages show just the audio attachment without `<media:audio>` text. ## Default Behavior Default is `false` to preserve existing accessibility fallback behavior. Fixes #15840 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR bundles multiple unrelated fixes into a single commit: the `suppressMediaPlaceholders` config option (Signal/iMessage), Venice streaming disable, cron timestamp normalization, daemon launchd detection stricter filtering, Discord bot self-message filtering, and hook debug logging. - **`suppressMediaPlaceholders` config (Signal + iMessage)**: Cleanly implemented — the new boolean config option correctly gates placeholder insertion, and both channels handle the empty-message-with-attachment case safely via existing validation guards. - **`src/daemon/inspect.ts` — Critical logic bug**: The new guard skips non-gateway openclaw services, but the *pre-existing* guard already skips gateway openclaw services. Together these two conditions cover all `marker === "openclaw"` cases, meaning **no** openclaw service is ever reported. This effectively disables gateway conflict detection entirely. - **`src/agents/venice-models.ts` — Type error**: Adds `params: { streaming: false }` to `ModelDefinitionConfig` objects, but that type has no `params` property. This will fail strict TypeScript type-checking. - **`src/cron/normalize.ts` — Missing kind inference**: Adds support for numeric `schedule.at` timestamps, but the kind-inference block doesn't check `typeof schedule.at === "number"`, so numeric `at` without explicit `kind` won't auto-infer `kind: "at"`. - **Discord + hooks changes**: The Discord early bot-filter and hook debug logging are straightforward and correct. <h3>Confidence Score: 1/5</h3> - This PR contains a critical logic bug in daemon/inspect.ts that silently disables gateway detection, plus a type error in venice-models.ts. - Score of 1 reflects two blocking issues: (1) the daemon inspect logic bug where both gateway and non-gateway openclaw services are skipped, completely breaking the conflict detection feature, and (2) the TypeScript type error where `params` is not a valid property of `ModelDefinitionConfig`. There is also a minor logic gap in cron normalize kind inference for numeric `at` values. - Pay close attention to `src/daemon/inspect.ts` (logic bug silently skips all openclaw services), `src/agents/venice-models.ts` (type error), and `src/cron/normalize.ts` (missing kind inference for numeric `at`). <sub>Last reviewed commit: 21ebfbc</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs