mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix: show directory-level MCP servers in RepoMcpDialog (#134)
* fix: show directory-level MCP servers in RepoMcpDialog - Derive server list from MCP status response instead of global config - Add GET /opencode-configs/:name endpoint to fetch named configs - Fetch repo-specific config via openCodeConfigName in RepoDetail/SessionDetail - Add null guards for serverConfig to handle directory-only servers - Update empty state text to mention project's opencode.json Closes #130 * Switch RepoMcpDialog to use directory-level server configs
This commit is contained in:
1 parent
c78c96ed86
commit
24609ef6c3
4 files changed
+29
-38
No files matched your search
@@ -152,6 +152,14 @@ export const mcpApi = {
|
||||
return response.json()
|
||||
},
|
||||
|
||||
async getConfigForDirectory(directory: string): Promise<Record<string, unknown>> {
|
||||
const response = await fetch(`${API_BASE}/api/opencode/config?directory=${encodeURIComponent(directory)}`)
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to get config for directory: ${response.statusText}`)
|
||||
}
|
||||
return response.json()
|
||||
},
|
||||
|
||||
async connectDirectory(name: string, directory: string): Promise<boolean> {
|
||||
const response = await fetch(`${API_BASE}/api/settings/mcp/${encodeURIComponent(name)}/connectdirectory`, {
|
||||
method: 'POST',
|
||||
|
||||
Reference in new issue
Block a user