Skip to content

feat: add viz by generating svg image #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

marcusschiesser
Copy link
Contributor

@marcusschiesser marcusschiesser commented Apr 22, 2025

  1. adds an interceptor to handle to create a graph of the workflow (using graphology as data structure)
  2. graph can be returned using getGraph on a workflow generated with const workflow = withGraph(createWorkflow());
  3. toSigma converts the graph into a graph that is renderable by https://www.sigmajs.org/
  4. demo/visualization is an example to render a complex workflow (with sendEvent and filter) using sigma.js, result looks like:
image

Copy link

changeset-bot bot commented Apr 22, 2025

⚠️ No Changeset found

Latest commit: 20d14a6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Member

@himself65 himself65 left a comment

Choose a reason for hiding this comment

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

  1. this should be a browser-compatable package
  2. graphviz is not a good package to me. it doesn't drag node, and it's a static svg

Copy link
Member

@himself65 himself65 left a comment

Choose a reason for hiding this comment

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

All I want is exactly this, or I will not merge the PR

https://github.com/statelyai/xstate-viz

Copy link
Contributor

github-actions bot commented May 20, 2025

Copy link

pkg-pr-new bot commented May 20, 2025

Open in StackBlitz

npm i https://pkg.pr.new/run-llama/llama-flow/@llama-flow/core@67
npm i https://pkg.pr.new/run-llama/llama-flow/@llama-flow/http@67
npm i https://pkg.pr.new/run-llama/llama-flow/@llama-flow/llamaindex@67
npm i https://pkg.pr.new/run-llama/llama-flow/@llama-flow/viz@67

commit: 20d14a6

},
"dependencies": {
"@llama-flow/core": "latest",
"@llama-flow/viz": "workspace:*",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

need to be latest after release

@marcusschiesser marcusschiesser marked this pull request as ready for review May 21, 2025 09:44
@himself65
Copy link
Member

this looks better now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants