ugly but works

This commit is contained in:
Sebastian Herrlinger
2026-03-04 00:08:26 +01:00
parent 7e1d396427
commit 3b38e8dc24
9 changed files with 151 additions and 18 deletions

View File

@@ -1,19 +1,16 @@
/** @jsxImportSource ../../packages/opencode/node_modules/@opentui/solid */
/** @jsxImportSource ../../packages/plugin/src */
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 <text> [plugin:{label}]</text>
},
home_footer() {
console.error(`[workspace-smoke] render home_footer (${label})`)
return <text> theme:workspace-plugin-smoke</text>
},
session_footer(_ctx, props) {
console.error(`[workspace-smoke] render session_footer (${props.session_id.slice(0, 8)})`)
return <text> session:{props.session_id.slice(0, 8)}</text>
},
},
@@ -27,7 +24,6 @@ const tui = async (input, options) => {
if (options?.enabled === false) return
const label = typeof options?.label === "string" ? options.label : "smoke"
input.slots.register(slot(label))
console.error(`[workspace-smoke] tui plugin initialized (${label})`)
}
export default {