Documentation
¶
Index ¶
Constants ¶
const WhiteSpaceChars = " \t\n\r\f\v"
Variables ¶
This section is empty.
Functions ¶
func FormatAgentMessage ¶
func IndexSubslice ¶
func IndexSubslice[T comparable](s, sub []T) int
IndexSubslice returns the index of the first instance of sub in s, or -1 if sub is not present in s. It's not the optimal algorithm - KMP would be better - but I don't want to implement anything more complex. If I can find a library that implements a faster algorithm, I'll use it.
func RemoveUserInput ¶
RemoveUserInput removes the user input from the message. Goose, Aider, and Claude Code echo back the user's input to make it visible in the terminal. This function makes a best effort attempt to remove it. It assumes that the user input doesn't have any leading or trailing whitespace. Otherwise, the input may not be fully removed from the message. For instance, if there are any leading or trailing lines with only whitespace, and each line of the input in msgRaw is preceded by a character like `>`, these lines will not be removed.
func TrimWhitespace ¶
Types ¶
type AgentType ¶
type AgentType string
const ( AgentTypeClaude AgentType = "claude" AgentTypeGoose AgentType = "goose" AgentTypeAider AgentType = "aider" AgentTypeCodex AgentType = "codex" AgentTypeGemini AgentType = "gemini" AgentTypeCopilot AgentType = "copilot" AgentTypeAmp AgentType = "amp" AgentTypeCursor AgentType = "cursor" AgentTypeAuggie AgentType = "auggie" AgentTypeAmazonQ AgentType = "amazonq" AgentTypeOpencode AgentType = "opencode" AgentTypeCustom AgentType = "custom" )