// Separate module for history restoration to ensure persistence across reconnects
let shouldRestore = false;
let savedHistory: string | null = null;

export function setShouldRestoreHistory(should: boolean) {
  shouldRestore = should;
}

export function setSavedHistory(history: string | null) {
  savedHistory = history;
}

export function getShouldRestoreHistory(): boolean {
  return shouldRestore;
}

export function getSavedHistory(): string | null {
  return savedHistory;
}

export function clearHistoryRestore() {
  shouldRestore = false;
  savedHistory = null;
}
