feat(walkthrough): open the change walkthrough from an agent tool call

This commit is contained in:
Chris Scott committed 2026-10-09 11:03:21 -04:00
1 parent 3eb0b02203
commit aa1da8d608
26 files changed
+1367 -175

No files matched your search

+7 -5
View File
@@ -1,15 +1,17 @@
import { vi } from 'vitest'
import type { OpenCodeApi } from '@opencode-manager/shared/opencode'
import type { ModelInfo, OpenCodeApi } from '@opencode-manager/shared/opencode'
import type { OpenCodeClient } from '../../src/services/opencode/client'
/** OpenCode API stubs for a catalog that has finished loading, so model resolution succeeds on the first poll. */
export function stubLoadedModelCatalog() {
const model = { providerID: 'openai', id: 'gpt-5-mini', enabled: true }
export function stubLoadedModelCatalog(models: ModelInfo[] = [
{ providerID: 'openai', id: 'gpt-5-mini', enabled: true } as ModelInfo,
]) {
const defaultModel = models[0] ?? null
return {
config: { get: vi.fn(async () => []) },
model: {
list: vi.fn(async () => ({ data: [model] })),
default: vi.fn(async () => ({ data: model })),
list: vi.fn(async () => ({ data: models })),
default: vi.fn(async () => ({ data: defaultModel })),
},
}
}