| 1 | namespace CascadeIDE.Services; |
| 2 | |
| 3 | /// <summary>Focus/Power, автономка, чат, Ollama и документы (partial IdeCommands).</summary> |
| 4 | public static partial class IdeCommands |
| 5 | { |
| 6 | // ——— Focus / Power / автономка / чат |
| 7 | /// <summary>Создать контрольную точку (Focus). returns: text.</summary> |
| 8 | public const string FocusCheckpoint = "focus_checkpoint"; |
| 9 | /// <summary>Откатить к последней контрольной точке (Focus). returns: text.</summary> |
| 10 | public const string FocusRollback = "focus_rollback"; |
| 11 | /// <summary>Подтвердить текущий шаг плана (Focus). returns: text.</summary> |
| 12 | public const string ConfirmFocusStep = "confirm_focus_step"; |
| 13 | /// <summary>Отменить текущий шаг плана (Focus). returns: text.</summary> |
| 14 | public const string CancelFocusStep = "cancel_focus_step"; |
| 15 | /// <summary>Пояснить текущий шаг (Focus/Power). returns: text.</summary> |
| 16 | public const string ExplainCurrentStep = "explain_current_step"; |
| 17 | /// <summary>Экстренно остановить автономные действия/выполнение (Emergency stop). returns: text.</summary> |
| 18 | public const string EmergencyStop = "emergency_stop"; |
| 19 | /// <summary>Обновить снимок рабочего состояния (Power cockpit). returns: text.</summary> |
| 20 | public const string RefreshWorkspaceSnapshot = "refresh_workspace_snapshot"; |
| 21 | /// <summary>Шаг трассы по индексу в AgentTraceSteps (0 — самый старый). args: step_index:integer; returns: text; example: {"step_index":0}.</summary> |
| 22 | public const string ExplainTraceStep = "explain_trace_step"; |
| 23 | /// <summary>Откатить состояние по шагу трассы. args: step_index:integer; returns: text; example: {"step_index":0}.</summary> |
| 24 | public const string RollbackTraceStep = "rollback_trace_step"; |
| 25 | /// <summary>Установить safety.observe. returns: text.</summary> |
| 26 | public const string SetSafetyObserve = "safety.observe"; |
| 27 | /// <summary>Установить safety.confirm. returns: text.</summary> |
| 28 | public const string SetSafetyConfirm = "safety.confirm"; |
| 29 | /// <summary>Установить safety.autonomous. returns: text.</summary> |
| 30 | public const string SetSafetyAutonomous = "safety.autonomous"; |
| 31 | /// <summary>Запустить автономный режим (agent run). returns: text.</summary> |
| 32 | public const string StartAutonomous = "start_autonomous"; |
| 33 | /// <summary>Поставить автономный режим на паузу. returns: text.</summary> |
| 34 | public const string PauseAutonomous = "pause_autonomous"; |
| 35 | /// <summary>Продолжить автономный режим после паузы. returns: text.</summary> |
| 36 | public const string ResumeAutonomous = "resume_autonomous"; |
| 37 | /// <summary>Quick action: починить упавшие тесты. returns: text.</summary> |
| 38 | public const string FixFailingTests = "fix_failing_tests"; |
| 39 | /// <summary>Quick action: расследовать NullReferenceException. returns: text.</summary> |
| 40 | public const string InvestigateNullref = "investigate_nullref"; |
| 41 | /// <summary>Quick action: подготовить коммит (сводка/план/проверки). returns: text.</summary> |
| 42 | public const string PrepareCommit = "prepare_commit"; |
| 43 | /// <summary>Чат: args: message?:string, role?:string. role assistant — только строка ассистента из MCP; иначе user и отправка; при ai.mode = mcp_only встроенный LLM не вызывается. returns: text; example: {"message":"hello"}.</summary> |
| 44 | public const string SendChat = "send_chat"; |
| 45 | /// <summary>Новая ветка чата: args: parent_message_id?:string, display_title?:string, title?:string. Пишет thread_forked; переключает активную ветку. returns: text; example: {"display_title":"ADR review"}</summary> |
| 46 | public const string ForkChatThread = "fork_chat_thread"; |
| 47 | /// <summary>Открыть structured clarification batch в чате. args: batch_json:string. returns: text; example: {"batch_json":"{\"id\":\"...\",\"title\":\"Нужно уточнить\",\"items\":[]}"}.</summary> |
| 48 | public const string OpenChatClarificationBatch = "open_chat_clarification_batch"; |
| 49 | /// <summary>Отправить structured clarification response для активного batch. args: response_json:string. returns: text; example: {"response_json":"{\"batchId\":\"...\",\"answersByItemId\":{\"scope\":\"mfd\"}}"}.</summary> |
| 50 | public const string SubmitChatClarificationResponse = "submit_chat_clarification_response"; |
| 51 | /// <summary>Скачать модель Ollama (как в настройках). args: model:string; returns: text; example: {"model":"qwen2.5-coder:7b"}.</summary> |
| 52 | public const string InstallOllamaModel = "install_ollama_model"; |
| 53 | |
| 54 | // ——— Документы |
| 55 | /// <summary>Переоткрыть недавно закрытый документ. returns: text.</summary> |
| 56 | public const string ReopenClosedDocument = "reopen_closed_document"; |
| 57 | /// <summary>Активировать документ (переключить вкладку). args: file_path:string; returns: text; example: {"file_path":"C:\\\\tmp\\\\a.cs"}.</summary> |
| 58 | public const string ActivateDocument = "activate_document"; |
| 59 | /// <summary>Закрыть документ. args: file_path:string; returns: text; example: {"file_path":"C:\\\\tmp\\\\a.cs"}.</summary> |
| 60 | public const string CloseDocument = "close_document"; |
| 61 | /// <summary>Закрепить/открепить документ (pin). args: file_path:string; returns: text; example: {"file_path":"C:\\\\tmp\\\\a.cs"}.</summary> |
| 62 | public const string TogglePinDocument = "toggle_pin_document"; |
| 63 | /// <summary>Переместить документ в группу 1. args: file_path:string; returns: text; example: {"file_path":"C:\\\\tmp\\\\a.cs"}.</summary> |
| 64 | public const string MoveDocumentToGroup1 = "move_document_to_group_1"; |
| 65 | /// <summary>Переместить документ в группу 2. args: file_path:string; returns: text; example: {"file_path":"C:\\\\tmp\\\\a.cs"}.</summary> |
| 66 | public const string MoveDocumentToGroup2 = "move_document_to_group_2"; |
| 67 | /// <summary>Переместить документ в группу 3. args: file_path:string; returns: text; example: {"file_path":"C:\\\\tmp\\\\a.cs"}.</summary> |
| 68 | public const string MoveDocumentToGroup3 = "move_document_to_group_3"; |
| 69 | } |
| 70 | |