@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
67 lines • 2.57 kB
TypeScript
/**
* Chat import service for importing chat history from various sources
*
* This service handles importing chat data through ChatHub (GitHub Copilot, etc.)
* into the devlog storage system with proper workspace mapping and linking.
*/
import type { ChatDevlogLink, ChatImportProgress, ChatMessage, ChatSession, ChatSessionId, ChatSource, StorageProvider } from '@codervisor/devlog-core';
interface WorkspaceInfo {
id: string;
name: string;
path?: string;
source: string;
firstSeen: string;
lastSeen: string;
sessionCount: number;
metadata: Record<string, unknown>;
}
export interface IChatHubService {
/**
* Ingest chat sessions from external clients
*/
ingestChatSessions(sessions: ChatSession[]): Promise<ChatImportProgress>;
/**
* Ingest chat messages from external clients
*/
ingestChatMessages(messages: ChatMessage[]): Promise<void>;
/**
* Process bulk chat data from external clients
*/
processBulkChatData(data: {
sessions: ChatSession[];
messages: ChatMessage[];
source: ChatSource;
workspaceInfo?: WorkspaceInfo;
}): Promise<ChatImportProgress>;
/**
* Get import progress by ID
*/
getImportProgress(importId: string): Promise<ChatImportProgress | null>;
/**
* Suggest links between chat sessions and devlog entries
*/
suggestChatDevlogLinks(sessionId?: ChatSessionId, minConfidence?: number): Promise<ChatDevlogLink[]>;
/**
* Auto-link chat sessions to devlog entries based on various heuristics
*/
autoLinkSessions(sessionIds: ChatSessionId[], threshold?: number): Promise<ChatDevlogLink[]>;
}
export declare class ChatHubService implements IChatHubService {
private storageProvider;
private activeImports;
constructor(storageProvider: StorageProvider);
ingestChatSessions(sessions: ChatSession[]): Promise<ChatImportProgress>;
ingestChatMessages(messages: ChatMessage[]): Promise<void>;
processBulkChatData(data: {
sessions: ChatSession[];
messages: ChatMessage[];
source: ChatSource;
workspaceInfo?: WorkspaceInfo;
}): Promise<ChatImportProgress>;
getImportProgress(importId: string): Promise<ChatImportProgress | null>;
suggestChatDevlogLinks(sessionId?: ChatSessionId, minConfidence?: number): Promise<ChatDevlogLink[]>;
autoLinkSessions(sessionIds: ChatSessionId[], threshold?: number): Promise<ChatDevlogLink[]>;
private generateImportId;
}
export {};
//# sourceMappingURL=chat-hub-service.d.ts.map