Open-source, local-first AI agent for real work.
TypeScript agent-toolsai-agentbyokcoding-agentcross-platformdesktop-appdeveloper-toolselectronharnessknowledge-basellmwikilocal-firstmcpplugin-systemprivacy-firstskillstypescriptvettaworkflow-automation
import { useSyncExternalStore } from "react";
import type { TurnReview } from "../git/turnReview";
import { getTurnReview, subscribeTurnReviews } from "../git/turnReview";
/** The last turn's review for a cwd, re-rendering whenever it changes. */
export function useTurnReview(cwd: string | null | undefined): TurnReview | null {
return useSyncExternalStore(
subscribeTurnReviews,
() => getTurnReview(cwd),
() => getTurnReview(cwd),
);
}