MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / set_progress

Method set_progress

helpers/log.py:370–390  ·  view source on GitHub ↗
(self, progress: str, no: int = 0, active: bool = True)

Source from the content-addressed store, hash-verified

368 _lazy_mark_dirty_for_context(ctx.id, reason="log.Log._update_item")
369
370 def set_progress(self, progress: str, no: int = 0, active: bool = True):
371 progress = self._mask_recursive(progress)
372 progress = _truncate_progress(progress)
373 changed = False
374 ctx = self.context
375 with self._lock:
376 prev_progress = self.progress
377 prev_active = self.progress_active
378
379 self.progress = progress
380 if not no:
381 no = len(self.logs)
382 self.progress_no = no
383 self.progress_active = active
384
385 changed = self.progress != prev_progress or self.progress_active != prev_active
386
387 if changed and ctx:
388 # Progress changes are included in every snapshot, but push sync requires a
389 # dirty mark even when no log items changed.
390 _lazy_mark_dirty_for_context(ctx.id, reason="log.Log.set_progress")
391
392 def set_initial_progress(self):
393 self.set_progress("Waiting for input", 0, False)

Callers 12

set_initial_progressMethod · 0.95
prepare_promptMethod · 0.45
rate_limiter_callbackMethod · 0.45
handle_interventionMethod · 0.45
run_compactionFunction · 0.45
get_terminal_outputMethod · 0.45
gateMethod · 0.45
_gate_innerMethod · 0.45
processMethod · 0.45
executeMethod · 0.45
build_promptFunction · 0.45

Calls 3

_mask_recursiveMethod · 0.95
_truncate_progressFunction · 0.85

Tested by

no test coverage detected