Skip to content

Commit 0540962

Browse files
committed
refactor(mcp): rename and extend MCP schema file matching #371
- Rename MCP_SERVERS_FILE_NAME to include ".mcp" prefix - Extend file matching to support any ".mcp.json" files - Improves clarity and flexibility for MCP schema file handling
1 parent 23a1bff commit 0540962

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/kotlin/cc/unitmesh/devti/custom/schema/CustomMCPServersSchemaFileProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.jetbrains.jsonSchema.extension.JsonSchemaFileProvider
77
import com.jetbrains.jsonSchema.extension.JsonSchemaProviderFactory
88
import com.jetbrains.jsonSchema.extension.SchemaType
99

10-
const val MCP_SERVERS_FILE_NAME = "AutoDevMCPServersFile.json"
10+
const val MCP_SERVERS_FILE_NAME = "AutoDevMCPServersFile.mcp.json"
1111

1212
class CustomMCPServersSchemaFileProvider(project: Project) : JsonSchemaFileProvider {
1313
override fun isAvailable(file: VirtualFile): Boolean {
@@ -19,7 +19,7 @@ class CustomMCPServersSchemaFileProvider(project: Project) : JsonSchemaFileProvi
1919
return false
2020
}
2121

22-
return file.name == MCP_SERVERS_FILE_NAME
22+
return file.name == MCP_SERVERS_FILE_NAME || file.name.endsWith(".mcp.json")
2323
}
2424

2525
override fun getName(): String = "AutoDevMCPServersFile"

0 commit comments

Comments
 (0)