The build_template function is now outside of the DocumentLoaderFrontNode class to improve code organization and make it more modular. This change also makes it easier to reuse the function in other parts of the codebase.
The changes add a margin to the right of the icon in the menu bar and node toolbar components. This improves the spacing between the icon and the text. The dark:text-gray-300 class is added to ensure that the icon is visible in both light and dark mode.
The constant EDIT_DIALOG_SUBTITLE was not being used, so it was removed. The node description is now being used instead of the constant for the dialog subtitle, which makes the code more dynamic and easier to maintain.
🔥 refactor(EditNodeModal): remove unused constant
💄 style(frontend): improve readability by capitalizing the button text in EditNodeModal and changing the placeholder text in ExtraSidebar search bar to improve consistency with the rest of the application.
The heroicons package was replaced with lucide-react icons to improve consistency with the rest of the application. The icons were replaced with the following lucide-react icons: Settings2, Copy, and Trash2.
🚀 feat(tabsContext.tsx): add save function to save the current state of the flows to local storage
The save function was added to TabsContextInitialValue to provide a default value for the save function. The save function was added to save the current state of the flows to local storage. The function uses lodash's cloneDeep to avoid mutating the original object. It also looks for file fields to prevent saving the content and breaking the flow for exceeding the data limit for local storage. The function then saves the tabId, flows, and id to local storage.
🎨 style(PageComponent): add lowercase type prefix to the generated node id
The 'ID:' prefix was added to the node id badge in EditNodeModal to improve readability and semantics. In PageComponent, a lowercase prefix was added to the generated node id to improve consistency with the naming conventions.
The wildcard in the url property was causing issues with debugging the frontend. Removing the wildcard ensures that the debugger is attached to the correct URL.
🔨 refactor(ExtraSidebarComponent): remove Separator component
The PageComponent now generates new node IDs with a prefix that matches the type of the node. This improves the readability of the IDs and makes it easier to identify the type of node by looking at its ID. The ExtraSidebarComponent no longer uses the Separator component, as it is no longer needed.
🔨 refactor(frontend): update import paths for EditFlowSettingsComponent
🔨 refactor(frontend): remove unused id property from createNewFlow function in tabsContext
🔨 refactor(frontend): replace nameInputComponent with EditFlowSettingsComponent in exportModal and flowSettingsModal
The nameInputComponent has been renamed to EditFlowSettingsComponent to better reflect its purpose. The import paths have been updated accordingly. The id property is no longer needed in the createNewFlow function in tabsContext, so it has been removed. The exportModal and flowSettingsModal components have been updated to use the new EditFlowSettingsComponent instead of the old nameInputComponent.
This commit adds a new component called EditFlowSettingsComponent which allows the user to edit the name and description of a flow. The component receives the current name and description of the flow, the maximum length of the name, an array of all flows, the id of the current flow, and three functions to update the name, description, and flow. The component renders two input fields, one for the name and one for the description, and updates the flow and name when the user types in the input fields. The name input field has a character limit of maxLength and displays an error message when the limit is reached.
The commit removes unused imports and variables from the utils.ts file. This improves the code's readability and maintainability by removing unnecessary code.
The /health route is added to the apiRoutes array to allow the frontend to check the health of the backend server. This is useful for monitoring and debugging purposes.
The API endpoints have been updated to include a version number to improve the maintainability of the codebase. The version number is now included in the URL path for both the Python API and the curl code. This change allows for future updates to the API without breaking existing code that relies on the previous version.
✨ feat(nameInputComponent.tsx): add character limit to name input field
The name and description input fields in the ExportModal and FlowSettingsModal components have been refactored into a reusable component called EditFlowSettings. This improves code reusability and reduces code duplication. The EditFlowSettings component also includes a character limit of 50 characters for the name input field to prevent users from entering names that are too long.
The EditFlowSettings component is a form that allows the user to edit the name and description of a flow. It receives the current name and description as props, as well as a list of flows, the current tab ID, and functions to update the name, description, and flow. The component also includes a character limit for the name input and displays an error message if the limit is reached.
Added new OpenAI chat models to the CHAT_OPENAI_MODELS list to improve the quality of the chatbot responses. The new models are "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k-0613", "gpt-4-0613", and "gpt-4-32k-0613". The existing models "gpt-3.5-turbo" and "gpt-4-32k" were also updated to their latest versions.
The langchain and openai dependencies have been updated to versions 0.0.200 and 0.27.8 respectively. This update is necessary to ensure that the application is using the latest versions of these libraries and to take advantage of any bug fixes or new features that have been added.
The changes in this commit include removing unused imports and formatting the code to improve readability. The handleSaveFlow function was added to save flow changes to the database and display a success message. This function is called when the user clicks the save button.
🎨 style(flowSettingsModal): remove unused imports and format code
The imports for XMarkIcon and FaEraser were removed as they were not being used. The lodash set function was also removed as it was not being used. The getWebSocketUrl function was extracted from the connectWS function to improve readability and maintainability.
🔨 refactor(vite.config): remove unused routes and commented code, remove rewrite function
The menuBar component had some unused imports and code that was removed. A missing semicolon was added to the code. The vite.config file had some unused routes and commented code that was removed. The rewrite function was also removed as it was not needed.
✨ feat(App.tsx): simplify getVersion() function call
The imports and components that are no longer used have been removed to improve the code's readability and maintainability. The getVersion() function call has been simplified to make the code more concise and easier to read.
All API endpoints now have the /api/v1 prefix to improve the semantics of the API and to make it easier to distinguish between the frontend and backend routes.
The import statements for unused components and contexts have been removed to improve code readability and maintainability. The unused variables have also been removed to reduce clutter and improve code quality.
The status codes have been added to the API endpoints to improve the readability of the code and to make it more explicit what the expected response codes are. The status codes have been added to the following endpoints: create_flow, read_flows, read_flow, update_flow, delete_flow, create_flows, upload_file, and download_file.