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:
Orlando Chen 2026-02-24 15:08:23 +09:00
parent 5f3fc4c133
commit f09be8f16e
2 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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 <command>")
fmt.Println()