* Create a test ExtensionHost with default options.
({
mode = "code",
provider = "openrouter",
model = "test-model",
...options
}: Partial<ExtensionHostOptions> = {})
| 27 | * Create a test ExtensionHost with default options. |
| 28 | */ |
| 29 | function createTestHost({ |
| 30 | mode = "code", |
| 31 | provider = "openrouter", |
| 32 | model = "test-model", |
| 33 | ...options |
| 34 | }: Partial<ExtensionHostOptions> = {}): ExtensionHost { |
| 35 | return new ExtensionHost({ |
| 36 | mode, |
| 37 | user: null, |
| 38 | provider, |
| 39 | model, |
| 40 | workspacePath: "/test/workspace", |
| 41 | extensionPath: "/test/extension", |
| 42 | ephemeral: false, |
| 43 | debug: false, |
| 44 | exitOnComplete: false, |
| 45 | ...options, |
| 46 | }) |
| 47 | } |
| 48 | |
| 49 | // Type for accessing private members |
| 50 | type PrivateHost = Record<string, unknown> |
no outgoing calls
no test coverage detected