cmd

package
v0.17.7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chat

func Chat(ctx context.Context, opts RunOptions) (*api.Message, error)

Chat runs an agent chat loop with tool support. This is the experimental version of chat that supports tool calling.

func GenerateInteractive

func GenerateInteractive(cmd *cobra.Command, modelName string, wordWrap bool, options map[string]any, think *api.ThinkValue, hideThinking bool, keepAlive *api.Duration, yoloMode bool, enableWebsearch bool) error

GenerateInteractive runs an interactive agent session. This is called from cmd.go when --experimental flag is set. If yoloMode is true, all tool approvals are skipped. If enableWebsearch is true, the web search tool is registered.

Types

type RunOptions

type RunOptions struct {
	Model        string
	Messages     []api.Message
	WordWrap     bool
	Format       string
	System       string
	Options      map[string]any
	KeepAlive    *api.Duration
	Think        *api.ThinkValue
	HideThinking bool
	Verbose      bool

	// Agent fields (managed externally for session persistence)
	Tools    *tools.Registry
	Approval *agent.ApprovalManager

	// YoloMode skips all tool approval prompts
	YoloMode bool
}

RunOptions contains options for running an interactive agent session.

Jump to

Keyboard shortcuts

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