/** * @license * Copyright 2025 Qwen * SPDX-License-Identifier: Apache-2.0 */ import type { ChatRecord } from '@3-/qwen-code-core'; import type { SessionContext } from './types.js'; /** * Handles replaying session history on session load. * * Uses the unified emitters to ensure consistency with normal flow. * This ensures that replayed history looks identical to how it would * have appeared during the original session. */ export declare class HistoryReplayer { private readonly messageEmitter; private readonly toolCallEmitter; constructor(ctx: SessionContext); /** * Replays all chat records from a loaded session. * * @param records - Array of chat records to replay */ replay(records: ChatRecord[]): Promise; /** * Replays a single chat record. */ private replayRecord; /** * Replays content from a message (user or assistant). * Handles text parts, thought parts, and function calls. */ private replayContent; /** * Replays a tool result record. */ private replayToolResult; /** * Extracts tool name from a chat record's function response. */ private extractToolNameFromRecord; }