π File detail
utils/classifierApprovalsHook.ts
π― Use case
This file lives under βutils/β, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, β¦). On the API surface it exposes useIsClassifierChecking β mainly functions, hooks, or classes. Dependencies touch React UI. It composes internal code from classifierApprovals (relative imports). What the file header says: React hook for classifierApprovals store. Split from classifierApprovals.ts so pure-state importers (permissions.ts, toolExecution.ts, postCompactCleanup.ts) do not pull React into print.ts.
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
React hook for classifierApprovals store. Split from classifierApprovals.ts so pure-state importers (permissions.ts, toolExecution.ts, postCompactCleanup.ts) do not pull React into print.ts.
π€ Exports (heuristic)
useIsClassifierChecking
π External import roots
Package roots from from "β¦" (relative paths omitted).
react
π₯οΈ Source preview
/**
* React hook for classifierApprovals store.
* Split from classifierApprovals.ts so pure-state importers (permissions.ts,
* toolExecution.ts, postCompactCleanup.ts) do not pull React into print.ts.
*/
import { useSyncExternalStore } from 'react'
import {
isClassifierChecking,
subscribeClassifierChecking,
} from './classifierApprovals.js'
export function useIsClassifierChecking(toolUseID: string): boolean {
return useSyncExternalStore(subscribeClassifierChecking, () =>
isClassifierChecking(toolUseID),
)
}