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:
20
src/types.ts
20
src/types.ts
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user