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:
2026-02-02 14:10:19 -05:00
parent 3b277c3925
commit fbd9afa177
6 changed files with 110 additions and 30 deletions

View File

@@ -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
// ============================================================================