Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit ebf0660

Browse files
committed
refactor: remove unused matchesPattern helper function
1 parent 297dcc0 commit ebf0660

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

src/core/auto-approval/mcp.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
import type { McpServerUse, McpServer, McpTool } from "@roo-code/types"
22

3-
/**
4-
* Checks if a tool name matches a pattern (supports wildcard "*")
5-
* @param toolName The name of the tool to check
6-
* @param pattern The pattern to match against (can be "*" for wildcard)
7-
* @returns True if the tool name matches the pattern
8-
*/
9-
function matchesPattern(toolName: string, pattern: string): boolean {
10-
if (pattern === "*") {
11-
return true
12-
}
13-
return toolName === pattern
14-
}
15-
163
export function isMcpToolAlwaysAllowed(mcpServerUse: McpServerUse, mcpServers: McpServer[] | undefined): boolean {
174
if (mcpServerUse.type === "use_mcp_tool" && mcpServerUse.toolName) {
185
const server = mcpServers?.find((s: McpServer) => s.name === mcpServerUse.serverName)

0 commit comments

Comments
 (0)