Fix MCP form input and add reactive MCP server state
- Fix space key not working in MCP add form by handling evt.name === "space"
- Add support for multi-character paste sequences via evt.sequence
- Add MCPServerDisplay type to types/tui.ts for UI display
- Add mcpServers reactive state to app store with setMcpServers,
addMcpServer, and updateMcpServerStatus actions
- Update session.tsx to use store's mcpServers instead of static props
- Update execute.tsx to update store when server is added/connected
- Remove duplicate MCPServer interfaces from app.tsx, session.tsx,
and mcp-select.tsx in favor of shared MCPServerDisplay type
This commit is contained in:
@@ -246,6 +246,19 @@ export interface StreamingLogState {
|
||||
isStreaming: boolean;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// MCP Types (for UI display)
|
||||
// ============================================================================
|
||||
|
||||
export type MCPServerStatus = "connected" | "disconnected" | "error";
|
||||
|
||||
export interface MCPServerDisplay {
|
||||
id: string;
|
||||
name: string;
|
||||
status: MCPServerStatus;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Component Props Types
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user