Documentation
¶
Overview ¶
Package repl implements the interactive read-eval-print loop for yaah.
In v0.1 the REPL is a plain bufio.Scanner over stdin/stdout with ANSI escape codes for color. When the TUI lands in v0.2, the input loop swaps to bubbletea but the history and slash-command logic stay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendHistory ¶
AppendHistory appends a single entry to the history file, one per line. If the file exceeds maxHistoryBytes after the write, it is rotated: only the most recent entries fitting within maxHistoryBytes are kept.
func InitNoColor ¶
func InitNoColor()
func SlashAgentArg ¶ added in v0.153.0
SlashAgentArg extracts the persona name from an /agent input line, "" for the bare command. ParseSlashCommand must have returned CmdAgent for the input.
func SlashModeArg ¶ added in v0.164.0
SlashModeArg extracts the mode word from a /mode input line, "" for the bare command. ParseSlashCommand must have returned CmdMode for the input.
Types ¶
type SlashCommand ¶
type SlashCommand int
SlashCommand represents a recognized slash command from user input.
const ( CmdNone SlashCommand = iota CmdExit CmdClear CmdHelp CmdCompact CmdReloadRoles CmdLogin CmdLogout CmdAgents CmdAgent CmdMode )
func ParseSlashCommand ¶
func ParseSlashCommand(input string) SlashCommand
ParseSlashCommand checks if input is a recognized slash command. Returns CmdNone for regular text input and unrecognized commands.