47 references to AgentClientKind
aspire (26)
Agents\AgentEnvironmentScanContext.cs (3)
13private readonly HashSet<AgentClientKind> _detectedClients = []; 69public void AddDetectedClient(AgentClientKind client) 77public IReadOnlyCollection<AgentClientKind> DetectedClients => _detectedClients;
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (2)
58context.AddDetectedClient(AgentClientKind.ClaudeCode); 90context.AddDetectedClient(AgentClientKind.ClaudeCode);
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (2)
64context.AddDetectedClient(AgentClientKind.CopilotCli); 98context.AddDetectedClient(AgentClientKind.CopilotCli);
Agents\Hooks\ITelemetryHookConfigurator.cs (3)
21IReadOnlyCollection<AgentClientKind> detectedClients, 45internal sealed record TelemetryHookSkip(AgentClientKind Client, TelemetryHookSkipReason Reason); 53IReadOnlyList<AgentClientKind> ConfiguredClients,
Agents\Hooks\TelemetryHookConfigurator.cs (7)
58IReadOnlyCollection<AgentClientKind> detectedClients, 63var configured = new List<AgentClientKind>(); 69.Where(static c => c is AgentClientKind.CopilotCli or AgentClientKind.ClaudeCode) 81foreach (var client in supported) 85case AgentClientKind.CopilotCli: 96case AgentClientKind.ClaudeCode:
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (2)
56context.AddDetectedClient(AgentClientKind.OpenCode); 84context.AddDetectedClient(AgentClientKind.OpenCode);
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (2)
63context.AddDetectedClient(AgentClientKind.VsCode); 84context.AddDetectedClient(AgentClientKind.VsCode);
Commands\AgentInitCommand.cs (5)
523private static string GetClientDisplayName(AgentClientKind client) 526AgentClientKind.CopilotCli => "GitHub Copilot CLI", 527AgentClientKind.ClaudeCode => "Claude Code", 528AgentClientKind.VsCode => "VS Code", 529AgentClientKind.OpenCode => "OpenCode",
Aspire.Cli.Tests (21)
Agents\TelemetryHookConfiguratorTests.cs (17)
22var result = await configurator.ConfigureAsync([AgentClientKind.CopilotCli], CancellationToken.None).DefaultTimeout(); 24Assert.Contains(AgentClientKind.CopilotCli, result.ConfiguredClients); 55await configurator.ConfigureAsync([AgentClientKind.CopilotCli], CancellationToken.None).DefaultTimeout(); 68var result = await configurator.ConfigureAsync([AgentClientKind.ClaudeCode], CancellationToken.None).DefaultTimeout(); 70Assert.Contains(AgentClientKind.ClaudeCode, result.ConfiguredClients); 105await configurator.ConfigureAsync([AgentClientKind.ClaudeCode], CancellationToken.None).DefaultTimeout(); 106await configurator.ConfigureAsync([AgentClientKind.ClaudeCode], CancellationToken.None).DefaultTimeout(); 141await configurator.ConfigureAsync([AgentClientKind.ClaudeCode], CancellationToken.None).DefaultTimeout(); 162var result = await configurator.ConfigureAsync([AgentClientKind.ClaudeCode], CancellationToken.None).DefaultTimeout(); 164Assert.DoesNotContain(AgentClientKind.ClaudeCode, result.ConfiguredClients); 165Assert.Contains(result.Skipped, s => s.Client == AgentClientKind.ClaudeCode && s.Reason == TelemetryHookSkipReason.MalformedConfig); 181var result = await configurator.ConfigureAsync([AgentClientKind.ClaudeCode], CancellationToken.None).DefaultTimeout(); 183Assert.Contains(result.Skipped, s => s.Client == AgentClientKind.ClaudeCode && s.Reason == TelemetryHookSkipReason.UnexpectedConfigShape); 201var result = await configurator.ConfigureAsync([AgentClientKind.ClaudeCode], CancellationToken.None).DefaultTimeout(); 203Assert.Contains(result.Skipped, s => s.Client == AgentClientKind.ClaudeCode && s.Reason == TelemetryHookSkipReason.UnexpectedConfigShape); 215[AgentClientKind.VsCode, AgentClientKind.OpenCode],
Commands\AgentInitCommandTests.cs (4)
907options.AgentEnvironmentDetectorFactory = _ => new FakeDetectingDetector(AgentClientKind.CopilotCli); 936options.AgentEnvironmentDetectorFactory = _ => new FakeDetectingDetector(AgentClientKind.CopilotCli); 962private sealed class FakeDetectingDetector(AgentClientKind client) : IAgentEnvironmentDetector 979IReadOnlyCollection<AgentClientKind> detectedClients,