fix(tui): guard Bun runtime plugin support

This commit is contained in:
Dax Raad 2026-07-29 12:57:12 -04:00
parent b2010220f9
commit f599f8f3d3
4 changed files with 10 additions and 3 deletions

View file

@ -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": {

View file

@ -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>
}

View file

@ -0,0 +1,3 @@
import { ensureRuntimePluginSupport } from "@opentui/solid/runtime-plugin-support/configure"
ensureRuntimePluginSupport()

View file

@ -0,0 +1 @@
// OpenTUI's runtime plugin transform uses Bun's plugin API. Node loads precompiled plugins without it.