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.

676 B
Raw Blame
import { createContext, useContext } from 'react';

import type { AnnotationBridge } from './useShowPageAnnotation';

export interface ShowPageAnnotationHostValue {
  src: string | null;
  annotation: AnnotationBridge;
}

export const ShowPageAnnotationHostContext = createContext<ShowPageAnnotationHostValue | null>(null);

export function useShowPageAnnotationHost(): ShowPageAnnotationHostValue | null {
  return useContext(ShowPageAnnotationHostContext);
}

export function useRequiredShowPageAnnotationHost(): ShowPageAnnotationHostValue {
  const host = useShowPageAnnotationHost();
  if (!host) throw new Error('Show Page annotation host is missing');
  return host;
}