mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-20 11:00:40 -07:00
Add extension name auto-complete to /extensions update (#10198)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -142,6 +142,19 @@ const updateExtensionsCommand: SlashCommand = {
|
||||
description: 'Update extensions. Usage: update <extension-names>|--all',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
action: updateAction,
|
||||
completion: async (context, partialArg) => {
|
||||
const extensions = context.services.config?.getExtensions() ?? [];
|
||||
const extensionNames = extensions.map((ext) => ext.name);
|
||||
const suggestions = extensionNames.filter((name) =>
|
||||
name.startsWith(partialArg),
|
||||
);
|
||||
|
||||
if ('--all'.startsWith(partialArg) || 'all'.startsWith(partialArg)) {
|
||||
suggestions.unshift('--all');
|
||||
}
|
||||
|
||||
return suggestions;
|
||||
},
|
||||
};
|
||||
|
||||
export const extensionsCommand: SlashCommand = {
|
||||
|
||||
Reference in New Issue
Block a user