UNPKG

jpglens

Version:

🔍 Universal AI-Powered UI Testing - See your interfaces through the lens of intelligence

92 lines 2.23 kB
/** * 🔍 jpglens - OpenRouter AI Provider * Universal AI-Powered UI Testing * * @author Taha Bahrami (Kaito) * @license MIT */ import { AIProvider, AnalysisContext, AnalysisResult, ScreenshotData, JPGLensConfig } from '../core/types.js'; /** * OpenRouter AI provider for jpglens * Supports multiple AI models through OpenRouter's unified API */ export declare class OpenRouterProvider implements AIProvider { private config; name: string; private baseUrl; private apiKey; private model; constructor(config: JPGLensConfig); /** * Check if OpenRouter is available */ isAvailable(): Promise<boolean>; /** * Get model information */ getModelInfo(): { name: string; capabilities: string[]; }; /** * Analyze screenshot with OpenRouter */ analyze(screenshot: ScreenshotData, context: AnalysisContext, prompt: string): Promise<AnalysisResult>; /** * Parse AI analysis text into structured result */ private parseAnalysisResult; /** * Extract a section from the analysis text */ private extractSection; /** * Extract issues from a section */ private extractIssues; /** * Extract recommendations from text */ private extractRecommendations; /** * Categorize issue by analyzing content */ private categorizeIssue; /** * Extract title from text (first sentence or 50 chars) */ private extractTitle; /** * Get impact description by severity */ private getImpactBySeverity; /** * Extract CSS selector from issue text */ private extractSelector; /** * Extract fix suggestion from text */ private extractFix; /** * Categorize recommendation type */ private categorizeRecommendation; /** * Extract code block from text */ private extractCodeBlock; /** * Assess recommendation impact */ private assessImpact; /** * Assess implementation effort */ private assessEffort; /** * Extract specific score from text */ private extractSpecificScore; } //# sourceMappingURL=openrouter.d.ts.map