refactor: rename printHelp to printCliHelp and printInteractiveHelp
Resolve function name collision between the top-level CLI help and the interactive mode help by giving each a distinct, descriptive name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1ddec1673c
commit
36f77eadb0
2 changed files with 7 additions and 7 deletions
|
|
@ -166,7 +166,7 @@ func interactiveMode(agentLoop *agent.AgentLoop, sessionKey string) {
|
||||||
|
|
||||||
// /help and /usage work in all modes
|
// /help and /usage work in all modes
|
||||||
if input == "/help" {
|
if input == "/help" {
|
||||||
printHelp()
|
printInteractiveHelp()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if input == "/usage" {
|
if input == "/usage" {
|
||||||
|
|
@ -291,7 +291,7 @@ func simpleInteractiveMode(agentLoop *agent.AgentLoop, sessionKey string) {
|
||||||
|
|
||||||
// /help and /usage work in all modes
|
// /help and /usage work in all modes
|
||||||
if input == "/help" {
|
if input == "/help" {
|
||||||
printHelp()
|
printInteractiveHelp()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if input == "/usage" {
|
if input == "/usage" {
|
||||||
|
|
@ -371,8 +371,8 @@ func simpleInteractiveMode(agentLoop *agent.AgentLoop, sessionKey string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// printHelp outputs detailed usage information for all interactive modes.
|
// printInteractiveHelp outputs detailed usage information for all interactive modes.
|
||||||
func printHelp() {
|
func printInteractiveHelp() {
|
||||||
fmt.Printf(`%s PicoClaw Interactive Mode Help
|
fmt.Printf(`%s PicoClaw Interactive Mode Help
|
||||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ func copyDirectory(src, dst string) error {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if len(os.Args) < 2 {
|
if len(os.Args) < 2 {
|
||||||
printHelp()
|
printCliHelp()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,12 +168,12 @@ func main() {
|
||||||
printVersion()
|
printVersion()
|
||||||
default:
|
default:
|
||||||
fmt.Printf("Unknown command: %s\n", command)
|
fmt.Printf("Unknown command: %s\n", command)
|
||||||
printHelp()
|
printCliHelp()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func printHelp() {
|
func printCliHelp() {
|
||||||
fmt.Printf("%s picoclaw - Personal AI Assistant v%s\n\n", logo, version)
|
fmt.Printf("%s picoclaw - Personal AI Assistant v%s\n\n", logo, version)
|
||||||
fmt.Println("Usage: picoclaw <command>")
|
fmt.Println("Usage: picoclaw <command>")
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue