Skip to content

Commit bbd36e8

Browse files
committed
core: update plugin dependency and config loading for .opencode directory support
1 parent 4e2d1ac commit bbd36e8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.opencode/bun.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/opencode/src/config/config.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import os from "os"
55
import z from "zod"
66
import { Filesystem } from "../util/filesystem"
77
import { ModelsDev } from "../provider/models"
8-
import { mergeDeep, pipe } from "remeda"
8+
import { mergeDeep, pipe, unique } from "remeda"
99
import { Global } from "../global"
1010
import fs from "fs/promises"
1111
import { lazy } from "../util/lazy"
@@ -76,6 +76,13 @@ export namespace Config {
7676
stop: Instance.worktree,
7777
}),
7878
)),
79+
...(await Array.fromAsync(
80+
Filesystem.up({
81+
targets: [".opencode"],
82+
start: Global.Path.home,
83+
stop: Global.Path.home,
84+
}),
85+
)),
7986
]
8087

8188
if (Flag.OPENCODE_CONFIG_DIR) {
@@ -84,7 +91,7 @@ export namespace Config {
8491
}
8592

8693
const promises: Promise<void>[] = []
87-
for (const dir of directories) {
94+
for (const dir of unique(directories)) {
8895
await assertValid(dir)
8996

9097
if (dir.endsWith(".opencode") || dir === Flag.OPENCODE_CONFIG_DIR) {

0 commit comments

Comments
 (0)