Commit graph

12,533 commits

Author SHA1 Message Date
Igor Carvalho
ca8e8e3f08 refactor[locationContext]: Move type locationContextType to types directorie 2023-07-19 17:30:41 -03:00
Igor Carvalho
2c8b0e1aaf refactor[darkContext]: Move type darkContextType to types directorie 2023-07-19 17:27:09 -03:00
Igor Carvalho
a2ebec1a87 refactor[alertContext]: Move type alertContextType to types directorie 2023-07-19 17:20:34 -03:00
gustavoschaedler
9adff855fb 🔧 chore(constants.py): update class attribute names to follow Langflow naming convention for better consistency and clarity
 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
2023-07-19 21:16:36 +01:00
Igor Carvalho
67be60c937 refactor[loadingComponent]: Move type LoadingComponentProps to types directorie 2023-07-19 17:14:17 -03:00
Igor Carvalho
83772eeefd refactor[ReactTooltipComponent]: Move type TooltipProps to types directorie 2023-07-19 17:11:56 -03:00
Igor Carvalho
7ca0f8d60d refactor[EditFlowSettingsComponent]: Move type InputProps to types directorie 2023-07-19 17:05:40 -03:00
Lucas Oliveira
62bcfdeaa9 Fixed bug where prompt modal not saving, but there is no Clean Edges now 2023-07-19 11:03:44 -03:00
Lucas Oliveira
b46a967452 Merge branch 'python_custom_node_component' of github.com:logspace-ai/langflow into python_custom_node_component 2023-07-19 11:01:53 -03:00
Lucas Oliveira
be712a45af Fixed bug where PromptComponent does not save, but there is no Clean Edges now 2023-07-19 11:01:23 -03:00
Gabriel Luiz Freitas Almeida
58d7491d83 🔨 refactor(endpoints.py): rename langchain_types_dict import to build_langchain_types_dict for clarity and consistency
🔨 refactor(types.py): remove unused langchain_types_dict variable to improve code cleanliness
2023-07-19 10:00:47 -03:00
Gabriel Luiz Freitas Almeida
4827c99368 🐛 fix(code_parser.py): handle case when code parameter is a class by getting its source code using inspect module
 feat(code_parser.py): add support for parsing class source code in addition to string source code to improve flexibility and usability
2023-07-19 07:03:54 -03:00
anovazzi1
0e477428b5
Add generic icon component (#637)
Add a generic component to generate all project icons
2023-07-18 18:55:20 -03:00
anovazzi1
d14d7fcc92 fix codacity issues 2023-07-18 18:51:15 -03:00
Lucas Oliveira
d668640791 Fixed code not saving 2023-07-18 18:40:53 -03:00
anovazzi1
1be753149d fix(AccordionComponent): add keyValue prop to AccordionComponent to fix missing key error
fix(AccordionComponent): remove unused import statements from AccordionComponent
fix(accordion.tsx): remove unnecessary className from AccordionContent component
fix(index.css): remove unnecessary cursor property from .AccordionContent class
fix(ApiModal): add keyValue prop to AccordionComponent in ApiModal to fix missing key error
fix(formModal): remove unused import statements from formModal
fix(formModal): replace Accordion, AccordionContent, AccordionItem, and AccordionTrigger components with AccordionComponent in formModal
fix(formModal): add keyValue prop to AccordionComponent in formModal to fix missing key error
fix(index.ts): add keyValue prop to AccordionComponentType to fix missing key error
fix(tailwind.config.js): remove unused keyframes and animation properties from tailwind.config.js
2023-07-18 18:38:19 -03:00
Lucas Oliveira
0560c966f6 Merge branch 'modalRefactor' into python_custom_node_component 2023-07-18 18:23:05 -03:00
Lucas Oliveira
dbb9b8ab81 Fixed disableCopyPaste on modals 2023-07-18 18:22:22 -03:00
Igor Carvalho
5f8efd244e formated code 2023-07-18 18:22:20 -03:00
Igor Carvalho
1ff7dca09e feat: Add remaining icons (Slack, Wikipedia and Wolfram) 2023-07-18 18:21:03 -03:00
Lucas Oliveira
02cff362f0 Merge branch 'modalRefactor' into python_custom_node_component 2023-07-18 18:13:26 -03:00
anovazzi1
8d4031dec0
Refactor Accordion Component for Shared Usage (#653)
This pull request aims to refactor the Accordion Component to enable its
shared usage by both the formModal (chat) component and the Tweaks
component. By making the necessary modifications, we can eliminate code
duplication and improve maintainability across the application.
2023-07-18 16:15:31 -03:00
Gabriel Luiz Freitas Almeida
5d4aae9ba3 🐛 fix(codeAreaModal/index.tsx): update condition in useEffect to check if nodeClass.template has more than 2 fields instead of 1
 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
2023-07-18 15:39:43 -03:00
Gabriel Luiz Freitas Almeida
e0d086e85a 🔥 refactor(codeAreaModal/index.tsx): simplify useEffect logic and add conditional check to prevent unnecessary handleClick execution 2023-07-18 15:29:29 -03:00
Gabriel Luiz Freitas Almeida
1f9e84d8c2 🔥 refactor(codeAreaModal/index.tsx): comment out unused useEffect hook and handleClick function
🔥 refactor(codeAreaModal/index.tsx): remove unused useEffect hook and handleClick function
2023-07-18 15:17:49 -03:00
Rodrigo Nader
ce240aedf6 add docs with components 2023-07-18 15:08:00 -03:00
anovazzi1
c77048c7ca chore(genericIconComponent): update import path for nodeIconsLucide in IconComponent to reflect new location in styleUtils 2023-07-18 15:05:05 -03:00
carlosrcoelho
5d2a29a436 add docs 2023-07-18 14:59:27 -03:00
anovazzi1
d8acf8cb8d fix import 2023-07-18 14:53:08 -03:00
gustavoschaedler
598a833b75 🐛 fix(util.py): fix import order to follow PEP8 guidelines for better readability and maintainability
 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
2023-07-18 18:47:04 +01:00
anovazzi1
17c6c7e528 Merge branch 'refactorUtils' into generic_icon_component 2023-07-18 12:51:08 -03:00
anovazzi1
38f3cb0a1a Merge branch 'dev' into refactorUtils 2023-07-18 12:18:25 -03:00
anovazzi1
2446759943 Merge branch 'dev' into generic_icon_component 2023-07-18 12:16:34 -03:00
anovazzi1
06dc663467 change TWstyle to className 2023-07-18 11:48:49 -03:00
anovazzi1
3aaeee42fe fix bug on tooltip with div wrapping 2023-07-18 11:43:59 -03:00
anovazzi1
13770a87f3 refactor(genericIconComponent): remove console.log statement in IconComponent function to improve code cleanliness and remove unnecessary logging 2023-07-18 11:20:07 -03:00
anovazzi1
9cf639841f update name from style to TWstyle to avoid conflicts 2023-07-18 11:15:25 -03:00
Cristhian Zanforlin Lousa
cef7ceb2c9 🐛 fix(AccordionComponent): change comparison operator from '==' to '===' to ensure strict equality comparison 2023-07-18 10:44:08 -03:00
Gabriel Luiz Freitas Almeida
ab61890997 🔀 refactor(main.py): extract get_static_files_dir() function to improve code readability and reusability
🔀 refactor(main.py): simplify setup_app() function by using get_static_files_dir() function to get static files directory
2023-07-18 07:26:30 -03:00
gustavoschaedler
cee4740b0f 🔧 fix(custom_component.py): add line break to improve readability of TODO comment
🔧 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
2023-07-18 02:05:37 +01:00
gustavoschaedler
11f7846e0a 🔥 refactor(conftest.py): remove unused fixtures and custom chain classes
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
2023-07-18 01:59:19 +01:00
Cristhian Zanforlin Lousa
40b656c8d4 🔀 merge(AccordionComponent/index.tsx): resolve merge conflict in AccordionComponent/index.tsx file
🐛 fix(AccordionComponent/index.tsx): remove unnecessary code after resolving merge conflict
2023-07-17 19:55:00 -03:00
Cristhian Zanforlin Lousa
c602fe5347 🐛 fix(AccordionComponent): resolve merge conflict in AccordionComponent/index.tsx
🐛 fix(AccordionComponent): add missing className to AccordionContent in AccordionComponent/index.tsx
🔧 chore(tailwind.config.js): fix syntax error in tailwind.config.js
2023-07-17 19:54:32 -03:00
Cristhian Zanforlin Lousa
0669a3e148 🎨 style(formModal): add custom-scroll class to Textarea component for custom styling
🎨 style(tailwind.config.js): add cursor: auto to scrollbar styles for better user experience
2023-07-17 19:50:52 -03:00
Igor Carvalho
56eb70674a refactor[genericIconComponent]: Remove unnecessary svg method function 2023-07-17 19:47:15 -03:00
Igor Carvalho
5af49e5a36 refactor[genericIconComponent]: Remove unnecesary switch case 2023-07-17 19:43:46 -03:00
Cristhian Zanforlin Lousa
662d4e81ae 🔧 chore(AccordionComponent): reformat code to improve readability and maintain consistent code style 2023-07-17 19:41:04 -03:00
Cristhian Zanforlin Lousa
f9fdc6786c 🐛 fix(AccordionComponent/index.tsx): remove border from AccordionItem to improve visual consistency
 feat(AccordionComponent/index.tsx): add className "AccordionContent" to AccordionContent component for styling purposes
2023-07-17 19:40:23 -03:00
Cristhian Zanforlin Lousa
eb76a51266 formatting 2023-07-17 19:32:37 -03:00
Cristhian Zanforlin Lousa
d0f477e605 formatting code 2023-07-17 19:31:50 -03:00