Skip to main content

diff

Method
This is a method of the Agent class in the agent module.
Get file diffs from autonomous execution. Returns a list of :class:FileDiff objects showing what files were modified, with additions/deletions counts.

Signature

Parameters

Optional[str]
Base commit hash to diff from. If None, uses the first snapshot (pre-autonomous state).

Returns

Any
:agent = Agent(autonomy=“full_auto”) result = agent.start(“Refactor utils.py”) for d in agent.diff(): print(f”{d.status}: {d.path} (+{d.additions}/-{d.deletions})“)

Uses

  • diff
  • logger.debug

Used By

Source

View on GitHub

praisonaiagents/agent/agent.py at line 3502