mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-22 03:16:35 +00:00
tweak: sanitize mcp server names (#831)
This commit is contained in:
parent
4172e3ad28
commit
022c979d28
1 changed files with 2 additions and 1 deletions
|
|
@ -115,7 +115,8 @@ export namespace MCP {
|
|||
const result: Record<string, Tool> = {}
|
||||
for (const [clientName, client] of Object.entries(await clients())) {
|
||||
for (const [toolName, tool] of Object.entries(await client.tools())) {
|
||||
result[clientName + "_" + toolName] = tool
|
||||
const sanitizedClientName = clientName.replace(/\s+/g, "_")
|
||||
result[sanitizedClientName + "_" + toolName] = tool
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue