workflow

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHint

func FormatHint(command string, recommendations []string) string

FormatHint renders recommendations for CLI output.

func PrintRecommendations

func PrintRecommendations(out io.Writer, command string)

PrintRecommendations records a command and prints next-step hints.

func RecommendFor

func RecommendFor(command string) []string

RecommendFor returns next-step suggestions after a command name.

Types

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

Memory stores command transition frequencies for next-step recommendations.

func NewMemory

func NewMemory() (*Memory, error)

NewMemory loads workflow memory from the fastgit config directory.

func (*Memory) LastCommandName

func (m *Memory) LastCommandName() string

LastCommandName returns the most recently recorded command.

func (*Memory) Recommend

func (m *Memory) Recommend(command string) []string

Recommend returns suggested next commands after the given command.

func (*Memory) Record

func (m *Memory) Record(command string) error

Record stores a completed command name.

func (*Memory) Save

func (m *Memory) Save() error

Save persists workflow memory.

type State

type State struct {
	Enabled     bool                      `yaml:"enabled"`
	Transitions map[string]map[string]int `yaml:"transitions,omitempty"`
	LastCommand string                    `yaml:"last_command,omitempty"`
}

State is persisted workflow memory.

Jump to

Keyboard shortcuts

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