✨ feat(load_custom_component_from_file.py): add functionality to compress and decompress code, validate code syntax, validate build function presence, read file content, get list of .py files in a directory, find menu by name in response, process file by validating content and returning result and content/error message, and build component menu list from .py files in a directory
✨ feat(codeAreaModal/index.tsx): refactor handleClick function to call processCode function instead of directly calling postValidateCode function
✨ feat(codeAreaModal/index.tsx): add support for processing non-dynamic fields by calling postValidateCode function and updating success and error data accordingly
✨ feat(codeAreaModal/index.tsx): add support for processing dynamic fields by calling postCustomComponent function and updating nodeClass and error data accordingly
✨ feat(util.py): add sync_to_async decorator to convert sync functions to async functions for better performance and compatibility
🐛 fix(util.py): fix formatting of dictionary by removing certain keys and modifying the values of other keys to improve consistency and clarity
🐛 fix(util.py): fix update_verbose function to recursively update the value of the 'verbose' key in a dictionary
🐛 fix(util.py): fix update_verbose function to correctly handle nested dictionaries
🐛 fix(util.py): fix update_verbose function to correctly handle non-dictionary values
🐛 fix(util.py): fix format_dict function to correctly handle the 'type' value when it is a type object
🐛 fix(util.py): fix format_dict function to correctly handle the 'type' value when it is a list type
🐛 fix(util.py): fix format_dict function to correctly handle the 'type' value when it is a Mapping type
🐛 fix(util.py): fix format_dict function to correctly handle the 'type' value when it is a dict type
🐛 fix(util.py): fix format_dict function to correctly handle the 'type' value when it is a Tool type
🐛 fix(util.py): fix format_dict function to correctly handle the 'type' value when it is an int type
🐛 fix(util.py): fix format_dict function to correctly handle the 'show' value based on field requirements and naming conventions
🐛 fix(util.py): fix format_dict function to correctly handle the 'password' value based on field naming conventions
🐛 fix(util.py): fix format_dict function to correctly handle the 'multiline' value based on field naming conventions
🐛 fix(util.py): fix format_dict function to correctly handle the 'type' value when it is a dict type for the 'dict_' key
🐛 fix(util.py): fix format_dict function to correctly handle the 'value' field when it is a default value
🐛 fix(util.py): fix format_dict function to correctly handle the 'value' field for the 'headers' key
🐛 fix(util.py): fix format_dict function to correctly handle the 'options' field for specific class and key combinations
🔧 fix(index.tsx): remove unused imports to clean up code
🔧 fix(utils.ts): add space before opening parenthesis to improve code style
🔧 fix(test_custom_component.py): add line breaks to improve readability of test cases
The following changes were made:
- Removed the `custom_chain` fixture and the `MyCustomChain` and `CustomChain` classes as they were not being used.
- Removed the `data_processing`, `filter_docs`, `get_request`, and `post_request` fixtures as they were not being used.
🔧 fix(test_agents_template.py): set "dynamic" property to False for all template variables to ensure consistency and improve clarity
🐛 fix(test_chains_template.py): add missing "dynamic" field to template dictionaries to ensure consistency and avoid potential bugs
🔧 fix(test_custom_component.py): fix import statements and remove unused imports to improve code readability and maintainability
✨ feat(test_custom_component.py): add tests for the initialization of the CodeParser, Component, and CustomComponent classes
🔧 fix(test_custom_component.py): fix test names and add missing test cases for the Component and CustomComponent classes
🔨 refactor: refactor server.ts to use uppercase PORT variable for improved semantics
✨ feat: add support for process.env.PORT environment variable to run app on configurable port
🔨 refactor: refactor CustomComponent tests for improved readability and maintainability
🔨 refactor: refactor CodeParser tests for improved readability and maintainability
🔨 refactor: refactor Component tests for improved readability and maintainability
🐛 fix: fix CustomComponent class template validation to raise HTTPException when code is None
🔧 fix(tests): fix syntax error in custom_component._class_template_validation
✨ feat(tests): add test_custom_component_get_code_tree_syntax_error to test CustomComponent.get_code_tree method for raising CodeSyntaxError when given incorrect syntax
✨ feat(tests): add test_custom_component_get_function_entrypoint_args_no_args to test CustomComponent.get_function_entrypoint_args property with a build method with no arguments
✨ feat(tests): add test_custom_component_get_function_entrypoint_return_type_no_return_type to test CustomComponent.get_function_entrypoint_return_type property with a build method with no return type
✨ feat(tests): add test_custom_component_get_main_class_name_no_main_class to test CustomComponent.get_main_class_name property when there is no main class
✨ feat(tests): add test_custom_component_build_not_implemented to test CustomComponent.build method for raising NotImplementedError
✨ feat(tests): add fixtures for custom_chain, data_processing, filter_docs, and get_request
🔧 fix(tests): remove commented out code and unused imports to improve code readability and maintainability
🐛 fix(test_llms_template.py): set "dynamic" property to False for all template properties to ensure static values are used
🐛 fix(test_prompts_template.py): set "dynamic" property to False for all template properties to ensure consistency and improve readability
🔧 fix(formModal): add className "AccordionContent" to AccordionContent component for styling purposes
🔧 fix(index.css): add styles for AccordionContent component to handle animation for opening and closing
🔧 fix(tailwind.config.js): remove unused keyframes and animations related to accordion
- Refactor code parsing in `code_parser.py` to handle imports, function definitions, and class attributes more robustly and cleanly.
- Add new methods in `component.py` to parse Assign and AnnAssign statements, and FunctionDef statements.
- Refactor `custom_component.py` to improve the handling of custom components, including better extraction of main class name and template configuration.
- Update `types.py` to better handle the building of custom component templates, including handling of field configurations and error handling.
- Minor formatting fix in `conftest.py` test fixture.
These changes improve the robustness and readability of the code, and provide better handling and validation of custom components.
🔨 refactor(ApiModal/index.tsx): remove unused imports and variables to improve code readability and maintainability
🔨 refactor(ApiModal/index.tsx): add missing dependency to useEffect to fix missing dependency warning
🔨 refactor(ApiModal/index.tsx): add setOpen function to closePopUp when modal is opened
🔨 refactor(constants.py): make YourComponent inherit from CustomComponent for better code reuse and structure
🔨 refactor(conftest.py): restructure custom_chain fixture for better readability and maintainability