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