Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

provider-options.ts

19 lines733 Bytes

1import type { OpencodePermissionMode } from './process/permissions'
2​
3/**
4 * Per-call provider options for the OpenCode adapter, passed via
5 * `modelOptions` on `chat()`.
6 */
7export interface OpencodeTextProviderOptions {
8 /**
9 * Resume an existing OpenCode session. The adapter emits the session id of
10 * every fresh run via a CUSTOM `opencode.session-id` stream event; thread
11 * it back here to continue that session (only the latest user message is
12 * sent — the harness already holds the prior context).
13 */
14 sessionId?: string
15 /** Per-call override of the configured permission mode. */
16 permissionMode?: OpencodePermissionMode
17 /** Per-call override of the harness working directory. */
18 directory?: string