mirror of
https://fastgit.cc/https://github.com/anomalyco/opencode
synced 2026-04-23 02:13:48 +08:00
refactor: switch plugin siblings to self-reexport imports
This commit is contained in:
@@ -24,8 +24,8 @@ import {
|
||||
type PluginPackage,
|
||||
type PluginSource,
|
||||
} from "@/plugin/shared"
|
||||
import { PluginLoader } from "@/plugin"
|
||||
import { PluginMeta } from "@/plugin"
|
||||
import { PluginLoader } from "@/plugin/loader"
|
||||
import { PluginMeta } from "@/plugin/meta"
|
||||
import { installPlugin as installModulePlugin, patchPluginConfig, readPluginManifest } from "@/plugin/install"
|
||||
import { hasTheme, upsertTheme } from "../context/theme"
|
||||
import { Global } from "@/global"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * as CopilotModels from "./models"
|
||||
|
||||
@@ -142,3 +142,4 @@ export async function get(
|
||||
|
||||
return result
|
||||
}
|
||||
export * as CopilotModels from "./models"
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
export * as Plugin from "./plugin"
|
||||
export * as PluginMeta from "./meta"
|
||||
export * as PluginLoader from "./loader"
|
||||
|
||||
@@ -170,3 +170,4 @@ export async function loadExternal<R = Loaded>(input: Input<R>): Promise<R[]> {
|
||||
for (const item of out) if (item !== undefined) ready.push(item)
|
||||
return ready
|
||||
}
|
||||
export * as PluginLoader from "./loader"
|
||||
|
||||
@@ -184,3 +184,4 @@ export async function list(): Promise<Store> {
|
||||
const file = storePath()
|
||||
return Flock.withLock(lock(file), async () => read(file))
|
||||
}
|
||||
export * as PluginMeta from "./meta"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { afterEach, expect, mock, test } from "bun:test"
|
||||
import { CopilotModels } from "@/plugin/github-copilot"
|
||||
import { CopilotModels } from "../../src/plugin/github-copilot/models"
|
||||
import { CopilotAuthPlugin } from "@/plugin/github-copilot/copilot"
|
||||
|
||||
const originalFetch = globalThis.fetch
|
||||
|
||||
Reference in New Issue
Block a user