feat: Enable /setup-github to always run, and error appropriately (#5653)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
Lee James
2025-08-06 09:06:37 -04:00
committed by GitHub
parent aab850668c
commit b38f377c9a
3 changed files with 18 additions and 8 deletions

View File

@@ -32,7 +32,6 @@ import { themeCommand } from '../ui/commands/themeCommand.js';
import { toolsCommand } from '../ui/commands/toolsCommand.js';
import { vimCommand } from '../ui/commands/vimCommand.js';
import { setupGithubCommand } from '../ui/commands/setupGithubCommand.js';
import { isGitHubRepository } from '../utils/gitUtils.js';
/**
* Loads the core, hard-coded slash commands that are an integral part
@@ -74,7 +73,7 @@ export class BuiltinCommandLoader implements ICommandLoader {
themeCommand,
toolsCommand,
vimCommand,
...(isGitHubRepository() ? [setupGithubCommand] : []),
setupGithubCommand,
];
return allDefinitions.filter((cmd): cmd is SlashCommand => cmd !== null);