csharpdeeb25a2 | 1 | #nullable enable |
| 2 | |
| 3 | using CascadeIDE.Models.Intercom; |
| 4 | |
| 5 | namespace CascadeIDE.Features.Chat; |
| 6 | |
| 7 | /// <summary>Слэш-путь → <see cref="Services.IdeCommands"/> (ADR 0119).</summary> |
| 8 | public sealed record ChatSlashCommandDescriptor( |
| 9 | string SlashPath, |
| 10 | string CommandId, |
| 11 | string Help, |
| 12 | ChatSlashCommandExecutionKind ExecutionKind = ChatSlashCommandExecutionKind.IdeCommand, |
| 13 | string? MfdPage = null, |
| 14 | string? PrimarySurface = null, |
| 15 | string? MapLevel = null, |
| 16 | string? SlashGroup = null, |
| 17 | SlashCompletionKind Completion = SlashCompletionKind.None, |
| 18 | IntercomMessageAudience MessageAudience = IntercomMessageAudience.SelfOnly, |
| 19 | bool AutoRunOnCommit = false, |
| 20 | bool AutoRunRequiresArgs = true) |
| 21 | { |
| 22 | /// <summary>После выбора подсказки autocomplete — выполнить без второго Enter.</summary> |
| 23 | public bool ShouldAutoExecuteAfterAutocompleteCommit(string argsTail) => |
| 24 | AutoRunOnCommit && (!AutoRunRequiresArgs || !string.IsNullOrWhiteSpace(argsTail)); |
| 25 | } |
| 26 | |
View only · write via MCP/CIDE