add diagram generation to agent responses#1
Open
berkaymenekse wants to merge 2 commits intomololab:mainfrom
Open
add diagram generation to agent responses#1berkaymenekse wants to merge 2 commits intomololab:mainfrom
berkaymenekse wants to merge 2 commits intomololab:mainfrom
Conversation
Track used tables from the LLM response and generate a mermaid ER diagram in the streamed chat completion payload. Made-with: Cursor
ParvinEyvazov
requested changes
Feb 28, 2026
Member
ParvinEyvazov
left a comment
There was a problem hiding this comment.
Thank you for your contribution @berkaymenekse 🚀. Great feature, really nice addition.
I encountered two issues while testing:
- The agent can return multiple queries in a single response. In this case, multiple diagrams should be generated, one per query.
- A diagram is created only for the first query in the chat. If the conversation continues and a new query is generated or the previous query is modified, a new diagram is not created.
Let me know what you think. Happy to help test a follow-up update.
Member
|
Additional note: |
Added 'used_tables' and 'diagram' fields to Query and GeneratedSQL types to support relationship diagram generation. Updated related parsing and response handling to accommodate these changes. Improved documentation to reflect the new structure.
Author
|
Hi, added 'used_tables' and 'diagram' fields to Query and GeneratedSQL types to support relationship diagram generation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Track used tables from the LLM response and generate a mermaid ER diagram in the streamed chat completion payload.