Commit graph

7,390 commits

Author SHA1 Message Date
Lucas Oliveira
cc776b3196 Implemented Zustand Alert and changed all the usages 2024-01-05 13:14:00 -03:00
Lucas Oliveira
df12f33e86 Removed useEffects from flowsContext 2024-01-05 12:41:45 -03:00
Lucas Oliveira
a75d70b49c Fixed typing and naming of zustand functions 2024-01-05 12:17:52 -03:00
Lucas Oliveira
0dad0eb540 changed useDark to selector instead of destructuring 2024-01-05 11:55:37 -03:00
Lucas Oliveira
503e7766ba changed useFlow declaration from destructuring to selector to improve performance 2024-01-05 11:49:07 -03:00
cristhianzl
68e5454b11 feat(headerComponent): add support for storeStore in headerComponent to manage store state
refactor(headerComponent): refactor useDarkStore calls in headerComponent to improve readability and maintainability
2024-01-05 11:44:00 -03:00
cristhianzl
97d7f330ea refactor(extraSidebarComponent): remove unused context variable and import to improve code readability and maintainability 2024-01-05 11:41:47 -03:00
cristhianzl
538c7e01e9 refactor(extraSidebarComponent): refactor useContext hooks to destructure FlowsContext and typesContext for better readability
refactor(nodeToolbarComponent): refactor useContext hooks to destructure useStoreStore for better readability
2024-01-05 11:41:40 -03:00
cristhianzl
34592f87e8 merge 2024-01-05 11:38:33 -03:00
Lucas Oliveira
3d720f7f79 Fixed flowsContext to work using useFlow zustand, removed unused functions 2024-01-05 11:31:40 -03:00
Lucas Oliveira
75326cad27 Changed every flowsContext to useFlow 2024-01-05 11:20:02 -03:00
Lucas Oliveira
0bc74b5251 Formatting changes 2024-01-05 10:43:31 -03:00
Lucas Oliveira
df8912055d Implemented Zustand State of flow manager 2024-01-05 10:38:33 -03:00
Lucas Oliveira
17fd965231 Changed way of declaring Zustand functions 2024-01-05 09:47:11 -03:00
anovazzi1
ca7193476d chore(flowManagerStore.ts): add isPending property to RFState to track pending state
chore(tabs/index.ts): keep existing properties and functions in FlowsContextType for future use
2024-01-04 18:51:32 -03:00
anovazzi1
c61c67cc7c fix(App.tsx): remove unused useContext import and hardReset function call
refactor(App.tsx): remove hardReset function call and add comment indicating any reset function
refactor(flowsContext.tsx): remove hardReset function and update comment for tabId property
refactor(flowsContext.tsx): remove hardReset function from useEffect hook
refactor(flowsContext.tsx): remove hardReset function and update comment for hardReset function
refactor(flowManagerStore.ts): add nodeId property and incrementNodeId function
refactor(tabs/index.ts): remove hardReset function from FlowsContextType
2024-01-04 18:29:35 -03:00
anovazzi1
aa44a70a02 feat(flowManagerStore.ts): add paste function to allow pasting copied nodes and edges at a specified position
feat(flowManagerStore.ts): add lastCopiedSelection object to store the last copied nodes and edges for pasting
2024-01-04 16:36:46 -03:00
anovazzi1
c32a7f9f11 Fix formatting and remove unused imports 2024-01-04 15:58:29 -03:00
anovazzi1
fb52f1368e feat(flowManagerStore.ts): add flowManagerStore to manage nodes and edges in reactflow
The flowManagerStore.ts file is added to the src/frontend/src/stores directory. This file contains the implementation of a custom store called RFState, which manages the state of nodes and edges in a reactflow component. The store provides various functions and callbacks to manipulate and update the nodes and edges.

The RFState interface defines the structure of the store, including the nodes and edges arrays, as well as callbacks for handling changes to nodes and edges.

The useStore hook is created using the create function from the zustand library. It initializes the store with an empty nodes and edges array, and defines callbacks for handling changes to nodes, edges, and connections.

The setEdges and setNodes functions are used to update the nodes and edges arrays in the store.

The deleteNode function removes a node from the nodes array and any associated edges from the edges array.

The deleteEdge function removes an edge from the edges array.

This store can be used in components to access and manipulate the nodes and edges in a reactflow component.
2024-01-04 15:22:53 -03:00
cristhianzl
851caf42b7 fix(storeStore.tsx): fix incorrect order of arguments in updateHasApiKey function
fix(storeStore.tsx): fix incorrect order of arguments in updateLoadingApiKey function
2024-01-04 15:03:34 -03:00
cristhianzl
1284329c16 fix(modals): update state variables after saving API key to reflect the correct values
fix(pages): update state variables after fetching API data to reflect the correct values
2024-01-04 14:51:00 -03:00
cristhianzl
c032a9c003 fix(cardComponent): remove unused import and update import for useStoreStore
fix(headerComponent): remove unused import and update import for useStoreStore
fix(storeGuard): remove unused import and update import for useStoreStore
fix(index): remove unused import and update import for useStoreStore
fix(StoreApiKeyModal): remove unused import and update import for useStoreStore
fix(shareModal): remove unused import and update import for useStoreStore
fix(extraSidebarComponent): remove unused import and update import for useStoreStore
fix(nodeToolbarComponent): remove unused import and update import for useStoreStore
fix(index): remove unused import and update import for useStoreStore
fix(FlowPage): remove unused import and update import for useStoreStore
fix(darkStore): create store for dark mode and update import for useStoreStore
fix(storeStore): create store for store context and update import for useStoreStore
2024-01-04 11:48:10 -03:00
cristhianzl
beb0223605 chore(package.json): add zustand package as a dependency to the frontend package.json file
fix(codeTabsComponent): remove unused imports and update import for FlowsContext

fix(headerComponent): remove unused imports and update import for FlowsContext, useDarkStore, and remove darkContext

fix(tagsSelectorComponent): remove unused import and update import for useDarkStore

refactor(darkStore): move darkContext functionality to a separate zustand store called darkStore

refactor(index.tsx): remove import for darkContext and DarkProvider

fix(codeAreaModal): remove unused imports and update import for useDarkStore

feat(darkStore): add zustand store for managing dark mode state, stars count, and gradient index

feat(darkStore): fetch and set stars count from API in darkStore

feat(darkStore): generate and set random gradient index in darkStore

feat(darkStore): add updateDark, updateStars, and updateGradientIndex actions to darkStore

feat(darkStore): initialize dark mode state, stars count, and gradient index in darkStore

feat(darkStore): fetch and set stars count from API in darkStore

feat(darkStore): generate and set random gradient index in darkStore

feat(darkStore): add updateDark, updateStars, and updateGradientIndex actions to darkStore

feat(darkStore): initialize dark mode state, stars count, and gradient index in darkStore
2024-01-04 11:17:09 -03:00
Lucas Oliveira
f533ab43f9 Added debouncing on node and edge change to not make unnecessary saveFlows. 2023-12-31 12:46:04 -03:00
Lucas Oliveira
20f0e758a4 Fixed Flow Settings Modal not updating when re-entering 2023-12-31 12:36:27 -03:00
Lucas Oliveira
faa9de996f made flowSaving silent 2023-12-31 12:25:46 -03:00
Lucas Oliveira
e6e5a3cac5 Fixed copy paste only copying one node 2023-12-31 12:19:05 -03:00
Lucas Oliveira
c28817ed3b Fixed multiple set pending on move making it lag 2023-12-31 12:11:43 -03:00
Lucas Oliveira
081b6a63be Fixed initial onChange on all components 2023-12-31 12:10:24 -03:00
Lucas Oliveira
1ec50a2f27 Fixed infinite saving when input was connected 2023-12-31 12:07:07 -03:00
Lucas Oliveira
13e3d6fc19 removed unused updateNodeInternals 2023-12-31 11:59:51 -03:00
Lucas Oliveira
85979b8d37 Fixed name, description and showNode to use the interceptor function 2023-12-31 11:53:12 -03:00
Lucas Oliveira
8728e4a0ea removed dataRef 2023-12-30 21:10:05 -03:00
Lucas Oliveira
3241c795ad Fixed types of tabsState 2023-12-30 21:02:13 -03:00
Lucas Oliveira
f6bd5a4e4a Removed all reactFlowInstance nodes and edges settings. Centralized flow saving. 2023-12-30 20:50:51 -03:00
Lucas Oliveira
6e2673e1d5 Fix handleNodeClass and handleOnNewValue to use interceptor saving, added cleanEdges on interceptor 2023-12-30 19:31:13 -03:00
Lucas Oliveira
319e70863a Fixed isValidConnection 2023-12-30 17:54:31 -03:00
Lucas Oliveira
5c1c613c76 Removed reactFlowInstance and changed to the interceptor function, validate connection not working 2023-12-29 23:21:53 -03:00
Gabriel Luiz Freitas Almeida
d9fe8c838d Refactor ChatOllamaEndpoint.py 2023-12-29 11:00:34 -03:00
Gabriel Luiz Freitas Almeida
82a33ec7b6
add ChatOllama LLM (#1235)
This is a draft of a custom component to access the Ollama API endpoint.
2023-12-29 10:57:22 -03:00
Gabriel Luiz Freitas Almeida
5e0d30a7f6
Adding Vectara Self Query Retriever - feature request (#1249)
### Pull Request for Issue #1246 

**Description**,
This pull request addresses issue #1246, which proposes the addition of
a self-query retriever according to the LangChain Vectara integration.
The self-query retriever aims to empower users with the ability to
perform queries directly within the Vectara component(vector store).

**Changes Made**
I have added one more file under
`src\backend\langflow\components\retrievers` which contains a new
VectaraSelfQueryRetriverComponent class

**Files Added:** VectaraSelfQueryRetriever.py

**langchain documentation for this component:**

https://python.langchain.com/docs/integrations/retrievers/self_query/vectara_self_query
2023-12-29 10:56:18 -03:00
Gabriel Luiz Freitas Almeida
4c599cbc49
Merge branch 'main' into dev 2023-12-29 10:54:53 -03:00
Gabriel Luiz Freitas Almeida
c1c2b8ffc3 Update version number in pyproject.toml 2023-12-29 10:51:09 -03:00
Gabriel Luiz Freitas Almeida
b66a051a7e
Update .dockerignore file and add QEMU, Docker Buildx, and Docker Hub integration (#1267)
This pull request includes the following changes:

- Update .dockerignore file

- Add QEMU, Docker Buildx, and Docker Hub integration
2023-12-29 10:50:20 -03:00
Gabriel Luiz Freitas Almeida
41a7911f05 Add QEMU, Docker Buildx, and Docker Hub integration 2023-12-29 10:49:40 -03:00
Gabriel Luiz Freitas Almeida
b9fea47dd1 Update .dockerignore file 2023-12-29 10:46:39 -03:00
Gabriel Luiz Freitas Almeida
75390ebe15
Update bcrypt version to 4.0.1 and add .dockerignore entries for node_modules and dist directories (#1266)
This pull request updates the bcrypt version to 4.0.1 and adds .dockerignore entries for the node_modules and dist directories.
2023-12-29 09:49:57 -03:00
Gabriel Luiz Freitas Almeida
7e28707a23 Add .dockerignore entries for node_modules and dist directories 2023-12-29 09:45:09 -03:00
Gabriel Luiz Freitas Almeida
74a8954eb0 Update bcrypt version to 4.0.1 2023-12-29 09:45:03 -03:00
Gabriel Luiz Freitas Almeida
002adc3910
Add Dockerfile for building and pushing the application image (#1265)
This pull request adds a Dockerfile for building and pushing the application image. The Dockerfile includes the necessary steps to set up the environment, install dependencies, and run the application.
2023-12-29 09:38:42 -03:00