Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

330 B
Raw Blame
export async function commitWorkPanelPresentation({
  reservation,
  isCurrent,
  commit,
}: {
  reservation: Promise<unknown>;
  isCurrent: () => boolean;
  commit: () => void;
}): Promise<boolean> {
  try {
    await reservation;
  } catch {
    return false;
  }

  if (!isCurrent()) return false;
  commit();
  return true;
}