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