Commit 4b4841dc authored by John Slaughter's avatar John Slaughter Committed by Michael Angelo Rivera
Browse files

feat: add command to open user level MCP configuration

parent d96835c9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -361,6 +361,11 @@
        "title": "Add New Chat",
        "category": "GitLab",
        "icon": "$(add)"
      },
      {
        "command": "gl.mcp.openUserConfig",
        "title": "Open User Settings (JSON)",
        "category": "GitLab MCP"
      }
    ],
    "menus": {
+1 −0
Original line number Diff line number Diff line
@@ -24,4 +24,5 @@ export const USER_COMMANDS = {
  SHOW_DIAGNOSTICS_FROM_SIDE_PANEL: 'gl.showDiagnosticsFromSidePanel',
  AGENTIC_CHAT_NEW_CONVERSATION: 'gl.agenticChat.startNewConversation',
  AGENTIC_CHAT_HISTORY: 'gl.agenticChat.showHistoryView',
  MCP_OPEN_USER_CONFIG: 'gl.mcp.openUserConfig',
};
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ export const USER_COMMANDS = {
  PUBLISH_TO_GITLAB: 'gl.publishToGitLab',
  AGENTIC_CHAT_NEW_CONVERSATION: COMMON_USER_COMMANDS.AGENTIC_CHAT_NEW_CONVERSATION,
  AGENTIC_CHAT_HISTORY: COMMON_USER_COMMANDS.AGENTIC_CHAT_HISTORY,
  MCP_OPEN_USER_CONFIG: COMMON_USER_COMMANDS.MCP_OPEN_USER_CONFIG,
};

/*
+2 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ import { createDeselectWorkspaceAccountCommand } from './accounts/deselect_works
import { AccountPreselectionService } from './accounts/account_preselection_service';
import { TokenRefreshService } from './accounts/token_refresh_service';
import { tokenExchangeService } from './gitlab/token_exchange_service';
import { openMcpUserConfigCommand } from './mcp/open_mcp_config_command';

const registerCommands = (
  context: vscode.ExtensionContext,
@@ -235,6 +236,7 @@ const registerCommands = (
      await languageServerManager.restartLanguageServer();
    },
    [PROGRAMMATIC_COMMANDS.SHOW_ERROR_MESSAGE]: openers.showErrorMessage,
    [USER_COMMANDS.MCP_OPEN_USER_CONFIG]: openMcpUserConfigCommand,
  };

  Object.keys(commands).forEach(cmd => {
+3 −0
Original line number Diff line number Diff line
import { openMcpUserConfigFile } from './utils/mcp_config';

export const openMcpUserConfigCommand = () => openMcpUserConfigFile();
Loading