Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSupportedFileType ¶
IsSupportedFileType checks if a file has a supported extension.
func ParsePastedFiles ¶
ParsePastedFiles attempts to parse pasted content as file paths. It handles different terminal formats: - Unix: space-separated with backslash escaping - Windows Terminal: quote-wrapped paths - Single file: just the path
Returns nil if the content doesn't look like file paths.
Types ¶
type AttachmentPreview ¶
AttachmentPreview describes an attachment and its contents for dialog display.
type Editor ¶
type Editor interface {
layout.Model
layout.Sizeable
layout.Focusable
SetWorking(working bool) tea.Cmd
AcceptSuggestion() tea.Cmd
ScrollByWheel(delta int)
// Value returns the current editor content
Value() string
// SetValue updates the editor content
SetValue(content string)
// InsertText inserts text at the current cursor position
InsertText(text string)
// AttachFile adds a file as an attachment and inserts @filepath into the editor
AttachFile(filePath string) error
Cleanup()
GetSize() (width, height int)
BannerHeight() int
AttachmentAt(x int) (AttachmentPreview, bool)
// SetRecording sets the recording mode which shows animated dots as the cursor
SetRecording(recording bool) tea.Cmd
// IsRecording returns true if the editor is in recording mode
IsRecording() bool
// IsHistorySearchActive returns true if the editor is in history search mode
IsHistorySearchActive() bool
// EnterHistorySearch activates incremental history search
EnterHistorySearch() (layout.Model, tea.Cmd)
// SendContent triggers sending the current editor content
SendContent() tea.Cmd
}
Editor represents an input editor component
Click to show internal directories.
Click to hide internal directories.