From bbd36e844152d202daf55d71d4c065b0e830b5ed Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 16 Dec 2025 15:06:50 -0500 Subject: core: update plugin dependency and config loading for .opencode directory support --- packages/opencode/src/config/config.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 9cf3507e1..9086f70ce 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -5,7 +5,7 @@ import os from "os" import z from "zod" import { Filesystem } from "../util/filesystem" import { ModelsDev } from "../provider/models" -import { mergeDeep, pipe } from "remeda" +import { mergeDeep, pipe, unique } from "remeda" import { Global } from "../global" import fs from "fs/promises" import { lazy } from "../util/lazy" @@ -76,6 +76,13 @@ export namespace Config { stop: Instance.worktree, }), )), + ...(await Array.fromAsync( + Filesystem.up({ + targets: [".opencode"], + start: Global.Path.home, + stop: Global.Path.home, + }), + )), ] if (Flag.OPENCODE_CONFIG_DIR) { @@ -84,7 +91,7 @@ export namespace Config { } const promises: Promise[] = [] - for (const dir of directories) { + for (const dir of unique(directories)) { await assertValid(dir) if (dir.endsWith(".opencode") || dir === Flag.OPENCODE_CONFIG_DIR) { -- cgit v1.2.3