runSlash dispatches a slash-prefixed submission; unknown commands produce a quiet hint, not an error. config.yaml is re-read before every slash so hand-edits take effect without a restart (see reloadConfigFromDisk).
(text string)
| 83 | } |
| 84 | |
| 85 | // reloadConfigFromDisk reruns config.Bootstrap and replaces m.cfg so hand edits |
| 86 | // to config.yaml between slash commands take effect immediately. URLOverride |
| 87 | // (from CODEHAMR_URL) is carried across the swap so the env var keeps applying. |
| 88 | // |
| 89 | // Returns the Bootstrap error verbatim; callers decide whether to surface it |
| 90 | // (runSlash warns on submit; the popover refresh path ignores it so a broken |
| 91 | // file doesn't spam a warning on every keystroke). |
| 92 | // |
| 93 | // Rebuilds the llm.Client when the active profile's resolved (URL, model, key) |
| 94 | // triple changed: covers both within profile edits and a moved active. |
| 95 | func (m *Model) reloadConfigFromDisk() error { |
| 96 | projectRoot := filepath.Dir(m.cfg.Dir) |
| 97 | fresh, _, err := config.Bootstrap(projectRoot) |
| 98 | if err != nil { |