feat: ollama support

This commit is contained in:
2026-03-01 21:31:33 +01:00
parent 4daa5f450b
commit 9fdbccc687
15 changed files with 796 additions and 25 deletions

View File

@@ -139,12 +139,14 @@ describe('ProviderRegistry', () => {
expect(registry.isReady()).toBe(true);
});
it('getProviderStatus() reports both providers', () => {
expect(registry.getProviderStatus()).toEqual({ opencode: false, mistral: false });
it('getProviderStatus() reports all providers', () => {
expect(registry.getProviderStatus()).toEqual({ opencode: false, mistral: false, ollama: false });
registry.setOpencodeKey('test');
expect(registry.getProviderStatus()).toEqual({ opencode: true, mistral: false });
expect(registry.getProviderStatus()).toEqual({ opencode: true, mistral: false, ollama: false });
registry.setMistralKey('test2');
expect(registry.getProviderStatus()).toEqual({ opencode: true, mistral: true });
expect(registry.getProviderStatus()).toEqual({ opencode: true, mistral: true, ollama: false });
registry.setOllamaEnabled(true);
expect(registry.getProviderStatus()).toEqual({ opencode: true, mistral: true, ollama: true });
});
it('isProviderKeySet() checks per-provider', () => {