mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 14:06:21 +00:00
The generic `/ai <subcommand>` tab-completion was nested inside conditional blocks that prevented it from firing in common cases — for example, `/ai<tab>` or `/ai <tab>` would never match subcommands because the `autocomplete_param_with_ac()` call was guarded by argument count checks and nested inside the explicit handler branches. Move the fallback subcommand autocomplete to execute unconditionally after all explicit handler branches, ensuring `/ai <tab>` always lists available subcommands regardless of argument count or which subcommand was typed. Also move the `/ai set` subcommand fallback outside the inner else-block so it runs whenever args[0] is "set", not only when num_args >= 2.