Refactor error handling, client, and tests for Ollama integration

This commit is contained in:
2026-05-06 16:30:16 +02:00
parent 59df2f6856
commit fd49abcdb9
35 changed files with 4970 additions and 3765 deletions
-4
View File
@@ -95,7 +95,6 @@ describe('Validation Functions', () => {
const errors = validatePluginSettings({
ollamaUrl: 'http://localhost:11434',
model: 'llama3',
lastIndexTime: 0,
});
expect(errors).toEqual([]);
});
@@ -104,7 +103,6 @@ describe('Validation Functions', () => {
const errors = validatePluginSettings({
ollamaUrl: 'invalid-url',
model: 'llama3',
lastIndexTime: 0,
});
expect(errors.length).toBe(1);
expect(errors[0]).toContain('Ollama URL');
@@ -114,7 +112,6 @@ describe('Validation Functions', () => {
const errors = validatePluginSettings({
ollamaUrl: 'http://localhost:11434',
model: 'invalid@model',
lastIndexTime: 0,
});
expect(errors.length).toBe(1);
expect(errors[0]).toContain('Model');
@@ -124,7 +121,6 @@ describe('Validation Functions', () => {
const errors = validatePluginSettings({
ollamaUrl: 'invalid-url',
model: 'invalid@model',
lastIndexTime: 0,
});
expect(errors.length).toBe(2);
expect(errors[0]).toContain('Ollama URL');