Forge
csharpdeeb25a2
1namespace CascadeIDE.ViewModels;
2
3/// <summary>Путь Cursor ACP и предпочитаемая модель.</summary>
4public partial class MainWindowViewModel
5{
6 private string _cursorAcpAgentPath = "";
7 private string _cursorAcpModelId = "";
8
9 /// <summary>Путь к <c>cursor-agent.cmd</c> или каталогу <c>dist-package</c> (настройки, провайдер Cursor ACP).</summary>
10 public string CursorAcpAgentPath
11 {
12 get => _cursorAcpAgentPath;
13 set
14 {
15 var v = value ?? "";
16 if (!SetProperty(ref _cursorAcpAgentPath, v))
17 return;
18 _settings.Ai.Acp.CursorAcpPath = v;
19 SaveSettingsIfChanged();
20 if (string.Equals(AiMode, "acp", StringComparison.OrdinalIgnoreCase))
21 ChatPanel.DisposeCursorAcpSession();
22 ChatPanel.RefreshSendChatCommandState();
23 }
24 }
25
26 /// <summary><c>modelId</c> для Cursor ACP (<c>session/setModel</c>); TOML: <c>cursor_acp_model_id</c>.</summary>
27 public string CursorAcpModelId
28 {
29 get => _cursorAcpModelId;
30 set
31 {
32 var v = value ?? "";
33 if (!SetProperty(ref _cursorAcpModelId, v))
34 return;
35 _settings.Ai.Acp.CursorAcpModelId = v;
36 SaveSettingsIfChanged();
37 }
38 }
39}
40
View only · write via MCP/CIDE