using AxCopilot.Views; using FluentAssertions; using Xunit; namespace AxCopilot.Tests.Views; public class SlashCommandCatalogTests { [Fact] public void MatchBuiltinCommands_ShouldFilterDevCommandsInChatTab() { var chatMatches = SlashCommandCatalog.MatchBuiltinCommands("/rev", isDevTab: false); var devMatches = SlashCommandCatalog.MatchBuiltinCommands("/rev", isDevTab: true); chatMatches.Should().BeEmpty(); devMatches.Should().ContainSingle(x => x.Cmd == "/review"); } [Fact] public void Catalog_ShouldContainCoreParityCommands() { SlashCommandCatalog.TryGetEntry("/compact", out var compactEntry).Should().BeTrue(); compactEntry.SystemPrompt.Should().Be("__COMPACT__"); SlashCommandCatalog.TryGetEntry("/permissions", out var permissionEntry).Should().BeTrue(); permissionEntry.SystemPrompt.Should().Be("__PERMISSIONS__"); SlashCommandCatalog.TryGetEntry("/mcp", out var mcpEntry).Should().BeTrue(); mcpEntry.SystemPrompt.Should().Be("__MCP__"); } }