Skip to content
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 all outdated components at once #4763

Merged
merged 13 commits into from
Nov 25, 2024
Merged

Conversation

lucaseduoli
Copy link
Collaborator

This pull request introduces a new feature to update all nodes in a flow and includes several associated changes. The most important changes involve adding the useUpdateAllNodes hook, updating the FlowStore to manage components that need updating, and creating a new UpdateAllComponents component.

New Feature: Update All Nodes

Store Updates

  • src/frontend/src/stores/flowStore.ts: Updated the FlowStore to include a list of components that need updating (componentsToUpdate). Modified the logic to populate this list and check its length before showing related error messages. [1] [2]

Integration in Flow Page

Type Adjustments

lucaseduoli and others added 5 commits November 21, 2024 13:08
…for testing purposes

✨ (reactflow): create edges to connect different nodes for data flow in the chatbot application.

📝 (Prompt): Update prompt template with dynamic variables for better customization and flexibility.

📝 (code): update code in ChatInput component to import necessary modules and classes for chat inputs handling
♻️ (code): refactor code in ChatInput component to improve readability and maintainability by organizing imports and defining class attributes clearly

📝 (input.py): Update input fields display names and information for better clarity and understanding
📝 (input.py): Update file input field to support multiple file types and be a list of files
📝 (input.py): Update sender options to be more descriptive as "Machine" and "User" instead of constants
📝 (input.py): Update sender_name input field information to clarify it is the name of the sender
📝 (input.py): Update session_id input field information to explain its purpose and usage
📝 (input.py): Update files input field information to clarify it is for files to be sent with the message
📝 (input.py): Update input_value input field information to clarify it is the text message to be passed as input
📝 (input.py): Update should_store_message input field information to explain its purpose of storing messages in history
📝 (input.py): Update message_response method to handle storing messages based on conditions and updating status

📝 (metadata): Update metadata fields in ChatInput component for better clarity and consistency
📝 (OpenAIModel): Add OpenAI API Key field to the template for configuring the OpenAI model usage

📝 (LCModelComponent): Update OpenAIModelComponent inputs and add support for new features and configurations to enhance text generation capabilities.

📝 (file.py): Update comments and documentation for better clarity and understanding of the code
♻️ (file.py): Refactor code to improve readability and maintainability by restructuring the logic and removing unnecessary code blocks

📝 (schema.json): Update schema for the Output of the model to enable JSON mode and improve functionality
📝 (ChatOutput): Display a chat message in the Playground for better user interaction and experience

📝 (ChatOutput): Update ChatOutput class inputs and outputs structure for better organization and readability.

✨ (frontend): Add a new file 'outdated_flow.json' to store outdated flow data for frontend tests.

✨ (outdated-actions.spec.ts): add test to ensure user can update outdated components in the application
@lucaseduoli lucaseduoli marked this pull request as ready for review November 22, 2024 20:07
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Nov 22, 2024
Copy link
Member

@Cristhianzl Cristhianzl left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 22, 2024
@ogabrielluiz ogabrielluiz merged commit 0b15084 into main Nov 25, 2024
18 checks passed
@ogabrielluiz ogabrielluiz deleted the feat/update_all branch November 25, 2024 13:15
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
* update components to update

* Added update all components

* Update the logic for updating all components

* Added dismiss functionality

* Removed node from components to update when updated

* ✨ (list/index.tsx): add data-testid attribute to list card component for testing purposes

✨ (reactflow): create edges to connect different nodes for data flow in the chatbot application.

📝 (Prompt): Update prompt template with dynamic variables for better customization and flexibility.

📝 (code): update code in ChatInput component to import necessary modules and classes for chat inputs handling
♻️ (code): refactor code in ChatInput component to improve readability and maintainability by organizing imports and defining class attributes clearly

📝 (input.py): Update input fields display names and information for better clarity and understanding
📝 (input.py): Update file input field to support multiple file types and be a list of files
📝 (input.py): Update sender options to be more descriptive as "Machine" and "User" instead of constants
📝 (input.py): Update sender_name input field information to clarify it is the name of the sender
📝 (input.py): Update session_id input field information to explain its purpose and usage
📝 (input.py): Update files input field information to clarify it is for files to be sent with the message
📝 (input.py): Update input_value input field information to clarify it is the text message to be passed as input
📝 (input.py): Update should_store_message input field information to explain its purpose of storing messages in history
📝 (input.py): Update message_response method to handle storing messages based on conditions and updating status

📝 (metadata): Update metadata fields in ChatInput component for better clarity and consistency
📝 (OpenAIModel): Add OpenAI API Key field to the template for configuring the OpenAI model usage

📝 (LCModelComponent): Update OpenAIModelComponent inputs and add support for new features and configurations to enhance text generation capabilities.

📝 (file.py): Update comments and documentation for better clarity and understanding of the code
♻️ (file.py): Refactor code to improve readability and maintainability by restructuring the logic and removing unnecessary code blocks

📝 (schema.json): Update schema for the Output of the model to enable JSON mode and improve functionality
📝 (ChatOutput): Display a chat message in the Playground for better user interaction and experience

📝 (ChatOutput): Update ChatOutput class inputs and outputs structure for better organization and readability.

✨ (frontend): Add a new file 'outdated_flow.json' to store outdated flow data for frontend tests.

✨ (outdated-actions.spec.ts): add test to ensure user can update outdated components in the application

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix tests

---------

Co-authored-by: cristhianzl <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants