mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-31 01:03:42 +00:00
fix(tui): guard Bun runtime plugin support
This commit is contained in:
parent
b2010220f9
commit
f599f8f3d3
4 changed files with 10 additions and 3 deletions
|
|
@ -72,6 +72,11 @@
|
|||
"bun": "./src/editor-zed-sqlite.bun.ts",
|
||||
"node": "./src/editor-zed-sqlite.node.ts",
|
||||
"default": "./src/editor-zed-sqlite.bun.ts"
|
||||
},
|
||||
"#runtime-plugin-support": {
|
||||
"bun": "./src/plugin/runtime-plugin-support.bun.ts",
|
||||
"node": "./src/plugin/runtime-plugin-support.node.ts",
|
||||
"default": "./src/plugin/runtime-plugin-support.node.ts"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import { fileURLToPath, pathToFileURL } from "url"
|
|||
import type { Context, Dialog, Page, Slot, SlotMap, SlotName, Toast } from "@opencode-ai/plugin/tui/context"
|
||||
import { createStore, produce, reconcile as reconcileStore } from "solid-js/store"
|
||||
import { useRenderer } from "@opentui/solid"
|
||||
import { ensureRuntimePluginSupport } from "@opentui/solid/runtime-plugin-support/configure"
|
||||
import "#runtime-plugin-support"
|
||||
import { useConfig } from "../config"
|
||||
import { useClient } from "../context/client"
|
||||
import { useData } from "../context/data"
|
||||
|
|
@ -37,8 +37,6 @@ import { abbreviateHome } from "../util/path-format"
|
|||
import { builtins } from "./builtins"
|
||||
import { discoverTuiPlugins } from "./discovery"
|
||||
|
||||
ensureRuntimePluginSupport()
|
||||
|
||||
export interface PackageResolver {
|
||||
readonly resolve: (spec: string) => Promise<string | undefined>
|
||||
}
|
||||
|
|
|
|||
3
packages/tui/src/plugin/runtime-plugin-support.bun.ts
Normal file
3
packages/tui/src/plugin/runtime-plugin-support.bun.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { ensureRuntimePluginSupport } from "@opentui/solid/runtime-plugin-support/configure"
|
||||
|
||||
ensureRuntimePluginSupport()
|
||||
1
packages/tui/src/plugin/runtime-plugin-support.node.ts
Normal file
1
packages/tui/src/plugin/runtime-plugin-support.node.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
// OpenTUI's runtime plugin transform uses Bun's plugin API. Node loads precompiled plugins without it.
|
||||
Loading…
Add table
Add a link
Reference in a new issue