Skip to main content

Module output_view

Module output_view 

Source
Expand description

Saved copies of long capability output.

A result longer than the inline limit is kept whole in a file under the system temporary directory, and the model receives the fileโ€™s path, size, line count and a preview, which it searches with the run_command builtin. Nothing here limits or deletes saved files: they live as long as the temporary directory keeps them. Verification always uses the original result.

Constantsยง

PREVIEW_CHARS ๐Ÿ”’
Characters of a saved file shown to the model next to its path.
SEARCH_NOTE ๐Ÿ”’
How the model should use a saved file instead of repeating the call.
STORAGE_NOTE ๐Ÿ”’
What the model should do when output could not be saved completely.

Staticsยง

SERIAL ๐Ÿ”’

Functionsยง

create ๐Ÿ”’
Create a new private file for one output.
describe ๐Ÿ”’
Path, size, line count and preview of a saved file.
inline_bytes ๐Ÿ”’
Results longer than this many UTF-8 bytes are saved instead of inlined.
is_image ๐Ÿ”’
Images keep their existing multimodal path in Pilot.
now_unix ๐Ÿ”’
output_dir ๐Ÿ”’
This processโ€™s private directory under the system temporary directory.
prepare
Return result with long text replaced by a reference to its saved copy.
prepare_in ๐Ÿ”’
save ๐Ÿ”’
ๆต™ICPๅค‡2023005800ๅท-2 ๆต™ๅ…ฌ็ฝ‘ๅฎ‰ๅค‡33010902005384ๅท