Documentation
¶
Index ¶
- func Expand(template string, args []string) string
- func ParseArgs(s string) []string
- func ReadStdinPrompt() (string, error)
- func RunPrint(sess *agent.Session, args []string, jsonMode bool) error
- func RunPrintMode(sess *agent.Session, prompt string, jsonMode bool) error
- func RunTUI(sess *agent.Session, cwd, gitBranch, modelName string, profile policy.Profile, ...) error
- type App
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
Expand substitutes placeholder patterns in template with the given args.
Supported patterns:
- $1, $2, ... $N — positional args (1-based, out-of-range → "")
- ${@:N} — all args from index N onward (1-based)
- ${@:N:L} — L args starting at index N (1-based)
- $@ / $ARGUMENTS — all args joined by space
Substitution is single-pass per pattern class (no recursive expansion).
func ParseArgs ¶
ParseArgs splits a command argument string respecting double and single quotes. Empty quoted strings are skipped.
func ReadStdinPrompt ¶
ReadStdinPrompt reads all of stdin as a prompt (for pipe usage).
func RunPrintMode ¶
RunPrintMode runs the agent in non-interactive mode. stdout receives assistant text (pipe-friendly), stderr receives tool/status info. When jsonMode is true, all events are streamed as JSONL to stdout.
Types ¶
type App ¶
type App struct {
Session *agent.Session
Cwd string
GitBranch string
// PolicyProfile controls slash-command risk gating.
PolicyProfile policy.Profile
// Templates are user-defined prompt templates loaded from .md files.
Templates []config.PromptTemplate
// Skills are loaded skill definitions.
Skills []config.Skill
// MCPManager manages MCP server connections.
MCPManager *mcpclient.Manager
// PlanStore persists plans to <cwd>/.codebot/plans/.
PlanStore *storage.PlanStore
// History provides input history for Up/Down navigation.
History *storage.History
// contains filtered or unexported fields
}
App is the TUI adapter. Business logic lives in agent.Session.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package imageinput handles image input from clipboard paste and file drag-drop, converting raw data to agentcore ContentBlocks.
|
Package imageinput handles image input from clipboard paste and file drag-drop, converting raw data to agentcore ContentBlocks. |
Click to show internal directories.
Click to hide internal directories.