-
-
Notifications
You must be signed in to change notification settings - Fork 186
Expand file tree
/
Copy pathtui.tsx
More file actions
26 lines (22 loc) · 720 Bytes
/
Copy pathtui.tsx
File metadata and controls
26 lines (22 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/** @jsxImportSource @opentui/solid */
import type { TuiPluginModule } from "@opencode-ai/plugin/tui"
import { registerCommands } from "./lib/tui/commands"
import { loadConfig } from "./lib/tui/data"
import { openPanelModal } from "./lib/tui/modals"
const tui: TuiPluginModule["tui"] = async (api) => {
const config = loadConfig(api)
if (!config.enabled || !config.commands.enabled) return
registerCommands(api, [
{
title: "DCP",
name: "dcp.panel",
description: "Open DCP panel",
slashName: "dcp",
run: () => openPanelModal(api, config),
},
])
}
export default {
id: "opencode-dcp",
tui,
} satisfies TuiPluginModule