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/interfaces/ProgressHandle.md.
  • English
  • Interface: ProgressHandle

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

    进度条操作句柄。

    Methods

    start()

    start(
       total: number, 
       startValue?: number, 
       payload?: Record<string, string>): void;

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

    开始进度(total 为刻度总量)。

    Parameters

    ParameterType
    totalnumber
    startValue?number
    payload?Record<string, string>

    Returns

    void


    update()

    update(value: number, payload?: Record<string, string>): void;

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

    更新当前进度值。

    Parameters

    ParameterType
    valuenumber
    payload?Record<string, string>

    Returns

    void


    setTotal()

    setTotal(total: number): void;

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

    修正总量刻度(未知→已知 Content-Length / finish 补总量)。 LSP:勿用重 start 冒充改 total;实现须保留当前 value,并允许随后 update 按新刻度出帧。

    Parameters

    ParameterType
    totalnumber

    Returns

    void


    stop()

    stop(): void;

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

    结束并清除进度条。

    Returns

    void

    Properties

    PropertyModifierTypeDescriptionDefined in
    activereadonlyboolean当前是否已 start 且未 stoplogs/terminal-progress.ts:41