feat(frontend): add opencode plugin types and API methods

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
xintaofei
2026-04-12 10:26:51 +08:00
parent 996945223c
commit 4ff339d9fc
2 changed files with 48 additions and 0 deletions

View File

@@ -885,6 +885,7 @@ export type FixActionKind =
| "redownload_binary"
| "retry_connection"
| "open_agents_settings"
| "install_opencode_plugins"
export interface FixAction {
label: string
@@ -909,6 +910,32 @@ export interface PreflightResult {
checks: CheckItem[]
}
// ─── OpenCode Plugins ───
export type PluginStatus = "installed" | "missing"
export interface PluginInfo {
name: string
declared_spec: string
installed_version: string | null
status: PluginStatus
}
export interface PluginCheckSummary {
config_path: string
cache_dir: string
plugins: PluginInfo[]
has_project_config_hint: boolean
}
export type PluginInstallEventKind = "started" | "log" | "completed" | "failed"
export interface PluginInstallEvent {
task_id: string
kind: PluginInstallEventKind
payload: string
}
// ─── Chat Channels ───
export type ChannelType = "lark" | "telegram" | "weixin"