refactor: switch config siblings to self-reexport imports

This commit is contained in:
Kit Langton
2026-04-16 11:22:44 -04:00
parent 3b4c9cc54f
commit aff2218de8
9 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import z from "zod"
import { ConfigPlugin } from "@/config"
import { ConfigKeybinds } from "@/config"
import { ConfigPlugin } from "@/config/plugin"
import { ConfigKeybinds } from "@/config/keybinds"
const KeybindOverride = z
.object(

View File

@@ -10,8 +10,8 @@ import { Global } from "@/global"
import { AppFileSystem } from "@opencode-ai/shared/filesystem"
import { Npm } from "@opencode-ai/shared/npm"
import { CurrentWorkingDirectory } from "./cwd"
import { ConfigPlugin } from "@/config"
import { ConfigKeybinds } from "@/config"
import { ConfigPlugin } from "@/config/plugin"
import { ConfigKeybinds } from "@/config/keybinds"
import { InstallationLocal, InstallationVersion } from "@/installation/version"
import { makeRuntime } from "@/cli/effect/runtime"
import { Filesystem, Log } from "@/util"

View File

@@ -36,7 +36,7 @@ import { Flag } from "@/flag/flag"
import { INTERNAL_TUI_PLUGINS, type InternalTuiPlugin } from "./internal"
import { setupSlots, Slot as View } from "./slots"
import type { HostPluginApi, HostSlots } from "./slots"
import { ConfigPlugin } from "@/config"
import { ConfigPlugin } from "@/config/plugin"
type PluginLoad = {
options: ConfigPlugin.Options | undefined

View File

@@ -1,5 +1,3 @@
export * as Config from "./config"
export * as ConfigMarkdown from "./markdown"
export * as ConfigPaths from "./paths"
export * as ConfigKeybinds from "./keybinds"
export * as ConfigPlugin from "./plugin"

View File

@@ -160,3 +160,4 @@ export const Keybinds = z
.meta({
ref: "KeybindsConfig",
})
export * as ConfigKeybinds from "./keybinds"

View File

@@ -71,3 +71,4 @@ export function deduplicatePluginOrigins(plugins: Origin[]): Origin[] {
return list.toReversed()
}
export * as ConfigPlugin from "./plugin"

View File

@@ -8,7 +8,7 @@ import {
type PluginPackage,
type PluginSource,
} from "./shared"
import { ConfigPlugin } from "@/config"
import { ConfigPlugin } from "@/config/plugin"
import { InstallationVersion } from "@/installation/version"
export namespace PluginLoader {

View File

@@ -25,7 +25,7 @@ import { Global } from "../../src/global"
import { ProjectID } from "../../src/project/schema"
import { Filesystem } from "../../src/util"
import * as Network from "../../src/util/network"
import { ConfigPlugin } from "@/config"
import { ConfigPlugin } from "../../src/config/plugin"
import { Npm } from "@opencode-ai/shared/npm"
const emptyAccount = Layer.mock(Account.Service)({

View File

@@ -10,7 +10,7 @@ import { Filesystem } from "../../src/util"
import { AppRuntime } from "../../src/effect/app-runtime"
import { Effect, Layer } from "effect"
import { CurrentWorkingDirectory } from "@/cli/cmd/tui/config/cwd"
import { ConfigPlugin } from "@/config"
import { ConfigPlugin } from "../../src/config/plugin"
const wintest = process.platform === "win32" ? test : test.skip
const clear = (wait = false) => AppRuntime.runPromise(Config.Service.use((svc) => svc.invalidate(wait)))