init
This commit is contained in:
commit
ec53fcbe95
1905 changed files with 513762 additions and 0 deletions
17
utils/classifierApprovalsHook.ts
Normal file
17
utils/classifierApprovalsHook.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* 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),
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue