Skip to main content

Module input

Module input 

Source
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§

FileContext
A file’s contents loaded from an @path reference.
PasteBlock
Content pasted via clipboard (bracketed paste).
ProcessedInput
Result of processing user input for @path references.

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 @path tokens and bare image paths (drag-and-drop), read the files, and return cleaned prompt plus file contents and images.