MCPcopy Create free account
hub / github.com/astercloud/aster / printHelp

Function printHelp

cmd/aster/session.go:457–478  ·  view source on GitHub ↗

printHelp prints the help message

(useColor bool)

Source from the content-addressed store, hash-verified

455
456// printHelp prints the help message
457func printHelp(useColor bool) {
458 printColored(useColor, colorCyan, "\nAvailable Commands:\n")
459 printColored(useColor, colorGray, "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n")
460
461 commands := []struct {
462 cmd string
463 desc string
464 }{
465 {"/exit, /quit", "Exit the session"},
466 {"/clear", "Clear conversation history"},
467 {"/help", "Show this help message"},
468 {"/status", "Show agent status"},
469 {"/session", "Show session ID"},
470 }
471
472 for _, c := range commands {
473 printColored(useColor, colorYellow, " %-16s", c.cmd)
474 printColored(useColor, colorGray, " %s\n", c.desc)
475 }
476
477 printColored(useColor, colorGray, "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n")
478}
479
480// printColored prints colored output if colors are enabled
481func printColored(useColor bool, color, format string, args ...any) {

Callers 1

handleCommandFunction · 0.70

Calls 1

printColoredFunction · 0.85

Tested by

no test coverage detected