MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _binary_hint_for_ext

Function _binary_hint_for_ext

src/command_system/input_processing.py:358–372  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

356
357
358def _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
375def _try_build_image_attachment(

Callers 1

expand_at_mentionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected