Documentation
¶
Index ¶
- func ContainsAllOption(items []string) bool
- func RunEditorWithFallback(cfg *types.Config, filePath string) error
- type BraveSearchResult
- type BraveWebResult
- type Terminal
- func (t *Terminal) CodeDump() (string, error)
- func (t *Terminal) CodeDumpFromDir(targetDir string) (string, error)
- func (t *Terminal) CodeDumpFromDirForCLI(targetDir string) (string, error)
- func (t *Terminal) CopyLatestResponseToClipboard(chatHistory []types.ChatHistory) error
- func (t *Terminal) CopyResponsesInteractive(chatHistory []types.ChatHistory, messages []types.ChatMessage) error
- func (t *Terminal) CopyToClipboard(content string) error
- func (t *Terminal) ExtractSentencesFromChatHistory(chatHistory []types.ChatHistory, messages []types.ChatMessage) []string
- func (t *Terminal) ExtractSentencesFromText(text string) []string
- func (t *Terminal) ExtractURLsFromChatHistory(chatHistory []types.ChatHistory) []string
- func (t *Terminal) ExtractURLsFromMessages(messages []types.ChatMessage) []string
- func (t *Terminal) ExtractURLsFromText(text string) []string
- func (t *Terminal) FzfMultiSelect(items []string, prompt string) ([]string, error)
- func (t *Terminal) FzfMultiSelectExact(items []string, prompt string) ([]string, error)
- func (t *Terminal) FzfMultiSelectForCLI(items []string, prompt string) ([]string, error)
- func (t *Terminal) FzfSelect(items []string, prompt string) (string, error)
- func (t *Terminal) FzfSelectOrQuery(items []string, prompt string) (string, error)
- func (t *Terminal) GetCurrentDirFilesRecursive() ([]string, error)
- func (t *Terminal) GetDirFilesRecursive(targetDir string) ([]string, error)
- func (t *Terminal) IsTerminal() bool
- func (t *Terminal) IsURL(str string) bool
- func (t *Terminal) LoadFileContent(selections []string) (string, error)
- func (t *Terminal) PrintError(message string)
- func (t *Terminal) PrintInfo(message string)
- func (t *Terminal) PrintModelSwitch(model string)
- func (t *Terminal) PrintPlatformSwitch(platform, model string)
- func (t *Terminal) PrintSuccess(message string)
- func (t *Terminal) RecordShellSession() (string, error)
- func (t *Terminal) ScrapeURLs(urls []string) (string, error)
- func (t *Terminal) ShowHelp()
- func (t *Terminal) ShowHelpFzf() string
- func (t *Terminal) ShowLoadingAnimation(message string, done chan bool)
- func (t *Terminal) WebSearch(query string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsAllOption ¶
ContainsAllOption checks if the ">all" option was selected in a list of items
Types ¶
type BraveSearchResult ¶
type BraveSearchResult struct {
Web struct {
Results []BraveWebResult `json:"results"`
} `json:"web"`
}
BraveSearchResult represents the top-level structure of the Brave Search API response
type BraveWebResult ¶
type BraveWebResult struct {
Title string `json:"title"`
URL string `json:"url"`
Description string `json:"description"`
}
BraveWebResult represents a single web result from the Brave Search API
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal handles terminal-related operations
func NewTerminal ¶
NewTerminal creates a new terminal handler
func (*Terminal) CodeDump ¶
CodeDump generates a comprehensive code dump of all text files in the current directory
func (*Terminal) CodeDumpFromDir ¶
CodeDumpFromDir generates a comprehensive code dump of all text files in the specified directory
func (*Terminal) CodeDumpFromDirForCLI ¶
CodeDumpFromDirForCLI generates a comprehensive code dump for CLI usage with cancellation detection
func (*Terminal) CopyLatestResponseToClipboard ¶
func (t *Terminal) CopyLatestResponseToClipboard(chatHistory []types.ChatHistory) error
CopyLatestResponseToClipboard copies the latest bot response directly to clipboard
func (*Terminal) CopyResponsesInteractive ¶
func (t *Terminal) CopyResponsesInteractive(chatHistory []types.ChatHistory, messages []types.ChatMessage) error
CopyResponsesInteractive allows user to select and copy chat responses to clipboard
func (*Terminal) CopyToClipboard ¶
CopyToClipboard copies content to the system clipboard with cross-platform support
func (*Terminal) ExtractSentencesFromChatHistory ¶
func (t *Terminal) ExtractSentencesFromChatHistory(chatHistory []types.ChatHistory, messages []types.ChatMessage) []string
ExtractSentencesFromChatHistory scans the entire chat history and extracts all unique sentences
func (*Terminal) ExtractSentencesFromText ¶
ExtractSentencesFromText extracts all sentences from a given text
func (*Terminal) ExtractURLsFromChatHistory ¶
func (t *Terminal) ExtractURLsFromChatHistory(chatHistory []types.ChatHistory) []string
ExtractURLsFromChatHistory scans the entire chat history and extracts all unique URLs
func (*Terminal) ExtractURLsFromMessages ¶
func (t *Terminal) ExtractURLsFromMessages(messages []types.ChatMessage) []string
ExtractURLsFromMessages scans all chat messages and extracts all unique URLs
func (*Terminal) ExtractURLsFromText ¶
ExtractURLsFromText extracts all URLs from a given text using regex
func (*Terminal) FzfMultiSelect ¶
FzfMultiSelect provides a fuzzy finder interface for multiple selections
func (*Terminal) FzfMultiSelectExact ¶
FzfMultiSelectExact provides an exact matching fuzzy finder interface for multiple selections
func (*Terminal) FzfMultiSelectForCLI ¶
FzfMultiSelectForCLI provides a fuzzy finder interface for multiple selections with cancellation detection
func (*Terminal) FzfSelectOrQuery ¶
FzfSelectOrQuery provides a fuzzy finder interface that allows for selection or custom query input.
func (*Terminal) GetCurrentDirFilesRecursive ¶
GetCurrentDirFilesRecursive returns all files and directories in the current directory and subdirectories
func (*Terminal) GetDirFilesRecursive ¶
GetDirFilesRecursive returns all files and directories in the specified directory and subdirectories
func (*Terminal) IsTerminal ¶
IsTerminal checks if the input is from a terminal
func (*Terminal) LoadFileContent ¶
LoadFileContent loads and returns content from selected files/directories or URLs
func (*Terminal) PrintError ¶
PrintError prints an error message
func (*Terminal) PrintModelSwitch ¶
PrintModelSwitch prints model switch confirmation
func (*Terminal) PrintPlatformSwitch ¶
PrintPlatformSwitch prints platform switch confirmation
func (*Terminal) PrintSuccess ¶
PrintSuccess prints a success message
func (*Terminal) RecordShellSession ¶
RecordShellSession records the entire shell session and returns the content as a string.
func (*Terminal) ScrapeURLs ¶
ScrapeURLs scrapes content from multiple URLs
func (*Terminal) ShowHelpFzf ¶
ShowHelpFzf displays the help information using fzf for interactive selection. Returns the selected command if it should be executed, empty string otherwise.
func (*Terminal) ShowLoadingAnimation ¶
ShowLoadingAnimation displays a loading animation