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.
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.
🔨 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.
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
✨ feat(buildTrigger): add error handling to build request
Previously, multiple build requests could be sent simultaneously, which could cause issues. The fix prevents multiple requests from being sent at the same time. Additionally, error handling has been added to the build request to catch any errors that may occur.
The description of CombineDocsChainNode was updated to reflect the actual functionality of the node. The node is now used to load a question answering chain instead of constructing a chain from combined documents.
The console.log statement in the Chat component has been removed as it is no longer needed. Unused imports have also been removed from the BuildTrigger and Chat components to improve code readability and maintainability.
🐛 fix(frontend): add missing semicolon in EditFlowSettingsComponent
The package.json and postcss.config.js files were updated to improve formatting and update dependencies. The EditFlowSettingsComponent had a missing semicolon which was added.
🔧 chore: fix formatting issues in multiple files
The changes in this commit are purely cosmetic and do not affect the functionality of the application. The changes include fixing formatting issues such as indentation, whitespace, and semicolons in multiple files. These changes improve the readability and maintainability of the codebase.
The openai_api_version field value is no longer set as it is not needed. The password field is now set to False for fields not containing 'key' or 'token' in their name to improve security.
🐛 fix(llms.py): remove setting of openai_api_version field value
🔧 chore(base.py): fix typo in docstring
The fix in chat.py ensures that an error message is yielded when an exception occurs during stream_build. This helps to provide more information to the client-side when an error occurs. The typo in base.py's docstring is fixed to improve readability.
✨ feat(API): add postBuildInit function to post the build init of a flow
The postBuildInit function has been added to post the build init of a flow. The function takes in a flow object and returns a promise that resolves to an AxiosResponse containing the build status. Documentation has been added to the function to improve code readability and maintainability.
The SSEProvider is added to the ContextWrapper to provide a context for the Server-Sent Events (SSE) functionality. This allows the frontend to receive real-time updates from the server without the need for constant polling.
- Rename `VectorStoreAgent` to `Vector store agent` in `custom.py`
- Replace "Construct a sql agent from an LLM and tools." with "Construct an SQL agent from an LLM and tools." in `custom.py`
- Update descriptions of `SQLAgentNode`, `TimeTravelGuideChainNode`, `CombineDocsChainNode`, and `ToolNode` in related files
- Increase width of `ExtraSidebarComponent` container in `index.tsx` from 52 to 56
The code changes update the frontend index.css and cardComponent/index.tsx files. 'bg-colors', 'gradients', and CSS variables have been modified, including the addittion of copilot generated gradients for optimization. The 'utils.ts' file has also been updated.
✨ feat(constants.tsx): add support for tweaks in getPythonApiCode and getCurlCode functions
🎨 style(ApiModal/index.tsx): remove unused imports and components
🎨 style(PageComponent/index.tsx): change node type id format to include the type name in uppercase
✨ feat(utils.ts): add buildTweaks function to create an empty tweaks object for each node
The node type id format is now changed to include the type name in uppercase, which improves consistency with the naming conventions. Support for tweaks is added to the getPythonApiCode and getCurlCode functions, which allows the API to apply tweaks to the flow. Unused imports and components are removed from the ApiModal component. The buildTweaks function is added to create an empty tweaks object for each node.