64 references to AgentClientKind
aspire (34)
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\Copilot\CopilotAgentEnvironmentScanner.cs (3)
70
context.AddDetectedClient(
AgentClientKind
.CopilotApp);
81
context.AddDetectedClient(
AgentClientKind
.CopilotCli);
91
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 (13)
57
IReadOnlyCollection<
AgentClientKind
> detectedClients,
62
var configured = new List<
AgentClientKind
>();
68
var supported = new List<
AgentClientKind
>();
69
if (detectedClients.Contains(
AgentClientKind
.CopilotApp))
71
supported.Add(
AgentClientKind
.CopilotApp);
73
else if (detectedClients.Contains(
AgentClientKind
.CopilotCli))
75
supported.Add(
AgentClientKind
.CopilotCli);
78
if (detectedClients.Contains(
AgentClientKind
.ClaudeCode))
80
supported.Add(
AgentClientKind
.ClaudeCode);
91
foreach (
var
client in supported)
95
case
AgentClientKind
.CopilotApp:
96
case
AgentClientKind
.CopilotCli:
107
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 (6)
490
private static string GetClientDisplayName(
AgentClientKind
client)
493
AgentClientKind
.CopilotCli => "GitHub Copilot CLI",
494
AgentClientKind
.CopilotApp => "GitHub Copilot App",
495
AgentClientKind
.ClaudeCode => "Claude Code",
496
AgentClientKind
.VsCode => "VS Code",
497
AgentClientKind
.OpenCode => "OpenCode",
Aspire.Cli.Tests (30)
Agents\CopilotAgentEnvironmentScannerTests.cs (3)
214
Assert.Equal([
AgentClientKind
.CopilotApp], context.DetectedClients);
229
[
AgentClientKind
.CopilotCli,
AgentClientKind
.CopilotApp],
Agents\TelemetryHookConfiguratorTests.cs (20)
22
var result = await configurator.ConfigureAsync([
AgentClientKind
.CopilotCli], CancellationToken.None).DefaultTimeout();
24
Assert.Contains(
AgentClientKind
.CopilotCli, result.ConfiguredClients);
52
[
AgentClientKind
.CopilotCli,
AgentClientKind
.CopilotApp],
55
Assert.Equal([
AgentClientKind
.CopilotApp], result.ConfiguredClients);
71
await configurator.ConfigureAsync([
AgentClientKind
.CopilotCli], CancellationToken.None).DefaultTimeout();
84
var result = await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
86
Assert.Contains(
AgentClientKind
.ClaudeCode, result.ConfiguredClients);
121
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
122
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
157
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
178
var result = await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
180
Assert.DoesNotContain(
AgentClientKind
.ClaudeCode, result.ConfiguredClients);
181
Assert.Contains(result.Skipped, s => s.Client ==
AgentClientKind
.ClaudeCode && s.Reason == TelemetryHookSkipReason.MalformedConfig);
197
var result = await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
199
Assert.Contains(result.Skipped, s => s.Client ==
AgentClientKind
.ClaudeCode && s.Reason == TelemetryHookSkipReason.UnexpectedConfigShape);
217
var result = await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
219
Assert.Contains(result.Skipped, s => s.Client ==
AgentClientKind
.ClaudeCode && s.Reason == TelemetryHookSkipReason.UnexpectedConfigShape);
231
[
AgentClientKind
.VsCode,
AgentClientKind
.OpenCode],
Commands\AgentInitCommandTests.cs (7)
929
[InlineData(nameof(
AgentClientKind
.CopilotCli), "GitHub Copilot CLI")]
930
[InlineData(nameof(
AgentClientKind
.CopilotApp), "GitHub Copilot App")]
936
var
client = Enum.Parse<
AgentClientKind
>(clientKind);
973
options.AgentEnvironmentDetectorFactory = _ => new FakeDetectingDetector(
AgentClientKind
.CopilotCli);
999
private sealed class FakeDetectingDetector(
AgentClientKind
client) : IAgentEnvironmentDetector
1016
IReadOnlyCollection<
AgentClientKind
> detectedClients,