Return a per-extension hint the model can act on, or a generic fallback. PDF specifically points at the Read tool's ``pages`` parameter, mirroring TS's behaviour where PDFs are surfaced through Read rather than auto-inlined via @-mention.
(ext: str)
| 356 | |
| 357 | |
| 358 | def _binary_hint_for_ext(ext: str) -> str: |
| 359 | """Return a per-extension hint the model can act on, or a generic |
| 360 | fallback. PDF specifically points at the Read tool's ``pages`` |
| 361 | parameter, mirroring TS's behaviour where PDFs are surfaced through |
| 362 | Read rather than auto-inlined via @-mention.""" |
| 363 | if ext == "pdf": |
| 364 | return ( |
| 365 | "PDFs cannot be inlined as @-mention text. Use the Read tool " |
| 366 | "with the ``pages`` parameter (e.g. ``pages=\"1-5\"``) to view " |
| 367 | "specific page ranges." |
| 368 | ) |
| 369 | return ( |
| 370 | "This file is binary and cannot be inlined as text. Use the Read " |
| 371 | "tool to view it if it is a supported format." |
| 372 | ) |
| 373 | |
| 374 | |
| 375 | def _try_build_image_attachment( |
no outgoing calls
no test coverage detected