Files
opencode-manager/ocm-cli/src/tui-dialogs.ts
T
Chris Scott 7351d5f002 feat(opencode): migrate OpenCode Manager to OpenCode 2
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.
2026-09-24 08:38:26 -04:00

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 })
}