mirror of
https://github.com/run-llama/workflows-ts.git
synced 2026-07-21 06:05:23 -04:00
[PR #67] [MERGED] feat: add viz by generating svg image #76
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/run-llama/workflows-ts/pull/67
Author: @marcusschiesser
Created: 4/22/2025
Status: ✅ Merged
Merged: 8/26/2025
Merged by: @marcusschiesser
Base:
main← Head:ms/add-viz📝 Commits (10+)
c9277f1add pre-commit hookc624228programmatically generate dot filed58478egenerate static graph with graphology68a1801add browser viz using sigma46179cafix lint8c64791add send events7b34078add awaited events5f46ed3clean up parser20d14a6Merge branch 'main' into ms/add-viz922b47aMerge branch 'main' into ms/add-viz📊 Changes
26 files changed (+1605 additions, -2 deletions)
View changed files
➕
.changeset/tiny-fishes-grow.md(+5 -0)➕
demo/visualization/.gitignore(+24 -0)➕
demo/visualization/index.html(+14 -0)➕
demo/visualization/package.json(+28 -0)➕
demo/visualization/public/llamaindex.svg(+18 -0)➕
demo/visualization/src/main.ts(+28 -0)➕
demo/visualization/src/style.css(+9 -0)➕
demo/visualization/src/vite-env.d.ts(+1 -0)➕
demo/visualization/src/workflow.ts(+60 -0)➕
demo/visualization/tsconfig.app.json(+27 -0)➕
demo/visualization/tsconfig.json(+12 -0)➕
demo/visualization/tsconfig.node.json(+25 -0)➕
demo/visualization/vite.config.ts(+7 -0)➕
packages/viz/examples/basic.ts(+72 -0)➕
packages/viz/package.json(+59 -0)➕
packages/viz/src/graph.ts(+70 -0)➕
packages/viz/src/index.ts(+2 -0)➕
packages/viz/src/parser.ts(+229 -0)➕
packages/viz/src/sigma.ts(+31 -0)➕
packages/viz/src/tests/graph.test.ts(+181 -0)...and 6 more files
📄 Description
handleto create a graph of the workflow (usinggraphologyas data structure)getGraphon a workflow generated withconst workflow = withGraph(createWorkflow());toSigmaconverts the graph into a graph that is renderable by https://www.sigmajs.org/demo/visualizationis an example to render a complex workflow (withsendEventandfilter) using sigma.js, result looks like:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.