Commit graph

4,997 commits

Author SHA1 Message Date
anovazzi1
cb5b58b7e4 update remove api key function 2023-06-16 15:54:25 -03:00
Gabriel Luiz Freitas Almeida
93d1c10888 🎨 style(index.css): reformat CSS file to improve readability and consistency
The CSS file has been reformatted to improve readability and consistency. The changes include indentation, whitespace, and line breaks. No functional changes have been made to the code.
2023-06-16 14:01:31 -03:00
Igor Carvalho
af14c843d3 Add MainPage style constants 2023-06-16 13:46:25 -03:00
Lucas Oliveira
2093a23547 Git button redirecting to new tab 2023-06-16 13:37:17 -03:00
anovazzi1
6abe1e6ba9 fix(alertContext.tsx): prevent empty titles from being added to notification center in setErrorData, setNoticeData and setSuccessData functions 2023-06-16 13:11:55 -03:00
anovazzi1
b47f6aa326 refactor(frontend): add isBuilding state to SSEContext and use it in GenericNode and BuildTrigger components
The isBuilding state was added to the SSEContext to keep track of whether a build is currently in progress. This state was then used in the GenericNode and BuildTrigger components to conditionally render certain elements based on whether a build is in progress or not.
2023-06-16 13:03:38 -03:00
Gabriel Luiz Freitas Almeida
568813f9da feat(tabsContext.tsx): add functions to generate random names and descriptions for new flows
🐛 fix(utils.ts): fix import statement for ADJECTIVES, DESCRIPTIONS, and NOUNS constants
The constants.tsx file now contains arrays of adjectives, nouns, and descriptions that can be used to generate random names and descriptions for new flows. The tabsContext.tsx file now has functions that use these arrays to generate random names and descriptions for new flows. The utils.ts file has been updated to fix the import statement for the ADJECTIVES, DESCRIPTIONS, and NOUNS constants.
 feat(constants.tsx): add arrays of adjectives, nouns, and descriptions for generating random names and descriptions
2023-06-16 09:38:11 -03:00
Lucas Oliveira
1ecc1247e7 Fixed bug where we cannot move the nodes, removed unused console.logs 2023-06-16 08:37:16 -03:00
Rodrigo Nader
e34587703b Improve chat and build trigger buttons color and shadows
- The code changes consist of modifying the CSS classes of the chat and build trigger buttons, adjusting the hover effects, shadows and icon colors to make them more visually appealing.
2023-06-16 01:43:40 -03:00
Igor Carvalho
6aa7702cbc Add new random gradient colors 2023-06-16 01:01:13 -03:00
Cristhian Zanforlin Lousa
7a6472f103 Merge branch 'db' of https://github.com/logspace-ai/langflow into db 2023-06-15 21:37:27 -03:00
Cristhian Zanforlin Lousa
f61d76cfac rollback position of icons 2023-06-15 21:37:24 -03:00
Gabriel Luiz Freitas Almeida
eede3ac0e6 ♻️ refactor(index.ts): remove unused imports from index.ts
The imports for ForwardRefExoticComponent, ReactElement, ReactFragment, ReactNode, and SVGProps were not being used in the file, so they were removed to improve code readability and maintainability.
2023-06-15 20:48:45 -03:00
Cristhian Zanforlin Lousa
1b0c173f39 Merge branch 'db' of https://github.com/logspace-ai/langflow into db 2023-06-15 19:38:16 -03:00
Cristhian Zanforlin Lousa
1af91d7ac0 Changing icons position and layout 2023-06-15 19:38:12 -03:00
Gabriel Luiz Freitas Almeida
dc8d2362fc Merge branch 'db' of https://github.com/logspace-ai/langflow into db 2023-06-15 18:17:18 -03:00
Gabriel Luiz Freitas Almeida
9909416694 📝 docs(constants.tsx): add documentation for TWEAKS constant
The TWEAKS constant is a dictionary that can be used to tweak the flow. It is an optional parameter that can be passed to the run_flow function. The dictionary should be in the format {"OpenAI-XXXXX": {"model_name": "gpt-4"}}. This commit adds documentation to the code to make it easier for developers to understand how to use the TWEAKS constant.
2023-06-15 18:14:23 -03:00
anovazzi1
3d2632aa5f refactor(PageComponent): refactor setTabsState calls to use tabId instead of flow.id to improve semantics and avoid bugs 2023-06-15 18:12:55 -03:00
anovazzi1
bb3fde016d Merge branch 'db' of personal:logspace-ai/langflow into db 2023-06-15 18:03:46 -03:00
anovazzi1
8d6149a124 refactor(PageComponent): add support for setting tabsState.isPending to true when nodes or edges change to indicate that the flow is being edited
feat(PageComponent): import NodeChange from reactflow and add onNodesChangeMod function to handle nodes change and set tabsState.isPending to true
2023-06-15 18:03:28 -03:00
Rodrigo Nader
4f3ea874a5 Refactor build trigger in Chat Component
This commit changes the styling of the build trigger button in the Chat Component. The button is now round and has a shadow when hovering. Additionally, the lightning bolt icon is now colored with a gradient rather than a solid color.
2023-06-15 17:50:48 -03:00
anovazzi1
64b0ffcde5 feat(frontend): add flow name and description editing functionality to FlowSettingsModal component
fix(frontend): fix saveFlow function call to save edited flow name and description instead of the original flow object
2023-06-15 17:47:24 -03:00
anovazzi1
e22062bba5 feat(PageComponent): add useEffect hook to save flow when component unmounts if flow is pending
The useEffect hook was added to the PageComponent to save the flow when the component unmounts if the flow is pending. This is done to ensure that any changes made to the flow are saved before the component is unmounted. The tabsState and saveFlow functions were also added as dependencies to the hook.
2023-06-15 17:12:33 -03:00
anovazzi1
af5f42bf2e Merge branch 'db' of personal:logspace-ai/langflow into db 2023-06-15 16:59:28 -03:00
anovazzi1
c94ae3b6bc feat(tabsContext.tsx): add saveFlow function to save flow changes to database and update state
feat(flowSettingsModal/index.tsx): use saveFlow function from TabsContext to save flow changes to database and update state
feat(extraSidebarComponent/index.tsx): use saveFlow function from TabsContext to save flow changes to database and update state
feat(tabs/index.ts): add saveFlow function to TabsContextType to update type definition
2023-06-15 16:59:17 -03:00
Gabriel Luiz Freitas Almeida
549a544939 feat(ApiModal): add onValueChange prop to Tabs component to update activeTab state
The activeTab state was previously a number, but it was causing a type error when passed as a prop to the TabsTrigger component. Changing it to a string fixed the issue. Additionally, the onValueChange prop was added to the Tabs component to update the activeTab state when a new tab is selected.
🐛 fix(ApiModal): change activeTab state from number to string to fix type error
2023-06-15 16:49:14 -03:00
Lucas Oliveira
9b3e835a5b Merge branch 'db' of github.com:logspace-ai/langflow into db 2023-06-15 16:12:53 -03:00
Lucas Oliveira
10fdae4c89 changed buttin colors and modal background 2023-06-15 16:12:51 -03:00
anovazzi1
3653f5eefc feat(chatModal): add getWebSocketUrl function to generate WebSocket URL based on chatId and environment
This commit adds a new function called getWebSocketUrl to the ChatModal component. This function generates a WebSocket URL based on the chatId and environment. It determines whether to use the "ws" or "wss" protocol based on whether the current protocol is secure or not. It also determines the host based on whether the environment is development or production. This function will be used to establish a WebSocket connection to the server.
2023-06-15 15:53:56 -03:00
anovazzi1
9c9838927a Merge branch 'db' of personal:logspace-ai/langflow into db 2023-06-15 15:46:59 -03:00
anovazzi1
a62d50a011 feat: Add error message for invalid nodes in BuildTrigger 2023-06-15 15:46:53 -03:00
Lucas Oliveira
f4dcc5da5c Merge branch 'db' of github.com:logspace-ai/langflow into db 2023-06-15 15:45:08 -03:00
Lucas Oliveira
8d72cad17c deleted unused gradients 2023-06-15 15:45:06 -03:00
anovazzi1
2811bc57c4 Merge branch 'db' of personal:logspace-ai/langflow into db 2023-06-15 15:36:22 -03:00
anovazzi1
312766a598 redirect to home page on wrong url 2023-06-15 15:36:10 -03:00
Lucas Oliveira
d72f24a859 Merge branch 'db' of github.com:logspace-ai/langflow into db 2023-06-15 15:33:25 -03:00
Lucas Oliveira
ef00bdea14 Fixed flow name on MenuBar 2023-06-15 15:33:22 -03:00
Gabriel Luiz Freitas Almeida
d3d7392104 🐛 fix(extraSidebarComponent): fix Save button color when isPending is true
The Save button was not being displayed correctly when the isPending variable was true. The fix changes the order of the classes to correctly display the button as intended.
2023-06-15 15:33:12 -03:00
Gabriel Luiz Freitas Almeida
7d897929b3 Merge branch 'db' of https://github.com/logspace-ai/langflow into db 2023-06-15 15:31:43 -03:00
Gabriel Luiz Freitas Almeida
f21bc80359 🔨 refactor(buildTrigger): remove unused state variable 'valid' and simplify streamNodeData function
The 'valid' state variable was not being used, so it was removed. The 'streamNodeData' function was simplified by removing the 'onStreamComplete' callback and instead using a while loop to wait for the stream to finish. The function now returns a boolean indicating whether all nodes in the flow are valid or not.
2023-06-15 15:30:51 -03:00
Lucas Oliveira
6275f904bc Merge branch 'db' of github.com:logspace-ai/langflow into db 2023-06-15 15:24:45 -03:00
Lucas Oliveira
82b5b450bc Changed code modal 2023-06-15 15:24:42 -03:00
Gabriel Luiz Freitas Almeida
cb7c8b45cd 🔨 refactor(API): add type to updateFlowInDatabase function and format code
The updateFlowInDatabase function now has a type added to it, which improves the readability of the code. The code has also been formatted to improve consistency with the rest of the codebase.
2023-06-15 15:08:39 -03:00
Gabriel Luiz Freitas Almeida
03076b3577 🔨 refactor(flows.py): change response model of update_flow endpoint to FlowRead
🔨 refactor(parameterComponent): remove unused imports and refactor onChange function to handleOnNewValue
 feat(tabsContext): add tabsState and setTabsState to TabsContextType and TabsProvider
🔨 refactor(flowSettingsModal): refactor handleSaveFlow function to update flow and setTabsState with isPending false
The update_flow endpoint now returns a FlowRead response model instead of FlowReadWithStyle. The parameterComponent file has been refactored to remove unused imports and to use a handleOnNewValue function to handle onChange events. The TabsContextType and TabsProvider have been updated to include tabsState and setTabsState. The flowSettingsModal has been refactored to update the flow and setTabsState with isPending false.

🔨 refactor(extraSidebarComponent): add tabsState and setTabsState to TabsContextType
🐛 fix(extraSidebarComponent): disable save button when flow is not pending
🐛 fix(extraSidebarComponent): update flow state after saving
The TabsContextType now includes tabsState and setTabsState to allow for the management of the state of each tab. The save button is now disabled when the flow is not pending. The flow state is now updated after saving to reflect the changes made.
2023-06-15 15:08:37 -03:00
Gabriel Luiz Freitas Almeida
499d5238e3 🔥 refactor(chatModal): remove unused function getWebSocketUrl
The function getWebSocketUrl was not being used in the code and was therefore removed to improve code readability and maintainability.
2023-06-15 15:08:36 -03:00
Lucas Oliveira
78a0ed60e9 changed button color 2023-06-15 14:54:12 -03:00
Lucas Oliveira
3e4bfc99b8 deleted function and changed button color 2023-06-15 14:52:26 -03:00
Lucas Oliveira
ded204efc9 Merge branch 'db' of github.com:logspace-ai/langflow into db 2023-06-15 14:43:04 -03:00
Lucas Oliveira
a74f026dad Fixed New Project not redireting on MenuBar 2023-06-15 14:43:01 -03:00
Gabriel Luiz Freitas Almeida
40a61649df feat(chatComponent): add state to track if all nodes are valid during build trigger
The build trigger component now tracks if all nodes are valid during the build process. This is done by adding a state variable called `valid` which is set to true by default. If any node is invalid, the `valid` state is set to false. This ensures that the error message is displayed when there are invalid nodes. The `streamNodeData` function now takes a callback function `onStreamComplete` which is called when the SSE stream is complete. This callback function is used to set the `isBuilt` state variable.
🐛 fix(chatComponent): fix bug where build trigger would not show error message when nodes are invalid
2023-06-15 14:32:08 -03:00