mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Port the backend lifecycle, generated plugins, event aggregation, schedules, worktrees, provider credentials, MCP, config handling, the frontend chat model, and the ocm CLI to OpenCode 2. Adopt @opencode/client 2.0.15 as the single typed V2 API contract, require OpenCode 2.0.0 or newer (pinned 2.0.15), and delete every V1-only code path.
14 lines
479 B
TypeScript
14 lines
479 B
TypeScript
import type { Context } from '@opencode/plugin/tui/context'
|
|
|
|
export function confirmDialog(context: Context, props: { title: string; message: string }): Promise<boolean> {
|
|
return context.ui.dialog.confirm(props).then((value) => value === true)
|
|
}
|
|
|
|
export function selectDialog<Value>(
|
|
context: Context,
|
|
title: string,
|
|
options: { title: string; description?: string; value: Value }[],
|
|
): Promise<Value | undefined> {
|
|
return context.ui.dialog.select({ title, options })
|
|
}
|