Commit graph

5,864 commits

Author SHA1 Message Date
anovazzi1
e91e24ee99 fix(tabsContext.tsx): remove unused imports and variables to improve code cleanliness
feat(tabsContext.tsx): add saveComponent and deleteComponent functions to TabsContext to handle saving and deleting custom components
fix(typesContext.tsx): remove saveComponent and deleteComponent functions from typesContext as they are now handled in TabsContext
fix(sideBarDraggableComponent/index.tsx): remove unused imports and variables to improve code cleanliness
feat(sideBarDraggableComponent/index.tsx): add deleteComponent function from TabsContext to handle deleting custom components
fix(nodeToolbarComponent/index.tsx): remove unused imports and variables to improve code cleanliness
feat(nodeToolbarComponent/index.tsx): add saveComponent function from TabsContext to handle saving custom components
fix(types/index.ts): import NodeDataType from flow to fix type error in TabsContextType
2023-10-20 16:37:28 -03:00
anovazzi1
40ee81144f refactor(typesContext.tsx): remove commented out code and unused variables to improve code readability and maintainability 2023-10-20 16:21:57 -03:00
anovazzi1
a41032def7 fix(tabsContext.tsx): fix issue with missing return statement causing incorrect data processing
fix(tabsContext.tsx): move setData function call outside of try-catch block to ensure it always executes
fix(MainPage/index.tsx): filter out component flows from the list of flows to be rendered
2023-10-20 12:36:48 -03:00
cristhianzl
315fe42e0b chore(API/index.ts): remove debugger statement for cleaner code 2023-10-20 11:32:25 -03:00
cristhianzl
551615f19e Merge branch 'feature/store' of github.com:logspace-ai/langflow into feature/store 2023-10-20 11:32:19 -03:00
cristhianzl
1a0d7bd3d4 feat(API): add new functions to interact with store components
- Added new functions `getStoreComponents`, `postStoreComponents`, `getComponent`, and `searchComponent` to the `API` controller module.
- `getStoreComponents` function retrieves a list of store components from the API.
- `postStoreComponents` function posts a new store component to the API.
- `getComponent` function retrieves a specific store component by its ID from the API.
- `searchComponent` function searches for store components based on various parameters such as query, page, limit, status, and tags.

fix(AdminPage): remove unnecessary line

- Removed an unnecessary line of code in the `AdminPage` component.

feat(StorePage): add functionality to get and search store components

- Added functionality to the `StorePage` component to get store components and perform a search.
- Added a new import statement for the `getStoreComponents` and `searchComponent` functions from the `API` controller module.
- Added a new state variable `searchData` to store the search results.
- Added a new state variable `inputText` to store the search input text.
- Added a new function `handleGetComponents` to fetch store components from the API.
- Added a new function `handleSearch` to perform a search based on the input text.
- Modified the `onChange` event handler of the search input to update the `inputText` state and trigger the search.
- Added a call to `handleGetComponents` in the `StoreApiKeyModal` component's `onCloseModal` event handler to refresh the store components after closing the modal.
2023-10-20 11:32:00 -03:00
Gabriel Luiz Freitas Almeida
09d4ee43cf 🔧 fix(store.py): remove duplicate list_components endpoint to avoid conflicts and improve code organization
 feat(store.py): add new list_components endpoint to retrieve a paginated list of components from the store
2023-10-20 11:26:08 -03:00
Gabriel Luiz Freitas Almeida
4c8550579d 🐛 fix(service.py): remove unnecessary try-except block and improve error handling in GET request 2023-10-20 11:08:38 -03:00
Gabriel Luiz Freitas Almeida
3b14cdbe9f 🐛 fix(service.py): catch all exceptions when raising ValueError in the search method to provide more informative error message 2023-10-20 11:06:16 -03:00
Gabriel Luiz Freitas Almeida
b7aa3274f8 🐛 fix(service.py): improve error handling in StoreService search method
 feat(service.py): change default sort parameter in StoreService search method to sort by likes in descending order
2023-10-20 11:02:38 -03:00
Gabriel Luiz Freitas Almeida
5667dd4540 🐛 fix(service.py): remove redundant assignment to params variable to fix incorrect behavior 2023-10-20 07:54:19 -03:00
Gabriel Luiz Freitas Almeida
51929df2b0 🐛 fix(service.py): remove redundant assignment to params variable
The redundant assignment to the params variable was removed to prevent overwriting the initial assignment.
2023-10-20 07:53:11 -03:00
Gabriel Luiz Freitas Almeida
4c6dc748a0 updates to colliding endpoints and search 2023-10-19 22:52:38 -03:00
Gabriel Luiz Freitas Almeida
09a1e332a5 update download method 2023-10-19 22:15:44 -03:00
Gabriel Luiz Freitas Almeida
54c2535b95 update schema for store endpoints 2023-10-19 22:14:45 -03:00
Gabriel Luiz Freitas Almeida
717334841f add guard in case api key is a str 2023-10-19 22:14:11 -03:00
Gabriel Luiz Freitas Almeida
062a709151 fix fields and likes count 2023-10-19 22:13:39 -03:00
Gabriel Luiz Freitas Almeida
a3bede0187 Add store schema 2023-10-19 22:12:49 -03:00
cristhianzl
405f74bef9 adding confirmation modal and save flow integratio 2023-10-19 21:27:29 -03:00
anovazzi1
79cdcaf19a fix(typesContext.tsx): update component type key to match newKey value for consistency and clarity 2023-10-19 20:09:14 -03:00
Gabriel Luiz Freitas Almeida
5aed852bb0 🔧 chore(service.py): add aggregation parameter to store service API call to retrieve count of likes for each component 2023-10-19 18:14:56 -03:00
Gabriel Luiz Freitas Almeida
242f741567 🔧 refactor(store.py): remove unused imports and variables to improve code readability and maintainability
🔒 chore(store.py): add dependency injection for store API key retrieval to improve code modularity and testability
🔒 chore(store.py): add error handling for missing store API key to provide better user feedback
🔒 chore(store.py): refactor create_component, read_component, and list_components to use store API key from dependency injection instead of user object
2023-10-19 18:14:56 -03:00
cristhianzl
91d0da573d Merge branch 'saveComponent' into feature/store 2023-10-19 18:08:52 -03:00
anovazzi1
38d668e5f3 fix(App.tsx): remove unused setErrorData and setLoading variables to improve code readability
feat(App.tsx): add support for successData, successOpen, and setSuccessOpen variables from alertContext to handle success alerts
feat(App.tsx): add support for fetchError variable from typesContext to handle fetch errors
fix(tabsContext.tsx): add setData variable to useContext to update data state
feat(tabsContext.tsx): add support for saving custom components to data state in typesContext
fix(typesContext.tsx): remove unused imports and commented code
feat(typesContext.tsx): add support for saveFlowToDatabase function to save flow to the database
fix(index.ts): add missing newline at the end of the file
2023-10-19 17:36:25 -03:00
Gabriel Luiz Freitas Almeida
cc6da7626e 🐛 fix(store.py): add validation to check if user has a store API key set before creating a component 2023-10-19 16:40:15 -03:00
Gabriel Luiz Freitas Almeida
ce955a82fe 🔨 refactor(store.py): change parameter name from 'component' to 'component_create' for clarity and consistency
🔨 refactor(store.py): change type annotation of 'component' parameter from 'Flow' to 'FlowCreate' to match the expected type
2023-10-19 16:34:19 -03:00
anovazzi1
609016139e feat(typesContext.tsx): add saveFlowStore function to API controller to save a new flow to the database
fix(typesContext.tsx): call saveFlowStore function to save the newly created flow component to the database
2023-10-19 16:31:52 -03:00
anovazzi1
2d3490c047 refactor(types): change isComponent property to is_component in FlowType and NodeType to follow naming convention
refactor(utils): change isComponent property to is_component in createFlowComponent function to match updated naming convention
2023-10-19 16:16:43 -03:00
anovazzi1
2963bbdf53 fix(typesContext.tsx): import createFlowComponent function from reactflowUtils to fix compilation error
fix(typesContext.tsx): update assignment of custom_components in data object to use correct property name
fix(typesContext.tsx): update assignment of custom_components in data object to use correct property value
fix(typesContext.tsx): update assignment of components in savedComponentsJSON to use createFlowComponent function
fix(typesContext.tsx): update setData function to use functional update to avoid stale state
fix(entities/index.ts): update type of components property in localStorageUserType to use FlowType
fix(flow/index.ts): update property name isNode to isComponent in FlowType
fix(reactflowUtils.ts): update property name isNode to isComponent in createFlowComponent function
2023-10-19 16:08:29 -03:00
Gabriel Luiz Freitas Almeida
2a25865340 🐛 fix(flow.py): make 'is_component' field nullable to allow for optional values 2023-10-19 16:05:54 -03:00
anovazzi1
b78f17f9b0 update package lock 2023-10-19 15:22:34 -03:00
anovazzi1
9c6930bd0f Merge remote-tracking branch 'origin/dev' into saveComponent 2023-10-19 15:17:12 -03:00
anovazzi1
3e8384eff9 update package json 2023-10-19 15:16:13 -03:00
anovazzi1
337f0f8794 fix(parameterComponent): update readonly condition to only check for data.node?.flow
fix(promptComponent): prevent update from prompt template after group node if prompt is wrongly marked as not dynamic
fix(EditNodeModal): update readonly condition to only check for myData.current.node?.flow
2023-10-19 15:02:32 -03:00
cristhianzl
7a96951fd1 fix(StoreApiKeyModal): close modal after successfully saving API Key to improve user experience 2023-10-19 14:43:40 -03:00
anovazzi1
5a5ed630ed
update har file getAll content (#1075) 2023-10-19 14:42:22 -03:00
anovazzi1
b0bbe39c89 update har file getAll content 2023-10-19 14:40:27 -03:00
cristhianzl
b9eefade27 Merge branch 'saveComponent' into feature/store 2023-10-19 14:29:49 -03:00
Gabriel Luiz Freitas Almeida
b19c75dc3c 🐛 fix(api_key.py): rename api_key parameter to api_key_request in save_store_api_key function for clarity and consistency 2023-10-19 14:28:48 -03:00
cristhianzl
4b09ced2ec Merge branch 'saveComponent' into feature/store 2023-10-19 14:15:46 -03:00
Gabriel Luiz Freitas Almeida
c5262f39f2 🔒 refactor(api_key.py): update encrypt_api_key function call to pass settings_service as a keyword argument for clarity and maintainability 2023-10-19 14:08:51 -03:00
cristhianzl
e7f6f63864 Merge branch 'saveComponent' into feature/store 2023-10-19 13:49:28 -03:00
Gabriel Luiz Freitas Almeida
68e5cb4cce Merge remote-tracking branch 'origin/main' into dev 2023-10-19 11:04:09 -03:00
Gabriel Luiz Freitas Almeida
218788d5df 🔧 chore(Makefile): exclude alembic directory from ruff linting to avoid unnecessary errors
🔧 chore(Makefile): add exclusion of alembic directory from ruff linting to improve linting process
2023-10-19 10:59:44 -03:00
Gabriel Luiz Freitas Almeida
f080c75d6a 🐛 fix(utils.py): add padding to SECRET_KEY before initializing Fernet to ensure it has the correct length 2023-10-19 10:57:52 -03:00
Gabriel Luiz Freitas Almeida
0286353695 🐛 fix(base.py): include vertex ID in error message to provide more context when building a node fails 2023-10-19 09:25:53 -03:00
cristhianzl
4397f88890 fix(StoreApiKeyModal/index.tsx): add error handling when saving API key and display success/error messages
feat(StoreApiKeyModal/index.tsx): add functionality to save API key using addApiKeyStore function
2023-10-19 00:24:06 -03:00
cristhianzl
e473570c5d Merge branch 'saveComponent' into feature/store 2023-10-19 00:02:21 -03:00
cristhianzl
2fbb68d6a6 fix(keyPairListComponent.spec.ts): fix typo in test case description
fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage
fix(keyPairListComponent.spec.ts): add assertion to check if input field value with spaces is correctly filled
fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage
fix(keyPairListComponent.spec.ts): update assertion to check if input field value with spaces is correctly filled
2023-10-18 23:58:09 -03:00
cristhianzl
64aea7f589 feat(API): add function to add an API key to the API key store
This commit adds a new function `addApiKeyStore` to the API controller. This function is used to add an API key to the API key store by making a POST request to the `/api_key/store` endpoint with the provided key. If the request is successful (status code 200), the function returns the response data. If there is an error, it is logged to the console and re-thrown.
2023-10-18 23:33:22 -03:00