Skip to content

Commit 8593f90

Browse files
committed
docs: warn that MEDIA: directives must be plain text (no markdown wrap)
The MEDIA: parser only matches plain-text directives. Wrapping the directive in Markdown (bold, inline code, fenced code) makes the parser skip it and the attachment is silently dropped from delivery. Add an explicit warning callout on the rich-output protocol page with valid/invalid examples so authors do not silently lose media. Refs #78495
1 parent 6b1c868 commit 8593f90

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

‎docs/reference/rich-output-protocol.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,28 @@ Local `MEDIA:` attachments can use absolute paths, workspace-relative paths, or
2121
home-relative `~/` paths. They still pass through the agent file-read policy and
2222
media type checks before delivery.
2323

24+
<Warning>
25+
`MEDIA:` is parsed only as plain text. Wrapping the directive in Markdown
26+
formatting (bold, inline code, fenced code) prevents the parser from
27+
recognizing it, and the attachment is silently dropped from delivery.
28+
29+
Valid:
30+
31+
```text
32+
MEDIA:/workspace/image.png
33+
```
34+
35+
Invalid (parsed as prose, no attachment delivered):
36+
37+
```text
38+
**MEDIA:/workspace/image.png**
39+
`MEDIA:/workspace/image.png`
40+
Here is your image: MEDIA:/workspace/image.png
41+
```
42+
43+
Keep `MEDIA:` on its own line, in plain text, with no surrounding formatting.
44+
</Warning>
45+
2446
Plain Markdown image syntax stays text by default. Channels that intentionally
2547
map Markdown image replies to media attachments opt in at their outbound
2648
adapter; Telegram does this so `![alt](url)` can still become a media reply.

0 commit comments

Comments
 (0)