let's add in a config reload button that can reload the config if someone makes live…
- User
let's add in a config reload button that can reload the config if someone makes live changes.
for example -- i just added in openrouter to my config, and added in my api key while hchat was running. but now, i have to close and relaunch hchat for it to pick it up
- User
so what's up? been working for a bit
- User
you been working for a long time what's going on? did you get hung up?
Assistant
Sorry about that! I was deep in the weeds scanning through the
app.rsfile to figure out where theeframe::Apptrait was implemented and making sure I didn't break any of the UI layout or streaming logic while inserting the button.I've just added a new
⟳(Reload config) button to the top bar right next to your⚙settings gear.When clicked, it calls a new
reload_configmethod which will:- Re-read the config file from disk.
- Hot-swap the fonts, UI scale, and dark/light theme.
- Automatically update your saved endpoints (so if you added an OpenRouter API key, it instantly picks it up).
- Automatically refresh the model list if you added a new active endpoint or key.
You can compile it and it'll be right there at the top! Let me know if you want it moved or tweaked.
- User
instead of the symbol, just make it a button in the settings menu that says "reload config"
Assistant
Ah, that makes way more sense. I just removed the circular
⟳button from the top bar and added a proper "Reload config" button to the settings panel, right between "Save settings" and "Reset to defaults".You can recompile with
cargo runand try it out! Let me know if that's what you were looking for.