refactor: switch config siblings to self-reexport imports

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

View file

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

View file

@ -10,8 +10,8 @@ import { Global } from "@/global"
import { AppFileSystem } from "@opencode-ai/shared/filesystem" import { AppFileSystem } from "@opencode-ai/shared/filesystem"
import { Npm } from "@opencode-ai/shared/npm" import { Npm } from "@opencode-ai/shared/npm"
import { CurrentWorkingDirectory } from "./cwd" import { CurrentWorkingDirectory } from "./cwd"
import { ConfigPlugin } from "@/config" import { ConfigPlugin } from "@/config/plugin"
import { ConfigKeybinds } from "@/config" import { ConfigKeybinds } from "@/config/keybinds"
import { InstallationLocal, InstallationVersion } from "@/installation/version" import { InstallationLocal, InstallationVersion } from "@/installation/version"
import { makeRuntime } from "@/cli/effect/runtime" import { makeRuntime } from "@/cli/effect/runtime"
import { Filesystem, Log } from "@/util" 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 { INTERNAL_TUI_PLUGINS, type InternalTuiPlugin } from "./internal"
import { setupSlots, Slot as View } from "./slots" import { setupSlots, Slot as View } from "./slots"
import type { HostPluginApi, HostSlots } from "./slots" import type { HostPluginApi, HostSlots } from "./slots"
import { ConfigPlugin } from "@/config" import { ConfigPlugin } from "@/config/plugin"
type PluginLoad = { type PluginLoad = {
options: ConfigPlugin.Options | undefined options: ConfigPlugin.Options | undefined

View file

@ -1,5 +1,3 @@
export * as Config from "./config" export * as Config from "./config"
export * as ConfigMarkdown from "./markdown" export * as ConfigMarkdown from "./markdown"
export * as ConfigPaths from "./paths" 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({ .meta({
ref: "KeybindsConfig", ref: "KeybindsConfig",
}) })
export * as ConfigKeybinds from "./keybinds"

View file

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

View file

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

View file

@ -25,7 +25,7 @@ import { Global } from "../../src/global"
import { ProjectID } from "../../src/project/schema" import { ProjectID } from "../../src/project/schema"
import { Filesystem } from "../../src/util" import { Filesystem } from "../../src/util"
import * as Network from "../../src/util/network" import * as Network from "../../src/util/network"
import { ConfigPlugin } from "@/config" import { ConfigPlugin } from "../../src/config/plugin"
import { Npm } from "@opencode-ai/shared/npm" import { Npm } from "@opencode-ai/shared/npm"
const emptyAccount = Layer.mock(Account.Service)({ 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 { AppRuntime } from "../../src/effect/app-runtime"
import { Effect, Layer } from "effect" import { Effect, Layer } from "effect"
import { CurrentWorkingDirectory } from "@/cli/cmd/tui/config/cwd" 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 wintest = process.platform === "win32" ? test : test.skip
const clear = (wait = false) => AppRuntime.runPromise(Config.Service.use((svc) => svc.invalidate(wait))) const clear = (wait = false) => AppRuntime.runPromise(Config.Service.use((svc) => svc.invalidate(wait)))