printHelp prints the help message
(useColor bool)
| 455 | |
| 456 | // printHelp prints the help message |
| 457 | func 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 |
| 481 | func printColored(useColor bool, color, format string, args ...any) { |
no test coverage detected