TestPrintHelpListsAllCommands: tui.PrintHelp formats every command in the central slice. Guards against a command being added to runSlash dispatch but forgotten in --help.
(t *testing.T)
| 579 | func TestPrintHelpListsAllCommands(t *testing.T) { |
| 580 | var buf bytes.Buffer |
| 581 | PrintHelp(&buf) |
| 582 | for _, want := range []string{"/clear", "/models"} { |
| 583 | if !strings.Contains(buf.String(), want) { |
| 584 | t.Fatalf("PrintHelp missing %q:\n%s", want, buf.String()) |
| 585 | } |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | // TestSlashModelSwitchesActive: /models <name> sets Active and rebuilds the |
| 590 | // llm client's base URL / token / model to the new profile's values. |
| 591 | func TestSlashModelSwitchesActive(t *testing.T) { |
| 592 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |