Files
mguinhos d17575771b Projeto: app demo, servidor/firmware em software/, simulacao Godot, planta do bloco D, chapas MDF da base, renders e slides
- app/: app demo (Kivy/buildozer) da API do robo
- software/: servidor RoboMovel (SLAM, profundidade, navegacao) e firmware da base movel (movido de firmware/)
- simulacao/: projeto Godot do robo e script de lancamento servidor + simulacao
- modelos/: planta do 5o andar do bloco D, cena Blender do corredor e modelo real do robo
- partes/mdf/: chapas identificadas e nesting da base do robo (DXF/SVG/FCStd)
- projeto/render, relatorio/imagens, slides: renders finais e apresentacoes de progresso
- ferramentas/scripts: encaixe de chapas, planta do bloco D e render do corredor no Blender
- .gitignore: ignora backups do Blender/FreeCAD e .godot/
2026-10-25 23:38:16 -03:00

1.6 KiB

read_file

Read a file, including images.

Input — path (required), offset (optional, 1-based line), limit (optional, line count)

Text files come back as text. Images come back as an attachment the model can actually look at. Anything else is refused.

Which is which is decided by the leading bytes, not the extension: a screenshot saved as .dat is still a PNG, and a .png that is really text should not be announced as an image. PNG, JPEG, GIF and WebP are recognised. A file with a NUL byte in its first 8 KB is treated as binary and refused with its type and size, rather than decoded as UTF-8 into noise.

Whether an image is actually attached depends on the vision column in data/providers.csv for the current model — true/false where someone has checked, blank where nobody has, which is treated as worth attempting. When it isn't attached, the result says so instead of failing silently.

A tool result is text-only in all three protocols this addon speaks, so an attached image is added to the conversation as a separate user message right after the tool result.

Size

Reading whole files is capped at 200 KB. Over that it refuses and reports the size and line count, and you read it in parts with offset and limit — the result says which lines you got and how many there are in total.

The cap exists because a tool result that overflows the context doesn't just fail once: it stays in the conversation and every later request repeats it. A session .chat full of base64 images once put 1,088,124 tokens into a single request this way.