mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 05:00:46 +00:00
prefactor(commands): Command Service Prefactor for Extensible Commands (#4511)
This commit is contained in:
parent
7a9821607b
commit
2a95c8287e
36 changed files with 919 additions and 720 deletions
|
|
@ -17,6 +17,7 @@ import {
|
|||
CommandContext,
|
||||
SlashCommand,
|
||||
SlashCommandActionReturn,
|
||||
CommandKind,
|
||||
} from './types.js';
|
||||
import * as child_process from 'child_process';
|
||||
import * as process from 'process';
|
||||
|
|
@ -48,10 +49,12 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
|
|||
return {
|
||||
name: 'ide',
|
||||
description: 'manage IDE integration',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
subCommands: [
|
||||
{
|
||||
name: 'status',
|
||||
description: 'check status of IDE integration',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
action: (_context: CommandContext): SlashCommandActionReturn => {
|
||||
const status = getMCPServerStatus(IDE_SERVER_NAME);
|
||||
const discoveryState = getMCPDiscoveryState();
|
||||
|
|
@ -89,6 +92,7 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
|
|||
{
|
||||
name: 'install',
|
||||
description: 'install required VS Code companion extension',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
action: async (context) => {
|
||||
if (!isVSCodeInstalled()) {
|
||||
context.ui.addItem(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue