41 references to OpenCodePaths
aspire (26)
Agents\OpenCode\OpenCodeAgentClient.cs (25)
58: OpenCodePaths.GetConfigDirectory(context, environment); 62OpenCodePaths.GetOverride(OpenCodePaths.ConfigDirectoryEnvironmentVariable, context, environment) is { } custom) 69? OpenCodePaths.GetProjectConfigPaths(workspaceRoot) 86environment.GetEnvironmentVariable(OpenCodePaths.ConfigContentEnvironmentVariable) is { Length: > 0 } inline) 125=> scope is AgentConfigurationScope.Project ? OpenCodePaths.GetProjectConfigPath(workspaceRoot) 126: OpenCodePaths.GetGlobalMcpConfigPath(context, environment); 142? OpenCodePaths.GetProjectConfigPaths(workspaceRoot) 143: environment.GetEnvironmentVariable(OpenCodePaths.ConfigEnvironmentVariable) is not { Length: > 0 } 144? OpenCodePaths.GetConfigPaths(Path.GetDirectoryName(configFilePath)!) 232? OpenCodePaths.GetProjectConfigPath(workspaceRoot) 233: OpenCodePaths.GetGlobalMcpConfigPath(context, environment); 239if (environment.GetEnvironmentVariable(OpenCodePaths.ConfigContentEnvironmentVariable) is { Length: > 0 } inline && 267if (environment.GetEnvironmentVariable(OpenCodePaths.ConfigContentEnvironmentVariable) is { Length: > 0 } inline) 272throw AspireSkillsRemoteConfiguration.ExistingConfiguration($"{OpenCodePaths.ConfigContentEnvironmentVariable}.skills"); 281.SelectMany(OpenCodePaths.GetProjectConfigPaths) 286var defaultPaths = OpenCodePaths.GetConfigPaths(OpenCodePaths.GetConfigDirectory(context, environment)); 287var customDirectory = OpenCodePaths.GetOverride(OpenCodePaths.ConfigDirectoryEnvironmentVariable, context, environment); 288IEnumerable<string> customPaths = customDirectory is null ? [] : OpenCodePaths.GetConfigPaths(customDirectory); 289var globalPaths = environment.GetEnvironmentVariable(OpenCodePaths.ConfigEnvironmentVariable) is { Length: > 0 } 290? new[] { OpenCodePaths.GetGlobalMcpConfigPath(context, environment) }.Concat(customPaths).Concat(defaultPaths) 294.Concat(OpenCodePaths.GetConfigPaths(OpenCodePaths.GetManagedSettingsDirectory(context, environment))).Distinct(StringComparers.FileSystemPath);
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (1)
22var configFilePath = OpenCodePaths.GetMcpConfigPath(context.RepositoryRoot);
Aspire.Cli.Tests (15)
Agents\AgentConfigurationTestContext.cs (1)
60public string OpenCodeDirectory => OpenCodePaths.GetConfigDirectory(ExecutionContext, Environment);
Commands\AgentInitClientSelectionTests.cs (14)
801scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 802: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment))!); 851? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) : OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment))!; 905var jsoncPath = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 906: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 970var jsoncPath = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 971: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 1022var jsoncPath = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 1023: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 1297var path = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 1298: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 1336var path = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 1337: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment);