UNPKG

@codervisor/devlog-ai

Version:

AI Chat History Extractor & Docker-based Automation - TypeScript implementation for GitHub Copilot and other AI coding assistants with automated testing capabilities

95 lines 2.44 kB
/** * Real-time Copilot Interaction Capture Parser * * Captures and parses Copilot interactions in real-time during automation */ import { EventEmitter } from 'events'; import type { CopilotInteraction } from '../types/index.js'; interface TelemetryData { timestamp?: number; trigger?: string; fileName?: string; fileContent?: string; line?: number; character?: number; precedingText?: string; followingText?: string; suggestion?: { text: string; confidence: number; accepted?: boolean; alternatives?: string[]; }; accepted?: boolean; responseTime?: number; metadata?: Record<string, unknown>; [key: string]: unknown; } export declare class RealTimeCaptureParser extends EventEmitter { private isCapturing; private interactions; private startTime?; /** * Start capturing Copilot interactions */ startCapture(): void; /** * Stop capturing and return collected interactions */ stopCapture(): Promise<CopilotInteraction[]>; /** * Record a Copilot interaction */ recordInteraction(interaction: CopilotInteraction): void; /** * Create interaction from VS Code telemetry data */ createInteractionFromTelemetry(telemetryData: TelemetryData): CopilotInteraction; /** * Parse VS Code logs for Copilot interactions */ parseVSCodeLogs(logContent: string): Promise<CopilotInteraction[]>; /** * Parse a single log line for Copilot data */ private parseLogLine; /** * Extract interaction data from log line */ private extractInteractionFromLogLine; /** * Extract timestamp from log line */ private extractTimestamp; /** * Extract trigger type from log line */ private extractTrigger; /** * Extract filename from log line */ private extractFileName; /** * Extract suggestion text from log line */ private extractSuggestionText; /** * Map telemetry trigger to interaction trigger */ private mapTriggerType; /** * Get capture statistics */ getCaptureStats(): { isCapturing: boolean; duration: number; interactionCount: number; startTime?: Date; }; /** * Clear captured interactions */ clearCapture(): void; } export {}; //# sourceMappingURL=real-time-parser.d.ts.map