smoke
parent
b99e3efad2
commit
8b45247d24
|
|
@ -0,0 +1,33 @@
|
|||
/** @jsxImportSource @opentui/solid */
|
||||
import mytheme from "../themes/mytheme.json" with { type: "json" }
|
||||
|
||||
const slot = (label) => ({
|
||||
id: "workspace-smoke",
|
||||
slots: {
|
||||
home_hint() {
|
||||
return <text> [plugin:{label}]</text>
|
||||
},
|
||||
home_footer() {
|
||||
return <text> theme:workspace-plugin-smoke</text>
|
||||
},
|
||||
session_footer(_ctx, props) {
|
||||
return <text> session:{props.session_id.slice(0, 8)}</text>
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const themes = {
|
||||
"workspace-plugin-smoke": mytheme,
|
||||
}
|
||||
|
||||
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 {
|
||||
themes,
|
||||
tui,
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"$schema": "https://opencode.ai/tui.json",
|
||||
"theme": "workspace-plugin-smoke",
|
||||
"plugin": [
|
||||
[
|
||||
"./plugins/tui-smoke.tsx",
|
||||
{
|
||||
"enabled": true,
|
||||
"label": "workspace"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue