3 implementations of IAgentClient
aspire (3)
Agents\ClaudeCode\ClaudeCodeAgentClient.cs (1)
15
:
IAgentClient
Agents\Copilot\CopilotAgentClient.cs (1)
15
:
IAgentClient
Agents\OpenCode\OpenCodeAgentClient.cs (1)
14
:
IAgentClient
71 references to IAgentClient
aspire (20)
Agents\AgentConfiguration.cs (3)
19
IEnumerable<
IAgentClient
> clients, DirectoryInfo workspaceRoot, AgentConfigurationScope scope,
34
foreach (
var
client in targets)
259
IReadOnlyList<
IAgentClient
> Clients,
Agents\AspireSkills\LocalAspireSkills.cs (2)
28
IEnumerable<
IAgentClient
> agents,
40
foreach (
var
agent in agents)
Agents\Hooks\TelemetryHookConfigurator.cs (2)
8
IEnumerable<
IAgentClient
> clients) : ITelemetryHookConfigurator
26
foreach (
var
client in clients.Where(client => (client.Environments & supportedEnvironments) != AgentEnvironment.None))
Agents\Playwright\PlaywrightCliInstaller.cs (1)
46
IEnumerable<
IAgentClient
> clients,
Commands\AgentInitCommand.cs (8)
32
private readonly IReadOnlyList<
IAgentClient
> _clients;
44
IEnumerable<
IAgentClient
> clients,
157
private static Option<string?> CreateAgentsOption(IReadOnlyList<
IAgentClient
> clients)
331
IReadOnlyList<
IAgentClient
> selectedClients;
497
foreach (
var
client in selectedClients)
994
private void DisplayInstallationLocations(IReadOnlyList<
IAgentClient
> clients, AgentConfigurationScope scope, DirectoryInfo workspaceRoot, bool installSkills, bool configureMcp)
1030
void AddLocation(string format, string path, IReadOnlyList<
IAgentClient
> sharedClients)
1071
IReadOnlyList<
IAgentClient
> SelectedClients,
Commands\InitCommand.cs (1)
255
private static IReadOnlyList<string> GetAspireifyCommands(IReadOnlyList<
IAgentClient
> selectedClients)
Program.cs (3)
624
builder.Services.AddSingleton<
IAgentClient
, CopilotAgentClient>();
625
builder.Services.AddSingleton<
IAgentClient
, ClaudeCodeAgentClient>();
626
builder.Services.AddSingleton<
IAgentClient
, OpenCodeAgentClient>();
Aspire.Cli.Tests (51)
Agents\AgentConfigurationTestContext.cs (6)
48
public IReadOnlyList<
IAgentClient
> Clients { get; }
49
public
IAgentClient
Copilot { get; }
50
public
IAgentClient
ClaudeCode { get; }
51
public
IAgentClient
OpenCode { get; }
73
AgentConfigurationScope scope, IReadOnlyList<
IAgentClient
> clients, CancellationToken cancellationToken = default)
77
IAgentClient
client, AgentConfigurationScope scope, CancellationToken cancellationToken = default)
Agents\AgentConfigurationTests.cs (3)
219
var
client = _context.Clients.Single(client => string.Equals(client.Id, clientId, StringComparisons.AgentClientId));
522
IAgentClient
[] clients = [_context.Copilot];
592
var
client = _context.Clients.Single(client => string.Equals(client.Id, clientId, StringComparisons.AgentClientId));
Agents\LocalAspireSkillsTests.cs (1)
255
private (IReadOnlyList<string> Files, IReadOnlyList<string> Errors, bool HasFileErrors) Scan(IEnumerable<
IAgentClient
> agents)
Commands\AgentInitClientSelectionTests.cs (24)
125
var
copilot = provider.GetServices<
IAgentClient
>().Single(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId));
176
Assert.Equal(expectedClients.Split(','), agentPrompt.PreSelected.Cast<
IAgentClient
>().Select(client => client.Id), StringComparers.AgentClientId);
178
var clients = provider.GetServices<
IAgentClient
>().ToArray();
319
services.RemoveAll<
IAgentClient
>();
320
services.AddSingleton<
IAgentClient
, OpenCodeAgentClient>();
343
services.RemoveAll<
IAgentClient
>();
344
services.AddSingleton<
IAgentClient
, OpenCodeAgentClient>();
354
Assert.Equal("opencode", Assert.Single(provider.GetServices<
IAgentClient
>()).Id);
368
Assert.Equal(["copilot", "claude", "opencode"], choices.Cast<
IAgentClient
>().Select(client => client.Id), StringComparers.AgentClientId);
410
return choices.Cast<
IAgentClient
>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray();
453
return choices.Cast<
IAgentClient
>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray();
509
? choices.Cast<
IAgentClient
>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray() : [];
571
var paths = provider.GetServices<
IAgentClient
>().Select(client => client.GetMcpConfigPath(selectedScope, workspace.WorkspaceRoot)).Distinct().ToArray();
739
var
openCode = provider.GetServices<
IAgentClient
>().Single(client => string.Equals(client.Id, "opencode", StringComparisons.AgentClientId));
1004
foreach (
var
client in provider.GetServices<
IAgentClient
>())
1102
var
client = provider.GetServices<
IAgentClient
>().Single(client => string.Equals(client.Id, clientId, StringComparisons.AgentClientId));
1153
var
client = provider.GetServices<
IAgentClient
>().Single(client => string.Equals(client.Id, clientId, StringComparisons.AgentClientId));
1186
var
client = provider.GetServices<
IAgentClient
>().Single(client => string.Equals(client.Id, clientId, StringComparisons.AgentClientId));
Commands\AgentInitCommandTests.cs (10)
288
IAgentClient
client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId),
367
IAgentClient
client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId),
407
Assert.All(provider.GetServices<
IAgentClient
>(), client =>
578
foreach (
var
client in provider.GetServices<
IAgentClient
>())
939
var
client = context.Clients.Single(client => string.Equals(client.Id, clientId, StringComparisons.AgentClientId));
1201
IAgentClient
[] clients = [context.Copilot, context.ClaudeCode];
1202
foreach (
var
client in clients)
1223
foreach (
var
client in clients)
1344
var
client = context.Clients.Single(client => string.Equals(client.Id, clientId, StringComparisons.AgentClientId));
Commands\InitCommandTests.cs (2)
712
.Where(choice => choice is
IAgentClient
|| choice is string name && name == CommonAgentApplicators.AspireSkillName).ToArray();
750
choices.Cast<
IAgentClient
>().Where(client => string.Equals(client.Id, "claude", StringComparisons.AgentClientId)).Cast<object>().ToArray();
Commands\NewCommandTests.cs (2)
3278
Assert.All(items, static item => Assert.IsAssignableFrom<
IAgentClient
>(item));
3279
return items.Cast<
IAgentClient
>().Where(client => string.Equals(client.Id, "copilot", StringComparisons.AgentClientId)).Cast<object>().ToArray();
Utils\CliTestHelper.cs (3)
200
services.AddSingleton<
IAgentClient
, CopilotAgentClient>();
201
services.AddSingleton<
IAgentClient
, ClaudeCodeAgentClient>();
202
services.AddSingleton<
IAgentClient
, OpenCodeAgentClient>();