(id: string, calls: WriteCall[], writeable = true)
| 94 | interface WriteCall { id: string; dir: string; cred: WorkspaceAiCred } |
| 95 | |
| 96 | function stubAdapter(id: string, calls: WriteCall[], writeable = true): CliAdapter { |
| 97 | const adapter: CliAdapter = { |
| 98 | id, |
| 99 | displayName: id, |
| 100 | capabilities: { parallelPerCwd: true, resumeLast: false, resumeById: false, transcriptDiscovery: 'none' }, |
| 101 | composeCommand: (base) => base, |
| 102 | } |
| 103 | if (writeable) { |
| 104 | ;(adapter as { writeAiConfig?: CliAdapter['writeAiConfig'] }).writeAiConfig = async (dir, cred) => { |
| 105 | calls.push({ id, dir, cred }) |
| 106 | } |
| 107 | } |
| 108 | return adapter |
| 109 | } |
| 110 | |
| 111 | function fakeLogger(): { logger: Logger; warns: string[] } { |
| 112 | const warns: string[] = [] |
no test coverage detected