[#110] Add AI client with multi-provider support and UI #113

Manually merged
jabber.developer merged 64 commits from feat/ai into master 2026-05-15 02:22:56 +00:00
67 changed files with 3180 additions and 13818 deletions
Showing only changes of commit 634fb7d7eb - Show all commits

View File

@@ -111,8 +111,10 @@ _ai_invoke_callback(ai_callback_data_t* cb_data)
{
log_debug("[AI-CALLBACK] _ai_invoke_callback: is_error=%d, response_cb=%p, error_cb=%p",
cb_data->is_error, (void*)cb_data->response_cb, (void*)cb_data->error_cb);
/* profanity uses ncurses, not GLib main loop, so call directly */
/* Take the global lock to ensure thread-safety when invoking callbacks that may access UI state. */
pthread_mutex_lock(&lock);
_ai_callback_invoke(cb_data);
pthread_mutex_unlock(&lock);
}
/* ========================================================================