optivise
Version:
Optivise - The Ultimate Optimizely Development Assistant with AI-powered features, zero-config setup, and comprehensive development support
71 lines • 2.13 kB
TypeScript
/**
* Documentation Indexing Service
* Automatically indexes Optimizely documentation into ChromaDB for AI-powered search
*/
import type { Logger, OptimizelyProduct } from '../types/index.js';
export interface DocumentSource {
url: string;
product: OptimizelyProduct;
contentType: 'documentation' | 'tutorial' | 'api' | 'example';
title?: string;
tags?: string[];
}
export interface IndexingProgress {
totalDocuments: number;
processedDocuments: number;
failedDocuments: number;
currentDocument?: string;
status: 'idle' | 'indexing' | 'completed' | 'failed';
startTime?: Date;
endTime?: Date;
}
export declare class DocumentationIndexingService {
private readonly logger;
private indexingProgress;
private readonly documentationSources;
constructor(logger: Logger);
/**
* Start indexing all documentation sources
*/
indexAllDocumentation(): Promise<boolean>;
/**
* Process a single documentation source and create chunks
*/
private processDocumentSource;
/**
* Generate sample content for demonstration
* In production, this would fetch real documentation content
*/
private generateSampleContent;
/**
* Split content into manageable chunks
*/
private chunkContent;
/**
* Index specific products only
*/
indexProductDocumentation(products: OptimizelyProduct[]): Promise<boolean>;
/**
* Get indexing progress
*/
getIndexingProgress(): IndexingProgress;
/**
* Check if indexing is in progress
*/
isIndexing(): boolean;
/**
* Clear all indexed documentation
*/
clearIndex(): Promise<boolean>;
/**
* Get indexing statistics
*/
getIndexingStats(): Promise<{
collections: Record<string, any>;
totalDocuments: any;
lastIndexed: Date | undefined;
indexingStatus: "failed" | "completed" | "idle" | "indexing";
} | null>;
}
export declare const documentationIndexingService: DocumentationIndexingService;
//# sourceMappingURL=documentation-indexing-service.d.ts.map