Wait for OpenCode plugin activation before integration calls

This commit is contained in:
Chris Scott committed 2026-11-13 17:38:01 -05:00
1 parent eba86dc3fc
commit 226e13b3d1
9 files changed
+60 -216

No files matched your search

+5 -1
View File
@@ -49,7 +49,7 @@ export type {
V2Event,
} from '@opencode/client'
export { ClientError, isIntegrationNotFoundError, isMcpServerNotFoundError, isSessionNotFoundError, isWorktreeError } from '@opencode/client'
export { ClientError, isMcpServerNotFoundError, isSessionNotFoundError, isWorktreeError } from '@opencode/client'
export { assistantText, sessionIDFromEvent, toolContentText } from './content'
@@ -236,6 +236,10 @@ export function openCodeLocation(directory: string | undefined): OpenCodeLocatio
return directory ? { location: { directory } } : undefined
}
export async function awaitOpenCodePlugins(api: Pick<OpenCodeApi, 'provider'>): Promise<void> {
await api.provider.list()
}
interface OpenCodeErrorStatusByTag {
[tag: string]: number
}