From 89a224b017a4efa416b1965a0e0510a46606a3a8 Mon Sep 17 00:00:00 2001 From: Jabber Developer Date: Wed, 13 May 2026 22:02:02 +0000 Subject: [PATCH] feat(ai): allow /ai models command from console Remove window type check from cmd_ai_models() so fetching models works from console. Response is shown via cons_show() when called from console, or in the AI window when called from there. --- src/command/cmd_funcs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 52f29acb..8e3537f1 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -11141,12 +11141,7 @@ cmd_ai_models(ProfWin* window, const char* const command, gchar** args) cons_show("Use '/ai models %s' to fetch fresh models from the API.", provider_name); } else { // Default: fetch fresh models from API - if (!window || window->type != WIN_AI) { - cons_show_error("Must be in an AI chat window to fetch models."); - return TRUE; - } - ProfAiWin* aiwin = (ProfAiWin*)window; - ai_fetch_models(provider_name, aiwin); + ai_fetch_models(provider_name, window); } return TRUE;