/* * Управляет и отображает историю графов чата. Предоставляет функционал для выбора * прошлых разговоров, начала новых чатов и удаления записей графов. */ import { EventBus } from '../utils/EventBus'; export class HistoryPanel { container: HTMLElement; props: { graphs: any[]; onGraphSelect: (data: { graphId: string; currentNode: string | null }) => void; eventBus: EventBus; }; graphs: any[]; newChatButton: HTMLButtonElement; chatList: HTMLElement; contextMenu: HTMLElement; deleteButton: HTMLButtonElement; contextMenuGraphId: string | null; constructor( container: HTMLElement, props: { graphs: any[]; onGraphSelect: (data: { graphId: string; currentNode: string | null }) => void; eventBus: EventBus; } ) { this.container = container; this.props = props; this.graphs = props.graphs || []; this.init(); } init(): void { this.container.innerHTML = `