36 references to OpenCodePaths
aspire (21)
Agents\OpenCode\OpenCodeAgentClient.cs (20)
52=> scope is AgentConfigurationScope.Project ? OpenCodePaths.GetProjectConfigPath(workspaceRoot) 53: OpenCodePaths.GetGlobalMcpConfigPath(context, environment); 69? OpenCodePaths.GetProjectConfigPaths(workspaceRoot) 70: environment.GetEnvironmentVariable(OpenCodePaths.ConfigEnvironmentVariable) is not { Length: > 0 } 71? OpenCodePaths.GetConfigPaths(Path.GetDirectoryName(configFilePath)!) 160? OpenCodePaths.GetProjectConfigPath(workspaceRoot) 161: OpenCodePaths.GetGlobalMcpConfigPath(context, environment); 167if (environment.GetEnvironmentVariable(OpenCodePaths.ConfigContentEnvironmentVariable) is { Length: > 0 } inline && 195if (environment.GetEnvironmentVariable(OpenCodePaths.ConfigContentEnvironmentVariable) is { Length: > 0 } inline) 200throw AspireSkillsRemoteConfiguration.ExistingConfiguration($"{OpenCodePaths.ConfigContentEnvironmentVariable}.skills"); 209.SelectMany(OpenCodePaths.GetProjectConfigPaths) 214var defaultPaths = OpenCodePaths.GetConfigPaths(OpenCodePaths.GetConfigDirectory(context, environment)); 215var customDirectory = OpenCodePaths.GetOverride(OpenCodePaths.ConfigDirectoryEnvironmentVariable, context, environment); 216IEnumerable<string> customPaths = customDirectory is null ? [] : OpenCodePaths.GetConfigPaths(customDirectory); 217var globalPaths = environment.GetEnvironmentVariable(OpenCodePaths.ConfigEnvironmentVariable) is { Length: > 0 } 218? new[] { OpenCodePaths.GetGlobalMcpConfigPath(context, environment) }.Concat(customPaths).Concat(defaultPaths) 222.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)
795scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 796: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment))!); 845? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) : OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment))!; 899var jsoncPath = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 900: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 964var jsoncPath = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 965: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 1016var jsoncPath = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 1017: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 1295var path = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 1296: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment); 1334var path = scope is AgentConfigurationScope.Project ? OpenCodePaths.GetMcpConfigPath(workspace.WorkspaceRoot) 1335: OpenCodePaths.GetGlobalMcpConfigPath(executionContext, environment);