ProgressState
Agent Runtimes / hooks/useProgressStore / ProgressState
Type Alias: ProgressState
ProgressState =
object
Defined in: src/hooks/useProgressStore.ts:29
State shape for the global top progress bar.
Properties
isActive
isActive:
boolean
Defined in: src/hooks/useProgressStore.ts:33
True while at least one task is active.
reset
reset: () =>
void
Defined in: src/hooks/useProgressStore.ts:47
Clear every active task (hides the bar).
Returns
void
setTaskActive
setTaskActive: (
id,active) =>void
Defined in: src/hooks/useProgressStore.ts:45
Bind the bar to a boolean loading flag for a given task id. Convenient
inside effects: setTaskActive('volumes', volumesLoading).
Parameters
id
string
active
boolean
Returns
void
startTask
startTask: (
id?) =>string
Defined in: src/hooks/useProgressStore.ts:38
Mark a task as active. Returns the task id so callers can stop it later. When no id is supplied a unique one is generated.
Parameters
id?
string
Returns
string
stopTask
stopTask: (
id) =>void
Defined in: src/hooks/useProgressStore.ts:40
Mark a task as no longer active.
Parameters
id
string
Returns
void
tasks
tasks:
Record<string,true>
Defined in: src/hooks/useProgressStore.ts:31
Map of currently-active task ids.