This commit is contained in:
2026-01-24 23:15:08 -08:00
parent 4eb055bb48
commit 0c336ef1d1
3 changed files with 40 additions and 26 deletions

View File

@@ -146,6 +146,26 @@ class PipelineProgress:
except Exception:
return
def begin_pipe(
self,
*,
total_items: int,
items_preview: Optional[Sequence[Any]] = None
) -> None:
ui, pipe_idx = self.ui_and_pipe_index()
if ui is None:
return
try:
fn = getattr(ui, "begin_pipe", None)
if callable(fn):
fn(
int(pipe_idx),
total_items=max(1, int(total_items)),
items_preview=list(items_preview or []),
)
except Exception:
return
def on_emit(self, emitted: Any) -> None:
"""Advance local pipe progress after pipeline_context.emit().