Expand description
Files a message names as @path, read to go with it: an image as an
image, any other file as its text, capped the way read shows it, so
the model needs no read call for it.
Structs§
- Attached
- What a message’s
@pathreferences came to.
Functions§
- attached_
file - The label and the contents of an attached text file, when
textis one, so a view can show it without the markup around it. - attachments
- The files
textnames with@path, each once, resolved frombaseinworkspaceand read from it. Every@token that names a file there is attached, whatever its shape (@notes.md,@src/lib.rs,@Makefile,@.env); one with no file there is missing when it looks like a path, and otherwise stays text, such as@aliceor@alice.smith. A token’s trailing punctuation is not part of its path. A leading~/is the user’s home on this machine; in another workspace it is not attached, with a note. - first_
typed - What the user typed first in
conversation(typed). - is_
image_ path - Whether
pathnames an image by its extension. - is_
path_ reference - Whether
reference, an@token without its@, looks like a path by its shape alone: it holds a/, or ends in a dot and one to four letters or digits.attachmentsreports such a token as missing when no file is there; any other token (a mention, an address, or a file with no extension) is attached only when its file is there, and is otherwise left as text. - read_
image - The image at
pathinworkspaceas message content, its type told by its first bytes; why not, for a file that cannot be read, is larger than a provider takes, or is not a PNG, JPEG, GIF or WebP image. - typed
- What the user typed in message
atofconversation: the text items of a message of the user’s own (EntryRef::is_users_own), never of one an agent or a plugin delivered, such as a note, nor a file attached, each trimmed, joined by a blank line;Nonewhen it has none.