MCPcopy
hub / github.com/codeaashu/claude-code / useTasksV2

Function useTasksV2

src/hooks/useTasksV2.ts:218–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216 * Hides the list after 5 seconds if there are no open tasks.
217 */
218export function useTasksV2(): Task[] | undefined {
219 const teamContext = useAppState(s => s.teamContext)
220
221 const enabled = isTodoV2Enabled() && (!teamContext || isTeamLead(teamContext))
222
223 const store = enabled ? getStore() : null
224
225 return useSyncExternalStore(
226 store ? store.subscribe : NOOP_SUBSCRIBE,
227 store ? store.getSnapshot : NOOP_SNAPSHOT,
228 )
229}
230
231/**
232 * Same as useTasksV2, plus collapses the expanded task view when the list

Callers 3

SpinnerWithVerbInnerFunction · 0.85
ModeIndicatorFunction · 0.85

Calls 4

useAppStateFunction · 0.85
isTodoV2EnabledFunction · 0.85
isTeamLeadFunction · 0.85
getStoreFunction · 0.70

Tested by

no test coverage detected