* refactor: Add useIsFetching hook for folder fetching in DropdownButtonComponent
* refactor: Improve folder sidebar buttons component
Refactor the folder sidebar buttons component to improve its structure and readability. This includes adding a new hook for folder fetching, handling rendering and filtering functionality, and updating the UI for adding and uploading folders. The changes also include handling double-click and keydown events for folder items, as well as fixing some bugs related to folder editing and deleting. These improvements enhance the overall user experience and maintainability of the codebase.
* refactor: Remove unused import and variable in DropdownButtonComponent
* refactor: Remove unused import and variable in DropdownButtonComponent
- Remove unused import and variable in DropdownButtonComponent
- Add useIsFetching hook for folder fetching in DropdownButtonComponent
* refactor: Remove unused import and variable in DropdownButtonComponent
* refactor: Add cascade delete functionality for flows
This commit adds a new function `cascade_delete_flow` to the `utils.py` file in the `langflow.api` module. This function is responsible for deleting related records when a flow is deleted. It uses the `delete` method from SQLAlchemy to delete records from the `TransactionTable` and `VertexBuildTable` tables based on the flow ID. Finally, it deletes the flow record itself from the `Flow` table.
The function is wrapped in a try-except block to handle any exceptions that may occur during the deletion process. If an exception is raised, a `RuntimeError` is raised with an appropriate error message.
This refactor improves the code by encapsulating the cascade delete logic in a separate function, making it more modular and easier to maintain.
* refactor: Add cascade delete functionality for flows
* refactor: Add cascade delete functionality for flows and folders
* refactor: Remove unused delete_flow_by_id function
* refactor: Add cascade delete functionality for flows and folders
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* 📝 (XMLAgent.py): Add support for chat history data input in XMLAgentComponent to enhance agent functionality and interaction with Language Model.
* [autofix.ci] apply automated fixes
* 📝 (XMLAgent.py): Update user_prompt to system_prompt and adjust its content for better clarity and consistency
🐛 (XMLAgent.py): Ensure user_prompt contains 'input' key before creating agent runnable to prevent errors
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Deleted "personal" from manage your projects
* Removed animations from alerts on the dropdown
* Changed useDeleteFlow to return isPending as well
* Added delete loading to components and added filter of components not present in "flows" for deletion
* added isDuplicating as a isMutating with the postAddFlow
* 🔧 (pyproject.toml): add duckduckgo-search dependency to the project
✨ (DuckDuckGoSearchRun.py): introduce DuckDuckGoSearchComponent for performing web searches using DuckDuckGo search engine
✨ (DuckDuckGo.jsx): add SVG icon for DuckDuckGo
✨ (index.tsx): create DuckDuckGoIcon component for displaying DuckDuckGo icon
🔧 (styleUtils.ts): import DuckDuckGoIcon for nodeIconsLucide in styleUtils
* 📝 (DuckDuckGoSearchRun.py): remove unnecessary whitespace to improve code readability and consistency
* ✨ (DuckDuckGoSearchRun.py): Add retry logic to DuckDuckGo search component for rate-limited requests
📝 (DuckDuckGoSearchRun.py): Update component description to reflect the addition of retry logic
📝 (DuckDuckGoSearchRun.py): Add new inputs for max_retries and initial_delay to configure retry behavior
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method with retry logic
📝 (DuckDuckGoSearchRun.py): Update format_results method to handle formatted results
📝 (DuckDuckGoSearchRun.py): Add search_with_retry method to handle search with retry logic
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method
📝 (DuckDuckGoSearchRun.py): Update search_response method to set status messages
📝 (DuckDuckGoSearchRun.py): Handle exceptions and set appropriate status messages in search_response method
✨ (duckduckgo.spec.ts): Add integration test for DuckDuckGo search component in frontend
* 📝 (DuckDuckGoSearchRun.py): add newline at the end of the file to follow best practices and avoid potential issues with some tools that expect it
* [autofix.ci] apply automated fixes
* updating duckudckgo
* [autofix.ci] apply automated fixes
* ✨ (DuckDuckGoSearchRun.py): Refactor DuckDuckGoSearchComponent to use pydantic BaseModel for schema definition and improve code structure for better readability and maintainability. Add support for result limiting in search functionality.
* 🔧 (DuckDuckGoSearchRun.py): Remove unnecessary import and update status message for DuckDuckGo Search Tool to improve clarity
* [autofix.ci] apply automated fixes
* ✨ (duckduckgo.spec.ts): update test selectors for duckduckgo search component to match changes in the frontend code and improve test reliability
* 🐛 (linkComponent.spec.ts): fix an issue where the key combination for selecting all text was not working correctly on Mac devices. Updated the key combination to use the correct modifier key based on the user's operating system.
* 📝 (frontend): mark is-unicode-supported package as extraneous in package-lock.json
* rollback lock file
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Add run_id parameter to set run ID in graph within load_and_run_flow function
* Add run_id parameter to run_flow call in FlowTool for tracking runs
* Add run_id parameter to CustomComponent's run_flow method
* fix: mypy error arg-type
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
* ✨ (inputs/__init__.py): Add LinkInput class to support linking functionality in inputs
📝 (inputs/input_mixin.py): Add Link field type to support linking functionality in inputs
📝 (inputs/inputs.py): Add LinkInput class to support linking functionality in inputs
📝 (io/__init__.py): Import and export LinkInput class for linking functionality in inputs
📝 (frontend/src/components/linkComponent/index.tsx): Create LinkComponent to display and handle links in frontend components
📝 (frontend/src/components/parameterRenderComponent/index.tsx): Add support for rendering LinkComponent in parameter rendering based on template type
📝 (frontend/src/constants/constants.ts): Add "link" as a supported type for LANGFLOW_SUPPORTED_TYPES
📝 (frontend/src/types/api/index.ts): Add icon and text fields to InputFieldType for link component
📝 (frontend/src/types/components/index.ts): Define LinkComponentType for passing link data to LinkComponent
✨ (linkComponent.spec.ts): Add unit test for link component interaction to ensure proper functionality and behavior
📝 (unit-test-components.spec.ts): Add template for a unit test file to be used for testing components in the frontend application
* style: apply make format
* Update input_mixin.py
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
* Fix dark mode colors on jsonView
* Fix dict component button view
* Changed style of dict component button
* Changed parameter render to remove space on the bottom of the inputs that are only handles
* Fixed space below nodes
* 🐛 (CSVAgent.py): Fix handle_parsing_errors parameter to use the correct instance variable self.handle_parsing_errors instead of a hardcoded value
* 📝 (CSVAgent.py): add newline at the end of the file to follow best practices and improve code readability
* ✨ (frontend): Add react-json-view-lite package to frontend dependencies
📝 (frontend): Update JsonView component in dictAreaModal to use dark theme and adjust class name
📝 (frontend): Update background color for dark theme in JsonView component styling
* 🔧 (generalBugs-shard-13.spec.ts): remove unnecessary line causing linting issue
* updating lock
* ✨ (CSVAgent.py): Add support for MessageTextInput input type and Output for building agent response
📝 (CSVAgent.py): Update input descriptions and add info for better understanding of inputs
📝 (CSVAgent.py): Update build_agent_response method to handle input and return response as a Message object
📝 (CSVAgent.py): Update build_agent method to return Union[AgentExecutor, Agent] for flexibility and handle parsing errors
* [autofix.ci] apply automated fixes
* fix: remove Union from func return type
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
# Enhance HuggingFaceInferenceAPIEmbeddings component
## Initial enhancements
- Update display name and description for clarity
- Add API URL validation method
- Implement local URL detection and dummy API key for local deployments
- Improve error handling for API key and URL requirements
- Update documentation link
## API key info update
- Updated the info in API key input
## Refactor and improvements
- Update base class from LCModelComponent to LCEmbeddingsModel
- Rename 'api_url' to 'inference_endpoint' for clarity
- Improve error messages and validation for inference endpoint
- Update documentation link
- Enhance comments and code formatting
* Changed text warning name invalid
* Change invalidNameList to include components
* 📝 (generalBugs-shard-13.spec.ts): add missing comments to clarify the purpose of the code block and improve code readability
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* changing the example default input value
* Update Agent Flow.json
---------
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* feat: Add CalculatorToolComponent to langflow/components/tools
This commit adds the CalculatorToolComponent to the langflow/components/tools directory. The CalculatorToolComponent allows users to perform basic arithmetic operations on a given expression. It includes an input for the expression and returns the result or an error message.
Ref: #3757
* lint
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
🔧 (utils.py): refactor import statement to get version info from utils module instead of version module
🔧 (index.tsx): add dataTestId attribute to submit button in ShareModal component for testing purposes
✨ (generalBugs-shard-13.spec.ts): add end-to-end test to verify sharing a flow on the Langflow Store via modal interaction
* fix: TypeError: object LangfuseResponseGeneratorSync can't be used in 'await'
* 🔧 (generalBugs-shard-1.spec.ts): remove unnecessary empty line to improve code readability
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* Add CassandraGraphVectorStoreComponent and HtmlLinkExtractorComponent
* Move uuid import to global imports
* fix test with new text spliter
* update poetry lock
* ci: add continue-on-error to py_autofix.yml
---------
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* update templates
* update to include global variables
* Refactor code to include global variables
* update PythonREPLTool.py
* [autofix.ci] apply automated fixes
* update pythonREPL and example
* Refactor code to handle decoding chat messages and handle decoding errors
* ✨ (Simple Agent.spec.ts): Add test case to fill textarea with specific text for testing purposes
📝 (Simple Agent.spec.ts): Update test case descriptions for better clarity and accuracy
✅ (Simple Agent.spec.ts): Update test assertions to match the expected behavior of the test case
* [autofix.ci] apply automated fixes
* 🐛 (Dynamic Agent.spec.ts): fix environment variable name from BRAVE_SEARCH_API_KEY to SEARCH_API_KEY for consistency and clarity
💡 (Dynamic Agent.spec.ts): add additional test cases to improve test coverage and ensure specific text is not present in the chat output
* 🔧 (.github/workflows/typescript_test.yml): update environment variable name from BRAVE_SEARCH_API_KEY to SEARCH_API_KEY for consistency
🐛 (Travel Planning Agent.spec.ts): fix test to skip if SEARCH_API_KEY is not available in the environment variables
* ✅ (Simple Agent.spec.ts): update expected count of python words to 3 for accurate test validation
* updating search tools
* [autofix.ci] apply automated fixes
* change examples
* update travel planning to include global variable
* Refactor search API component to include result limiting
* 📝 (Travel Planning Agent.spec.ts): remove unnecessary empty line to improve code readability and consistency
* test: adjusts asserts to make the test pass successfully
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
* 📝 (Vector Store.spec.ts): Remove unnecessary code block related to AstraVectorStoreComponent class and its methods
♻️ (Vector Store.spec.ts): Refactor test file to remove unused imports and clean up unnecessary code blocks
🔧 (Vector Store.spec.ts): Refactor code to include conditional logic based on the presence of "dev" in ASTRA_DB_API_ENDPOINT environment variable
🔧 (Vector Store.spec.ts): Add function extractAndCleanCode to extract and clean code content from HTML element
* 🐛 (Vector Store.spec.ts): fix incorrect check for Astra DB API endpoint to include "astra-dev" instead of "dev" for proper environment detection
* ✨ (index.tsx): Add ShadTooltip component to provide tooltips for folder buttons for better user experience
📝 (index.tsx): Import useIsFetching from "@tanstack/react-query" to check if there are ongoing data fetching operations before enabling folder buttons
* 🔧 (index.tsx): add isPending variable to usePostFolders hook to track loading state for adding folders
🔧 (index.tsx): update disabled attribute in add and upload folder buttons to include isPending variable to prevent multiple submissions
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* Fix textarea with password visual bug
* Changed password field to default to none
* updated sanitizedHTMLWrapper to receive ref
* fixed sanitizedhtmlwrapper type
* Added back to scroll position and cursor position on Chrome
* [autofix.ci] apply automated fixes
* Fix position of password
* Fixed tests
* Fixed examples
* Fixed test schema
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* Refactor YfinanceToolComponent to inherit from LCToolComponent and remove unused outputs
* Refactor `PythonREPLToolComponent` to use new input configuration and update method signatures
* Add functions to handle dict values in ATTR_FUNC_MAPPING for '_outputs_maps' and '_inputs'
* Handle '_outputs_maps' argument in frontend node creation
* Add unit test for custom component subclassing from LCToolComponent
* Add input and output handling to PythonREPLToolComponent
- Introduced `input_value` to `inputs` for capturing user input.
- Added `outputs` to define the output structure, including `api_run_model` and `tool` for backward compatibility.
- Implemented `run_model` method to execute the tool and return results as `Data`.
* Add input and output handling to YfinanceToolComponent
- Introduced `MessageTextInput` for user queries.
- Added `Output` definitions for `api_run_model` and `tool` methods.
- Implemented `run_model` method to execute tool with user input.
* Add input and output definitions to YfinanceTool for better data handling
* Update error message to use display_name instead of vertex_type in edge validation
* Add unit test for YfinanceToolComponent template output validation
* Refactor tool components to include 'Data' output and update input types
- Added 'Data' output type to 'Agent Flow', 'Sequential Agent', and 'Complex Agent' starter projects.
- Updated input types to use 'MessageTextInput' and 'MultiselectInput' for better input handling.
- Refactored code to align with new input and output structures, ensuring backward compatibility.
* Add unit test for PythonREPLToolComponent template validation
* test: disblable test
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>