TestSlashModelSwitchClearsStaleBudget: after a hamrpass turn leaves m.budget set, switching to a profile that emits no X-Budget-* headers (local Ollama) would keep rendering the old percentage forever; StatusSuffix only checks .Set, not which profile produced it. rebuildClient must drop the cached s
(t *testing.T)
| 813 | } |
| 814 | |
| 815 | // TestArgPopoverSkipsConfigReloadMidTurn: typing is allowed mid turn, but the |
| 816 | // cmd→arg popover transition must not reload config then: a reload can |
| 817 | // rebuildClient and swap the live llm.Client under the |
| 818 | // in flight turn. The stale list is fine; submit is phase gated and runSlash |
| 819 | // reloads once the turn is over. |
| 820 | func TestArgPopoverSkipsConfigReloadMidTurn(t *testing.T) { |
| 821 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 822 | yaml := []byte(`active: local |
| 823 | models: |
| 824 | local: |
| 825 | llm: local-model |
| 826 | url: ` + m.cfg.Models["local"].URL + ` |
| 827 | key: "" |
| 828 | context_size: 256000 |
| 829 | remote: |
| 830 | llm: cloud-model |
| 831 | url: http://remote:9000 |
| 832 | key: sk-r |
nothing calls this directly
no test coverage detected