|
@@ -122,6 +122,13 @@ export const layer: Layer.Layer<Service, never, AppFileSystem.Service | Config.S
|
|
|
const ctx = yield* InstanceState.context
|
|
const ctx = yield* InstanceState.context
|
|
|
const paths = new Set<string>()
|
|
const paths = new Set<string>()
|
|
|
|
|
|
|
|
|
|
+ for (const file of globalFiles()) {
|
|
|
|
|
+ if (yield* fs.existsSafe(file)) {
|
|
|
|
|
+ paths.add(path.resolve(file))
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// The first project-level match wins so we don't stack AGENTS.md/CLAUDE.md from every ancestor.
|
|
// The first project-level match wins so we don't stack AGENTS.md/CLAUDE.md from every ancestor.
|
|
|
if (!Flag.OPENCODE_DISABLE_PROJECT_CONFIG) {
|
|
if (!Flag.OPENCODE_DISABLE_PROJECT_CONFIG) {
|
|
|
for (const file of FILES) {
|
|
for (const file of FILES) {
|
|
@@ -133,13 +140,6 @@ export const layer: Layer.Layer<Service, never, AppFileSystem.Service | Config.S
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- for (const file of globalFiles()) {
|
|
|
|
|
- if (yield* fs.existsSafe(file)) {
|
|
|
|
|
- paths.add(path.resolve(file))
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
if (config.instructions) {
|
|
if (config.instructions) {
|
|
|
for (const raw of config.instructions) {
|
|
for (const raw of config.instructions) {
|
|
|
if (raw.startsWith("https://") || raw.startsWith("http://")) continue
|
|
if (raw.startsWith("https://") || raw.startsWith("http://")) continue
|