141 references to Project
aspire (25)
Agents\AgentPath.cs (2)
51var displayPath = GetDisplayPath(path, AgentConfigurationScope.Project, workspaceRoot, executionContext); 60var root = scope is AgentConfigurationScope.Project ? workspaceRoot : executionContext.HomeDirectory;
Agents\AspireSkills\LocalAspireSkills.cs (1)
49(Path: Path.Combine(root.FullName, location.Directory), Scope: AgentConfigurationScope.Project, location.Owners)))
Agents\ClaudeCode\ClaudeCodeAgentClient.cs (4)
59=> Path.Combine(scope is AgentConfigurationScope.Project 71var directory = scope is AgentConfigurationScope.Project 87=> scope is AgentConfigurationScope.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json") 305if (scope is AgentConfigurationScope.Project)
Agents\Copilot\CopilotAgentClient.cs (5)
48=> Path.Combine(scope is AgentConfigurationScope.Project ? workspaceRoot.FullName : context.HomeDirectory.FullName, 57var directory = scope is AgentConfigurationScope.Project 70=> scope is AgentConfigurationScope.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json") 77if (scope is AgentConfigurationScope.Project) 190if (scope is AgentConfigurationScope.Project)
Agents\OpenCode\OpenCodeAgentClient.cs (6)
48=> Path.Combine(scope is AgentConfigurationScope.Project ? workspaceRoot.FullName : context.HomeDirectory.FullName, 52=> scope is AgentConfigurationScope.Project ? OpenCodePaths.GetProjectConfigPath(workspaceRoot) 68var candidates = scope is AgentConfigurationScope.Project 159=> scope is AgentConfigurationScope.Project 173foreach (var path in scope is AgentConfigurationScope.Project ? CatalogSettings(workspaceRoot) : GlobalCatalogSettings()) 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 (3)
265PromptBinding.Create(parseResult, s_scopeOption, AgentConfigurationScope.Project), 523new[] { AgentConfigurationScope.Project, AgentConfigurationScope.Global }, 524value => value is AgentConfigurationScope.Project
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 (116)
Agents\AgentConfigurationTests.cs (16)
196var path = _context.Copilot.GetIntegrationConfigPath(AgentConfigurationScope.Project, _context.Project); 205config, _context.Project, AgentConfigurationScope.Project, edit, _context.Sources, CancellationToken.None); 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); 524var projectResults = await _context.ConfigureIntegrationAsync(AgentConfigurationScope.Project, clients).DefaultTimeout(); 575await _context.ConfigureIntegrationAsync(AgentConfigurationScope.Project, [_context.ClaudeCode]).DefaultTimeout(); 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]); 741AgentConfigurationScope.Project, [_context.Copilot, _context.ClaudeCode]); 755AgentConfigurationScope.Project, [_context.Copilot], cancellation.Token)).DefaultTimeout();
Agents\AgentPathTests.cs (1)
85Assert.Equal(homePath, AgentPath.GetDisplayPath(homePath, AgentConfigurationScope.Project, _context.Project, _context.ExecutionContext));
Agents\LocalAspireSkillsTests.cs (5)
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));
Agents\OpenCodeAgentClientTests.cs (19)
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); 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); 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]); 306var directory = scope is AgentConfigurationScope.Project ? _context.Project.FullName : _context.OpenCodeDirectory; 331var results = await _context.ConfigureIntegrationAsync(AgentConfigurationScope.Project, [_context.OpenCode]); 387Assert.True(_context.OpenCode.HasIntegrationRegistration(_context.Project, AgentConfigurationScope.Project, _context.Sources));
Agents\SkillSourceTests.cs (18)
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 (27)
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))] 490Assert.Equal([AgentConfigurationScope.Project, AgentConfigurationScope.Global], choices.Cast<AgentConfigurationScope>()); 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) 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) 1521var scope = global ? AgentConfigurationScope.Global : AgentConfigurationScope.Project; 1589workspace.WorkspaceRoot, AgentConfigurationScope.Project, [SkillSource.BuiltIn]));
Commands\AgentInitCommandTests.cs (25)
107context.Copilot.GetIntegrationConfigPath(AgentConfigurationScope.Project, context.Project)), "json") 216context.Copilot.GetIntegrationConfigPath(AgentConfigurationScope.Project, context.Project)), "json") 281client.GetIntegrationConfigPath(AgentConfigurationScope.Project, context.Project)))); 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))] 873var scopeRoot = scope is AgentConfigurationScope.Project ? context.Project : context.Home; 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); 1212[InlineData("copilot", nameof(AgentConfigurationScope.Project), ".github/copilot/settings.local.json")] 1213[InlineData("claude", nameof(AgentConfigurationScope.Project), ".claude/settings.local.json")] 1229scope is AgentConfigurationScope.Project 1296context.Project, AgentConfigurationScope.Project, [SkillSource.BuiltIn])); 1360[InlineData(nameof(AgentConfigurationScope.Project))] 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 (3)
1027var nativePath = client.GetIntegrationConfigPath(AgentConfigurationScope.Project, workspace.WorkspaceRoot); 1104var unselectedScope = selectedScope is AgentConfigurationScope.Project 1106: AgentConfigurationScope.Project;