Commit graph

4,819 commits

Author SHA1 Message Date
anovazzi1
6d04f49443 fix(reactflowUtils.ts): fix nullability issues and improve variable names for better readability
refactor(reactflowUtils.ts): update targetHandle and sourceHandle to use JSON stringified values for better compatibility
2023-09-13 17:50:51 -03:00
anovazzi1
8e03d95df5 feat(GenericNode): add support for Proxy field in GenericNode component to enable customization of Proxy component for each template field 2023-09-13 17:21:51 -03:00
anovazzi1
07f5342aa8 migrate old edges id format to new edges id fromat on ungroup node 2023-09-13 17:04:07 -03:00
anovazzi1
a7b9cf2cc9 update position on node 2023-09-13 16:17:59 -03:00
anovazzi1
04f2941a7d fix(GenericNode): import XYPosition from reactflow to fix type error
feat(GenericNode): add position prop to GenericNode component to pass the position of the node
fix(nodeToolbarComponent): import updateFlowPosition from reactflowUtils to fix reference error
feat(nodeToolbarComponent): add position prop to NodeToolbarComponent to pass the position of the node
fix(components): import XYPosition from reactflow to fix type error
feat(components): add position prop to nodeToolbarPropsType to pass the position of the node
feat(reactflowUtils): add expandGroupNode function to expand a group node and update the flow
2023-09-13 10:53:43 -03:00
anovazzi1
7de65ed709 feat(nodeToolbarComponent): add "Ungroup" button to the node toolbar when the node is a group
fix(styleUtils.ts): import the "Ungroup" icon from lucide-react to use it in the node toolbar component
2023-09-12 22:13:06 -03:00
anovazzi1
f33acd4685 fix(EditNodeModal): fix incorrect property name in template rendering logic
The property name `display_name` was incorrectly used instead of `name` in the template rendering logic. This has been fixed to correctly display the name of the template parameter.
2023-09-12 21:28:01 -03:00
anovazzi1
9d510e3e4b fix output string of custom component and truncate long Ids on display name 2023-09-12 21:00:42 -03:00
anovazzi1
e4471886e4 feat(types/api): add 'dynamic' and 'proxy' properties to TemplateVariableType to support dynamic and proxy fields in templates
feat(utils/reactflowUtils): add 'toTitleCase' function to convert strings to title case

refactor(utils/reactflowUtils): update function names and comments

refactor(utils/reactflowUtils): update 'updateGroupNodeTemplate' function to handle 'dynamic' property

refactor(utils/reactflowUtils): update 'mergeNodeTemplates' function to handle 'display_name' and 'dynamic' properties

refactor(utils/reactflowUtils): update 'isHandleConnected' function to handle 'proxy' property

refactor(utils/reactflowUtils): update 'generateNodeFromFlow' function to set 'type' as 'genericNode' instead of 'groupNode'
2023-09-12 18:15:32 -03:00
anovazzi1
42f7821002 fix(parameterComponent/index.tsx): remove unnecessary ts-ignore comments
fix(reactflowUtils.ts): add input_types variable to prevent error when checking for advanced types
2023-09-12 17:17:36 -03:00
anovazzi1
772bfbf1d3 fix(reactflowUtils.ts): fix null pointer error when accessing nested properties in connectedInputNodesOnHandle function 2023-09-10 23:57:22 -03:00
anovazzi1
5933c2cefc fix(PageComponent/index.tsx): fix typo in import statement for scapeJSONParse function
feat(PageComponent/index.tsx): add functionality to generate a new flow and node from a selection and update the nodes and edges accordingly
feat(PageComponent/index.tsx): add validation for selection and display error message if selection is invalid
2023-09-10 23:37:13 -03:00
anovazzi1
7bdaa1bca6 copy package-lock from dev to avoid dependencie erro 2023-09-10 21:23:18 -03:00
anovazzi1
b72558db7c added coma 2023-09-10 19:54:39 -03:00
anovazzi1
db4bb0c822 Merge remote-tracking branch 'origin/dev' into newGroupNode 2023-09-10 19:54:28 -03:00
anovazzi1
e22f3acf8c fix(DisclosureComponent): remove commented out code and fix missing icon bug
feat(PageComponent): add selection menu component and onClick event handler for debugging purposes
2023-09-08 17:48:44 -03:00
anovazzi1
30ac706de1 feat(PageComponent): add SelectionMenu component to PageComponent to enable selection of nodes
feat(SelectionMenuComponent): create SelectionMenu component to display a toolbar with a "Group" button for node selection
fix(styleUtils): import Group icon from lucide-react to use in SelectionMenuComponent
2023-09-08 17:05:08 -03:00
anovazzi1
4d5447ed65 feat(reactflowUtils.ts): add functions to handle connected input nodes and ungroup nodes
The `connectedInputNodesOnHandle` function is added to retrieve the nodes connected to the input handle of a given node. It takes the `nodeId`, `handleId`, `nodes`, and `edges` as parameters and returns an array of connected nodes.

The `ungroupNode` function is added to ungroup a group node. It takes the `groupNode` and `BaseFlow` as parameters and updates the edges and nodes in the `BaseFlow` to redirect the edges to the correct proxy node.

The `processFLow` function is added to process the flow object recursively. It clones the flow object and iterates through the nodes to ungroup any group nodes and update the edges and nodes accordingly.

Note: No newline at the end of the file.
2023-09-08 16:16:01 -03:00
anovazzi1
056cf6f66d refactor(api/index.ts): remove unused variable property from APITemplateType
fix(utils/reactflowUtils.ts): import TemplateVariableType from types/api
feat(utils/reactflowUtils.ts): add mergeNodeTemplates function to merge node templates and update display names
feat(utils/reactflowUtils.ts): add isHandleConnected function to check if a handle is connected to an edge
refactor(utils/reactflowUtils.ts): remove TODO comments and update comments for mergeNodeTemplates and isHandleConnected functions
feat(utils/reactflowUtils.ts): add generateNodeTemplate function to generate node templates from a flow
2023-09-08 12:24:04 -03:00
anovazzi1
8cdfb00af6 chore(reactflowUtils.ts): add TODO comment to update to new types
feat(reactflowUtils.ts): add function to update group node template to set visibility of basic types to advanced true
feat(reactflowUtils.ts): add function to generate node template for group node based on flow data
feat(reactflowUtils.ts): add function to generate node from flow data
2023-09-08 12:17:28 -03:00
anovazzi1
e129b3c9f4 refactor(reactflowUtils.ts): extract validation logic into a separate function for better code organization and reusability
feat(reactflowUtils.ts): add validateSelection function to validate the selection of nodes and edges in the React Flow instance
2023-09-08 12:13:40 -03:00
anovazzi1
0df8427e3f refactor(api/index.ts): add FlowType import to improve code readability and maintainability
feat(reactflowUtils.ts): add concatFlows function to concatenate nodes and edges from a FlowType object to a ReactFlowInstance

feat(reactflowUtils.ts): add generateNodeFromFlow function to generate a NodeType object from a FlowType object
2023-09-08 12:11:06 -03:00
anovazzi1
2e7f362867 feat(reactflowUtils.ts): add findLastNodeType type to represent the input for findLastNode function
feat(reactflowUtils.ts): add filterFlow function to filter out selected nodes and edges from the flow
feat(reactflowUtils.ts): add updateFlowPosition function to update the position of nodes in the flow based on a new position
fix(reactflowUtils.ts): fix return type of generateFlow function to use generateFlowType type instead of inline type definition
2023-09-08 12:02:41 -03:00
anovazzi1
67e364ef35 fix(reactflowUtils.ts): import missing FlowType from "../flow" in reactflowUtils.ts
feat(reactflowUtils.ts): add generateFlow function to generate a new flow based on selected nodes and edges
2023-09-08 11:37:35 -03:00
anovazzi1
ccb8b0d323 feat(reactflowUtils.ts): add getMiddlePoint function to calculate the average position of multiple nodes
The getMiddlePoint function calculates the average position of multiple nodes by summing up the x and y coordinates of each node and dividing them by the total number of nodes. This allows us to find the middle point or center of a group of nodes. This function can be used to determine the position of a new node based on the average position of existing nodes.
2023-09-08 11:27:04 -03:00
igorrCarvalho
f44b0e33b1 remove unnused imports 2023-09-05 18:31:30 -03:00
igorrCarvalho
25949b97a7 Fix: user not having icon when id starts with a letter 2023-09-05 18:31:30 -03:00
anovazzi1
0a47163f9b
fix bug on open modals (#865) 2023-09-05 09:50:42 -03:00
Cristhian Zanforlin Lousa
e50b593681 🐛 fix(API/index.ts): handle potential undefined response object properties to prevent errors 2023-09-04 20:18:10 -03:00
anovazzi1
25f7814fea refactor(codeTabsComponent): wrap code tabs in a div with flex column layout for better styling and readability 2023-09-04 19:33:21 -03:00
anovazzi1
8acdd1abff fix animation 2023-09-04 19:29:20 -03:00
anovazzi1
0fe46a3909 revert to default animation of radixUI 2023-09-04 18:48:50 -03:00
Lucas Oliveira
5df8b11d9f Changed autocomplete to only fill when on form 2023-09-04 16:37:43 -03:00
anovazzi1
82368bbe76
Login enhancements (#847)
This pull request introduces a series of enhancements to our recently
revamped login page, streamlining the user experience. These changes
were meticulously designed and developed to ensure a seamless login
process for our users while adhering to the highest standards of
usability and privacy.
2023-09-04 16:20:18 -03:00
anovazzi1
2112f6152e Merge remote-tracking branch 'origin/dev' into login_improvements 2023-09-04 16:19:13 -03:00
Gabriel Luiz Freitas Almeida
4efab50916
Replace logging with loguru (#863) 2023-09-04 19:18:50 +00:00
Gabriel Luiz Freitas Almeida
e8846fc568
Merge branch 'dev' into implement_loguru 2023-09-04 19:17:21 +00:00
Gabriel Luiz Freitas Almeida
28b487dc33 🔧 fix(manager.py): change logger.warn to logger.warning for consistency and clarity
🔧 fix(logger.py): change log_file parameter type annotation to Optional[Path] to indicate that it is an optional argument
2023-09-04 16:15:41 -03:00
Gabriel Luiz Freitas Almeida
7e336bbee6 🐛 fix(logger.py): change log_level variable to uppercase to improve consistency and semantics 2023-09-04 16:13:01 -03:00
Gabriel Luiz Freitas Almeida
3c153c8b1b
Improves endpoint dependency usage (#862) 2023-09-04 19:06:31 +00:00
Gabriel Luiz Freitas Almeida
58c3e5e9dc refactor: replace loggers with loguru 2023-09-04 11:38:39 -03:00
Gabriel Luiz Freitas Almeida
87eb8b1a95 🔧 chore(logger.py): refactor logger configuration to use loguru library and improve log formatting 2023-09-04 11:35:22 -03:00
Gabriel Luiz Freitas Almeida
5f98f0bbd9 📦 chore(pyproject.toml): add loguru package as a dependency for improved logging capabilities 2023-09-04 11:34:38 -03:00
Gabriel Luiz Freitas Almeida
2ab3fcb28a 🐛 fix(base.py): set default value of frontend_node to None in ValidatePromptRequest class to avoid potential NoneType errors
🐛 fix(validate.py): set frontend_node to None instead of an empty dictionary in post_validate_prompt function to align with the default value in ValidatePromptRequest class
2023-09-04 10:04:21 -03:00
Gabriel Luiz Freitas Almeida
dc1a5c81a1
added missing backslashes to api key request definition and bugfix to migration script (#858) 2023-09-04 12:36:17 +00:00
root
b1c24054c6 added indent to index dropping on non-existing table 2023-09-04 11:41:34 +00:00
Gabriel Luiz Freitas Almeida
53c5a3ccde 🐛 fix(base.py): make frontend_node field in PromptValidationResponse optional to handle cases where it is not provided 2023-09-04 07:05:10 -03:00
Gabriel Luiz Freitas Almeida
833fb4ad8f 🔀 chore(utils.py): add type hint for get_session() function to indicate it returns a generator instead of a Session object 2023-09-04 07:01:05 -03:00
Gabriel Luiz Freitas Almeida
43864904ef 🔧 chore(Makefile): update mypy command to only check files in src/backend/langflow directory to improve performance and reduce noise in the output 2023-09-04 07:00:38 -03:00
Gabriel Luiz Freitas Almeida
37ebbf4e65 Formatting 2023-09-04 06:42:41 -03:00