Forge
csharpdeeb25a2
1#nullable enable
2
3using CascadeIDE.Features.Chat.DataAcquisition;
4using CascadeIDE.Models.Intercom;
5using CascadeIDE.Services.Intercom;
6
7namespace CascadeIDE.Features.Chat;
8
9/// <summary>Единая точка prepare для composer, MCP и slash (ADR 0134).</summary>
10public static class IntercomOutboundMessagePreparer
11{
12 public static Task<PreparedIntercomMessage> PrepareAsync(
13 string rawInput,
14 IReadOnlyDictionary<string, AttachmentAnchor> pendingByShortId,
15 IntercomAttachmentResolveAtSend.EditorSnapshot editor,
16 string? workspaceRoot,
17 string? solutionPath,
18 CancellationToken cancellationToken = default,
19 string? indexDirectoryRelative = null) =>
20 IntercomAttachmentResolveAtSendWorker.TryPrepareAsync(
21 rawInput,
22 pendingByShortId,
23 editor,
24 workspaceRoot,
25 solutionPath,
26 cancellationToken,
27 indexDirectoryRelative);
28
29 /// <summary><c>send_chat</c> / MCP: без Roslyn по member @ send.</summary>
30 public static Task<PreparedIntercomMessage> PrepareForMcpAsync(
31 string rawInput,
32 IReadOnlyDictionary<string, AttachmentAnchor> pendingByShortId,
33 IntercomAttachmentResolveAtSend.EditorSnapshot editor,
34 string? workspaceRoot,
35 string? solutionPath,
36 CancellationToken cancellationToken = default) =>
37 IntercomAttachmentResolveAtSendWorker.TryPrepareForMcpAsync(
38 rawInput,
39 pendingByShortId,
40 editor,
41 workspaceRoot,
42 solutionPath,
43 cancellationToken);
44}
45
View only · write via MCP/CIDE