41 references to OpenCodePaths
aspire (26)
Agents\OpenCode\OpenCodeAgentClient.cs (25)
58
:
OpenCodePaths
.GetConfigDirectory(context, environment);
62
OpenCodePaths
.GetOverride(
OpenCodePaths
.ConfigDirectoryEnvironmentVariable, context, environment) is { } custom)
69
?
OpenCodePaths
.GetProjectConfigPaths(workspaceRoot)
86
environment.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);
239
if (environment.GetEnvironmentVariable(
OpenCodePaths
.ConfigContentEnvironmentVariable) is { Length: > 0 } inline &&
267
if (environment.GetEnvironmentVariable(
OpenCodePaths
.ConfigContentEnvironmentVariable) is { Length: > 0 } inline)
272
throw AspireSkillsRemoteConfiguration.ExistingConfiguration($"{
OpenCodePaths
.ConfigContentEnvironmentVariable}.skills");
281
.SelectMany(
OpenCodePaths
.GetProjectConfigPaths)
286
var defaultPaths =
OpenCodePaths
.GetConfigPaths(
OpenCodePaths
.GetConfigDirectory(context, environment));
287
var customDirectory =
OpenCodePaths
.GetOverride(
OpenCodePaths
.ConfigDirectoryEnvironmentVariable, context, environment);
288
IEnumerable<string> customPaths = customDirectory is null ? [] :
OpenCodePaths
.GetConfigPaths(customDirectory);
289
var 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)
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)
801
scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
802
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment))!);
851
?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot) :
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment))!;
905
var jsoncPath = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
906
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
970
var jsoncPath = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
971
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
1022
var jsoncPath = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
1023
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
1297
var path = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
1298
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);
1336
var path = scope is AgentConfigurationScope.Project ?
OpenCodePaths
.GetMcpConfigPath(workspace.WorkspaceRoot)
1337
:
OpenCodePaths
.GetGlobalMcpConfigPath(executionContext, environment);