Commit graph

2,427 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
3e3579d4c6 🐛 fix(parameterComponent): remove console.log statement to clean up code
🔥 chore(keypairListComponent): remove unused useEffect hook to improve code readability
2023-09-27 14:34:58 -03:00
anovazzi1
d73a69dd3d removed legacy function save 2023-09-27 14:04:36 -03:00
anovazzi1
2243e8df2d fix(buildTrigger): update validateNodes function calls to pass in nodes and edges arrays instead of reactFlowInstance
fix(formModal): update validateNodes function calls to pass in nodes and edges arrays instead of reactFlowInstance
fix(reactflowUtils): update validateNode function signature to accept edges array instead of reactFlowInstance
feat(reactflowUtils): update validateNodes function signature to accept nodes and edges arrays instead of reactFlowInstance
2023-09-27 11:39:22 -03:00
anovazzi1
eaab405742 code format 2023-09-27 10:20:34 -03:00
anovazzi1
76def20d86 fix bug when object comes as a string from backend 2023-09-27 10:19:49 -03:00
Cristhian Zanforlin Lousa
7d6f7f1e5e 🔧 fix(keypairListComponent): rearrange classNames to improve readability and maintain consistency
🔧 fix(dictAreaModal): add CSS classes to prevent panning, dragging, undoing, and copying to improve user experience
2023-09-26 23:56:45 -03:00
Cristhian Zanforlin Lousa
76e0c6546a 🔨 refactor(codeTabsComponent): remove unused import of ShadTooltip component to improve code cleanliness and reduce bundle size
🔨 refactor(codeTabsComponent): remove unnecessary wrapping of TextAreaComponent and InputFileComponent components with ShadTooltip component to simplify code structure and improve performance
🔨 refactor(codeTabsComponent): remove unused onChange handlers in TextAreaComponent and InputFileComponent components to remove unnecessary code and improve code readability
🔨 refactor(codeTabsComponent): remove unnecessary className attribute in InputFileComponent component to remove redundant styling
🔨 refactor(codeTabsComponent): remove unused useEffect and useState imports to remove unnecessary code and improve code readability

🐛 fix(codeTabsComponent): fix JSX syntax error and improve code readability
 feat(codeTabsComponent): refactor codeTabsComponent to use separate components for different template types
2023-09-26 23:44:15 -03:00
Cristhian Zanforlin Lousa
921af848b7 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-09-26 22:05:45 -03:00
Cristhian Zanforlin Lousa
d9eb22c30f 🔧 fix(codeTabsComponent): remove unused onChange function parameter in CodeTabsComponent to improve code readability and maintainability
🔧 fix(dictComponent): change onChange behavior in DictComponent to set an empty object when disabled instead of an empty array
🔧 fix(ApiModal): add a check to convert changes to an object only if it is an array in ApiModal
🔧 fix(dictAreaModal): change dictObj state to a ref in DictAreaModal to avoid unnecessary re-renders
🔧 fix(dictAreaModal): update dictObj ref value instead of using setDictObj in DictAreaModal to improve performance
🔧 fix(types): remove unnecessary line breaks in TooltipComponentType to improve code readability
2023-09-26 22:05:39 -03:00
anovazzi1
3c202c4781 chore(codeTabsComponent): add custom-scroll class to improve styling of code tabs component
chore(keypairListComponent): add h-full class to make keypair list component fill its parent container
chore(EditNodeModal): add custom-scroll class and max-h-48 class to make the modal scrollable when necessary
2023-09-26 21:35:46 -03:00
anovazzi1
1920c140a8 fix(PageComponent/index.tsx): fix incorrect parameter passed to uploadFlow function 2023-09-26 21:03:12 -03:00
Cristhian Zanforlin Lousa
ea2b0dcc38 🔄 refactor(keypairListComponent): replace Textarea component with Input component for key and value inputs 2023-09-26 21:01:25 -03:00
Cristhian Zanforlin Lousa
0cf6e09292 🐛 fix(ApiModal): uncomment setActiveTab("0") to fix a bug where the active tab was not being set correctly 2023-09-26 20:56:11 -03:00
Cristhian Zanforlin Lousa
13fae3875b Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-09-26 20:55:56 -03:00
Cristhian Zanforlin Lousa
5feb98466c start state for nestedDict 2023-09-26 20:55:46 -03:00
anovazzi1
c77a93b6d9 fix(MainPage): only set isDragging to true if the dragged item is a file to prevent unnecessary state changes 2023-09-26 20:55:25 -03:00
anovazzi1
cb74a0fb44 fix(nodeToolbarComponent): add check to disable button when nodeLength is 0 to prevent unwanted actions
feat(nodeToolbarComponent): add event handler to ignore events with "disabled" keyword to prevent unwanted actions
2023-09-26 20:39:26 -03:00
anovazzi1
fdde05d29e fix(baseModal): update onChangeOpenModal prop type to accept an optional boolean parameter to improve flexibility and avoid potential errors 2023-09-26 20:15:04 -03:00
anovazzi1
6fd2b0c743 fix(tabsContext.tsx): add optional 'silent' parameter to the saveFlow function to control whether to show success message or not
fix(PageComponent/index.tsx): pass 'true' as the second argument to the saveFlow function to prevent showing success message when saving flow every 30 seconds
fix(types/tabs/index.ts): update the saveFlow function signature to include the optional 'silent' parameter
2023-09-26 19:44:19 -03:00
Cristhian Zanforlin Lousa
1b3564ed3d 🔥 refactor(PageComponent/index.tsx): remove console.log statement for improved code cleanliness 2023-09-26 19:44:19 -03:00
Cristhian Zanforlin Lousa
230a8b3826 🐛 fix(PageComponent/index.tsx): add timer to automatically save flow every 30 seconds to prevent data loss 2023-09-26 19:44:19 -03:00
Cristhian Zanforlin Lousa
a0c4da7d76 🐛 fix(EditNodeModal): add missing useRef import to fix compilation error
 feat(EditNodeModal): use useRef to store and update data instead of useState to improve performance and prevent unnecessary re-renders

🐛 fix(EditNodeModal): fix references to myData.node to myData.current.node to correctly access the current node data
2023-09-26 19:07:34 -03:00
Gabriel Luiz Freitas Almeida
553bf51a7f fix formatting 2023-09-26 15:24:49 -03:00
Cristhian Zanforlin Lousa
536e9d8f47 merge fix 2023-09-26 12:08:19 -03:00
Cristhian Zanforlin Lousa
df3ce5a3d8 🐛 fix(parameterComponent): add support for 'int' type in conditional rendering to display a component
 feat(parameterComponent): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
🐛 fix(codeTabsComponent): import missing functions from reactflowUtils to fix build error
 feat(codeTabsComponent): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
 feat(codeTabsComponent): add DictComponent and KeypairListComponent to handle 'dict' and 'NestedDict' types
🐛 fix(ApiModal): import missing function from reactflowUtils to fix build error
 feat(ApiModal): add support for 'dict' and 'NestedDict' types in conditional rendering to display a component
🐛 fix(types): add Object type to buildTweakObject function in codeTabsPropsType
🐛 fix(reactflowUtils): add missing convertArrayToObj function to convert array of objects to object
 feat(reactflowUtils): add convertArrayToObj function to convert array of objects to object

🐛 fix(utils.ts): fix indentation and formatting issues in groupByFamily function
🐛 fix(utils.ts): fix indentation and formatting issues in buildTweakObject function
🐛 fix(utils.ts): fix indentation and formatting issues in getPythonApiCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getCurlCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getPythonCode function
🐛 fix(utils.ts): fix indentation and formatting issues in getChatComponentCode function
2023-09-26 12:07:31 -03:00
Gabriel Luiz Freitas Almeida
8deeeb5ba3 🐛 fix(utils.ts): change parameter name from apiKey to api_key to improve consistency and readability
 feat(utils.ts): add support for x-api-key header in run_flow function to pass the API key as a header instead of a query parameter
🔧 chore(utils.ts): update getCurlCode function to use x-api-key header instead of api-key header for authentication
2023-09-26 11:45:12 -03:00
Cristhian Zanforlin Lousa
0e6b38c427 🔥 refactor(dictAreaModal/index.tsx): remove unnecessary console.log statement
The console.log statement was not providing any useful information and was removed to improve code cleanliness and performance.
2023-09-26 11:21:49 -03:00
Cristhian Zanforlin Lousa
f56dcc03b0 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-09-26 11:21:38 -03:00
Cristhian Zanforlin Lousa
6803cd1d8c 🐛 fix(dictComponent): fix useEffect dependency to onChange instead of value to prevent unnecessary re-rendering
🐛 fix(keypairListComponent): add rows prop to Textarea components to fix rendering issue

🐛 fix(EditNodeModal): remove unused state variables and fix rendering issue with dict and NestedDict types

🐛 fix(dictAreaModal): fix useEffect dependency to dictObj instead of value to prevent unnecessary re-rendering
2023-09-26 11:21:30 -03:00
anovazzi1
41d18edc97 update package lock json 2023-09-26 10:46:55 -03:00
anovazzi1
b833d45fd1
Adds async processing, session management and a starter cloud setup (#921)
This PR adds the ability to use Redis as cache, Celery for task
execution, Session management, async tasks for the API and some other
improvements.

Run the following command after setting up the .env file in `./deploy`
folder:
```bash
docker compose up --exit-code-from tests tests result_backend broker celeryworker db --build
```
2023-09-26 10:34:38 -03:00
Cristhian Zanforlin Lousa
cc9f834178 🐛 fix(authContext.tsx): update cookie names for access token and refresh token to improve clarity and consistency
🐛 fix(api.tsx): update cookie names for access token and refresh token to match changes in authContext.tsx
2023-09-26 10:21:04 -03:00
Cristhian Zanforlin Lousa
5c57e62f55 🔄 refactor(keypairListComponent): replace Input component with Textarea component for key and value inputs
🐛 fix(keypairListComponent): fix incorrect prop name in Textarea component for value input
2023-09-26 08:19:31 -03:00
anovazzi1
be69a216de fix(authContext.tsx): update useEffect dependencies to include setUserData, setLoading, autoLogin, and setIsAdmin to prevent unnecessary re-renders and ensure proper functionality
feat(authContext.tsx): add support for autoLogin and userData in the TypesProvider component to retrieve and save custom components based on user data

fix(typesContext.tsx): update useEffect dependencies to include autoLogin and userData to ensure proper functionality and prevent unnecessary re-renders

fix(typesContext.tsx): handle error when fetching types and log the error for debugging purposes

feat(typesContext.tsx): add saveComponent function to save custom components to localStorage and update the data state with the new component

fix(nodeToolbarComponent/index.tsx): import typesContext from typesContext file to use the saveComponent function

feat(nodeToolbarComponent/index.tsx): call saveComponent function from typesContext to save the current node data as a custom component

feat(utils.ts): add IncrementObjectKey function to increment the key of an object if it already exists, to avoid overwriting existing keys in localStorage
2023-09-25 22:04:50 -03:00
anovazzi1
00e25c9495 feat(typesContext.tsx): add support for saving components to local storage
- Added import statements for necessary types and utility functions
- Added `saveComponent` function to the `typesContextType` interface
- Implemented `saveComponent` function to save a component to local storage

fix(nodeToolbarComponent/index.tsx): fix typo in case statement
- Fixed typo in case statement for "Download" option

feat(nodeToolbarComponent/index.tsx): add logic to handle "SaveAll" option
- Added logic to handle the "SaveAll" option in the switch statement
- Added condition to check if user is authenticated
- Added condition to check if user is auto-logged in
- Added console logs for debugging purposes

feat(entities/index.ts): add type definition for local storage user data
- Added `localStorageUserType` type definition to represent the structure of user data stored in local storage

feat(typesContext/index.ts): add type definition for node data
- Added `NodeDataType` type definition to represent the structure of node data

feat(utils.ts): add utility function to check if local storage key exists
- Added `checkLocalStorageKey` function to check if a given key exists in local storage
2023-09-25 20:59:04 -03:00
anovazzi1
c3df875f1a fix(AdminPage/index.tsx): fix off-by-one error in getUsersPage function call to correctly pass the index parameter
The getUsersPage function was being called with the incorrect index parameter. It was off by one, causing the wrong page of users to be fetched. This has been fixed by subtracting 1 from the index parameter before calling the function.
2023-09-25 18:09:14 -03:00
Gabriel Luiz Freitas Almeida
8bbf25ee14 🐛 fix(frontend): update format script in package.json to include all files in subdirectories for consistent code formatting 2023-09-22 18:16:57 -03:00
anovazzi1
ba1902d7fb add TODO comment 2023-09-22 15:28:25 -03:00
anovazzi1
9f7f6c84aa feat(nodeToolbarComponent): add functionality to download node as JSON file
feat(reactflowUtils): add functions to create a flow component and download a node as a JSON file

The changes in `nodeToolbarComponent` include importing the `downloadNode` function from `reactflowUtils` and adding a case in the switch statement to call the `downloadNode` function when the action is "SaveAll". This allows the user to download the node as a JSON file.

In `reactflowUtils`, two new functions are added. The `createFlowComponent` function takes in node data and creates a flow component with the necessary structure. The `downloadNode` function takes a flow component and converts it into a JSON file that can be downloaded by the user.
2023-09-22 15:18:52 -03:00
Gabriel Luiz Freitas Almeida
b3febf25dd Merge remote-tracking branch 'origin/dev' into celery 2023-09-22 14:50:19 -03:00
anovazzi1
7f3d57bfaa fix(nodeToolbarComponent): refactor handleSelectChange function to use switch statement for better readability and maintainability
feat(nodeToolbarComponent): add "SaveAll" option to the select dropdown and log a message when selected
2023-09-22 14:46:01 -03:00
anovazzi1
742ebae878 feat(nodeToolbarComponent): add "Save" option to the select dropdown in the node toolbar component to allow saving changes made to the node
fix(styleUtils): import the "SaveAll" icon from lucide-react to be used in the nodeIconsLucide object
2023-09-22 14:32:43 -03:00
anovazzi1
758d5ac9d3 fix(EditFlowSettingsComponent): fix issue with invalidName state not updating correctly when input value is changed 2023-09-22 14:09:44 -03:00
Gabriel Luiz Freitas Almeida
05b1f3658e 🔧 chore(frontend): add newline at the end of package-lock.json file to adhere to coding conventions 2023-09-22 14:05:46 -03:00
Gabriel Luiz Freitas Almeida
78ecb4c341 Merge remote-tracking branch 'origin/dev' into celery 2023-09-22 12:53:05 -03:00
anovazzi1
c9d7e72a08 clone deep to avoid ctrl-z bug on ungroup component 2023-09-21 21:35:23 -03:00
anovazzi1
f63a19578b update lock file 2023-09-21 21:28:19 -03:00
anovazzi1
795bf73752
Filter Menu Components on Click Edge (#932)
This branch implements the edge filtering feature.
2023-09-21 21:08:47 -03:00
anovazzi1
8275a9c2c1 chore(parameterComponent): remove unnecessary ts-ignore comments
fix(extraSidebarComponent): remove unnecessary if condition in handleBlur function
2023-09-21 21:00:17 -03:00
anovazzi1
0192d3461d fix(chatComponent): import processFlow function from reactflowUtils to fix reference error
fix(chatComponent): update validation check to use processFlow function to correctly count nodes
fix(formModal): remove unnecessary spread operator on processFlow function call
fix(reactflowUtils): update getGroupStatus function to correctly return status based on ssData
2023-09-21 20:43:02 -03:00