Skip to main content

Module attachments

Module attachments 

Source
Expand description

Explicit local attachment ingestion. No URL fetches or implicit path expansion in prompts. Bytes are captured once and retained in private session history; archive/memory projections deliberately omit image/document source payloads.

Structs§

LoadedAttachment
PendingAttachments

Constants§

MAX_ATTACHMENTS
MAX_PDF_BYTES
MAX_TEXT_BYTES

Functions§

build_user_content
load_attachment
Asynchronous bounded read on an opened regular-file handle. On Unix, O_NONBLOCK avoids FIFO-open hangs and O_NOFOLLOW refuses symlink leaves. Parent symlinks are allowed: selection of a local path is explicit consent.
load_attachment_sync
Synchronous variant of load_attachment for use in non-async contexts (TUI command handlers). Calls the blocking I/O directly on the current thread — acceptable for the TUI, which already blocks on user input.