mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 05:00:46 +00:00
feat: Show /ide subcommands based on connection status instead of ideMode boolean (#6496)
This commit is contained in:
parent
fde5511c27
commit
9588aa6ef9
5 changed files with 60 additions and 12 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue