/**
 * @license
 * Copyright 2025 HopCode Team
 * SPDX-License-Identifier: Apache-2.0
 */
import type { HistoryItem } from '../types.js';
import { type HistoryWindowInfo, type HistorySearchResult } from '../history/HistoryVault.js';
type HistoryItemUpdater = (prevItem: HistoryItem) => Partial<Omit<HistoryItem, 'id'>>;
export interface UseHistoryManagerReturn {
    /** The currently visible window of history items (up to WINDOW_SIZE). */
    history: HistoryItem[];
    addItem: (itemData: Omit<HistoryItem, 'id'>, baseTimestamp: number) => number;
    updateItem: (id: number, updates: Partial<Omit<HistoryItem, 'id'>> | HistoryItemUpdater) => void;
    clearItems: () => void;
    loadHistory: (newHistory: HistoryItem[]) => void;
    truncateToItem: (itemId: number) => void;
    canLoadOlderHistory: boolean;
    canLoadNewerHistory: boolean;
    loadOlderHistory: () => void;
    loadNewerHistory: () => void;
    windowInfo: HistoryWindowInfo;
    searchHistory: (query: string) => HistorySearchResult[];
    jumpToSearchResult: (globalIndex: number) => void;
}
/**
 * Custom hook to manage the chat history state.
 *
 * Wraps a {@link HistoryVault} that holds the full unbounded history off React
 * state.  Only the active window (up to 2 000 items) is pushed to React state,
 * preventing unbounded memory growth while still giving the AI access to the
 * complete session context via the vault's context-note mechanism.
 */
export declare function useHistory(): UseHistoryManagerReturn;
export {};
