MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / init

Function init

commands.go:27–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25var commands = map[string]command{}
26
27func init() {
28 commands["help"] = command{description: "show available commands", run: cmdHelp}
29 commands["provider"] = command{description: "show or change the LLM provider", usage: "/provider [anthropic|openai]", run: cmdProvider}
30 commands["model"] = command{description: "show or change the model", usage: "/model [name]", run: cmdModel}
31 commands["clear"] = command{description: "clear conversation history", run: cmdClear}
32 commands["tools"] = command{description: "list available tools", run: cmdTools}
33 commands["subagents"] = command{description: "list subagents (registered and currently running)", run: cmdSubagents}
34 commands["compact"] = command{
35 description: "run compaction now (optionally with a specific strategy)",
36 usage: "/compact [sliding|summarize|none]",
37 run: cmdCompact,
38 }
39 commands["verbose"] = command{
40 description: "toggle printing of compaction before/after",
41 usage: "/verbose [on|off]",
42 run: cmdVerbose,
43 }
44 commands["tokens"] = command{description: "show cumulative token usage and estimated cost", run: cmdTokens}
45 commands["debug"] = command{
46 description: "control the debug event panel (toggle / inspect entries)",
47 usage: "/debug [on|off|clear|ls|show [id]]",
48 run: cmdDebug,
49 }
50 commands["exit"] = command{description: "exit the harness", run: cmdExit}
51}
52
53// tokenReporter is what cmdTokens type-asserts to. We didn't widen the
54// Provider interface because not every backend has a "tokens" concept; any

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected