mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
feat: Show /ide subcommands based on connection status instead of ideMode boolean (#6496)
This commit is contained in:
@@ -237,13 +237,11 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
|
||||
},
|
||||
};
|
||||
|
||||
const ideModeEnabled = config.getIdeMode();
|
||||
if (ideModeEnabled) {
|
||||
ideSlashCommand.subCommands = [
|
||||
disableCommand,
|
||||
statusCommand,
|
||||
installCommand,
|
||||
];
|
||||
const { status } = ideClient.getConnectionStatus();
|
||||
const isConnected = status === IDEConnectionStatus.Connected;
|
||||
|
||||
if (isConnected) {
|
||||
ideSlashCommand.subCommands = [statusCommand, disableCommand];
|
||||
} else {
|
||||
ideSlashCommand.subCommands = [
|
||||
enableCommand,
|
||||
|
||||
Reference in New Issue
Block a user