* feat: Add NodeIcon component for displaying icons in GenericNode
This commit adds a new component called NodeIcon to the GenericNode module. The NodeIcon component is responsible for displaying icons based on the data type of the node. It uses the nodeIconsLucide object from the styleUtils module to map the data type to the corresponding icon name. The component also handles the display of emojis as icons by checking if the icon is an emoji using the emoji-regex library. The icon color is determined based on the data type using the nodeColors object from the styleUtils module. The NodeIcon component is used in the GenericNode component to render the icon of the node.
* [autofix.ci] apply automated fixes
* feat: Remove useIconNodeRender hook from CustomNodes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Added Validate endpoint
* Added API Code Validate type
* Added post validate code hook
* Used mutation instead of API call to validate code
* Removed validate code api call
* move css class for improve of the UI/UX
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Add data-testid attribute to main page title
The code changes add a `data-testid` attribute to the main page title in the `PageLayout` component. This attribute can be used for testing purposes.
* refactor: Update page load timeout in end-to-end test
Reduce the page load timeout in the end-to-end test for Basic Prompting to improve test efficiency. The timeout is decreased from 2000ms to 1000ms.
* refactor: Decrease page load timeout in end-to-end test
Reduce the page load timeout in the end-to-end test for Basic Prompting to improve test efficiency. The timeout is decreased from 2000ms to 1000ms.
* refactor: Decrease page load timeout in end-to-end test
* refactor: Update page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
Reduce the page load timeout in the end-to-end test for Basic Prompting to improve test efficiency. The timeout is decreased from 2000ms to 1000ms.
* improve tests decreasing and removing time outs
* 🐛 (ComposioAPI.py): Fix issue where build_config was not being updated correctly when api_key is not empty
* 🐛 (GenericNode/index.tsx): Fix potential null pointer exception by adding non-null assertion operator to info property access
✨ (generalBugs-shard-11.spec.ts): Add end-to-end tests to ensure users can use ComposIO without api_key error and connect tools successfully
* ✨ (index.tsx): Add data-testid attribute to the save button for testing purposes
✨ (auto-save-off.spec.ts): Add end-to-end test for manually saving a flow when auto_save is off
* ⬆️ (auto-save-off.spec.ts): decrease wait time from 5000ms to 3000ms for improved test efficiency
* moving auto-save-off test to scheduled folder
* feat: add useGetDownloadFileMutation hook for downloading files
This commit adds a new hook called useGetDownloadFileMutation to handle the downloading of files in the frontend. The hook takes in the path and filename as parameters and uses the fetch API to download the file. It then creates a URL object for the downloaded file and sets it as the href of a dynamically created anchor element. Finally, it triggers a click event on the anchor element to initiate the file download. The URL object is revoked after the download is complete.
* feat: add use-download-files hook for downloading files on chat
This commit adds a new hook called use-download-files to handle the downloading of files in the frontend. The hook takes in the path and filename as parameters and uses the fetch API to download the file. It then creates a URL object for the downloaded file and sets it as the href of a dynamically created anchor element. Finally, it triggers a click event on the anchor element to initiate the file download. The URL object is revoked after the download is complete.
* [autofix.ci] apply automated fixes
* feat: refactor file download handling in chat view
Refactor the file download handling in the chat view by introducing a new hook called `use-download-files`. This hook takes in the path and filename as parameters and uses the fetch API to download the file. It creates a URL object for the downloaded file and sets it as the href of a dynamically created anchor element. Finally, it triggers a click event on the anchor element to initiate the file download. The URL object is revoked after the download is complete.
* remove console.log
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com>
* refactor: Update lazy loading imports in routes.tsx
The code changes in `routes.tsx` refactor the lazy loading imports by removing unnecessary code duplication and reorganizing the import statements. This improves the readability and maintainability of the code.
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ✨ (use-icons-status.tsx): Add data-testid attribute to Loading component for testing purposes
✨ (index.tsx): Add data-testid attribute to stop building button for testing purposes
✨ (stop-building.spec.ts): Add end-to-end test to ensure user can stop a building process
* ✨ (stop-building.spec.ts): Add additional tests to ensure the user can stop a building process successfully and verify the button functionality.
* test(stop-building.spec.ts): Comment out wait timeouts
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* categoring tests
* ✨ (actionsMainPage-shard-1.spec.ts): Add end-to-end tests for selecting and deleting items, searching flows, and searching components on the main page to ensure proper functionality and user experience.
* 📝 (frontend/tsconfig.json): update file paths in include section to match the correct directory structure for scheduled-end-to-end tests.
* 🔧 (typescript_test.yml): update path in the command to change directory to run end-to-end tests in the frontend folder
📝 (typescript_test.yml): improve comments for better readability and understanding of the workflow logic
* add yml configuration to choose folder to run CI
* 🔧 (ci.yml): Fix formatting issues and add support for running tests in a specific folder
📝 (ci.yml): Update job dependencies to improve readability and maintainability of the workflow configuration
* ♻️ (typescript_test.yml): refactor matrix values for shardIndex and shardTotal to reduce redundancy and improve readability
* categoring tests
* ✨ (actionsMainPage-shard-1.spec.ts): Add end-to-end tests for selecting and deleting items, searching flows, and searching components on the main page to ensure proper functionality and user experience.
* 📝 (frontend/tsconfig.json): update file paths in include section to match the correct directory structure for scheduled-end-to-end tests.
* 🔧 (typescript_test.yml): update path in the command to change directory to run end-to-end tests in the frontend folder
📝 (typescript_test.yml): improve comments for better readability and understanding of the workflow logic
* add yml configuration to choose folder to run CI
* 🔧 (ci.yml): Fix formatting issues and add support for running tests in a specific folder
📝 (ci.yml): Update job dependencies to improve readability and maintainability of the workflow configuration
* ♻️ (typescript_test.yml): refactor matrix values for shardIndex and shardTotal to reduce redundancy and improve readability
* 🐛 (fileUploadComponent.spec.ts): fix file path for file upload to correctly locate the test file in the assets folder
* changing test_folder
* ✨ (fileUploadComponent.spec.ts): update file path for file upload test to match new file location in the project structure
* fix input on playwright command
* remove env definition from vite
* add get config query
* add save config hook to add info to autosaving and axios
* Use save config hook to get info
* Create autoSaving variable on flowsManagerStore
* Adds autoSaving from store into every place that used the env variables
* fix wrong url
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* Added new confirmation modal for saving
* Fixed save button
* fixed header classes
* updated docs link
* Added different message to auto saving
* Changed tooltip to appear in saved text, not in button
* Changed tooltip back to previous when auto saving is enabled
* changed auto_save to auto_saving
* Fixed build not appearing and icons
* Changed modal when autosave is enabled
* 🐛 (menuBar/index.tsx): fix condition for disabling save button to include isBuilding flag to prevent saving during build process
* fix current flow not being updated on set nodes and edges and fix modal not letting user leave when flow is empty
* Removed console log
* Fix add flow not adding the flow that comes from the backend
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com>
* feat: Add TableNodeComponent for rendering table data in ParameterRenderComponent
* refactor: Set default formatter type for columns in FormatColumns function
* [autofix.ci] apply automated fixes
* refactor: Improve object rendering in ObjectRender component
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Changed the data type of number field from string to number
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* refactor: add card store component
* refactor: use StoreCardComponent for displaying store cards
* refactor: Remove unused code
* refactor: Update Collection card to fit only to the my collection case
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* add separated component for prompt modal
* refactor: rename promptAreaModal to promptModal and update type import
* refactor: update promptComponent to use PromptModal instead of GenericModal
* refactor: update textarea-primary class in applies.css
* refactor: add ComponentTextModal for displaying and editing text areas
Add a new component, ComponentTextModal, for displaying and editing text areas. This component includes a textarea input, a title, and an icon. It also supports password visibility toggling. The ComponentTextModal is used within a BaseModal component and includes a save button for finishing the editing process. This commit refactors the code to add the ComponentTextModal and its related functionality.
* refactor: Add ComponentTextModal for displaying and editing text areas
* delete genericModal component and their references
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Removed unused code
* Separated folder sidebar from common sidebar
* Removed useOnFileDrop from common sidebar
* Added folderSidebarComponent that fetches the folders
* Added useOnFileDrop and SIdebarFoldersButton
* Make auth context not get folders
* Make delete folder refetch get folders
* Make folder mutations refetch the getFolder
* Create getFolder query
* Removed unused functions from useFolderStore
* Make isLoading from application depend only on flows
* Make main page not refetch folders
* Change types of folders store
* removed getFolders refetch on duplicateFolders
* Added loading from query into ComponentsComponent
* Made the flow page get the flows and types if they're not available
* Made the loading be the isLoading only
* Removed unused function
* Make cards appear even if it didnt load
* Removed setLoading of various pages
* Fixed loading happening every time the flow changes
* Added skeleton instead of loading on folders
* Added routing to contain folderId on both flows and initial page
* remove redirect of useFileDrop
* remove folderid getting from state
* removed setAllFlows
* chore: Remove unused variables and functions in useDuplicateFlows hook
* Added refetch of folders when the flow is deleted or added
* Changed redirectToLastLocation to redirect to last folder also
* Added upload flow to folder tanstack and refetched folders on upload
* Added loading of current folder on display of empty component
* Removed refetching folder on file drop
* Removed unused code
* Fixed add new flow from header not redirecting correctly
* Fixed unused code
* Added undefined on setting current flow as empty
* Added disable top bar and make it be displayed on the top of an empty folder
* Fixed select all checked when deleting all flows
* add onEscapeKeyDown
* refactor: Add ConfirmationModal to CodeAreaModal for better user experience
* refactor: Update CodeAreaModal to use ReactAce for code editing
* fix closing o x modal
* refactor: Update CodeAreaModal to use ReactAce for code editing
* [autofix.ci] apply automated fixes
* decompose object
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* fixed patch update flow
* fixed update flow patch to receive id by payload
* created save flow hook with auto save and manual save functions
* fix poetry lock
* added auto save check with environment variable
* removed unused user
* separated autosave and put the flow as a creation with nodes and edges
* removed set nodes that skipped saving
* implemented auto save hook
* removed autosave from setNodes and setEdges
* added auto save hook and saved on viewport move and added useEffect to save on nodes and edges changed
* changed type of setNodes
* removed unused var
* removed deletion of empty flow
* Added saving of flow on button when autoSave is disabled
* disable saving when the nodes are empty
* removed save loading as false when the access token is renewed
* implemented useDebounce
* added save loading to save flow hook
* removed setting nodes and edges on fetching, since they are set when the current flow is updated
* removed unused var
* use debounce hook to save flow
* set nodes and edges on current flow id change
* removed useplaygroundeffect
* removed unused import
* put set save loading before the If
* removed flow cleaning and inputs setting, since the inputs and outputs are set on the ResetFlow function
* updated to use ResetFlow function to update everything regarding flow
* removed flow pool get on resetFlow, for it to be fetched only if the user is inside the flow
* updated packagelock
* Changed router to outlet on app.tsx to use createRouter
* Created authSettingsGuard to guard the general settings
* Fixed routes to use createBrowserRouter to allow the use of useBlocker
* Changed index.tsx to use RouterProvider and the router just created
* Changed flowStore to have a local flow state
* Implemented setting the current flow state when saving the flow
* Added the update of current flow when auto saving
* changed current flow to use the current flow from Flow Store instead of Flows Manager Store
* Changed codeTabsComponent Tweaks check to show if its checked
* Removed unused variables
* Removed browser router from context wrapper
* Removed unused console.log
* Changed initialSetup to just run when opening the modal
* changed confirmationModal to have destructiveCancel and to only call onCancel if the other buttons were not pressed
* Created a SaveChangesModal that confirms if the user wants to save their changes
* Get folder by id when folder id changes too
* Changed reset flow calls to store whole flow
* Added check if user is exiting page to prevent him when there are unsaved changes
* Added new types on ConfirmationModalType
* Implement save on clicking the save button on the header
* added save component shortcut to use save shortcut as save flow
* added save component shortcut on shortcutsStore type
* changed save shortcut to save component on node toolbar
* added save shortcut to header menubar
* changed shortcuts name to be compatible with existing ones
* changed shortcuts to be backwards compatible
* changed save to changes to maintain retrocompatibility
* changed save_component to save to maintain retrocompatibility
* Changed time difference to unsaved changes
* changed the toolbar select item to get the right save shortcut
* Changed save flow to use current flow from useFlowStore instead of the previous saved flow
* changed changesNotSaved to include flow name and metadata
* Added way of saving the flow settings just locally instead of directly to database
* Changed shareModal to save flow with hook
* removed old auto saving on connect
* Removed save functions from flowsManagerStore
* refactor: Remove unused imports and state variables in EditFlowSettings component
* use current flow not saved one and refactored page to not receive flow
* added check of isFlowPage to display the menubar
* Added checks to render playground if API key is valid and if Flows exists
* Added check to not display X on chat on playground page
* Updated flows variable to be undefined by start to prevent things from loading before flows initialize
* Implemented log builds parameter to not allow the builds to be logged if user not on flowPage
* feat: add error handling for Flow build
The code changes in `buildUtils.ts` add error handling for the Flow build process. It includes a new case for handling errors in the switch statement, which displays the error message and triggers the `onBuildError` function. This change ensures that errors during the Flow build are properly handled and the build process is stopped.
* feat: enhance error handling in build_flow to capture and report HTTP exceptions in the flow building process
* feat: Export needsLayout function for layout handling in reactflowUtils, enhancing node position verification
* feat(layoutUtils): Enhance ELK layout options for improved graph rendering and add debug logs for layout verification
* feat: Update PageComponent to fit view when viewport is at (0,0)
The PageComponent in the FlowPage now fits the view when the viewport is at (0,0). This improves the initial display of the page and enhances the user experience.
* feat(uploadFlow): Integrate processDataFromFlow to handle flows during upload, improving data processing efficiency
* feat(constants): Update NODE_WIDTH from 384 to 400 for improved component layout and consistency in the user interface
* refactor(layoutUtils): Remove debug console logs from getLayoutedNodes
* fix: add 'nowheel' class to Textarea component for enhanced user experience in textarea interactions
* refactor: replace Input with Textarea in TextAreaComponent for improved user experience and aesthetics
* refactor: Update TextAreaComponent to dynamically adjust the number of rows based on the content length for improved user experience
* [autofix.ci] apply automated fixes
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat(utils.py): add escape_json_dump function to escape JSON strings for Edge dictionaries
* refactor(Output): streamline add_types method to prevent duplicate entries in types list for improved type management
* feat(data.py): add classmethod decorator to validate_data for enhanced validation logic when checking data types
* feat(setup.py): implement retry logic for loading starter projects to enhance robustness against JSON decode errors
* fix(input_mixin.py): improve model_config formatting and update field_type alias for clarity and consistency in field definitions
* feat(types.py): refactor vertex constructors to use NodeData and add input/output methods for better component interaction
* feat(schema.py): add NodeData and Position TypedDicts for improved type safety and structure in vertex data handling
* feat(base.py): update Vertex to use NodeData type and add to_data method for better data management and access
* refactor(schema.py): update TargetHandle and SourceHandle models to include model_config attribute
* Add TypedDict classes for graph schema serialization in `schema.py`
* Refactor `Edge` class to improve handle validation and data handling
- Consolidated imports and removed redundant `BaseModel` definitions for `SourceHandle` and `TargetHandle`.
- Added `valid_handles`, `target_param`, and `_target_handle` attributes to `Edge` class.
- Enhanced handle validation logic to distinguish between dictionary and string types.
- Introduced `to_data` method to return edge data.
- Updated attribute names to follow consistent naming conventions (`base_classes`, `input_types`, `field_name`).
* Refactor `Edge` class to improve handle validation and data handling
* Refactor: Standardize attribute naming and add `to_data` method in Edge class
- Renamed attributes to use snake_case consistently (`baseClasses` to `base_classes`, `inputTypes` to `input_types`, `fieldName` to `field_name`).
- Added `to_data` method to return `_data` attribute.
- Updated validation methods to use new attribute names.
* Refactor: Update Edge class to consistently use snake_case for attributes and improve validation logic for handles
* Refactor: Change node argument type in add_node and _create_vertex methods to NodeData for better type safety and clarity
* Refactor: Implement JSON serialization for graph data with `dumps` and `dump` methods, enhancing data export capabilities
* Refactor: Add pytest fixtures for ingestion and RAG graphs, enhance test structure for better clarity and organization
* Refactor: Add pytest fixtures for memory_chatbot_graph tests and improve test structure
* Refactor: Remove unused methods in ComponentVertex class to streamline code and improve readability
* Refactor: Remove unnecessary line in ComponentVertex class to enhance code clarity and maintainability
* refactor: Add utility functions for getting handle IDs in CustomNodes
- Added `getRightHandleId` function to generate the right handle ID for source handles.
- Added `getLeftHandleId` function to generate the left handle ID for target handles.
- These functions improve code readability and maintainability by encapsulating the logic for generating handle IDs.
* refactor: Add type for escaped handle IDs in edges to improve type safety in reactflowUtils
* feat: Add function to escape handle IDs in edges, enhancing edge management in reactflowUtils
* feat: Add function to check edges without escaped handle IDs, improving edge validation in reactflowUtils
* feat: Enhance edge processing in reactflowUtils to handle edges without escaped handle IDs more effectively
* feat: Add layoutUtils module for handling node layout using elkjs
* feat: update processDataFromFlow to add layout to nodes if needed
* feat: Update flowsManagerStore to parse flow data from file before processing
- Replace usages of `fileData` with `parsedFlowData` for improved clarity
- Ensure compatibility with newProject and isComponent parameters
- Improve error handling for uploading components as flows or vice versa
- Refactor code for better readability and maintainability
* Refactor import paths to use 'initialize' module in 'base.py'
* feat: Add method to set class source code and integrate it with frontend node input field
* refactor: Update sourceHandle dataType to use custom component class name
* fix: Raise error for unknown vertex types instead of returning default Vertex class
* refactor: Remove redundant call to _import_vertex_types() in VertexTypesDict initialization
* refactor: Simplify add_code_field by removing unnecessary field_config parameter from function signature
* feat: Add elkjs dependency to package.json and package-lock.json for enhanced functionality in the frontend
* refactor: Update fields type in Template class to use InputTypes for improved type safety
* refactor: Update import path for DefaultPromptField to improve code organization and maintain compatibility
* refactor: Reorganize imports in __init__.py for better structure and consistency across the inputs module
* refactor: Clean up imports in types.py for better organization and consistency in the graph vertex module
* refactor: Change vertex type annotations to strings for better compatibility and consistency in the graph module methods
* refactor: Update component instantiation to include _code parameter and fix input type annotations for improved type handling
* refactor: Remove unused CustomComponent import from __init__.py for cleaner module structure and improved organization
* refactor: Modify custom_component instantiation to include _code argument for enhanced functionality and clarity in CodeParser class
* refactor: Update CustomComponent import in __init__.py for improved module structure and organization
* refactor: Update launch.json to include correct path for backend source files
* refactor: Update dependencies in poetry.lock to latest versions and resolve merge conflicts in backend files
* [autofix.ci] apply automated fixes
* refactor: Remove unnecessary line in test_memory_chatbot.py
* refactor: Update dataType assignment in Component class to use component name if available, or fallback to class name
* refactor: Correct flow_id reference in MemoryComponent to improve clarity and consistency in memory handling
* refactor: Update import path for DefaultPromptField to improve code organization and maintainability in api_utils.py
* refactor: Add loading module to __init__.py for improved organization of interface package
* refactor: Clean up imports in base.py and enforce edge validation in Graph class for improved maintainability and error handling
* refactor: Remove edge component additions in test_base.py to streamline graph tests and emphasize error handling for unprepared graphs
* refactor: Mark @clack/prompts is-unicode-supported as extraneous in package-lock.json for better dependency management
* refactor: Update dataType assignment in Component class to use component name if available, or fallback to class name
* refactor: Fix edge existence check in Graph class to use correct variable, ensuring accurate validation of graph structure
* refactor: Add test for graph with edge and improve graph preparation logic
* refactor: Set default node type to "genericNode" in getLayoutedNodes for consistent layout structure
* create consts for node widht and height
* refactor: Catch and log errors when processing flow data in flowsManagerStore and reactflowUtils
* [autofix.ci] apply automated fixes
* fix: Validate custom components for source and target vertices in Graph edges
* test: Add fixture for client and raise TypeError for invalid class parsing in CodeParser tests
* test: Add unit test for listing flows as Flow objects in custom component with client
* test: Update assertions for memory chatbot component types in unit tests
* test: Refactor assertions to use updated component names in vector store RAG unit tests
* fix: Change error handling to return default Vertex for unknown node types in graph class
* [autofix.ci] apply automated fixes
* test: Add pytest fixture for CustomComponent in unit tests to enhance test structure and readability
* chore: Update component names in vector store RAG unit tests
* test: Refactor imports and make flow name generation unique in database unit tests
* chore: Add new attributes to Edge class for improved state management and validation in edge processing logic
* chore: Implement addition methods for Graph class to combine vertices and edges from other graph instances safely
* chore: Extend serialization in Graph class to include additional internal attributes for improved state handling
* chore: Call initialize method in prepare for proper setup before validating component IDs in Graph class
* chore: Add test to validate graph combination in vector store RAG, ensuring correct vertices and edges in merged graph structure
* refactor: Add utility functions for getting handle IDs in CustomNodes
- Added `getRightHandleId` function to generate the right handle ID for source handles.
- Added `getLeftHandleId` function to generate the left handle ID for target handles.
- These functions improve code readability and maintainability by encapsulating the logic for generating handle IDs.
* refactor: Add type for escaped handle IDs in edges to improve type safety in reactflowUtils
* feat: Add function to escape handle IDs in edges, enhancing edge management in reactflowUtils
* feat: Add function to check edges without escaped handle IDs, improving edge validation in reactflowUtils
* feat: Enhance edge processing in reactflowUtils to handle edges without escaped handle IDs more effectively
* feat: Add layoutUtils module for handling node layout using elkjs
* feat: update processDataFromFlow to add layout to nodes if needed
* Refactor import paths to use 'initialize' module in 'base.py'
* feat: Add method to set class source code and integrate it with frontend node input field
* refactor: Update sourceHandle dataType to use custom component class name
* fix: Raise error for unknown vertex types instead of returning default Vertex class
* refactor: Remove redundant call to _import_vertex_types() in VertexTypesDict initialization
* refactor: Simplify add_code_field by removing unnecessary field_config parameter from function signature
* feat: Add elkjs dependency to package.json and package-lock.json for enhanced functionality in the frontend
* refactor: Update fields type in Template class to use InputTypes for improved type safety
* refactor: Reorganize imports in __init__.py for better structure and consistency across the inputs module
* refactor: Clean up imports in types.py for better organization and consistency in the graph vertex module
* refactor: Change vertex type annotations to strings for better compatibility and consistency in the graph module methods
* refactor: Update component instantiation to include _code parameter and fix input type annotations for improved type handling
* refactor: Remove unused CustomComponent import from __init__.py for cleaner module structure and improved organization
* refactor: Modify custom_component instantiation to include _code argument for enhanced functionality and clarity in CodeParser class
* refactor: Update CustomComponent import in __init__.py for improved module structure and organization
* refactor: Update launch.json to include correct path for backend source files
* refactor: Update dependencies in poetry.lock to latest versions and resolve merge conflicts in backend files
* refactor: Update dataType assignment in Component class to use component name if available, or fallback to class name
* refactor: Correct flow_id reference in MemoryComponent to improve clarity and consistency in memory handling
* refactor: Update import path for DefaultPromptField to improve code organization and maintainability in api_utils.py
* refactor: Add loading module to __init__.py for improved organization of interface package
* refactor: Clean up imports in base.py and enforce edge validation in Graph class for improved maintainability and error handling
* refactor: Remove edge component additions in test_base.py to streamline graph tests and emphasize error handling for unprepared graphs
* refactor: Mark @clack/prompts is-unicode-supported as extraneous in package-lock.json for better dependency management
* refactor: Update dataType assignment in Component class to use component name if available, or fallback to class name
* refactor: Fix edge existence check in Graph class to use correct variable, ensuring accurate validation of graph structure
* refactor: Add test for graph with edge and improve graph preparation logic
* refactor: Set default node type to "genericNode" in getLayoutedNodes for consistent layout structure
* create consts for node widht and height
* refactor: Catch and log errors when processing flow data in flowsManagerStore and reactflowUtils
* [autofix.ci] apply automated fixes
* fix: Validate custom components for source and target vertices in Graph edges
* test: Add fixture for client and raise TypeError for invalid class parsing in CodeParser tests
* test: Add unit test for listing flows as Flow objects in custom component with client
* test: Update assertions for memory chatbot component types in unit tests
* test: Refactor assertions to use updated component names in vector store RAG unit tests
* fix: Change error handling to return default Vertex for unknown node types in graph class
* [autofix.ci] apply automated fixes
* test: Add pytest fixture for CustomComponent in unit tests to enhance test structure and readability
* chore: Update component names in vector store RAG unit tests
* test: Refactor imports and make flow name generation unique in database unit tests
* chore: Remove unused upload and flow management functions from flowsManagerStore for cleaner codebase
* chore: Await processDataFromFlow in useAddFlow hook
* chore: Correct NODE_HEIGHT calculation to use NODE_WIDTH constant for consistency in constants file
* chore: Remove extraneous flag for is-unicode-supported in package-lock.json for cleaner dependency management
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* refactor: create NodeOutputField component in GenericNode
* feat: update isUserChange parameter in setNode function
The `isUserChange` parameter in the `setNode` function of the `FlowStoreType` interface has been updated to be optional. This change improves the flexibility and usability of the function.
* feat: Add NodeInputField component to GenericNode
The NodeInputField component has been added to the GenericNode component. This component is responsible for rendering input fields for nodes in the UI. It improves the functionality and user experience of the GenericNode component.
* delete parameter component
* [autofix.ci] apply automated fixes
* feat: Refactor NodeOutputField component in GenericNode
The NodeOutputField component in the GenericNode component has been refactored to improve code organization and maintainability. This refactor enhances the functionality and user experience of the GenericNode component.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: suggest updating outdated components in API exception handling
Suggest updating the outdated components in the API exception handling. This commit adds a suggestion message to the API exception response when there are outdated components in the flow. The suggestion message provides the number of outdated components and recommends updating them. The suggestion is generated based on the list of outdated components obtained from the flow data.
* feat: refactor code
* [autofix.ci] apply automated fixes
* Update src/backend/base/langflow/exceptions/api.py
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* Update src/backend/base/langflow/api/utils.py
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* Update src/backend/base/langflow/exceptions/api.py
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* update function name
* [autofix.ci] apply automated fixes
* refactor: fix import casing in langflow.api.utils and langflow.exceptions.api
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* refactor: remove unused code and update exception handling in langflow.api.utils and langflow.exceptions.api
* [autofix.ci] apply automated fixes
* refactor: update exception handling and class in langflow.api.utils and langflow.exceptions.api
* [autofix.ci] apply automated fixes
* update function name and refactor none flow logic
* [autofix.ci] apply automated fixes
* refactor: fix typo in get_suggestion_message function name
* refactor: improve get_suggestion_message function in langflow.api.utils
* refactor: add unit tests for get_suggestion_message and get_outdated_components functions
* refactor: add unit tests for APIException in langflow.exceptions.api
* refactor: improve test coverage for APIException and related functions
* [autofix.ci] apply automated fixes
* update file name
* refactor: update build_exception_body method in APIException to handle Exception type
* refactor: handle None flow data in get_components_versions
* [autofix.ci] apply automated fixes
* refactor: update useDeleteBuilds function signature in _builds API query
* fix: Fix test changing screen before request ended
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* refactor: Add utility functions for getting handle IDs in CustomNodes
- Added `getRightHandleId` function to generate the right handle ID for source handles.
- Added `getLeftHandleId` function to generate the left handle ID for target handles.
- These functions improve code readability and maintainability by encapsulating the logic for generating handle IDs.
* refactor: Add type for escaped handle IDs in edges to improve type safety in reactflowUtils
* feat: Add function to escape handle IDs in edges, enhancing edge management in reactflowUtils
* feat: Add function to check edges without escaped handle IDs, improving edge validation in reactflowUtils
* feat: Enhance edge processing in reactflowUtils to handle edges without escaped handle IDs more effectively
* feat: Add layoutUtils module for handling node layout using elkjs
* feat: update processDataFromFlow to add layout to nodes if needed
* Refactor import paths to use 'initialize' module in 'base.py'
* feat: Add method to set class source code and integrate it with frontend node input field
* refactor: Update sourceHandle dataType to use custom component class name
* fix: Raise error for unknown vertex types instead of returning default Vertex class
* refactor: Remove redundant call to _import_vertex_types() in VertexTypesDict initialization
* refactor: Simplify add_code_field by removing unnecessary field_config parameter from function signature
* feat: Add elkjs dependency to package.json and package-lock.json for enhanced functionality in the frontend
* refactor: Update fields type in Template class to use InputTypes for improved type safety
* refactor: Reorganize imports in __init__.py for better structure and consistency across the inputs module
* refactor: Clean up imports in types.py for better organization and consistency in the graph vertex module
* refactor: Change vertex type annotations to strings for better compatibility and consistency in the graph module methods
* refactor: Update component instantiation to include _code parameter and fix input type annotations for improved type handling
* refactor: Remove unused CustomComponent import from __init__.py for cleaner module structure and improved organization
* refactor: Modify custom_component instantiation to include _code argument for enhanced functionality and clarity in CodeParser class
* refactor: Update CustomComponent import in __init__.py for improved module structure and organization
* refactor: Update launch.json to include correct path for backend source files
* refactor: Update dependencies in poetry.lock to latest versions and resolve merge conflicts in backend files
* refactor: Update dataType assignment in Component class to use component name if available, or fallback to class name
* refactor: Correct flow_id reference in MemoryComponent to improve clarity and consistency in memory handling
* refactor: Update import path for DefaultPromptField to improve code organization and maintainability in api_utils.py
* refactor: Add loading module to __init__.py for improved organization of interface package
* refactor: Clean up imports in base.py and enforce edge validation in Graph class for improved maintainability and error handling
* refactor: Remove edge component additions in test_base.py to streamline graph tests and emphasize error handling for unprepared graphs
* refactor: Mark @clack/prompts is-unicode-supported as extraneous in package-lock.json for better dependency management
* refactor: Update dataType assignment in Component class to use component name if available, or fallback to class name
* refactor: Fix edge existence check in Graph class to use correct variable, ensuring accurate validation of graph structure
* refactor: Add test for graph with edge and improve graph preparation logic
* refactor: Set default node type to "genericNode" in getLayoutedNodes for consistent layout structure
* create consts for node widht and height
* refactor: Catch and log errors when processing flow data in flowsManagerStore and reactflowUtils
* [autofix.ci] apply automated fixes
* fix: Validate custom components for source and target vertices in Graph edges
* test: Add fixture for client and raise TypeError for invalid class parsing in CodeParser tests
* test: Add unit test for listing flows as Flow objects in custom component with client
* test: Update assertions for memory chatbot component types in unit tests
* test: Refactor assertions to use updated component names in vector store RAG unit tests
* fix: Change error handling to return default Vertex for unknown node types in graph class
* [autofix.ci] apply automated fixes
* test: Add pytest fixture for CustomComponent in unit tests to enhance test structure and readability
* chore: Update component names in vector store RAG unit tests
* test: Refactor imports and make flow name generation unique in database unit tests
* chore: Remove unused upload and flow management functions from flowsManagerStore for cleaner codebase
* chore: Await processDataFromFlow in useAddFlow hook
* chore: Correct NODE_HEIGHT calculation to use NODE_WIDTH constant for consistency in constants file
* chore: Remove extraneous flag for is-unicode-supported in package-lock.json for cleaner dependency management
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Removed unused function and fixed tags initial value
* Added post save flow
* Added update flow patch
* removed unused import
* created useAddFlow hook to substitute AddFlow function on flowsManager store
* fixed post save flow to handle endpoint name as undefined
* Fixed add flow hook to use post save flow mutation
* removed unused line
* changed addFlow to use hook in all components that use addFlow
* Removed unused code
* removed addFlow of useDuplicateFlows call
* made newProject default as true
* removed unused variables from addFlow
* fixed url of requests of flows
* passed functions directly
* fix app to display loading on top of the router
* fixed promise of addFlow
* Added upload flow hook with a lot of modularity
* Fixed addFlow naming
* Added helper functions for file uploading
* Changed upload flow to use helper functions
* removed refresh on post
* changed paste function to handle when chatinput node exists on paste
* Used helper function to create input on FileInput
* Used helper function to create input on InputFileComponent
* Used helper function to create input on folder upload, and used uploadFlow hook
* used uploadFlow hook on dropdown options
* used addFlow instead of addComponent on node toolbar
* changed upload flow on headerComponent to use hook
* Changed pageComponent to use uploadFlow hook
* removed useFileDrop dependency
* Fixed onFileDrop to use uploadFlow
* removed useDropdown dependency
* removed unused add and upload functions from flowsManagerStore
* Clean flows and refetch when flow change, added loader when is fetching
* change name of delete flows api
* created useDeleteFlow hook
* used delete flow on useAddFlow
* Used useDeleteFlow hook in places that used removeFlow and deleteComponent
* deleted useDeleteMultiple hook
* removed removeFlows and deleteComponent functions of flowsManagerStore
* Deleted API flows delete call from API file
* Removed unused function and fixed tags initial value
* Added post save flow
* Added update flow patch
* removed unused import
* created useAddFlow hook to substitute AddFlow function on flowsManager store
* fixed post save flow to handle endpoint name as undefined
* Fixed add flow hook to use post save flow mutation
* removed unused line
* changed addFlow to use hook in all components that use addFlow
* Removed unused code
* removed addFlow of useDuplicateFlows call
* made newProject default as true
* removed unused variables from addFlow
* fixed url of requests of flows
* passed functions directly
* fix app to display loading on top of the router
* fixed promise of addFlow
* Added upload flow hook with a lot of modularity
* Fixed addFlow naming
* Added helper functions for file uploading
* Changed upload flow to use helper functions
* removed refresh on post
* changed paste function to handle when chatinput node exists on paste
* Used helper function to create input on FileInput
* Used helper function to create input on InputFileComponent
* Used helper function to create input on folder upload, and used uploadFlow hook
* used uploadFlow hook on dropdown options
* used addFlow instead of addComponent on node toolbar
* changed upload flow on headerComponent to use hook
* Changed pageComponent to use uploadFlow hook
* removed useFileDrop dependency
* Fixed onFileDrop to use uploadFlow
* removed useDropdown dependency
* removed unused add and upload functions from flowsManagerStore
* Clean flows and refetch when flow change, added loader when is fetching
* Changed loading to the useQuery isPending
* changed post to add flow
* fixed error when uploading other thing that is not a JSON not appearing
* changed useAddFlow to handle empty params too
* Fixed loading every time we switch tabs
* Fixed unnecessary list and !
* Fixed reference bug
* Inserted cloneDeep to prevent reference bugs
* Fixed tests of drag and drop
* Fixed flows not being refreshed when uploading
* [autofix.ci] apply automated fixes
* fixed folders test
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix: frozen status is lost after run
* [autofix.ci] apply automated fixes
* add FE tests to freeze feature
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com>