Description:
This pull request introduces a new feature that installs the shadTooltip
library into the project. Additionally, it enhances the tooltip
functionality by grouping the tooltips based on their associated edge
classes.
Changes Made:
Added the shadTooltip library to the project dependencies.
Implemented logic to group tooltips based on their respective edge
classes.
Updated the tooltip rendering code to display grouped tooltips on the
edges.
### Description
This pull request introduces an enhancement to the existing application
by adding persistence to the dark mode feature. Currently, when the page
is refreshed, the dark mode setting reverts to the default light mode.
With this enhancement, the dark mode state will be maintained even after
refreshing the page.
### Changes Made
1. Added a new setting in the application to store the user's preference
for dark mode.
2. Implemented functionality to persist the dark mode preference in
local storage.
3. Modified the page initialization logic to retrieve the dark mode
preference from local storage and apply it on page load.
This commit refactors the FrontendNode class by extracting two methods to handle specific field values related to models and API keys. The _handle_model_specific_field_values method handles the options and is_list properties for fields related to models, while the _handle_api_key_specific_field_values method handles the display_name and required properties for fields related to API keys. This improves the readability and maintainability of the code.
✨ feat(flow.py): add validator to ensure flow field is a valid JSON object with required fields
The flow field in the FlowBase model has been changed from a string to a dictionary to allow for JSON data. A validator has been added to ensure that the flow field is a valid JSON object with the required fields. The tests have been updated to reflect these changes.
✨ feat(database.py): add default argument to json.dumps to handle datetime objects
🚨 test(database.py): add tests for batch flow creation, file upload, and file download
The fix in database.py handles the case where the data dictionary does not contain the "flows" key. This is important because the code assumes that the "flows" key is present and will raise an exception if it is not. The fix adds a check to see if the "flows" key is present and if not, it creates a new FlowListCreate object with the data as a list of FlowCreate objects.
The feature in database.py adds a default argument to the json.dumps function to handle datetime objects. This is important because the default json encoder does not handle datetime objects and will raise an exception if it encounters one.
The tests in test_database.py cover the batch creation of flows, uploading a file containing flows, and downloading a file containing flows. These tests ensure that the endpoints are working as expected and that the data is being handled correctly.
🚀 feat(flowstyle.py): add FlowStyle model
🚀 feat(flowstyle.py): add FlowStyleCreate and FlowStyleRead models
🐛 fix(settings.py): correct typo in database_url variable name
The Flow model now has a relationship to the FlowStyle model, which allows for the creation of a FlowStyle object that is associated with a Flow object. The FlowStyle model is a new model that contains the color and emoji fields, which are used to style the Flow object. The FlowStyleCreate and FlowStyleRead models are used to create and read FlowStyle objects respectively. The typo in the database_url variable name has been corrected to ensure that the application connects to the correct database.
The order of the class definitions in the file has been changed to match the order of their usage in the code. This improves the readability of the code and makes it easier to understand the relationships between the classes. No functionality has been changed.
This commit simply imports the flatten_list function from the graph.utils module to be used in the AgentVertex class. This improves the readability of the code and reduces the number of lines of code.
The return statement in TextSplitterVertex was improved to be more readable by adding a new line before the Documents field. This makes it easier to read and understand the output of the function.
This pull request introduces a new feature that enhances the search
functionality by displaying menu options when performing a search.
Currently, the search results only present a list of relevant items, but
with this feature, users will have quick access to additional actions
and functionalities directly from the search results.
The changes include:
- Moved the `Edge` class to a new `edge` package
- Moved the `Graph` class to a new `graph` package
- Moved the `Node` class to a new `node` package
- Moved the `VectorStoreNode` class to the `node/types.py` module
- Moved the `Edge`, `Graph`, and `Node` classes to their respective `base.py` modules
- Added an `__init__.py` file to each package to allow for importing of classes
- Added a `constants.py` module to the `graph` package to store constants used in the `Graph` class
- Refactored the `Graph` class to use the new `Node` and `Edge` classes
- Refactored the `Graph` class to use a dictionary to map node types to their respective classes
- Refactored the `Graph` class to remove invalid nodes from the graph
- Refactored the `Graph` class to handle the LLM node within the graph
- Refactored the `Graph` class to build the nodes before building the edges
- Refactored the `Graph` class to use the `get_node` method to find nodes by id
- Refactored the `Graph` class to use the `get_node_neighbors` method to find the neighbors of a node
- Refactored the `Graph` class to use the `get_children_by_node_type` method to find the children of a node based on the node type
These changes improve the modularity and maintainability of the `langflow` package by separating the classes into their respective packages and modules. The changes also make it easier to add new node types to the `Graph` class by using a dictionary to map node types to their respective classes.
🚀 feat(node): add Node class to represent a node in the graph
🚀 feat(constants.py): add DIRECT_TYPES constant to represent direct types in a node's template
The Node class represents a node in the graph and is responsible for parsing the data and building the module. The DIRECT_TYPES constant is a list of direct types in a node's template.
🚧 chore(types.py): add import statements for typing and Node classes
This commit adds import statements for the typing module and the Node class to the types.py file. This is necessary for the code to run properly as it uses these classes and modules.
🚧 chore(loading.py): remove unnecessary import statement
This commit removes an unnecessary import statement from the loading.py file. The import statement was causing a circular import error and was not needed for the code to run properly.
🚧 chore(run.py): update import statement for Graph class
This commit updates the import statement for the Graph class in the run.py file. The import statement was outdated and was causing an import error.
🚧 chore(conftest.py): update import statement for Graph class
This commit updates the import statement for the Graph class in the conftest.py file. The import statement was outdated and was causing an import error.
🚧 chore(test_graph.py): update import statements for Node and Edge classes
This commit updates the import statements for the Node and Edge classes in the test_graph.py file. The import statements were outdated and were causing import errors.
## Description
This pull request introduces a new feature that allows users to change
the mouse cursor on Canva's React Flow. By updating the CSS and
JavaScript code, the cursor behavior can be modified to provide a
customized experience for users.
## Motivation
The ability to change the mouse cursor provides a way to enhance user
interaction and personalize the user experience within Canva's React
Flow. This feature can be particularly useful for applications or
websites that require specific cursor styles to match the overall design
or functionality.