From 36f77eadb054e9c21bdd2391fb2109df7ee44fb3 Mon Sep 17 00:00:00 2001 From: seagochen Date: Tue, 24 Feb 2026 15:08:23 +0900 Subject: [PATCH] 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 --- cmd/picoclaw/cmd_agent.go | 8 ++++---- cmd/picoclaw/main.go | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/picoclaw/cmd_agent.go b/cmd/picoclaw/cmd_agent.go index 58a63cc99..bb3a6fed2 100644 --- a/cmd/picoclaw/cmd_agent.go +++ b/cmd/picoclaw/cmd_agent.go @@ -166,7 +166,7 @@ func interactiveMode(agentLoop *agent.AgentLoop, sessionKey string) { // /help and /usage work in all modes if input == "/help" { - printHelp() + printInteractiveHelp() continue } if input == "/usage" { @@ -291,7 +291,7 @@ func simpleInteractiveMode(agentLoop *agent.AgentLoop, sessionKey string) { // /help and /usage work in all modes if input == "/help" { - printHelp() + printInteractiveHelp() continue } if input == "/usage" { @@ -371,8 +371,8 @@ func simpleInteractiveMode(agentLoop *agent.AgentLoop, sessionKey string) { } } -// printHelp outputs detailed usage information for all interactive modes. -func printHelp() { +// printInteractiveHelp outputs detailed usage information for all interactive modes. +func printInteractiveHelp() { fmt.Printf(`%s PicoClaw Interactive Mode Help ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ diff --git a/cmd/picoclaw/main.go b/cmd/picoclaw/main.go index 25ad701ca..96406858f 100644 --- a/cmd/picoclaw/main.go +++ b/cmd/picoclaw/main.go @@ -94,7 +94,7 @@ func copyDirectory(src, dst string) error { func main() { if len(os.Args) < 2 { - printHelp() + printCliHelp() os.Exit(1) } @@ -168,12 +168,12 @@ func main() { printVersion() default: fmt.Printf("Unknown command: %s\n", command) - printHelp() + printCliHelp() os.Exit(1) } } -func printHelp() { +func printCliHelp() { fmt.Printf("%s picoclaw - Personal AI Assistant v%s\n\n", logo, version) fmt.Println("Usage: picoclaw ") fmt.Println()