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);
167
if (environment.GetEnvironmentVariable(
OpenCodePaths
.ConfigContentEnvironmentVariable) is { Length: > 0 } inline &&
195
if (environment.GetEnvironmentVariable(
OpenCodePaths
.ConfigContentEnvironmentVariable) is { Length: > 0 } inline)
200
throw AspireSkillsRemoteConfiguration.ExistingConfiguration($"{
OpenCodePaths
.ConfigContentEnvironmentVariable}.skills");
209
.SelectMany(
OpenCodePaths
.GetProjectConfigPaths)
214
var defaultPaths =
OpenCodePaths
.GetConfigPaths(
OpenCodePaths
.GetConfigDirectory(context, environment));
215
var customDirectory =
OpenCodePaths
.GetOverride(
OpenCodePaths
.ConfigDirectoryEnvironmentVariable, context, environment);
216
IEnumerable<string> customPaths = customDirectory is null ? [] :
OpenCodePaths
.GetConfigPaths(customDirectory);
217
var 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)
22
var configFilePath =
OpenCodePaths
.GetMcpConfigPath(context.RepositoryRoot);
Aspire.Cli.Tests (15)
Agents\AgentConfigurationTestContext.cs (1)
60
public string OpenCodeDirectory =>
OpenCodePaths
.GetConfigDirectory(ExecutionContext, Environment);
Commands\AgentInitClientSelectionTests.cs (14)
795
scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
796
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment))!);
845
?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot) :
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment))!;
899
var jsoncPath = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
900
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
964
var jsoncPath = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
965
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
1016
var jsoncPath = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
1017
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
1295
var path = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
1296
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
1334
var path = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
1335
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);