Skip to content

Commit 32e72f0

Browse files
chore: MCPConnectionManager is enough
1 parent f1d70af commit 32e72f0

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/mcp/vsCodeMCPConnectionManager.ts renamed to src/mcp/mcpConnectionManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import type { ServiceProvider } from '@mongosh/service-provider-core';
1212
import { isAtlasStream } from 'mongodb-build-info';
1313
import { MCPLogIds } from './mcpLogIds';
1414

15-
export interface VSCodeMCPConnectParams {
15+
export interface MCPConnectParams {
1616
connectionId: string;
1717
connectionString: string;
1818
connectOptions: DevtoolsConnectOptions;
1919
}
2020

21-
export class VSCodeMCPConnectionManager extends ConnectionManager {
21+
export class MCPConnectionManager extends ConnectionManager {
2222
private activeConnectionId: string | null = null;
2323
private activeConnectionProvider: ServiceProvider | null = null;
2424

@@ -38,7 +38,7 @@ export class VSCodeMCPConnectionManager extends ConnectionManager {
3838
}
3939

4040
async connectToVSCodeConnection(
41-
connectParams: VSCodeMCPConnectParams,
41+
connectParams: MCPConnectParams,
4242
): Promise<AnyConnectionState> {
4343
try {
4444
const serviceProvider = await NodeDriverServiceProvider.connect(

src/mcp/mcpController.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '@himanshusinghs/mongodb-mcp-server';
1414
import type ConnectionController from '../connectionController';
1515
import { createLogger } from '../logging';
16-
import { VSCodeMCPConnectionManager } from './vsCodeMCPConnectionManager';
16+
import { MCPConnectionManager } from './mcpConnectionManager';
1717

1818
type mcpServerStartupConfig = 'ask' | 'enabled' | 'disabled';
1919

@@ -37,7 +37,7 @@ export type MCPServerInfo = {
3737
export class MCPController {
3838
private didChangeEmitter = new vscode.EventEmitter<void>();
3939
private server?: MCPServerInfo;
40-
private mcpConnectionManager?: VSCodeMCPConnectionManager;
40+
private mcpConnectionManager?: MCPConnectionManager;
4141

4242
constructor(
4343
private readonly context: vscode.ExtensionContext,
@@ -84,7 +84,7 @@ export class MCPController {
8484
logger,
8585
}) => {
8686
const connectionManager = (this.mcpConnectionManager =
87-
new VSCodeMCPConnectionManager(logger));
87+
new MCPConnectionManager(logger));
8888
await this.switchConnectionManagerToCurrentConnection();
8989
return connectionManager;
9090
};

src/test/suite/mcp/vsCodeMCPConnectionManager.test.ts renamed to src/test/suite/mcp/mcpConnectionManager.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import type { LoggerBase } from '@himanshusinghs/mongodb-mcp-server';
66
import type { ConnectionStateErrored } from '@himanshusinghs/mongodb-mcp-server';
77
import type { DevtoolsConnectOptions } from '@mongosh/service-provider-node-driver';
88
import { NodeDriverServiceProvider } from '@mongosh/service-provider-node-driver';
9-
import { VSCodeMCPConnectionManager } from '../../../mcp/vsCodeMCPConnectionManager';
9+
import { MCPConnectionManager } from '../../../mcp/mcpConnectionManager';
1010

1111
chai.use(chaiAsPromised);
1212

1313
const sandbox = sinon.createSandbox();
14-
suite('VSCodeMCPConnectionManager Test Suite', function () {
15-
let mcpConnectionManager: VSCodeMCPConnectionManager;
14+
suite('MCPConnectionManager Test Suite', function () {
15+
let mcpConnectionManager: MCPConnectionManager;
1616
let fakeServiceProvider: NodeDriverServiceProvider;
1717

1818
beforeEach(() => {
19-
mcpConnectionManager = new VSCodeMCPConnectionManager({
19+
mcpConnectionManager = new MCPConnectionManager({
2020
error: () => {},
2121
warning: () => {},
2222
} as unknown as LoggerBase);

0 commit comments

Comments
 (0)