commands

package
v2026.708.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBuiltinExitChat = errors.New("exit chat")
View Source
var ErrRestartSolomon = errors.New("restart solomon")

Functions

func Add

func Add(d Deps, parts []string) error

func AddProjectRule

func AddProjectRule(d Deps, parts []string) error

func AddRule

func AddRule(d Deps, parts []string) error

func Agent added in v2026.610.0

func Agent(d Deps) error

func AnonymizePrompt added in v2026.617.1

func AnonymizePrompt(d Deps, parts []string) error

func AutoUpdate added in v2026.603.0

func AutoUpdate(d Deps, parts []string) error

func BeginStartupConnectivityCheck added in v2026.609.3

func BeginStartupConnectivityCheck(ctx context.Context, cfg *config.Root)

func Btw added in v2026.621.0

func Btw(d Deps, parts []string) error

func Chat added in v2026.610.0

func Chat(d Deps) error

func CleanSessionCache

func CleanSessionCache(d Deps) error

func Clear

func Clear(d Deps) error

func ClearStartupOfflineForTest added in v2026.609.3

func ClearStartupOfflineForTest()

func CompactSummaryBody

func CompactSummaryBody(sep, summaryLLM, retainedBlock string) string

func ConfigBackup

func ConfigBackup(d Deps) error

func Connect

func Connect(d Deps) error

func CursorTools added in v2026.608.0

func CursorTools(d Deps, parts []string) error

func DispatchBuiltinSlash

func DispatchBuiltinSlash(d Deps, parts []string, name string) (matched bool, err error)

func DrainReplStartupInterrupt added in v2026.609.3

func DrainReplStartupInterrupt()

func ExitMessage

func ExitMessage(d Deps)

func Export added in v2026.701.0

func Export(d Deps, parts []string) error

func ExportChatBasenameForTest added in v2026.701.0

func ExportChatBasenameForTest(sess *chatstore.Session) string

func Fast

func Fast(d Deps, parts []string) error

func FormatChatTranscript

func FormatChatTranscript(msgs []chatstore.Message) string

func FormatOfflineNotice added in v2026.609.3

func FormatOfflineNotice(cfg *config.Root) string

func FormatProviderCatalogError added in v2026.609.3

func FormatProviderCatalogError(providerName string, err error) string

func FormatRetainedMessages

func FormatRetainedMessages(msgs []chatstore.Message) string

func Instructions

func Instructions(d Deps) error

func InternetReachable added in v2026.609.3

func InternetReachable(ctx context.Context, cfg *config.Root) bool

func InvalidateAndPrefetchSlashModelCatalog

func InvalidateAndPrefetchSlashModelCatalog(ctx context.Context, cfg *config.Root, out io.Writer)

func InvalidateSlashModelCatalogCache

func InvalidateSlashModelCatalogCache()

func Language

func Language(d Deps, parts []string) error

func LegacyTools

func LegacyTools(d Deps, parts []string) error

func MarkdownExportMetaForTest added in v2026.701.0

func MarkdownExportMetaForTest(title, projectRoot, model string) markdownExportMeta

func MaxResponse

func MaxResponse(d Deps, parts []string) error

func Name

func Name(d Deps, parts []string) error

func NewChat

func NewChat(d Deps) error

func Onboard

func Onboard(d Deps) error

func PlanExportPathForTest added in v2026.701.0

func PlanExportPathForTest(rootDir string, day time.Time, base string, rejectIfExists bool) (exportPathPlan, error)

func PrefetchSlashModelCatalog

func PrefetchSlashModelCatalog(ctx context.Context, cfg *config.Root, out io.Writer)

func PrepareReplStartupNotice added in v2026.609.3

func PrepareReplStartupNotice(out io.Writer)

func PrintProviderCatalogErrors added in v2026.609.3

func PrintProviderCatalogErrors(out io.Writer, errs []ProviderCatalogError)

func PrintSystem

func PrintSystem(out io.Writer, msg string)

func PrintSystemErr

func PrintSystemErr(out io.Writer, err error)

func PrintSystemValue

func PrintSystemValue(out io.Writer, v any)

func PrintSystemf

func PrintSystemf(out io.Writer, format string, args ...any)

func PromptIO

func PromptIO(d Deps) config.PromptIO

func Reasoning

func Reasoning(d Deps, parts []string) error

func Registry

func Registry(cfg *config.Root) [][]string

func RemoteMCPServerNames added in v2026.609.3

func RemoteMCPServerNames() []string

func Remove

func Remove(d Deps, parts []string) error

func RemoveProjectRule

func RemoveProjectRule(d Deps, parts []string) error

func RemoveRule

func RemoveRule(d Deps, parts []string) error

func RenderCompactSummaryBody

func RenderCompactSummaryBody(body string) string

RenderCompactSummaryBody applies terminal color to a plain-text summary body for display only. The returned string must never be persisted.

func ReplStartupInterrupt added in v2026.609.3

func ReplStartupInterrupt() <-chan struct{}

func Research added in v2026.617.0

func Research(d Deps, parts []string) error

func ResetInternetProbeURLsForTest added in v2026.624.0

func ResetInternetProbeURLsForTest()

func Resume

func Resume(d Deps, args []string) error

func Rules

func Rules(d Deps) error

func RunDocsSlash added in v2026.608.0

func RunDocsSlash(d Deps, line string) error

func RunForcedSkillSlash

func RunForcedSkillSlash(d Deps, line string) error

func RunSkillSlash

func RunSkillSlash(d Deps, e skills.SkillEntry) error

func SetInternetProbeURLsForTest added in v2026.624.0

func SetInternetProbeURLsForTest(urls []string)

func SetStartupOfflineForTest added in v2026.609.3

func SetStartupOfflineForTest(offline bool)

func Skills

func Skills(d Deps) error

func SlashBuiltinNames

func SlashBuiltinNames(cfg *config.Root) []string

func SlashCheckpointAck

func SlashCheckpointAck(d Deps)

func SlashGoto

func SlashGoto(d Deps, parts []string) error

func SlashIntegrations

func SlashIntegrations(d Deps) error

func SlashLog

func SlashLog(d Deps, parts []string) error

func SlashMCP

func SlashMCP(d Deps) error

func SlashModels

func SlashModels(d Deps) error

func SlashRewind added in v2026.621.0

func SlashRewind(d Deps, parts []string) error

func StartupWasOffline added in v2026.609.3

func StartupWasOffline() bool

func Stats

func Stats(d Deps) error

func Subagent added in v2026.615.0

func Subagent(d Deps, parts []string) error

func Summarize

func Summarize(d Deps) error

func SummarizeBody

func SummarizeBody(d Deps) (string, error)

func SummarizeProgressLine

func SummarizeProgressLine(dots int) string

func TakeReplStartupNotice added in v2026.609.3

func TakeReplStartupNotice(out io.Writer) bool

func TempChat

func TempChat(d Deps) error

func Terminal

func Terminal(d Deps, parts []string) error

func TestWeb

func TestWeb(d Deps) error

func Thinking

func Thinking(d Deps, parts []string) error

func Threshold

func Threshold(d Deps, parts []string) error

func Timeout

func Timeout(d Deps, parts []string) error

func Update added in v2026.602.3

func Update(d Deps) error

func Upgrade added in v2026.603.0

func Upgrade(d Deps) error

func Version

func Version(d Deps) error

func VersionString

func VersionString() string

func WriteHelp

func WriteHelp(w io.Writer, projHex, projRoot string, cfg *config.Root)

func WriteLabeledTranscript

func WriteLabeledTranscript(out io.Writer, msgs []chatstore.Message, model string, showUsage bool)

func WriteMarkdownExportForTest added in v2026.701.0

func WriteMarkdownExportForTest(w io.Writer, meta markdownExportMeta, sess *chatstore.Session, showUsage bool) error

func WriteVersion

func WriteVersion(w io.Writer)

Types

type Deps

type Deps struct {
	Ctx context.Context

	Out      io.Writer
	Stdin    io.Reader
	ReadLine func(prompt string) (string, error)

	Cfg     *config.Root
	SaveCfg func() error

	ProjHex  string
	ProjRoot string

	Session    func() *chatstore.Session
	SetSession func(*chatstore.Session)

	AcquireSessionFileLock func() error
	ReleaseSessionFileLock func()

	SetMode func(string)
	GetMode func() string

	ApplyCurrentModel            func(providerName, modelID string) error
	Model                        func() string
	Provider                     func() *config.Provider
	CompactionThresholdTokens    func() int64
	SetCompactionThresholdTokens func(int64)

	Client  openai.Client
	Backend llm.CompletionBackend

	ResetReadlineHistory  func()
	AppendReadlineHistory func(line string) error

	PrefillInput             func(string)
	SubmitUserMessage        func(string) error
	SubmitVisibleUserMessage func(visible, api string) error
	AtIncludeNotifier        func() *atmention.Notifier

	PrintWelcomeBanner func()

	CheckForUpdate func(force bool) (*updater.Notice, error)
	InstallUpdate  func(tag string) error

	CheckpointGoto   func(*checkpoint.FullCheckpointID) error
	CheckpointRewind func(*checkpoint.RewindPlan) error

	PersistSession func() error
	MutateSession  func(fn func(*chatstore.Session))

	GetReplShellFirst func() bool
	SetReplShellFirst func(bool)

	GetEphemeralSession func() bool
	SetEphemeralSession func(bool)

	Research interface {
		StartResearchJob(query, category string) (research.JobRecord, error)
		ListResearch() ([]research.JobRecord, error)
		ResearchStatus(target string) (research.JobRecord, error)
		CancelResearch(target string) error
		DeleteResearch(target string) error
		ResumeResearch(target string) (research.JobRecord, error)
	}
}

type ListedModel

type ListedModel struct {
	Prov  string
	Model string
}

type ProviderCatalogError added in v2026.609.3

type ProviderCatalogError struct {
	Provider string
	FullList bool
	Err      error
}

type SummarizeProgress

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

func NewSummarizeProgress

func NewSummarizeProgress(out io.Writer) *SummarizeProgress

func (*SummarizeProgress) Stop

func (s *SummarizeProgress) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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