Documentation
¶
Overview ¶
Package image loads a local image file into the base64 form the model providers expect, downscaling oversized PNG and JPEG images so a phone-sized screenshot does not blow the token budget.
Index ¶
Constants ¶
View Source
const MaxBytes = 8 << 20 // 8 MiB
MaxBytes caps the encoded payload so a huge file cannot be attached by mistake. It applies to formats we do not re-encode (GIF, WebP).
View Source
const MaxDim = 1568
MaxDim is the longest edge, in pixels, kept after downscaling. It matches the size above which the Anthropic API resizes anyway, so sending more is waste.
Variables ¶
This section is empty.
Functions ¶
func IsImagePath ¶
IsImagePath reports whether a path looks like an image by extension. The TUI uses it to decide whether an @mention should attach rather than inline.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.