Skip to content

Commit 55efa3f

Browse files
committed
chore: remove unnecessary comments
1 parent ba92542 commit 55efa3f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/services/mcp/McpHub.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ export class McpHub {
155155
private configChangeDebounceTimers: Map<string, NodeJS.Timeout> = new Map()
156156
private isProgrammaticUpdate: boolean = false
157157
private flagResetTimer?: NodeJS.Timeout
158-
// Registry for O(1) lookup of original server names from sanitized names
159158
private sanitizedNameRegistry: Map<string, string> = new Map()
160159

161160
constructor(provider: ClineProvider) {
@@ -921,18 +920,15 @@ export class McpHub {
921920
* Find a connection by sanitized server name.
922921
* This is used when parsing MCP tool responses where the server name has been
923922
* sanitized (e.g., hyphens replaced with underscores) for API compliance.
924-
* Uses O(1) registry lookup instead of scanning all connections.
925923
* @param sanitizedServerName The sanitized server name from the API tool call
926924
* @returns The original server name if found, or null if no match
927925
*/
928926
public findServerNameBySanitizedName(sanitizedServerName: string): string | null {
929-
// First try exact match (in case the original name was already valid)
930927
const exactMatch = this.connections.find((conn) => conn.server.name === sanitizedServerName)
931928
if (exactMatch) {
932929
return exactMatch.server.name
933930
}
934931

935-
// O(1) lookup using the sanitized name registry
936932
return this.sanitizedNameRegistry.get(sanitizedServerName) ?? null
937933
}
938934

0 commit comments

Comments
 (0)