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.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
import { useContext } from 'react';
import { UnsavedChangesContext } from './unsavedChangesContext';
import type { UnsavedChangesActionAuthorization } from '../lib/unsavedChangesRegistry';
/** Confirm before a side-effecting action whose successful result navigates to another route. */
export function useUnsavedChangesActionGuard(): () => UnsavedChangesActionAuthorization | null {
const context = useContext(UnsavedChangesContext);
if (!context) throw new Error('useUnsavedChangesActionGuard must be used within an UnsavedChangesProvider');
return context.authorizeRouteAction;
}