toggle

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

The words of the switches of the terminal app: what each word typed after the slash word of a switch makes of the value it holds, the values each takes, and the spinner each busy indicator turns

Index

Constants

View Source
const (
	StatusTop    = "top"
	StatusBottom = "bottom"
	StatusOff    = "off"
)

Where the status line of a chat sits: as dials on the bar at the top of the window, on the bottom edge of the chat's own frame, or nowhere

View Source
const (
	DensityComfortable = "comfortable"
	DensityCompact     = "compact"
	DensityDense       = "dense"
)

How close the transcript of a chat is set: a blank row between its parts and inside them, between its parts alone, or none at all

View Source
const (
	ProgressOff     = "off"
	ProgressNew     = "new"
	ProgressAll     = "all"
	ProgressVerbose = "verbose"
)

Which tool calls get a line in a transcript: none, one when the tool changes, every call, or every call open with all it was given and all it answered

View Source
const (
	DetailMinimal    = "minimal"
	DetailNormal     = "normal"
	DetailDetailed   = "detailed"
	DetailEverything = "everything"
	DetailCustom     = "custom"
)

How much of the agent's work a transcript shows, alpha's detail levels: replies alone, each call a folded line, calls and reasoning open, every call with its whole input and output; custom once its parts were set one by one

View Source
const (
	FoldHidden = "hidden"
	FoldFolded = "folded"
	FoldOpen   = "open"
)

How the reasoning of a transcript shows: not at all, folded to a line, or open

View Source
const (
	IndicatorUnicode = "unicode"
	IndicatorEmoji   = "emoji"
	IndicatorASCII   = "ascii"
)

Busy indicators: the braille wheel of the style worn, the phases of the moon, or plain strokes

View Source
const SessionScope = "--session"

Word after /detail that keeps the level to the chat it was typed in rather than the profile's settings

Variables

Densities from the most room to the least

Detail levels /detail takes, the least shown first

Busy indicators /indicator takes

View Source
var MouseWords = []string{"on", "off", "toggle", "wheel", "buttons", "all"}

Words /mouse offers, in the order its usage names them

Tool lines in the order /verbose goes through them

View Source
var StatusWords = []string{"on", "off", "top", "bottom", "toggle"}

Words /statusbar offers

Functions

func Density

func Density(word, now string) (string, bool)

Density the word asks for, as alpha's /density takes it: nothing and toggle go from comfortable to compact and from any other back, on is compact, off comfortable, and a density by its name; false for a word it does not take

func Detail

func Detail(words string) (level string, session, ok bool)

Level and scope the words after /detail ask for: a level by its name, or none to say the one in force, and --session for this chat alone, in either order; false for any other word or a second level

func Flag

func Flag(word string, now bool) (bool, bool)

Turns a switch on or off by the word typed after its slash word: nothing and toggle turn it over, on and off say which, as alpha's switches take them; false for any other word

func Indicator

func Indicator(word, now string) (string, bool)

Busy indicator the word asks for: nothing goes on to the next, and one by its name; false for any other word

func Level

func Level(parts Preset) string

Detail level the parts spell, custom when they spell none

func Mouse

func Mouse(word, now string) (string, bool)

Tracking of the mouse the word asks for: nothing and toggle turn it off, or to every move when it is off; false for a word /mouse does not take

func Progress

func Progress(word, now string) (string, bool)

Tool lines the word asks for: nothing goes on to the next of them, after verbose back to off, as alpha's /verbose does, and one by its name; false for a word it does not take

func Spinner

func Spinner(indicator string) []string

Frames a spinner turns through for the busy indicator, nil for the wheel of the style worn: the moon's phases each held for two frames, as alpha turns them at half the pace, and four strokes

func StatusBar

func StatusBar(word, now string) (string, bool)

Place of the status line the word asks for, as alpha's /statusbar takes it: nothing and toggle turn it off, or on at the top when it is off; on is the top; false for a word it does not take

Types

type Preset

type Preset struct {
	Progress, Reasoning string
	Open                bool
}

What a detail level sets: the tool lines, how reasoning shows, and whether calls and their results open

func Of

func Of(level string) (Preset, bool)

Parts the detail level sets, false for custom and any other word

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL