collapse tui api types

This commit is contained in:
Sebastian Herrlinger
2026-03-25 20:20:23 +01:00
parent c0a4755d15
commit 1e711cda3f
6 changed files with 89 additions and 71 deletions
@@ -115,6 +115,7 @@ type Opts = {
export function createTuiPluginApi(opts: Opts = {}): HostPluginApi {
const kv: Record<string, unknown> = {}
const count = opts.count
const ctrl = new AbortController()
const own = createOpencodeClient({
baseUrl: "http://localhost:4096",
})
@@ -182,6 +183,15 @@ export function createTuiPluginApi(opts: Opts = {}): HostPluginApi {
},
},
renderer,
slots: {
register: () => "fixture-slot",
},
lifecycle: {
signal: ctrl.signal,
onDispose() {
return () => {}
},
},
command: {
register: () => {
if (count) count.command_add += 1