296 references to AgentConfigurationScope
aspire (87)
Agents\AgentConfiguration.cs (1)
20
IEnumerable<IAgentClient> clients, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
Agents\AgentPath.cs (5)
51
var displayPath = GetDisplayPath(path,
AgentConfigurationScope
.Project, workspaceRoot, executionContext);
54
? GetDisplayPath(path,
AgentConfigurationScope
.Global, workspaceRoot, executionContext)
58
public static string GetDisplayPath(string path,
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot, CliExecutionContext executionContext)
60
var root = scope is
AgentConfigurationScope
.Project ? workspaceRoot : executionContext.HomeDirectory;
72
return scope is
AgentConfigurationScope
.Global ? $"~/{displayRelativePath}" : displayRelativePath;
Agents\AspireSkills\LocalAspireSkills.cs (4)
36
internal static IReadOnlyList<(string Directory,
AgentConfigurationScope
Scope, string[] Owners)> Find(
49
(Path: Path.Combine(root.FullName, location.Directory), Scope:
AgentConfigurationScope
.Project, location.Owners)))
50
.Append((Path: Path.Combine(homeDirectory.FullName, AgentPath.UniversalSkillsDirectory), Scope:
AgentConfigurationScope
.Global, Owners: s_universalSkillOwners));
54
var found = new List<(string Directory,
AgentConfigurationScope
Scope, string[] Owners)>();
Agents\ClaudeCode\ClaudeCodeAgentClient.cs (13)
58
public string GetSkillBaseDirectory(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
59
=> Path.Combine(scope is
AgentConfigurationScope
.Project
64
DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope, IReadOnlyList<SkillSource> sources)
69
public string GetIntegrationConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
71
var directory = scope is
AgentConfigurationScope
.Project
79
JsonObject config, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
86
public string GetMcpConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
87
=> scope is
AgentConfigurationScope
.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json")
91
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
95
string configFilePath, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
100
JsonObject config, string configFilePath, bool configureServer,
AgentConfigurationScope
scope)
302
DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope, IEnumerable<string> fragments)
305
if (scope is
AgentConfigurationScope
.Project)
Agents\Copilot\CopilotAgentClient.cs (16)
47
public string GetSkillBaseDirectory(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
48
=> Path.Combine(scope is
AgentConfigurationScope
.Project ? workspaceRoot.FullName : context.HomeDirectory.FullName,
52
DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope, IReadOnlyList<SkillSource> sources)
55
public string GetIntegrationConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
57
var directory = scope is
AgentConfigurationScope
.Project
64
JsonObject config, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
69
public string GetMcpConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
70
=> scope is
AgentConfigurationScope
.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json")
74
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
77
if (scope is
AgentConfigurationScope
.Project)
87
public IEnumerable<string> GetForwardedMcpConfigPaths(
AgentConfigurationScope
scope)
89
if (scope is not
AgentConfigurationScope
.Global)
120
string configFilePath, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
125
JsonObject config, string configFilePath, bool configureServer,
AgentConfigurationScope
scope)
185
private IEnumerable<string> GetSettingsFiles(DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope)
190
if (scope is
AgentConfigurationScope
.Project)
Agents\IAgentClient.cs (9)
19
string GetSkillBaseDirectory(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot);
22
DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope, IReadOnlyList<SkillSource> sources);
24
string GetIntegrationConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot);
27
JsonObject config, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
30
string GetMcpConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot);
33
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot);
36
string configFilePath, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
39
IEnumerable<string> GetForwardedMcpConfigPaths(
AgentConfigurationScope
scope) => [];
44
JsonObject config, string configFilePath, bool configureServer,
AgentConfigurationScope
scope);
Agents\McpConfigFileHelper.cs (2)
76
AgentConfigurationScope
scope,
97
var serverConfiguration = scope is
AgentConfigurationScope
.Global
Agents\OpenCode\OpenCodeAgentClient.cs (14)
47
public string GetSkillBaseDirectory(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
48
=> Path.Combine(scope is
AgentConfigurationScope
.Project ? workspaceRoot.FullName : context.HomeDirectory.FullName,
51
public string GetMcpConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
52
=> scope is
AgentConfigurationScope
.Project ? OpenCodePaths.GetProjectConfigPath(workspaceRoot)
56
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
60
string configFilePath, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
68
var candidates = scope is
AgentConfigurationScope
.Project
106
JsonObject config, string configFilePath, bool configureServer,
AgentConfigurationScope
scope)
158
public string GetIntegrationConfigPath(
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
159
=> scope is
AgentConfigurationScope
.Project
164
DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope, IReadOnlyList<SkillSource> sources)
173
foreach (var path in scope is
AgentConfigurationScope
.Project ? CatalogSettings(workspaceRoot) : GlobalCatalogSettings())
185
JsonObject config, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope,
193
scope is
AgentConfigurationScope
.Project ? CatalogSettings(workspaceRoot) : GlobalCatalogSettings(),
Agents\Playwright\PlaywrightCliInstaller.cs (2)
338
client.GetSkillBaseDirectory(
AgentConfigurationScope
.Project, workspaceRoot)))
356
.GetSkillBaseDirectory(
AgentConfigurationScope
.Project, new DirectoryInfo(repoRoot)));
Commands\AgentInitCommand.cs (19)
75
internal static readonly Option<
AgentConfigurationScope
> s_scopeOption = CreateScopeOption();
180
private static Option<
AgentConfigurationScope
> CreateScopeOption()
182
var option = new Option<
AgentConfigurationScope
>("--scope")
193
Enum.TryParse<
AgentConfigurationScope
>(result.Tokens[0].Value, ignoreCase: true, out _) &&
194
!Enum.GetNames<
AgentConfigurationScope
>().Contains(result.Tokens[0].Value, StringComparer.OrdinalIgnoreCase))
230
PromptBinding<
AgentConfigurationScope
> scopeBinding,
265
PromptBinding.Create(parseResult, s_scopeOption,
AgentConfigurationScope
.Project),
334
PromptBinding<
AgentConfigurationScope
> scopeBinding,
506
var
scope = scopeProvided ? requestedScope : scopeBinding.DefaultValue;
523
new[] {
AgentConfigurationScope
.Project,
AgentConfigurationScope
.Global },
524
value => value is
AgentConfigurationScope
.Project
765
AgentConfigurationScope
scope,
802
IAgentClient client, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope, CancellationToken cancellationToken)
1010
private void DisplayInstalledSkillsSummary(IReadOnlyList<InstalledSkillSummaryItem> installedSkills,
AgentConfigurationScope
scope, DirectoryInfo workspaceRoot)
1085
IReadOnlyList<IAgentClient> selectedClients, DirectoryInfo workspaceRoot,
AgentConfigurationScope
scope)
1097
AgentConfigurationScope
scope, CancellationToken cancellationToken)
1107
AgentConfigurationScope
scope, PromptBinding<bool> removeSkillCopiesBinding, CancellationToken cancellationToken)
1214
AgentConfigurationScope
scope)
Commands\InitCommand.cs (1)
220
PromptBinding.Create(parseResult, AgentInitCommand.s_scopeOption,
AgentConfigurationScope
.Project),
Commands\NewCommand.cs (1)
821
PromptBinding.Create(parseResult, AgentInitCommand.s_scopeOption,
AgentConfigurationScope
.Project),
Aspire.Cli.Tests (209)
Agents\AgentConfigurationTestContext.cs (2)
79
AgentConfigurationScope
scope, IReadOnlyList<IAgentClient> clients, CancellationToken cancellationToken = default)
83
IAgentClient client,
AgentConfigurationScope
scope, CancellationToken cancellationToken = default)
Agents\AgentConfigurationTests.cs (29)
196
var path = _context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, _context.Project);
205
config, _context.Project,
AgentConfigurationScope
.Project, edit, _context.Sources, CancellationToken.None);
220
var inherited = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, _context.Project);
222
var path = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, _context.Project);
226
config, _context.Project,
AgentConfigurationScope
.Project, edit, _context.Sources, CancellationToken.None);
252
var path = _context.ClaudeCode.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, _context.Project);
256
config, _context.Project,
AgentConfigurationScope
.Project, edit, _context.Sources, CancellationToken.None);
280
var path = _context.ClaudeCode.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, _context.Project);
284
config, _context.Project,
AgentConfigurationScope
.Project, edit, _context.Sources, CancellationToken.None);
295
var path = _context.OpenCode.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, _context.Project);
300
remote, _context.Project,
AgentConfigurationScope
.Global, remoteEdit, _context.Sources, CancellationToken.None);
303
path, _context.Project,
AgentConfigurationScope
.Global, mcpEdit, CancellationToken.None);
304
_context.OpenCode.UpdateMcpConfig(mcp, mcpPath, configureServer: true,
AgentConfigurationScope
.Global);
524
var projectResults = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, clients).DefaultTimeout();
528
var userResults = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Global, clients).DefaultTimeout();
570
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Global, [_context.ClaudeCode]).DefaultTimeout();
575
await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.ClaudeCode]).DefaultTimeout();
594
: client.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, _context.Project);
597
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [client]).DefaultTimeout();
603
Assert.False(File.Exists(client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, _context.Project)));
624
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.ClaudeCode]);
655
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.ClaudeCode]);
673
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Global, [_context.ClaudeCode]).DefaultTimeout();
685
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Global, [_context.Copilot]).DefaultTimeout();
686
var repeated = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Global, [_context.Copilot]).DefaultTimeout();
704
AgentConfigurationScope
.Global, [_context.Copilot, _context.ClaudeCode]);
726
AgentConfigurationScope
.Global, [_context.Copilot, _context.ClaudeCode]);
741
AgentConfigurationScope
.Project, [_context.Copilot, _context.ClaudeCode]);
755
AgentConfigurationScope
.Project, [_context.Copilot], cancellation.Token)).DefaultTimeout();
Agents\AgentPathTests.cs (4)
45
_context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, _context.Project));
47
_context.Copilot.GetMcpConfigPath(
AgentConfigurationScope
.Global, _context.Project));
85
Assert.Equal(homePath, AgentPath.GetDisplayPath(homePath,
AgentConfigurationScope
.Project, _context.Project, _context.ExecutionContext));
86
Assert.Equal(projectPath, AgentPath.GetDisplayPath(projectPath,
AgentConfigurationScope
.Global, _context.Project, _context.ExecutionContext));
Agents\LocalAspireSkillsTests.cs (8)
38
names.Select(name => (Path.Combine(skills, name),
AgentConfigurationScope
.Project)).OrderBy(entry => entry.Item1, StringComparers.FileSystemPath),
66
paths.Select(path => (path,
AgentConfigurationScope
.Project)).OrderBy(entry => entry.path, StringComparers.FileSystemPath),
83
new[] { (project,
AgentConfigurationScope
.Project), (user,
AgentConfigurationScope
.Global) }
96
Assert.Equal([(skill,
AgentConfigurationScope
.Project), (skill,
AgentConfigurationScope
.Global)], result);
119
Assert.Equal((selected,
AgentConfigurationScope
.Project), Assert.Single(result));
129
private IReadOnlyList<(string Directory,
AgentConfigurationScope
Scope)> Find(DirectoryInfo working, DirectoryInfo workspaceRoot)
Agents\OpenCodeAgentClientTests.cs (29)
25
var target = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, _context.Project);
27
Assert.True(client.HasIntegrationRegistration(_context.Project,
AgentConfigurationScope
.Project, _context.Sources));
31
var configured = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [client]);
57
var result = await _context.ConfigureMcpAsync(_context.OpenCode,
AgentConfigurationScope
.Project);
84
var result = await _context.ConfigureMcpAsync(_context.OpenCode,
AgentConfigurationScope
.Project);
102
var
scope = Enum.Parse<
AgentConfigurationScope
>(scopeName);
103
var directory = scope is
AgentConfigurationScope
.Project ? _context.Project.FullName : _context.OpenCodeDirectory;
117
Assert.Empty((scope is
AgentConfigurationScope
.Project ? _context.Home : _context.Project).EnumerateFileSystemInfos());
132
var result = await _context.ConfigureMcpAsync(_context.OpenCode,
AgentConfigurationScope
.Project);
147
var result = await _context.ConfigureMcpAsync(_context.OpenCode,
AgentConfigurationScope
.Project);
158
var result = await _context.ConfigureMcpAsync(_context.OpenCode,
AgentConfigurationScope
.Project);
169
var
scope = Enum.Parse<
AgentConfigurationScope
>(scopeName);
170
if (scope is
AgentConfigurationScope
.Global)
184
Assert.Empty((scope is
AgentConfigurationScope
.Project ? _context.Home : _context.Project).EnumerateFileSystemInfos());
196
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.OpenCode]);
222
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.OpenCode]);
253
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.OpenCode]);
275
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.OpenCode]);
293
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.OpenCode]);
305
var
scope = Enum.Parse<
AgentConfigurationScope
>(scopeName);
306
var directory = scope is
AgentConfigurationScope
.Project ? _context.Project.FullName : _context.OpenCodeDirectory;
331
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [_context.OpenCode]);
351
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Global, [_context.OpenCode]);
356
Assert.Equal(_context.OpenCode.GetMcpConfigPath(
AgentConfigurationScope
.Global, _context.Project), result.TargetPath);
378
var results = await _context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Global, [_context.OpenCode]);
387
Assert.True(_context.OpenCode.HasIntegrationRegistration(_context.Project,
AgentConfigurationScope
.Project, _context.Sources));
Agents\SkillSourceTests.cs (20)
207
var
scope = global ?
AgentConfigurationScope
.Global :
AgentConfigurationScope
.Project;
236
var path = context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project);
241
var result = Assert.Single(await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [context.Copilot]).DefaultTimeout());
258
var path = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project);
262
var result = Assert.Single(await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [client]).DefaultTimeout());
280
client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project),
283
Assert.True(client.HasIntegrationRegistration(context.Project,
AgentConfigurationScope
.Project, context.Sources));
298
var path = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project);
308
var result = Assert.Single(await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [client]).DefaultTimeout());
312
var unchanged = Assert.Single(await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [client]).DefaultTimeout());
345
var path = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project);
356
var result = Assert.Single(await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [client]).DefaultTimeout());
369
var results = await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, context.Clients).DefaultTimeout();
392
var path = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project);
403
var result = Assert.Single(await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, [client]).DefaultTimeout());
424
context.OpenCode.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project), """{"skills":[]}""");
426
var results = await context.ConfigureIntegrationAsync(
AgentConfigurationScope
.Project, context.Clients).DefaultTimeout();
433
client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project));
Commands\AgentInitClientSelectionTests.cs (70)
42
workspace.WorkspaceRoot,
AgentConfigurationScope
.Project, [SkillSource.BuiltIn]));
45
.HasIntegrationRegistration(workspace.WorkspaceRoot,
AgentConfigurationScope
.Project, [SkillSource.BuiltIn]));
100
var
selectedScope = scope == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
205
[InlineData("PrOjEcT", nameof(
AgentConfigurationScope
.Project))]
206
[InlineData("GlObAl", nameof(
AgentConfigurationScope
.Global))]
215
Assert.Equal(Enum.Parse<
AgentConfigurationScope
>(expected), result.GetValue<
AgentConfigurationScope
>("--scope"));
393
var directory = client.GetSkillBaseDirectory(Enum.Parse<
AgentConfigurationScope
>(scope, ignoreCase: true), workspace.WorkspaceRoot);
490
Assert.Equal([
AgentConfigurationScope
.Project,
AgentConfigurationScope
.Global], choices.Cast<
AgentConfigurationScope
>());
499
return
AgentConfigurationScope
.Global;
522
workspace.WorkspaceRoot,
AgentConfigurationScope
.Global, [SkillSource.BuiltIn]));
549
PromptForSelectionCallback = (_, _, _, _) =>
AgentConfigurationScope
.Global
617
workspace.WorkspaceRoot,
AgentConfigurationScope
.Project, [SkillSource.BuiltIn]));
642
var
selectedScope = scope == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
644
var root = selectedScope is
AgentConfigurationScope
.Project ? workspace.WorkspaceRoot : homeDirectory;
787
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
789
scope is
AgentConfigurationScope
.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot)
837
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
838
var configDirectory = Path.GetDirectoryName(scope is
AgentConfigurationScope
.Project
892
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
893
var jsoncPath = scope is
AgentConfigurationScope
.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot)
957
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
958
var jsoncPath = scope is
AgentConfigurationScope
.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot)
1009
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
1010
var jsoncPath = scope is
AgentConfigurationScope
.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot)
1083
var path = client.GetMcpConfigPath(
AgentConfigurationScope
.Global, workspace.WorkspaceRoot);
1181
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
1232
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
1265
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
1288
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
1289
var path = scope is
AgentConfigurationScope
.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot)
1327
var
scope = scopeName == "project" ?
AgentConfigurationScope
.Project :
AgentConfigurationScope
.Global;
1328
var path = scope is
AgentConfigurationScope
.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot)
1428
var path = client.GetMcpConfigPath(
AgentConfigurationScope
.Global, workspace.WorkspaceRoot);
1476
var mcpPath = client.GetMcpConfigPath(
AgentConfigurationScope
.Global, workspace.WorkspaceRoot);
1477
var pluginPath = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, workspace.WorkspaceRoot);
1521
var
scope = global ?
AgentConfigurationScope
.Global :
AgentConfigurationScope
.Project;
1589
workspace.WorkspaceRoot,
AgentConfigurationScope
.Project, [SkillSource.BuiltIn]));
1641
Assert.True(File.Exists(context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, context.Project)));
1642
Assert.True(File.Exists(context.Copilot.GetMcpConfigPath(
AgentConfigurationScope
.Global, context.Project)));
1643
Assert.False(File.Exists(context.ClaudeCode.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, context.Project)));
1649
var mcpPath = context.Copilot.GetMcpConfigPath(
AgentConfigurationScope
.Global, context.Project);
Commands\AgentInitCommandTests.cs (38)
107
context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project)), "json")
216
context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project)), "json")
281
client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project))));
437
var
configurationScope = Enum.Parse<
AgentConfigurationScope
>(scope, ignoreCase: true);
458
var skillsRoot = configurationScope is
AgentConfigurationScope
.Project ? context.Project : context.Home;
497
workspace.WorkspaceRoot,
AgentConfigurationScope
.Project, SkillSource.Resolve(provider.GetRequiredService<IConfiguration>())));
522
PromptBinding.CreateDefault(
AgentConfigurationScope
.Project),
527
var config = await File.ReadAllTextAsync(context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project));
561
PromptBinding.CreateDefault(
AgentConfigurationScope
.Project),
567
context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project)), "json")
857
[InlineData(nameof(
AgentConfigurationScope
.Project))]
858
[InlineData(nameof(
AgentConfigurationScope
.Global))]
862
var
scope = Enum.Parse<
AgentConfigurationScope
>(scopeName);
873
var scopeRoot = scope is
AgentConfigurationScope
.Project ? context.Project : context.Home;
874
var prefix = scope is
AgentConfigurationScope
.Global ? "~/" : string.Empty;
934
context.OpenCode.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project), config.ToJsonString());
960
client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project), original);
981
client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project)));
1084
context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project),
1142
var settingsPath = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project);
1151
client.GetIntegrationConfigPath(
AgentConfigurationScope
.Global, context.Project), settings);
1212
[InlineData("copilot", nameof(
AgentConfigurationScope
.Project), ".github/copilot/settings.local.json")]
1213
[InlineData("claude", nameof(
AgentConfigurationScope
.Project), ".claude/settings.local.json")]
1214
[InlineData("copilot", nameof(
AgentConfigurationScope
.Global), "managed-settings.json")]
1219
var
scope = Enum.Parse<
AgentConfigurationScope
>(scopeName);
1229
scope is
AgentConfigurationScope
.Project
1296
context.Project,
AgentConfigurationScope
.Project, [SkillSource.BuiltIn]));
1360
[InlineData(nameof(
AgentConfigurationScope
.Project))]
1361
[InlineData(nameof(
AgentConfigurationScope
.Global))]
1365
var
scope = Enum.Parse<
AgentConfigurationScope
>(scopeName);
1397
var integrationPath = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project);
1414
client.GetMcpConfigPath(
AgentConfigurationScope
.Project, context.Project)))!;
1417
Assert.True(File.Exists(context.Copilot.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project)));
1418
Assert.True(File.Exists(context.Copilot.GetMcpConfigPath(
AgentConfigurationScope
.Project, context.Project)));
Commands\ConfigSourceCommandTests.cs (2)
275
await Verify(await File.ReadAllTextAsync(client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, context.Project)), "json")
347
.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, workspace.WorkspaceRoot);
Commands\InitCommandTests.cs (7)
1027
var nativePath = client.GetIntegrationConfigPath(
AgentConfigurationScope
.Project, workspace.WorkspaceRoot);
1103
var
selectedScope = Enum.Parse<
AgentConfigurationScope
>(scope, ignoreCase: true);
1104
var
unselectedScope = selectedScope is
AgentConfigurationScope
.Project
1105
?
AgentConfigurationScope
.Global
1106
:
AgentConfigurationScope
.Project;