[#110] Add AI client with multi-provider support and UI #113
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user