src/vs/workbench/contrib/extensions/common/extensionQuery.ts/Query/suggestions
class Query:	static suggestions(query: string): string[] {
		const commands = ['installed', 'updates', 'enabled', 'disabled', 'builtin', 'featured', 'popular', 'recommended', 'recentlyPublished', 'workspaceUnsupported', 'deprecated', 'sort', 'category', 'tag', 'ext', 'id'] as const;
		const subcommands = {
			'sort': ['installs', 'rating', 'name', 'publishedDate', 'updateDate'],
			'category': EXTENSION_CATEGORIES.map(c => `"${c.toLowerCase()}"`),
			'tag': [''],
			'ext': [''],
			'id': ['']
		} as const;

		const queryContains = (substr: string) => query.indexOf(substr) > -1;
		const hasSort = subcommands.sort.some(subcommand => queryContains(`@sort:${subcommand}`));
		const hasCategory = subcommands.category.some(subcommand => queryContains(`@category:${subcommand}`));

		return flatten(
			commands.map(command => {
				if (hasSort && command === 'sort' || hasCategory && command === 'category') {
					return [];
				}
				if (command in subcommands) {
					return (subcommands as Record<string, readonly string[]>)[command]
						.map(subcommand => `@${command}:${subcommand}${subcommand === '' ? '' : ' '}`);
				}
				else {
					return queryContains(`@${command}`) ? [] : [`@${command} `];
				}
			}));
	}