Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

458 B
Raw Blame
export function inAppHistoryIndex(historyState: unknown): number | null {
  if (!historyState || typeof historyState !== 'object') return null;

  const index = (historyState as { idx?: unknown }).idx;
  return typeof index === 'number' && Number.isSafeInteger(index) && index >= 0 ? index : null;
}

export function hasInAppBackEntry(historyState: unknown): boolean {
  const index = inAppHistoryIndex(historyState);
  return index !== null && index > 0;
}