Forge
csharpdeeb25a2
1using CascadeIDE.Features.Chat.Application;
2using CascadeIDE.Features.IdeMcp.Application;
3using Xunit;
4
5namespace CascadeIDE.Tests;
6
7public sealed class IntercomApplicationComputingUnitTests
8{
9 [Theory]
10 [InlineData("⟦a:abcd1234⟧", true)]
11 [InlineData("see [F:Foo.cs M:Run]", true)]
12 [InlineData("plain text", false)]
13 [InlineData("", false)]
14 public void IntercomAttachSyntax_detects_wire_and_bracket(string text, bool expected) =>
15 Assert.Equal(expected, IntercomAttachSyntax.HasWireOrBracketSyntax(text));
16
17 [Theory]
18 [InlineData("assistant", "hello", true)]
19 [InlineData("user", "[F:a.cs]", true)]
20 [InlineData("user", "no attach", false)]
21 public void IntercomMcpSendChatRoute_routes_fast_append(string role, string message, bool expected) =>
22 Assert.Equal(expected, IntercomMcpSendChatRoute.ShouldAppendPreparedFeedMessage(role, message));
23
24 [Fact]
25 public void IntercomOutboundPrepareProfile_mcp_fast_skips_roslyn_and_git()
26 {
27 var p = IntercomOutboundPrepareProfile.McpFastPrepare;
28 Assert.True(p.SkipMemberRoslynAtSend);
29 Assert.False(p.CaptureSenderWorkspaceContext);
30 Assert.True(p.AddMcpFastPathWarning);
31 }
32}
33
View only · write via MCP/CIDE