MCPcopy Index your code
hub / github.com/Dimillian/CodexMonitor / useThreadStatus

Function useThreadStatus

src/features/threads/hooks/useThreadStatus.ts:9–37  ·  view source on GitHub ↗
({ dispatch }: UseThreadStatusOptions)

Source from the content-addressed store, hash-verified

7};
8
9export function useThreadStatus({ dispatch }: UseThreadStatusOptions) {
10 const markProcessing = useCallback(
11 (threadId: string, isProcessing: boolean) => {
12 dispatch({
13 type: "markProcessing",
14 threadId,
15 isProcessing,
16 timestamp: Date.now(),
17 });
18 },
19 [dispatch],
20 );
21
22 const markReviewing = useCallback(
23 (threadId: string, isReviewing: boolean) => {
24 dispatch({ type: "markReviewing", threadId, isReviewing });
25 },
26 [dispatch],
27 );
28
29 const setActiveTurnId = useCallback(
30 (threadId: string, turnId: string | null) => {
31 dispatch({ type: "setActiveTurnId", threadId, turnId });
32 },
33 [dispatch],
34 );
35
36 return { markProcessing, markReviewing, setActiveTurnId };
37}

Callers 2

useThreadsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected