[#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 3201 additions and 13818 deletions
Showing only changes of commit dc75f16221 - Show all commits

View File

@@ -4454,12 +4454,6 @@ _ai_autocomplete(ProfWin* window, const char* const input, gboolean previous)
/* Top-level /ai <subcommand> autocomplete (e.g., /ai s<tab> -> /ai set) */
if (num_args >= 1) {
/* Try to match subcommand prefix first */
result = autocomplete_param_with_ac(input, "/ai", ai_subcommands_ac, FALSE, previous);
if (result) {
return result;
}
if (g_strcmp0(args[0], "set") == 0) {
if (num_args >= 2) {
if (g_strcmp0(args[1], "provider") == 0) {
@@ -4481,12 +4475,11 @@ _ai_autocomplete(ProfWin* window, const char* const input, gboolean previous)
return result;
}
}
} else {
// /ai set <subcommand> - autocomplete subcommands
result = autocomplete_param_with_ac(input, "/ai set", ai_set_subcommands_ac, TRUE, previous);
if (result) {
return result;
}
}
// /ai set <subcommand> - autocomplete subcommands
result = autocomplete_param_with_ac(input, "/ai set", ai_set_subcommands_ac, TRUE, previous);
if (result) {
return result;
}
} else if (g_strcmp0(args[0], "remove") == 0) {
if (num_args >= 2 && g_strcmp0(args[1], "provider") == 0) {
@@ -4524,6 +4517,11 @@ _ai_autocomplete(ProfWin* window, const char* const input, gboolean previous)
return NULL;
}
}
result = autocomplete_param_with_ac(input, "/ai", ai_subcommands_ac, FALSE, previous);
if (result) {
return result;
}
}
return result;