-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
fix: update node logic #2515
fix: update node logic #2515
Conversation
lucaseduoli
commented
Jul 3, 2024
- Fix types attribution when updating a node
- Fix error while putting the Edited variable as false on an unedited component
- Changed base class from CustomComponent to Component - Added multiple input fields: message, sender, sender_name, session_id - Included output field for stored messages - Improved logic to handle both string and Message types - Enhanced error handling and validation for message storage
This commit adds a new component called CreateListComponent, which is responsible for creating a list of texts. The component takes in one or more texts as input and outputs a list of Data objects. This component is useful for scenarios where a list of texts needs to be processed or manipulated. The CreateListComponent class is added to the helpers module in the langflow.components package. It includes the necessary inputs and outputs, as well as a create_list method that generates the list of Data objects based on the input texts. This commit also includes some minor changes to other files, such as renaming the UUIDGeneratorComponent to IDGeneratorComponent and updating import statements.
…es, which is updated
@@ -14,7 +14,7 @@ const useCheckCodeValidity = ( | |||
// first check if data.type in NATIVE_CATEGORIES | |||
// if not return | |||
if ( | |||
!NATIVE_CATEGORIES.includes(types[data.type]) || | |||
!Object.keys(nodeNames).includes(types[data.type]) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucaseduoli is this change backwards compatible with existing flows?
For example, if I'm using a compoenent without the "name" property, would the refresh button appear ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is compatible. That line specifically just takes the types of the categories that we display at the sidebar instead of a types constant.
* Fixed bug where updating the node does not remove edited status * Fixed order of edited override * Made all node-changing functions to alter type the right way * Update StoreMessageComponent for enhanced message handling - Changed base class from CustomComponent to Component - Added multiple input fields: message, sender, sender_name, session_id - Included output field for stored messages - Improved logic to handle both string and Message types - Enhanced error handling and validation for message storage * Apply Ruff formatting * Update StoreMessageComponent for enhanced message handling * Apply Ruff formatting * Feat: add more types * Format code * feat: Add CreateListComponent for creating a list of texts This commit adds a new component called CreateListComponent, which is responsible for creating a list of texts. The component takes in one or more texts as input and outputs a list of Data objects. This component is useful for scenarios where a list of texts needs to be processed or manipulated. The CreateListComponent class is added to the helpers module in the langflow.components package. It includes the necessary inputs and outputs, as well as a create_list method that generates the list of Data objects based on the input texts. This commit also includes some minor changes to other files, such as renaming the UUIDGeneratorComponent to IDGeneratorComponent and updating import statements. * [autofix.ci] apply automated fixes * Changed native categories to use the keys of the style utils categories, which is updated * change component name * chore: add the name attribute to the CustomComponent * chore: assign the value of name to the components * chore: change the logic of the type value returned * chore: extract code to new func * chore: change component_name value * [autofix.ci] apply automated fixes * Formatted files --------- Co-authored-by: Rodrigo <[email protected]> Co-authored-by: rodrigosnader <[email protected]> Co-authored-by: igorrCarvalho <[email protected]> Co-authored-by: anovazzi1 <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: italojohnny <[email protected]>
* Fixed bug where updating the node does not remove edited status * Fixed order of edited override * Made all node-changing functions to alter type the right way * Update StoreMessageComponent for enhanced message handling - Changed base class from CustomComponent to Component - Added multiple input fields: message, sender, sender_name, session_id - Included output field for stored messages - Improved logic to handle both string and Message types - Enhanced error handling and validation for message storage * Apply Ruff formatting * Update StoreMessageComponent for enhanced message handling * Apply Ruff formatting * Feat: add more types * Format code * feat: Add CreateListComponent for creating a list of texts This commit adds a new component called CreateListComponent, which is responsible for creating a list of texts. The component takes in one or more texts as input and outputs a list of Data objects. This component is useful for scenarios where a list of texts needs to be processed or manipulated. The CreateListComponent class is added to the helpers module in the langflow.components package. It includes the necessary inputs and outputs, as well as a create_list method that generates the list of Data objects based on the input texts. This commit also includes some minor changes to other files, such as renaming the UUIDGeneratorComponent to IDGeneratorComponent and updating import statements. * [autofix.ci] apply automated fixes * Changed native categories to use the keys of the style utils categories, which is updated * change component name * chore: add the name attribute to the CustomComponent * chore: assign the value of name to the components * chore: change the logic of the type value returned * chore: extract code to new func * chore: change component_name value * [autofix.ci] apply automated fixes * Formatted files --------- Co-authored-by: Rodrigo <[email protected]> Co-authored-by: rodrigosnader <[email protected]> Co-authored-by: igorrCarvalho <[email protected]> Co-authored-by: anovazzi1 <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: italojohnny <[email protected]> (cherry picked from commit 17b730b)