📝 (index.css): add new color variables for datatype rose and its foreground to improve design consistency
📝 (styleUtils.ts): add DataFrame color to nodeColorsName object for better visualization of dataframes in the frontend
This makes the postgres instance only reachable from the langflow container and allows it to spin up even if another process (e.g. another postgres instance) is running on the host and binds to the same port.
* Added alternative for redo
* Added redo alternative on hotkeys
* added redo alternative type
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* refactor(tests): add new fixtures to files tests
- Introduced new pytest fixtures for creating API keys, active users, and flows to streamline test setup.
- Updated file upload, download, list, and delete tests to utilize the new fixtures, improving clarity and maintainability.
- Ensured that flow IDs are correctly referenced in all file operations, enhancing test accuracy.
- Added cleanup logic in fixtures to maintain database integrity after tests.
This refactor improves the organization of test cases and ensures that they are more robust and easier to understand.
* fix(tests): clear services cache in test fixtures
- Added logic to clear the services cache in both `conftest.py` and `test_files.py` fixtures to ensure a clean state for tests.
- This change prevents potential interference between tests by resetting the service manager's factories and services before each test run.
* refactor(tests): streamline file upload tests and remove unused mocks
- Removed the mock implementation of StorageService from the test fixtures to simplify the test setup.
- Introduced new fixtures to set maximum file size upload limits, enhancing test flexibility.
- Updated file upload, download, and list tests to directly use the new fixtures, improving clarity and maintainability.
- Ensured that uploaded file content is accurately tested, reflecting changes in the upload and download logic.
* Refactor: Update EditNodeComponent to hide table options and block hide
* 🐛 (model.py): fix issue with search_documents method not returning empty list when search_query is empty
♻️ (model.py): refactor search_documents method to handle search_query logic more efficiently
📝 (chroma.py): add typing_extensions override import for build_vector_store method to improve code readability
* ✨ (tests): add unit tests for ChromaVectorStoreComponent
- Introduced new test suite for ChromaVectorStoreComponent, covering various functionalities including database creation, collection management, similarity and MMR searches, and duplicate handling.
- Implemented tests for creating collections with and without data, ensuring proper functionality and data integrity.
- Verified search capabilities with different query types and result limits, enhancing overall test coverage for the component.
* fix: remove unnecessary whitespace in model.py and add missing import in chroma.py
* fix: mypy error module has no attribute "timeout"
* ♻️ (async_helpers.py): Remove unnecessary type hint ignore comment from timeout_context function
* 📝 (async_helpers.py): add a comment with issue reference PGH003 to document the reason for ignoring type checking in timeout_context function
* ♻️ (async_helpers.py): Remove unnecessary type hint comment to improve code readability and maintainability
* ♻️ (async_helpers.py): Add type ignore comment to suppress miscellaneous type error for timeout_context function
* ♻️ (async_helpers.py): refactor timeout_context function to remove unnecessary type ignore comments and improve code readability
* [autofix.ci] apply automated fixes
* 📝 (async_helpers.py): add a blank line for better code readability and consistency
* fix: mypy error: incompatible redefinition
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: add MockLanguageModel for testing language model interactions
- Introduced a new mock implementation of BaseLanguageModel to facilitate unit testing.
- Implemented methods to simulate responses and handle message processing.
- Added functionality to generate mock responses based on input messages.
- Ensured compatibility with existing language model interfaces for seamless integration in tests.
* refactor: simplify test_structured_output_component by replacing MagicMock with MockLanguageModel
- Removed extensive mock implementations of BaseLanguageModel in tests.
- Replaced instances of MagicMock with a new MockLanguageModel for better clarity and maintainability.
- Streamlined test cases for structured output generation and error handling.
- Ensured compatibility with existing test structure while enhancing readability.
* fix: rename utils.py to useful.py to avoid namespace conflict
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
* fix(tests): update supported versions in constants.py to include new releases
- Updated SUPPORTED_VERSIONS to reflect the latest versions: 1.0.19, 1.1.0, and 1.1.1.
- This change ensures that tests are aligned with the most current versioning.
* refactor(tests): update file_names_mapping for input, output, and prompt components
- Removed outdated version entries (1.0.15 to 1.0.18) and added new versions (1.1.0 and 1.1.1) for ChatInput, TextInput, ChatOutput, and Prompt components.
- Ensures test cases are aligned with the latest component versions for improved accuracy and reliability.
* fix(tests): update file_names_mapping in TestTextOutputComponent to reflect new versioning
- Removed outdated version entries (1.0.17, 1.0.18) and added new versions (1.1.0, 1.1.1) for TextOutput component.
- Ensures test cases are aligned with the latest component versions for improved accuracy and reliability.
fix(tests): update ComponentTestBase to skip tests when file_names_mapping is empty
- Modified the test method to skip the test instead of raising an AssertionError when no file names mapping is provided.
- Improved user feedback by providing a clear message indicating the reason for skipping the test.
* 📝 (GlobalVariableModal.tsx): Refactor GlobalVariableModal component to use Tabs component instead of Select for type selection and improve layout and styling of input fields and labels
🔧 (index.tsx): Add popoverWidth prop to InputComponent to allow setting the width of the popover in CustomInputPopover component
🔧 (index.tsx): Add popoverWidth prop to InputComponent in InputGlobalComponent to set the width of the popover to 315px
✨ (tabs-button.tsx): introduce new TabsButton component to handle tab functionality in UI components
📝 (tabs-button.tsx): add documentation for Tabs, TabsContent, TabsList, TabsTrigger components
📝 (components/index.ts): add popoverWidth property to InputComponentType to control the width of the popover in UI components
* ✨ (GlobalVariableModal.tsx): Add ForwardedIconComponent to display an icon next to the modal header text for better visual representation
📝 (GlobalVariableModal.tsx): Update TabsTrigger components to include data-testid attribute for testing purposes
✨ (index.tsx): Introduce new components OptionBadge, CommandItemContent, and SelectionIndicator to improve code organization and reusability
♻️ (index.tsx): Refactor handleRemoveOption function to have a more descriptive parameter signature and improve readability
📝 (index.tsx): Add comments to clarify the purpose of handleOptionSelect function and improve code documentation
📝 (index.tsx): Add comments to describe the purpose of getInputClassName and getAnchorClassName functions for better code understanding
✨ (globalVariables.spec.ts): improve placeholder text for variable name and value fields for better user understanding and experience
* 🐛 (GlobalVariableModal.tsx): Fix disabled state logic for TabsTrigger components to correctly reflect initialData type
📝 (GlobalVariableModal.tsx): Update label for submit button to dynamically change based on the presence of initialData
* 🐛 (index.tsx): Fix issue where options were not being correctly memoized as a Set to prevent unnecessary re-renders. Update memoizedOptions to correctly memoize options as a Set.
* 📝 (userSettings.spec.ts): Update placeholder text for variable name and value fields to improve clarity and user experience.
* Refactor: Commented out TextInput and TextOutput components
* Refactor: Add function to check if graph has output vertex connected to it
* Refactor: Add function to skip messages based on vertex configuration and message type
* Refactor: Update function to check for chat output in graph vertices
* Refactor: Enhance message skipping logic to include vertex existence check
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
✨ (model.py): introduce MultilineInput class to handle system messages in LCModelComponent for better organization and readability
📝 (Basic Prompting.json): Update node IDs and edge IDs for better readability and consistency in the JSON file.
📝 (Basic Prompting.json): Update node properties to display a chat message in the Playground instead of generating text using OpenAI LLMs
♻️ (Basic Prompting.json): Refactor field_order and outputs properties for the Chat Output node to include new fields and remove unnecessary ones
✨ (Basic Prompting.json): Update ChatOutput component to include new inputs and outputs for better customization and functionality. Add support for storing messages, setting sender type, and customizing message appearance.
✨ (Basic Prompting.json): Update field names and values for better clarity and consistency
♻️ (Basic Prompting.json): Refactor field names and values to improve readability and maintainability
✨ (Basic Prompting.json): Update the content of the file to include a new class 'OpenAIModelComponent' with inputs for configuring OpenAI model settings and methods for building the model and handling exceptions. Remove the 'data_template' field and update 'input_value' field to 'MessageInput'. Add new fields 'json_mode', 'max_tokens', 'model_kwargs', and 'model_name' with their respective configurations.
📝 (Basic Prompting.json): Update values and descriptions for fields in the Basic Prompting starter project to improve clarity and usability. Add a new field for temperature control with a default value of 0.1.
* refactor: add create_stream_tokens_event_manager for handling streaming events
* feat: integrate EventManager into run_graph_internal for enhanced event handling
- Added EventManager import and parameter to run_graph_internal function.
- Updated function call to include event_manager for improved event management during graph execution.
* feat: enhance Graph class with event_manager parameter
- Added event_manager parameter to multiple methods in the Graph class to facilitate better event management during graph execution.
- Updated process and run methods to include event_manager, ensuring it is passed through to relevant function calls.
- Improved documentation for methods to reflect the new event_manager parameter.
* feat: implement streaming support in flow execution with EventManager integration
- Added support for streaming responses in the simplified_run_flow endpoint, allowing real-time event handling during flow execution.
- Introduced consume_and_yield and run_flow_generator functions to manage event consumption and client communication.
- Integrated EventManager for enhanced event tracking, including success and error notifications.
- Updated endpoint documentation to reflect new streaming capabilities and parameters.
- Improved error handling and logging for better debugging and client disconnection management.
* refactor: remove request logging from simplified_run_flow endpoint
- Removed the logging of the request object in the simplified_run_flow function to streamline logging and reduce verbosity.
- This change enhances the clarity of logs by focusing on essential information during flow execution.
* feat: improve gitloader component
* [autofix.ci] apply automated fixes
* feat(git.py): refactor GitLoaderComponent to support asynchronous operations and improve temporary directory management
- Convert methods to async to enhance performance with file operations.
- Implement async context manager for handling temporary clone directories.
- Update binary file check and content filtering to be asynchronous.
* fix(git.py): enhance GitLoaderComponent with improved file filtering and binary check
- Refactor file filtering logic to utilize fnmatch for pattern matching.
- Introduce a new method to check for binary files based on null byte detection.
- Update content filtering to handle exceptions more gracefully.
- Modify temporary directory cleanup to use rmdir instead of remove for better directory management.
- Adjust load_documents method to utilize asyncio.to_thread for lazy loading of documents.
* refactor(git.py): enhance GitLoaderComponent with improved file filtering and binary check
- Refactor binary file check to be synchronous and handle exceptions more gracefully.
- Introduce new methods for checking file patterns and content patterns, allowing for more flexible filtering.
- Consolidate filtering logic into a single method for better maintainability.
- Update load_documents method to run lazy loading in a separate thread for improved performance.
* feat(tests): add unit tests for GitLoaderComponent file filtering and binary detection
- Introduced new test suite for GitLoaderComponent, including tests for binary file detection and file pattern matching.
- Implemented temporary file creation for testing various file types and permissions.
- Added tests for combined filtering functionality, ensuring robust handling of file and content patterns.
* refactor(git.py): improve pattern handling and content filtering in GitLoaderComponent
- Refactored pattern handling to use a more descriptive variable name `pattern_list` for clarity.
- Enhanced content filtering by ensuring proper encoding when reading file content.
- Updated regex validation to include a test string check for better error handling.
- Removed unnecessary comments to streamline the code and improve readability.
* fix: exception TypeError
TypeError: object async_generator can't be used in 'await' expression
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
chore: Update Dockerfiles to use COPY instead of ADD run apt-get upgrade
- Replaced ADD commands with COPY for better clarity and consistency across Dockerfiles.
- Added apt-get upgrade and clean commands to reduce image size and ensure packages are up to date.
- Updated user creation commands to include necessary cleanup steps.
- Ensured all Dockerfiles follow a similar structure for maintainability.
* Call __enter__ to make current langwatch trace available globally so users can more easily add more context to it, like final input and output. This means also skipping setting the root_span input and output if already set
* Update LangWatch logo
* 🐛 (newChatView.tsx): fix issue where chat value was not being cleared when tab is hidden
* 🔧 (newChatView.tsx): refactor setting chat value to handle additional condition for better logic clarity
* feat(conditional-router): rename 'matches regex' to 'regex'
- Simplify the operator name in the ConditionalRouter component
- Update dropdown options for better UX
- Maintain existing functionality while using more concise naming
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix: fetch composio apps list dynamically
* Ensure apps only get loaded once API key is entered
* Add comment
* typo fix
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>