The validation status colors were swapped, causing the wrong color to be displayed for the wrong status. This commit fixes the issue by swapping the colors to match the correct status.
The modal titles were simplified to remove the unnecessary "as" preposition and to make them more concise. The "Export as" and "Import from" titles were changed to "Export" and "Import" respectively.
This commit removes unused files and imports from the template directory. The deleted files are base.py, fields.py, and nodes.py. The deleted imports are from langflow.template.constants. This improves the codebase by removing unnecessary code and reducing clutter.
✨ feat(frontend_node): add constants module
This commit adds a new module called constants to the frontend_node directory. The module contains constants used in the frontend_node module. The constants are FORCE_SHOW_FIELDS, DEFAULT_PROMPT, SYSTEM_PROMPT, and HUMAN_PROMPT. This improves the codebase by centralizing the constants in one module.
🐛 fix(frontend_node): use ast.literal_eval instead of eval
This commit fixes a security vulnerability by replacing the use of eval with ast.literal_eval in the UtilitiesFrontendNode class. The method converts a string representation of a list to an actual list. The use of eval is dangerous as it can execute arbitrary code. This improves the codebase by making it more secure.
The keys of the nodeIcons object have been renamed to improve semantics and readability. The new names are more descriptive of the functionality of the corresponding icons.
The "suffix" and "prefix" fields have been changed from type "str" to "prompt" to allow for more flexibility in the input. The "format_instructions" field has been updated to be required and multiline, and to show the instructions by default. This change will make it easier for users to understand the expected input format.
🔨 refactor(util.py): add format_instructions to the list of fields to format in format_dict function
The suffix and format_instructions fields in the ZeroShotPromptNode class were swapped to improve the readability of the code. The format_instructions field is now above the suffix field, which makes more sense as it is a required field. In the util.py file, the format_instructions field was added to the list of fields to format in the format_dict function. This ensures that the format_instructions field is properly formatted when the function is called.
Description:
This pull request proposes the addition of a scrollbar to the modal
window containing advanced settings when the number of input fields
exceeds the limit of the screen. This enhancement aims to improve user
experience by providing a convenient way to access all settings, even
when the available screen space is limited.
The number of inputs in the screen is limited by a variable on Utils
that can be easily changed in the future if It's needed.