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
5f3fc4c133
commit
f09be8f16e
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
|
||||
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
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue