ctrlshiftleft
Version:
AI-powered toolkit for embedding QA and security testing into development workflows
47 lines (46 loc) • 1.75 kB
TypeScript
import { TestScenario } from '../types/testTypes';
interface SemanticSearchMatch {
line?: number;
score: number;
snippet?: string;
securityContext?: string;
}
export declare class LLMService {
private openai;
constructor();
/**
* Extract test scenarios from source code using LLM
* @param sourceCode Source code to analyze
* @param filePath Path to the source file (for context)
* @returns Array of test scenarios
*/
extractTestScenarios(sourceCode: string, filePath: string): Promise<TestScenario[]>;
/**
* Build prompt for test generation
*/
private buildTestGenerationPrompt;
/**
* Generate QA and security checklist from source code
* @param sourceCode Source code to analyze
* @param filePath Path to the source file (for context)
* @param type Type of checklist to generate (security or quality)
* @returns Checklist in JSON format
*/
generateChecklist(sourceCode: string, filePath: string, type: string): Promise<any>;
/**
* Build a prompt for generating security checklist from code
* @param sourceCode Source code content to analyze
* @param filePath Path to the source file (for context)
* @param type Type of checklist to generate (security or quality)
* @returns Prompt for generating checklists
*/
private buildChecklistGenerationPrompt;
/**
* Perform semantic search on source code to find security issues
* @param sourceCode Source code to analyze
* @param query Search query for semantic matching
* @returns Array of matches with relevance scores
*/
performSemanticSearch(sourceCode: string, query: string): Promise<SemanticSearchMatch[]>;
}
export {};