PtcRunner.SubAgent.ProgressRenderer (PtcRunner v0.9.0)

Copy Markdown View Source

Renders a markdown checklist from plan steps and summaries.

Used to show the LLM its progress through a plan as user feedback messages.

Rendering

Steps are checked off only when step-done has been called with the matching ID. The journal (task cache) is not consulted — caching and progress tracking are independent concerns.

Visibility

TurnFeedback.format/3 merges the current turn's summaries before rendering, so step-done calls appear in the checklist on the next turn's prompt (i.e., the feedback message for the current turn). If the current turn errors, its summaries are discarded by the loop and never reach the renderer. See PtcRunner.SubAgent.Loop.TurnFeedback for the call site.

Step-done entries whose IDs don't appear in the plan are collected under an "Out-of-Plan Steps" section.

Summary

Functions

Render a progress checklist.

Functions

render(plan, summaries)

@spec render([{String.t(), String.t()}], map()) :: String.t()

Render a progress checklist.

Parameters

  • plan - Normalized plan list of {id, description} tuples
  • summaries - Summaries map from step-done calls

Returns

A markdown string with the progress checklist, or empty string if no plan.