feat(mcp): add front-end API wrappers and types

- Add McpServer and McpStatus types
- Add window.api wrappers for MCP commands
- Extend vite-env.d.ts global typings for MCP APIs
This commit is contained in:
Jason
2025-10-08 22:35:02 +08:00
parent e7a584c5ba
commit 94192a3720
3 changed files with 95 additions and 2 deletions

View File

@@ -52,3 +52,23 @@ export interface Settings {
// Codex 自定义端点列表
customEndpointsCodex?: Record<string, CustomEndpoint>;
}
// MCP 服务器定义(宽松:允许扩展字段)
export interface McpServer {
type: "stdio" | "sse";
command: string;
args?: string[];
env?: Record<string, string>;
cwd?: string;
[key: string]: any;
}
// MCP 配置状态
export interface McpStatus {
settingsLocalPath: string;
settingsLocalExists: boolean;
enableAllProjectMcpServers: boolean;
mcpJsonPath: string;
mcpJsonExists: boolean;
serverCount: number;
}