Expand description
Input processing — @file references and image loading.
Processes user input for @path references, loading file contents
as additional context and images for multi-modal prompts.
Structs§
- File
Context - A file’s contents loaded from an
@pathreference. - Paste
Block - Content pasted via clipboard (bracketed paste).
- Processed
Input - Result of processing user input for
@pathreferences.
Constants§
- PASTE_
BLOCK_ THRESHOLD - Pastes shorter than this go inline in the textarea; longer ones become PasteBlocks.
Functions§
- format_
context_ files - Format file contexts into a string suitable for injection into the user message sent to the LLM.
- format_
paste_ blocks - Format paste blocks into semantically tagged XML for the LLM.
- process_
input - Scan input for
@pathtokens and bare image paths (drag-and-drop), read the files, and return cleaned prompt plus file contents and images.