Skip to content

Conversation

@hippopond
Copy link
Contributor

Previously, there were utility functions like:

draw_all_possible_flows
draw_agent_workflow

With the analogous Mermaid functions:

draw_all_possible_flows_mermaid
draw_agent_workflow_mermaid

EXCEPT:
draw_most_recent_execution

Previously Missing:
draw_most_recent_execution_mermaid

This PR creates: draw_most_recent_execution_mermaid
with the corresponding new test case in test_drawing.py::test_draw_most_recent_execution_mermaid

Your Name added 3 commits January 6, 2026 11:00
Co-authored-by: cecli (gemini/gemini-2.5-pro)
Draw Mermaid: More refactor

Draw Mermaid: More Refactor to clean up

Draw Mermaid: More refactor.

Draw Mermaid: Nicely Refactored
test: Add tests for draw_most_recent_execution

Co-authored-by: cecli (gemini/gemini-2.5-pro)

Draw Mermaid: Added in the test case for draw_recent_execution_mermaid
@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: 1d15e72

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hippopond
Copy link
Contributor Author

a new internal function:
_extract_agent_workflow_structure

Was created to consolidate the graph building logic. Thus BOTH:

draw_most_recent_execution
draw_most_recent_execution_mermaid

uses the same graph building function.

@coveralls
Copy link

coveralls commented Jan 7, 2026

Pull Request Test Coverage Report for Build 20797409063

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 16 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.06%) to 87.645%

Files with Coverage Reduction New Missed Lines %
tests/test_drawing.py 1 99.32%
src/llama_index/utils/workflow/init.py 15 61.74%
Totals Coverage Status
Change from base Build 20763338383: 0.06%
Covered Lines: 9038
Relevant Lines: 10312

💛 - Coveralls

Copy link
Contributor

@adrianlyjak adrianlyjak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the addition! one small comment, and also needs the lints fixed. You can run uv run pre-commit run -a to fix/run them locally.

"physics": {"enabled": False}
}
try:
import json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small thing: keep imports at the top unless there's a good reason. (import slow or conditional dependency). Mind moving up top?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thanks ! Let me make the adjustments, and turn around !

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, for the tip on: uv run pre-commit run -a

I was looking for a Makefile that had that, but I know :)

@adrianlyjak adrianlyjak added the enhancement New feature or request label Jan 7, 2026
@hippopond
Copy link
Contributor Author

I have just made the adjustment (moved "import json") to the top and now "uv run pre-commit run -a" passes all checks locally.

Looking forward the new lint results !

@hippopond
Copy link
Contributor Author

i see 7 failing checks, let me iterate

@adrianlyjak adrianlyjak enabled auto-merge (squash) January 7, 2026 21:41
@adrianlyjak adrianlyjak merged commit 96fd9c9 into run-llama:main Jan 7, 2026
15 checks passed
@adrianlyjak
Copy link
Contributor

adrianlyjak commented Jan 7, 2026

i see 7 failing checks, let me iterate

No worries, I got it, merged

@hippopond
Copy link
Contributor Author

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants