Skip to content

Commit b8901da

Browse files
dileepyavanCopilot
andauthored
Update src/vs/workbench/contrib/mcp/common/mcpTypesUtils.ts
Co-authored-by: Copilot <[email protected]>
1 parent 9301ffe commit b8901da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/mcp/common/mcpTypesUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ export function mcpServerToSourceData(server: IMcpServer): ToolDataSource {
104104
*/
105105
export function ValidateHttpResources(resource: URI, server: IMcpServer | undefined) {
106106
let isResourceRequestValid = false;
107-
if (resource.path.indexOf('/http/') === 0) {
107+
if (resource.path.startsWith('/http/')) {
108108
const launch = server?.connection.get()?.launchDefinition;
109109
if (launch && launch.type === McpServerTransportType.HTTP && launch.uri.authority.toLowerCase() === resource.authority.toLowerCase()) {
110110
isResourceRequestValid = true;
111111
}
112-
} else if (resource.path.indexOf('/https/') === 0) {
112+
} else if (resource.path.startsWith('/https/')) {
113113
isResourceRequestValid = true;
114114
}
115115
return isResourceRequestValid;

0 commit comments

Comments
 (0)