For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/logs/functions/withTerminalProgress.md.
  • 简体中文
  • 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>