68 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
>();
70
var supported = new List<
AgentClientKind
>();
71
if (detectedClients.Contains(
AgentClientKind
.CopilotApp))
73
supported.Add(
AgentClientKind
.CopilotApp);
75
else if (detectedClients.Contains(
AgentClientKind
.CopilotCli))
77
supported.Add(
AgentClientKind
.CopilotCli);
80
if (detectedClients.Contains(
AgentClientKind
.ClaudeCode))
82
supported.Add(
AgentClientKind
.ClaudeCode);
93
foreach (
var
client in supported)
97
case
AgentClientKind
.CopilotApp:
98
case
AgentClientKind
.CopilotCli:
109
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 (34)
Agents\CopilotAgentEnvironmentScannerTests.cs (3)
214
Assert.Equal([
AgentClientKind
.CopilotApp], context.DetectedClients);
229
[
AgentClientKind
.CopilotCli,
AgentClientKind
.CopilotApp],
Agents\TelemetryHookConfiguratorTests.cs (24)
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);
110
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
111
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
146
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
166
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None);
167
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None);
188
var result = await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
190
Assert.DoesNotContain(
AgentClientKind
.ClaudeCode, result.ConfiguredClients);
191
Assert.Contains(result.Skipped, s => s.Client ==
AgentClientKind
.ClaudeCode && s.Reason == TelemetryHookSkipReason.MalformedConfig);
230
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None);
231
await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None);
253
var result = await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
255
Assert.Contains(result.Skipped, s => s.Client ==
AgentClientKind
.ClaudeCode && s.Reason == TelemetryHookSkipReason.UnexpectedConfigShape);
273
var result = await configurator.ConfigureAsync([
AgentClientKind
.ClaudeCode], CancellationToken.None).DefaultTimeout();
275
Assert.Contains(result.Skipped, s => s.Client ==
AgentClientKind
.ClaudeCode && s.Reason == TelemetryHookSkipReason.UnexpectedConfigShape);
287
[
AgentClientKind
.VsCode,
AgentClientKind
.OpenCode],
Commands\AgentInitCommandTests.cs (7)
991
[InlineData(nameof(
AgentClientKind
.CopilotCli), "GitHub Copilot CLI")]
992
[InlineData(nameof(
AgentClientKind
.CopilotApp), "GitHub Copilot App")]
998
var
client = Enum.Parse<
AgentClientKind
>(clientKind);
1035
options.AgentEnvironmentDetectorFactory = _ => new FakeDetectingDetector(
AgentClientKind
.CopilotCli);
1061
private sealed class FakeDetectingDetector(
AgentClientKind
client) : IAgentEnvironmentDetector
1078
IReadOnlyCollection<
AgentClientKind
> detectedClients,