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

@@ -60,6 +60,7 @@ import type {
ChannelStatusInfo,
ChatChannelMessageLog,
ModelProviderInfo,
PluginCheckSummary,
} from "./types"
export async function listConversations(params?: {
@@ -278,6 +279,26 @@ export async function acpPreflight(
})
}
export async function opencodeListPlugins(): Promise<PluginCheckSummary> {
return getTransport().call("opencode_list_plugins", {})
}
export async function opencodeInstallPlugins(
taskId: string,
names?: string[] | null
): Promise<void> {
return getTransport().call("opencode_install_plugins", {
names: names ?? null,
taskId,
})
}
export async function opencodeUninstallPlugin(
name: string
): Promise<PluginCheckSummary> {
return getTransport().call("opencode_uninstall_plugin", { name })
}
export async function acpListAgentSkills(params: {
agentType: AgentType
workspacePath?: string | null