🐛 fix(buildTrigger): handle error response from server when starting a build
The ProgressBarComponent import was removed as it was not being used. The error handling was improved to handle the case where the server returns an error response when starting a build. The error message is now displayed to the user and the build state is reset.
The buildTrigger component was updated to use progress state instead of myValue to better represent the progress of the building process. This change allowed us to make improvements in the way progress is tracked, which will improve the user experience.
- The radial progress now displays the percentage value correctly.
- In the build trigger, we now properly handle the end of a stream event and fixed an issue with the RadialProgressComponent when isBuilding is true.
This commit adds a value state to the RadialProgress component, replacing the progressContext previously used. It also removes the progressContext, as it is no longer needed.
✨ feat(chat.py): add progress logging to stream_build function
The variable node was renamed to vertex to improve semantics and consistency with the naming conventions. Progress logging was added to the stream_build function to provide feedback to the user on the progress of the build process.
🐛 fix(index.tsx): fix typo in setSuccessData function call
✨ feat(index.tsx): add success logging to handleBuild function
A typo in the setSuccessData function call was fixed. Success logging was added to the handleBuild function to provide feedback to the user on the success of the build process.
The `getPythonCode` function now accepts a `tweaks` parameter which is used to customize the behavior of the flow. The `buildTweaks` function is called to generate the `tweaks` object which is then passed to the `load_flow_from_json` function. This allows for more flexibility in the usage of the flow.
The prepare-commit-msg git hook was removed from the frontend directory. This hook was not being used and was not necessary for the project's development workflow.
The prepare-commit-msg git hook was removed from the frontend directory. This hook was not being used and was not necessary for the project's development workflow.
The changes in headerComponent remove unused imports and update the header text to use a constant instead of a hardcoded string. The constant is added in constants.tsx. The MainPage component is updated to use the constant for the header text in the user projects section. This improves code readability and maintainability.
🎨 style(headerComponent): remove unused imports and update header text to use constant
✨ feat(constants.tsx): add constant for header text in user projects section
The keys in the types object were reversed to avoid overlap with the tool world. This was done by modifying the reduce function in the TypesProvider component.
Update the search placeholder to be more general, from 'Search Nodes' to 'Search', in the extra sidebar component, and update the collection description from 'Download or upload your complete project collection' to 'Download or upload your collection' in the main page.
The API URL path was incorrectly spelled as "/ap1/v1/predict" instead of "/api/v1/predict". This commit fixes the typo to ensure that the correct API endpoint is used.
Changed the error message in the build trigger component to clarify which components need to be checked before retrying. Updated the list to include instructions on how to inspect the component status.
refactor(App.tsx): remove redundant code that initializes the version state variable and fetches the version number from the API in FlowPage component instead
The menu bar has been refactored to improve readability and make it easier to add new options in the future. A new option has been added to create a new flow. The "Edit" label has been changed to "Options" to better reflect the purpose of the dropdown menu.
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.
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.
🐛 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
- 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.
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.
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.