Documentation
¶
Index ¶
- func ErrorBanner(err error, width int) string
- func Height(str string) int
- func IsImageMIME(mime string) bool
- func OpenDataBackground(data []byte, mimeType string) error
- func OpenTempfileEditor(pattern string, content string, placeholder string) tea.Cmd
- func ScrollIntoView(vp *viewport.Model, offset int, edge int)
- func SystemOpener() string
- func TruncateLeftToCellWidth(str string, width int, tail string) string
- func TruncateRightToCellWidth(str string, width int, tail string) string
- func Width(str string) int
- type MsgTempfileEditorClosed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorBanner ¶
func IsImageMIME ¶
IsImageMIME reports whether the MIME type is an image type supported by LLM APIs.
func OpenDataBackground ¶
OpenDataBackground writes data to a temporary file derived from mimeType and opens it with the system viewer in a background goroutine. The temp file is cleaned up when the viewer exits.
func OpenTempfileEditor ¶
OpenTempfileEditor opens $EDITOR on a temporary file with the given content. Upon closing, the contents of the file are read and returned wrapped in a MsgTempfileEditorClosed
func SystemOpener ¶
func SystemOpener() string
SystemOpener returns the system command used to open files (xdg-open on Linux/BSD, open on macOS).
func TruncateLeftToCellWidth ¶
Types ¶
type MsgTempfileEditorClosed ¶
type MsgTempfileEditorClosed string
Click to show internal directories.
Click to hide internal directories.