- Complete plugin architecture with modular design - Qdrant client with HTTP integration using requestUrl - Ollama and OpenAI embedding providers with batching - Hybrid chunking (semantic + size-based fallback) - Content extractors for markdown, code, PDFs, and images - Real-time indexing with file watcher and queue - Search modal with keyboard navigation - Comprehensive settings UI with connection testing - Graph visualization framework (basic implementation) - Full TypeScript types and error handling - Desktop-only plugin with status bar integration - Complete documentation and setup guide Features implemented: ✅ Semantic search with vector embeddings ✅ Multiple embedding providers (Ollama/OpenAI) ✅ Rich content extraction (markdown, code, PDFs, images) ✅ Smart chunking with heading-based splits ✅ Real-time file indexing with progress tracking ✅ Standalone search interface ✅ Comprehensive settings and configuration ✅ Graph view foundation for document relationships ✅ Full error handling and logging ✅ Complete documentation and troubleshooting guide Ready for testing with Qdrant instance and embedding provider setup.
19 lines
805 B
TypeScript
19 lines
805 B
TypeScript
import { EmbeddingProvider, EmbeddingProviderInterface, PluginSettings } from '../types';
|
|
import { OllamaEmbeddingProvider } from './ollama';
|
|
import { OpenAIEmbeddingProvider } from './openai';
|
|
|
|
export function createEmbeddingProvider(settings: PluginSettings): EmbeddingProviderInterface {
|
|
switch (settings.embedding.provider) {
|
|
case EmbeddingProvider.OLLAMA:
|
|
return new OllamaEmbeddingProvider(settings.embedding.ollama);
|
|
case EmbeddingProvider.OPENAI:
|
|
return new OpenAIEmbeddingProvider(settings.embedding.openai);
|
|
default:
|
|
throw new Error(`Unsupported embedding provider: ${settings.embedding.provider}`);
|
|
}
|
|
}
|
|
|
|
export { BaseEmbeddingProvider } from './provider';
|
|
export { OllamaEmbeddingProvider } from './ollama';
|
|
export { OpenAIEmbeddingProvider } from './openai';
|