Skip to content

feat: allow loading nodes from env-specified paths #4949

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 3 commits into
base: main
Choose a base branch
from

Conversation

jmorahan
Copy link

This allows you to specify additional paths in an environment variable so you can maintain custom components outside of the core codebase

@FintanGalvin
Copy link

Fantastic pr

@toi500
Copy link
Contributor

toi500 commented Jul 25, 2025

Best PR I have seen from the open-source community for this project so far. Love it.

@HenryHengZJ
Copy link
Contributor

awesome addition! curious how this work? you need to build the component files as well right? in the COMPONENTS_PATH?

@jmorahan
Copy link
Author

awesome addition! curious how this work? you need to build the component files as well right? in the COMPONENTS_PATH?

That is the idea, yes.

I haven't set up anything to facilitate that in this PR, as I figured it would need more discussion; this just sets it up to work if you can get the components built. But I did do a simple textsplitter component locally to test; can share that if it would be helpful. Just cloned the relevant bits of the interfaces etc for now.

@toi500
Copy link
Contributor

toi500 commented Jul 28, 2025

@jmorahan I’ve been testing this out and wanted to highlight 2 points:

  • I needed to make a small modification so the patch works on Windows too (using path.delimiter for splitting COMPONENTS_PATH).
image
  • I noticed that for a custom node to appear, it must have a unique this.name value. If I use the same this.name as an existing node, the custom node does not show up (the original is loaded). So, as far as I can tell, there isn’t currently a way to override existing nodes, only to add new ones with unique names.

And here is the thing, if I’m understanding correctly, when we want to make a simple change to a node like the Loop node, we need to change its default this.name value so it shows up, making the node unoperational.

chrome_Pz5lqc0GQN

It would be very helpful if external nodes with the same system names could override the native node by default.

@toi500
Copy link
Contributor

toi500 commented Jul 28, 2025

Following my above comment, I have added the ability to override existing nodes, as the more optimal way to work with this new feature. Now, we can create nodes and components from scratch using unique this.name values, or override existing ones when needed (by using the same this.name values as the default node) , for example, if a small change is required in a particular node.

chrome_9QS3OgufsA

Changes: bd17c55

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.

4 participants