For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/logs/functions/withTerminalProgress.md.
  • English
  • Function: withTerminalProgress()

    function withTerminalProgress<T>(opts: TerminalProgressOptions, run: (bar: ProgressHandle) => Promise<T>): Promise<T>;

    Defined in: logs/terminal-progress.ts:321

    在异步任务期间持有进度条,结束时保证 stop

    Type Parameters

    Type Parameter
    T

    Parameters

    ParameterType
    optsTerminalProgressOptions
    run(bar: ProgressHandle) => Promise<T>

    Returns

    Promise<T>