mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 12:46:21 +00:00
fix(ai): persistence and command-output fixes
- Persist per-provider default model in [ai] prefs (set/get/remove helpers, load on init, clear with provider removal). Previously /ai set default-model only updated runtime state. - Stop re-seeding openai/perplexity into [ai] every time the configured provider list is empty. The defaults are now seeded once, guarded by a "defaults_initialized" sentinel, so removing every provider does not silently restore them. - /ai providers (no arg) now lists the configured providers with key status, instead of the hardcoded openai/perplexity blurb. - /ai models <provider> (fresh fetch) prints the model names it cached, not just a count. Previously the user had to follow up with --cached to actually see them. - /ai remove provider now also clears the persisted default model, token, and cached model list, leaving no orphan keys in [ai]. - Drop dead ai_models_find declaration from ai_client.h (no implementation in this tree).
This commit is contained in:
@@ -380,4 +380,9 @@ gboolean prefs_ai_remove_models(const char* const provider);
|
||||
GList* prefs_ai_get_models(const char* const provider);
|
||||
void prefs_free_ai_models(GList* models);
|
||||
|
||||
/* AI default model per provider */
|
||||
gboolean prefs_ai_set_default_model(const char* const provider, const char* const model);
|
||||
gboolean prefs_ai_remove_default_model(const char* const provider);
|
||||
char* prefs_ai_get_default_model(const char* const provider);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user