| | | 1 | | using Shared.Contracts.Mcp; |
| | | 2 | | |
| | | 3 | | namespace UIBlazor.Options; |
| | | 4 | | |
| | | 5 | | public class McpOptions : BaseOptions |
| | | 6 | | { |
| | | 7 | | /// <summary> |
| | | 8 | | /// Включен ли вообще MCP |
| | | 9 | | /// </summary> |
| | 33 | 10 | | public bool Enabled { get; set => SetIfChanged(ref field, value); } = true; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Список MCP серверов |
| | | 14 | | /// </summary> |
| | 35 | 15 | | public List<McpServerConfig> Servers { get; set => SetIfChanged(ref field, value); } = []; |
| | | 16 | | |
| | 20 | 17 | | public Dictionary<string, ToolApprovalMode> ServerApprovalModes { get; set => SetIfChanged(ref field, value); } = [] |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Server initialization errors (serverName -> errorMessage) |
| | | 21 | | /// </summary> |
| | 20 | 22 | | public Dictionary<string, string> ServerErrors { get; set => SetIfChanged(ref field, value); } = []; |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Enabled state for MCP servers (serverName -> enabled) |
| | | 26 | | /// </summary> |
| | 22 | 27 | | public Dictionary<string, bool> ServerEnabledStates { get; set => SetIfChanged(ref field, value); } = []; |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Enabled state for MCP tools (serverName:toolName -> enabled) |
| | | 31 | | /// </summary> |
| | 24 | 32 | | public List<string> ToolDisabledStates { get; set => SetIfChanged(ref field, value); } = []; |
| | | 33 | | } |