feat: add assistant mode, SSE streaming, and OpenCode server integration (#214)

This commit is contained in:
Chris Scott authored and GitHub committed 2026-05-02 21:51:37 -04:00
1 parent 3cc24288a6
commit c3d6549f01
133 files changed
+7284 -6293

No files matched your search

@@ -0,0 +1,16 @@
import { vi } from 'vitest'
import type { OpenCodeClient } from '../../src/services/opencode/client'
export function createStubOpenCodeClient(overrides: Partial<OpenCodeClient> = {}): OpenCodeClient {
return {
forward: vi.fn(async () => new Response(JSON.stringify({}), { status: 200 })),
forwardRaw: vi.fn(async () => new Response(JSON.stringify({}), { status: 200 })),
getJson: vi.fn(async () => ({}) as unknown),
postJson: vi.fn(async () => ({}) as unknown),
setProviderAuth: vi.fn(async () => true),
deleteProviderAuth: vi.fn(async () => true),
startMcpAuth: vi.fn(async () => new Response(JSON.stringify({}), { status: 200 })),
authenticateMcp: vi.fn(async () => new Response(JSON.stringify({}), { status: 200 })),
...overrides,
} as OpenCodeClient
}