mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 08: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:
@@ -106,15 +106,6 @@ GList* ai_list_providers(void);
|
||||
*/
|
||||
gchar* ai_providers_find(const char* const search_str, gboolean previous, void* context);
|
||||
|
||||
/**
|
||||
* Find a model name for autocomplete.
|
||||
* @param search_str The search string
|
||||
* @param previous Whether to go to previous match
|
||||
* @param context ProfAiWin* for the current session
|
||||
* @return Model name, or NULL if not found
|
||||
*/
|
||||
gchar* ai_models_find(const char* const search_str, gboolean previous, void* context);
|
||||
|
||||
/**
|
||||
* Reset the provider autocomplete state.
|
||||
* Called from cmd_ac_reset() to clear autocomplete state.
|
||||
|
||||
Reference in New Issue
Block a user