diff --git a/.opencode/plugins/tui-smoke.tsx b/.opencode/plugins/tui-smoke.tsx
index dba51f0840..a8e446a215 100644
--- a/.opencode/plugins/tui-smoke.tsx
+++ b/.opencode/plugins/tui-smoke.tsx
@@ -1,16 +1,19 @@
-/** @jsxImportSource @opentui/solid */
+/** @jsxImportSource ../../packages/opencode/node_modules/@opentui/solid */
import mytheme from "../themes/mytheme.json" with { type: "json" }
const slot = (label) => ({
id: "workspace-smoke",
slots: {
home_hint() {
+ console.error(`[workspace-smoke] render home_hint (${label})`)
return [plugin:{label}]
},
home_footer() {
+ console.error(`[workspace-smoke] render home_footer (${label})`)
return theme:workspace-plugin-smoke
},
session_footer(_ctx, props) {
+ console.error(`[workspace-smoke] render session_footer (${props.session_id.slice(0, 8)})`)
return session:{props.session_id.slice(0, 8)}
},
},
diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx
index 0a6465e289..ad05f12ff2 100644
--- a/packages/opencode/src/cli/cmd/tui/app.tsx
+++ b/packages/opencode/src/cli/cmd/tui/app.tsx
@@ -160,14 +160,29 @@ export function tui(input: {
}
const renderer = await createCliRenderer(rendererConfig(input.config))
- const registry = createSolidSlotRegistry(renderer, {
- url: input.url,
- directory: input.directory,
- })
+ const registry = createSolidSlotRegistry(
+ renderer,
+ {
+ url: input.url,
+ directory: input.directory,
+ },
+ {
+ onPluginError(event) {
+ console.error("[tui.slot] plugin error", {
+ plugin: event.pluginId,
+ slot: event.slot,
+ phase: event.phase,
+ source: event.source,
+ message: event.error.message,
+ })
+ },
+ },
+ )
const Slot = createSlot(registry)
const slot: TuiSlot = (props) => Slot(props)
const slots: TuiSlots = {
register(plugin) {
+ console.error("[tui.slot] register", plugin.id)
return registry.register(plugin as SolidPlugin)
},
}
diff --git a/packages/opencode/src/cli/cmd/tui/plugin.ts b/packages/opencode/src/cli/cmd/tui/plugin.ts
index 6d3d33efdf..18a8174212 100644
--- a/packages/opencode/src/cli/cmd/tui/plugin.ts
+++ b/packages/opencode/src/cli/cmd/tui/plugin.ts
@@ -87,6 +87,7 @@ export namespace TuiPlugin {
const plugin = slot(entry)
if (plugin) {
input.slots.register(plugin)
+ log.info("registered tui slot plugin", { id: plugin.id })
}
const tui = (() => {
@@ -97,6 +98,7 @@ export namespace TuiPlugin {
})()
if (!tui) continue
await tui(input, Config.pluginOptions(item))
+ log.info("initialized tui plugin module", { path: spec })
}
}
},