* refactor: Standardize import statements and improve code readability across components
- Updated import statements to use consistent single quotes.
- Refactored various components to enhance readability and maintainability.
- Adjusted folder and file handling logic in the sidebar and file manager components.
- Introduced a new tabbed interface for the files page to separate files and knowledge bases, improving user experience.
* [autofix.ci] apply automated fixes
* feat: Introduce new Files and Knowledge Bases page with tabbed interface
- Added a new FilesPage component to manage file uploads and organization.
- Implemented a tabbed interface to separate Files and Knowledge Bases for improved user experience.
- Created FilesTab and KnowledgeBasesTab components for handling respective functionalities.
- Refactored routing to accommodate the new structure and updated import statements for consistency.
- Removed the old filesPage component to streamline the codebase.
* Create knowledgebase_utils.py
* Push initial ingest component
* [autofix.ci] apply automated fixes
* Create initial KB Ingestion component
* [autofix.ci] apply automated fixes
* Fix ruff check on utility functions
* [autofix.ci] apply automated fixes
* Some quick fixes
* Update kb_ingest.py
* [autofix.ci] apply automated fixes
* First version of retrieval component
* [autofix.ci] apply automated fixes
* Update icon
* Update kb_retrieval.py
* [autofix.ci] apply automated fixes
* Add knowledge bases feature with API integration and UI components
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* Refactor imports and update routing paths for assets and main page components. Adjust tab handling in the assets page to reflect URL changes and improve user navigation experience.
* [autofix.ci] apply automated fixes
* Add CreateKnowledgeBaseButton, KnowledgeBaseEmptyState, and KnowledgeBaseSelectionOverlay components. Refactor KnowledgeBasesTab to utilize new components and improve UI for knowledge base management. Introduce utility functions for formatting numbers and average chunk sizes.
* [autofix.ci] apply automated fixes
* PoV: Add Parquet data retrieval to KBRetrievalComponent (#9097)
* Add Parquet data retrieval to KBRetrievalComponent
Introduces a new output to KBRetrievalComponent for returning knowledge base data by reading Parquet files. Updates dependencies to include fastparquet for Parquet support.
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Fix some ruff issues
* [autofix.ci] apply automated fixes
* feat: refactor file management and knowledge base components
- Replaced the existing assetsPage with a new filesPage to better organize file management functionalities.
- Introduced KnowledgePage to handle knowledge base operations, integrating KnowledgeBasesTab for displaying and managing knowledge bases.
- Added various components for file and knowledge base management, including CreateKnowledgeBaseButton, KnowledgeBaseEmptyState, and drag-and-drop functionality.
- Updated routing and imports to reflect the new structure and ensure consistency across the application.
- Enhanced user experience with improved UI elements and state management for file selection and operations.
* feat: implement delete confirmation modal for knowledge base deletion
- Added a DeleteConfirmationModal component to confirm deletion actions.
- Integrated the modal into the KnowledgeBasesTab for handling knowledge base deletions.
- Updated column definitions to include a delete button for each knowledge base.
- Enhanced user experience by ensuring deletion actions require confirmation.
- Adjusted styles for the knowledge base table to improve checkbox visibility.
* feat: enhance knowledge base metadata with embedding model detection
- Added `embedding_model` field to `KnowledgeBaseInfo` for improved metadata tracking.
- Implemented `detect_embedding_model` function to extract embedding model information from configuration files.
- Updated `get_kb_metadata` to prioritize metadata extraction from `embedding_metadata.json`, falling back to detection if necessary.
- Modified `KBIngestionComponent` to save embedding model metadata during ingestion.
- Adjusted frontend components to display embedding model information in knowledge base queries and tables.
* refactor: clean up tooltip and value getter comments in knowledge base columns
- Removed redundant comments in the `knowledgeBaseColumns.tsx` file to enhance code clarity.
- Simplified the tooltip and value getter functions for embedding model display.
* [autofix.ci] apply automated fixes
* refactor: simplify KnowledgeBaseSelectionOverlay component
- Removed the unused onExport prop and its associated functionality.
- Cleaned up code formatting for consistency and readability.
- Updated success message strings to use single quotes for uniformity.
* feat: implement bulk and single deletion for knowledge bases
- Added `BulkDeleteRequest` model to handle bulk deletion requests.
- Implemented `delete_knowledge_base` endpoint for single knowledge base deletion.
- Created `delete_knowledge_bases_bulk` endpoint for deleting multiple knowledge bases at once.
- Introduced `useDeleteKnowledgeBase` and `useDeleteKnowledgeBases` hooks for frontend integration.
- Updated `KnowledgeBaseSelectionOverlay` and `KnowledgeBasesTab` components to utilize new deletion functionality with user feedback on success and error handling.
* Initial support for vector search
* feat: add KnowledgeBaseDrawer component for enhanced knowledge base details
- Introduced `KnowledgeBaseDrawer` component to display detailed information about selected knowledge bases.
- Integrated mock data for source files and linked flows, with a layout for displaying descriptions and embedding models.
- Updated `KnowledgeBasesTab` to handle row clicks and open the drawer with relevant knowledge base data.
- Enhanced `KnowledgePage` to manage drawer state and selected knowledge base, improving user interaction and experience.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* Fix ruff checks
* Update knowledge_bases.py
* feat: update mock data and enhance drawer functionality in KnowledgeBase components
- Replaced mock data in `KnowledgeBaseDrawer` with more descriptive placeholders.
- Added a reference to the drawer in `KnowledgePage` for improved click handling.
- Implemented logic to close the drawer when clicking outside, except for table row clicks.
- Enhanced row click handling to toggle drawer state based on current visibility.
* [autofix.ci] apply automated fixes
* Append scores column to rows
* refactor: improve knowledge base deletion and UI components
- Updated `useDeleteKnowledgeBase` and `useDeleteKnowledgeBases` to enhance parameter naming for clarity.
- Removed the `CreateKnowledgeBaseButton` component and its references to streamline the UI.
- Simplified the `KnowledgeBaseDrawer` and `KnowledgeBasesTab` components by removing mock data and improving state management.
- Enhanced the `KnowledgeBaseSelectionOverlay` to better handle bulk deletions and selection states.
- Refactored various components for consistent styling and improved readability.
* refactor: standardize import statements and improve code readability in SideBarFoldersButtonsComponent
- Updated import statements to use consistent single quotes.
- Refactored various function calls and state management for improved clarity.
- Enhanced folder handling logic and UI interactions for better user experience.
* feat: Add encryption for API keys in KB ingest and retrieval (#9129)
Add encryption for API keys in KB ingest and retrieval
Introduces secure storage of embedding model API keys by encrypting them during knowledge base ingestion and decrypting them during retrieval. Refactors metadata handling to include encrypted API keys, updates retrieval to support decryption and dynamic embedder construction, and improves logging for key operations. Removes legacy embedding client code in retrieval in favor of a provider-based approach.
* [autofix.ci] apply automated fixes
* Fix import of auth utils
* Allow appending to existing knowledge base
* [autofix.ci] apply automated fixes
* Update kb_ingest.py
* Update kb_ingest.py
* feat: enhance table component with editable Vectorize column functionality
- Implemented logic to determine editability of the Vectorize column based on other row values.
- Added checks to refresh grid cells upon changes to the Vectorize column.
- Updated TableAutoCellRender to conditionally disable editing based on Vectorize column state.
* New ingestion creation dialog
* [autofix.ci] apply automated fixes
* Clean up the creation process for KB
* [autofix.ci] apply automated fixes
* Clean up names and descriptions
* Update kb_retrieval.py
* chroma retrieval
* [autofix.ci] apply automated fixes
* Further KB cleanup
* refactor: update KB ingestion component and enhance NodeDialog functionality
- Restored SecretStrInput for API key in KB ingestion component.
- Modified NodeDialog to handle new value format and added support for additional properties.
- Introduced custom hooks for managing global variable states in InputGlobalComponent.
- Improved dropdown component styling and interaction.
- Cleaned up input component code for better readability and maintainability.
* Hash the text as id
* [autofix.ci] apply automated fixes
* Update kb_retrieval.py
* [autofix.ci] apply automated fixes
* Make sure to write out the source parquet
* Remove unneeded old code
* Add ability to block duplicate ingestion chunks
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* Rename retrieval component
* Better refresh mechanism for the retrieve
* Clean up some unused functionality
* Update kb_ingest.py
* Fix dropdown component logic to include checks for refresh button and dialog inputs
* Test the API key before saving knowledge
* [autofix.ci] apply automated fixes
* Allow storing updated api keys if provided at ingest time
* Add Knowledge Bases component and enhance Knowledge Base Empty State
- Introduced a new JSON configuration for Knowledge Bases, defining nodes and edges for data processing.
- Enhanced the KnowledgeBaseEmptyState component to include a button for creating a knowledge base template.
- Updated KnowledgeBasesTab to handle template creation, integrating flow management and navigation features.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* Update Knowledge Bases.json
* Update Knowledge Bases configuration and enhance UI components
- Updated the code hash in the Knowledge Bases JSON configuration.
- Modified the KnowledgeBaseEmptyState component to change the button icon and text from "Try Knowledge Base Template" to "Create Knowledge".
- Cleared the options for the knowledge base selection dropdowns to ensure they reflect the current state of available knowledge bases.
* [autofix.ci] apply automated fixes
* Implement feature flag for Knowledge Bases functionality
- Added FEATURE_FLAGS.knowledge_bases to control the visibility of knowledge base components in the API and UI.
- Updated the router to conditionally include the knowledge bases router based on the feature flag.
- Modified KBIngestionComponent and KBRetrievalComponent to hide if the knowledge bases feature is disabled.
- Enhanced the initial setup to skip loading knowledge base starter projects when the feature is disabled.
- Updated frontend routes and sidebar components to conditionally render knowledge base options based on the feature flag.
- Adjusted API queries to return an empty array if the knowledge bases feature is disabled.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* Refactor Knowledge Bases feature flag implementation
- Removed the FEATURE_FLAGS.knowledge_bases flag from backend components and frontend routes.
- Updated the API and UI to always include knowledge base components, simplifying the codebase.
- Adjusted the frontend feature flags to set ENABLE_KNOWLEDGE_BASES to false, ensuring knowledge base features are not displayed.
- Cleaned up related components and routes to reflect the removal of the feature flag, enhancing maintainability.
* revert
* [autofix.ci] apply automated fixes
* Remove Knowledge Bases JSON configuration and clean up KnowledgeBasesTab component by eliminating unused imports and template creation functionality.
* [autofix.ci] apply automated fixes
* Enhance routing structure by adding admin and login routes with protected access. Refactor flow routes for improved organization and clarity.
* added template back
* Use chroma for stats computation
* Fix ruff issue
* [autofix.ci] apply automated fixes
* Update Knowledge Bases.json
* Update Knowledge Bases.json
* Rename to just knowledge
* feat: enhance Jest configuration and add new tests for Knowledge Base components
- Updated jest.config.js to include a new setup file and refined test matching patterns.
- Introduced jest.setup.js for mocking globals and Vite-specific syntax.
- Added tests for KnowledgeBaseDrawer, KnowledgeBaseEmptyState, KnowledgeBaseSelectionOverlay, KnowledgeBasesTab, and KnowledgePage components.
- Created utility functions for testing and mock data for knowledge bases.
- Implemented tests for utility functions related to knowledge base formatting.
* [autofix.ci] apply automated fixes
* refactor: reorganize imports and clean up console log in Dropdown component
- Moved and re-imported necessary dependencies for better structure.
- Removed unnecessary console log statement to clean up the code.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* feat: add success callback for knowledge base creation in NodeDialog component
- Introduced a new success callback to handle knowledge base creation notifications.
- Enhanced dialog closing logic with a delay for Astra database tracking.
- Reorganized imports for better structure.
* refactor: update table component to handle single-toggle columns
- Renamed functions and variables to improve clarity regarding single-toggle columns (Vectorize and Identifier).
- Updated logic to ensure proper editability checks for single-toggle columns.
- Adjusted related components to reflect changes in column handling and rendering.
* [autofix.ci] apply automated fixes
* feat: Add unit tests for KBIngestionComponent (#9246)
* [autofix.ci] apply automated fixes
* fix: remove unnecessary drawer open state change in KnowledgePage
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* Remove kb_info output from KBIngestionComponent (#9275)
* [autofix.ci] apply automated fixes
* Update Knowledge Bases.json
* Use settings service for knowledge base directory
Replaces the hardcoded knowledge base directory path with a value from the settings service. This improves configurability and centralizes directory management.
* Fix knowledge bases mypy issue
* test: Update file page tests for consistency and clarity
- Changed expected title text from "My Files" to "Files" for accuracy.
- Removed unnecessary parentheses in arrow functions for cleaner syntax.
- Updated test assertions to ensure visibility checks are clear and consistent.
- Improved readability by standardizing the formatting of test cases.
* test: Update expected title in file upload component test for accuracy
- Changed expected title text from "My Files" to "Files" to reflect the correct page title.
* [autofix.ci] apply automated fixes
* Fix tests on backend
* Update kb_ingest.py
* [autofix.ci] apply automated fixes
* Switch to two templates for KB
* Update names and descs
* [autofix.ci] apply automated fixes
* Rename templates
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* Add on grid ready handler to select required nodes after opening
* [autofix.ci] apply automated fixes
* Updated mcp server tab test to test if state is maintained after refresh
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
* remove unused location store
* make sidebar component replace route in order for back button to go back to previous page before settings
* added test to back button functionality
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Remove extraneous flag from is-unicode-supported
The 'extraneous' flag was removed from the is-unicode-supported dependency in package-lock.json to reflect its correct status in the bundle.
Add GPT-5 series models to OpenAI metadata
Introduces metadata entries for the new GPT-5, GPT-5-mini, GPT-5-nano, and GPT-5-chat-latest models in the OPENAI_MODELS_DETAILED list. This update ensures these models are recognized and available for use in the application.
* Comment out Anthropic provider test and update API key usage
Temporarily commented out the Anthropic provider selection in the Research Translation Loop integration test and switched the API key input to use OPENAI_API_KEY. This change is made pending a way to properly test Anthropic integration.
* Update Research Translation Loop.spec.ts
* Improve session fixture cleanup and engine handling
Refactors the session fixture to use an in-memory SQLite engine with proper disposal and ensures tables are dropped and the engine is disposed of after tests. This enhances resource management and test isolation.
* Update src/backend/tests/conftest.py
---------
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
* update MCP Tests
* [autofix.ci] apply automated fixes
* Update util.py
* [autofix.ci] apply automated fixes
* Refactor MCP session manager for better configurability and cleanup (#9176)
* Add log rotation and header validation features
Introduces support for log rotation via the LANGFLOW_LOG_ROTATION environment variable and CLI/config options, with documentation updates. Adds header validation and sanitization for MCP connections, ensuring RFC 7230 compliance and security. Frontend and backend now support passing custom headers for MCP servers. Includes extensive new and updated unit tests for header handling, MCP utilities, and log rotation.
* Add unit tests for MCP utilities and update disconnect logic
Added comprehensive unit tests for MCP utility functions, session management, header validation, and client classes in test_mcp_util.py. Updated MCPStdioClient and MCPSseClient disconnect methods for clearer session cleanup logic. Refactored test_mcp_component.py to remove redundant and duplicated tests, consolidating coverage in the new test suite.
* [autofix.ci] apply automated fixes
* Update test_mcp_memory_leak.py
* Update util.py
* Improve session and process cleanup in MCP
Added explicit session closing and a short delay to allow subprocess transports to clean up, reducing warnings and potential memory leaks. Test code now waits longer after cleanup and increases process termination timeout to ensure all child processes are properly terminated.
* Improve session and process cleanup logic
Enhanced MCPSessionManager to handle both async and sync session closing methods, using inspection to determine awaitability. Updated memory leak test to more robustly wait for and clean up child processes, logging process states and handling termination more gracefully.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* update MCP Tests
* [autofix.ci] apply automated fixes
* Update util.py
* [autofix.ci] apply automated fixes
* Refactor MCP session manager for better configurability and cleanup (#9176)
* Add log rotation and header validation features
Introduces support for log rotation via the LANGFLOW_LOG_ROTATION environment variable and CLI/config options, with documentation updates. Adds header validation and sanitization for MCP connections, ensuring RFC 7230 compliance and security. Frontend and backend now support passing custom headers for MCP servers. Includes extensive new and updated unit tests for header handling, MCP utilities, and log rotation.
* Add unit tests for MCP utilities and update disconnect logic
Added comprehensive unit tests for MCP utility functions, session management, header validation, and client classes in test_mcp_util.py. Updated MCPStdioClient and MCPSseClient disconnect methods for clearer session cleanup logic. Refactored test_mcp_component.py to remove redundant and duplicated tests, consolidating coverage in the new test suite.
* [autofix.ci] apply automated fixes
* Update test_mcp_memory_leak.py
* Update util.py
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat: add import utilities for LangFlow components
- Introduced a new module `_importing.py` containing the `import_mod` function.
- This function dynamically imports attributes from specified modules, enhancing modularity and flexibility in component initialization.
- Comprehensive docstring added for clarity on usage and parameters.
* feat: implement dynamic imports for LangFlow components
- Added dynamic import functionality to various LangFlow components, allowing for lazy loading of attributes on access.
- Introduced mapping in each component's to manage imports efficiently.
- Enhanced error handling for import failures, providing clearer messages for missing attributes.
- Updated method to reflect available attributes for better introspection and tab-completion support.
- Comprehensive docstrings added to improve documentation and usability.
* test: add comprehensive tests for dynamic imports and component accessibility
- Introduced integration tests for dynamic import functionality, ensuring components are discoverable and instantiable post-refactor.
- Added unit tests for the `_import_utils` module, validating the `import_mod` function's behavior and error handling.
- Implemented tests to confirm all component modules are importable and maintain backward compatibility with existing import patterns.
- Enhanced performance tests to measure lazy loading efficiency and memory usage during component access.
- Ensured that all components have the required attributes for dynamic loading and that circular imports are prevented.
* chore: update ruff pre-commit hook to version 0.12.2 in configuration file
* refactor: update warning handling for dynamic imports
- Moved the warning suppression for LangChainDeprecationWarning into the dynamic import context to ensure it only applies during the import process.
- This change enhances clarity and maintains the original functionality while improving the robustness of the import mechanism.
* test: enhance dynamic import integration tests for component attributes
- Removed unnecessary import of AgentComponent and added assertions to verify essential attributes of OpenAIModelComponent, including display_name, description, icon, and inputs.
- Ensured that each input field has the required attributes for better validation of component integrity during dynamic imports.
* refactor: update import paths for Message class in conversation utilities
- Changed the import of the Message class from langflow.field_typing to langflow.schema.message across multiple utility files, ensuring consistency and alignment with the updated module structure.
- This refactor enhances code clarity and maintains compatibility with the latest schema definitions.
* refactor: remove Vectara components from LangFlow
- Deleted the Vectara components module from the codebase, streamlining the component structure.
- This change helps to reduce complexity and maintain focus on core functionalities.
* refactor: remove Vectara references from LangFlow component imports
- Eliminated Vectara from both the import statements and dynamic imports mapping, streamlining the component structure.
- This change contributes to reducing complexity and maintaining focus on core functionalities within the LangFlow framework.
* [autofix.ci] apply automated fixes
* fix: remove 'vectara' from __all__ in components module
* refactor: improve error handling tests for dynamic imports
* test: add tests for ModuleNotFoundError handling with None and special module names
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* ✨ (authContext.tsx): Add setCookieWithOptions function to set cookies with specific options for better security and control
📝 (use-post-refresh-access.ts): Update cookies.set calls to use setCookieWithOptions function for consistent cookie settings
♻️ (utils.ts): Refactor setCookieWithOptions function to include httpOnly option and update sameSite values to lowercase for consistency
* 📝 (frontend): add useGetCookieAuth and useSetCookieAuth hooks for managing cookies in auth context
🔧 (frontend): refactor authStore to use new cookie hooks for managing access token and api key cookies
🔧 (frontend): refactor use-post-logout and use-post-refresh-access to use new cookie hooks for cookie management
* 📝 (frontend): Remove redundant useGetCookieAuth hook and use direct access to cookies in authStore and related components
🔧 (utils): Refactor getAuthCookie and setAuthCookie functions to use react-cookie directly for better code organization and readability
Increase max file upload size to 1024 MB
Updated the default value of max_file_size_upload from 100 MB to 1024 MB in the Settings class to allow larger file uploads.
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 🐛 (chroma.py, local_db.py): Handle ImportError when importing filter_complex_metadata function to avoid crashing the application
💡 (chroma.py, local_db.py): Add try-except block to gracefully handle ImportError and log a warning message if the function cannot be imported
* ♻️ (local_db.py): remove unnecessary try-except block and simplify document adding process in LocalDBComponent
* 🔧 (chroma.py): Remove unused import 'filter_complex_metadata' and add support for filtering complex metadata to prevent ChromaDB errors
🔧 (test_chroma_vector_store_component.py): Add test cases for filtering complex metadata, preserving simple metadata types, handling single file upload scenario, fallback behavior when import fails, and handling empty and None metadata values.
* [autofix.ci] apply automated fixes
* 🐛 (test_chroma_vector_store_component.py): fix failing test due to None value being filtered out by ChromaDB metadata handling
* 🔧 (test_chroma_vector_store_component.py): refactor test method names and data to improve clarity and consistency in metadata filtering and preservation logic
* 🐛 (test_chroma_vector_store_component.py): fix missing variable assignment for error message in mocked import error to improve error handling and debugging in tests
* [autofix.ci] apply automated fixes
* 🔧 (test_chroma_vector_store_component.py): delete the file test_chroma_vector_store_component.py as it is no longer needed in the project
* [autofix.ci] apply automated fixes
* ✨ (test_chroma_vector_store_component.py): add unit tests for ChromaVectorStoreComponent including create_db, create_collection_with_data, similarity_search, mmr_search, search_with_different_types, search_with_score, duplicate_handling, chroma_collection_to_data, metadata_filtering_with_complex_data, metadata_filtering_fallback
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* ✨ (sql.py): add new output definitions for the SQLAgentComponent to include 'Agent' and 'Response' outputs for better functionality and flexibility
* 📝 (sql.py): update import statement for Output class to match new file structure
♻️ (sql.py): refactor Output class usage to remove unnecessary attributes and improve code readability
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
✨ (google_generative_ai_constants.py): add new Google Generative AI models (gemini-2.5 and gemini-2.0) to the list of supported models.
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* refactor: Simplify flow execution validation by removing unnecessary asyncio.wait_for calls
Updated the validate_flow_execution function to directly use the client.post and client.get methods with a timeout parameter, improving code readability and maintainability. This change eliminates redundant timeout handling while ensuring consistent timeout values across API calls.
* refactor: Enhance template tests for improved structure and validation
Refactored the template tests in `test_starter_projects.py` to utilize parameterization for better readability and maintainability. Introduced helper functions to retrieve template files and disabled tracing for all tests. Updated individual test methods to validate JSON structure, flow execution, and endpoint validation, ensuring comprehensive coverage of template functionality. This change streamlines the testing process and enhances the robustness of the test suite.
* refactor: Update project metadata and import paths in starter project JSON files
Modified the metadata section in multiple starter project JSON files to reflect updated code hashes and module paths, transitioning from 'lfx' to 'langflow' components. This change enhances consistency across the codebase and ensures that the correct modules are referenced for improved maintainability and clarity.
* chore: Update template test commands to utilize parallel execution
Modified the commands in the Makefile and CI workflows to include the `-n auto` option for pytest, enabling parallel test execution for the starter project template tests. This change enhances test performance and efficiency across the codebase.
* chore: Remove news-aggregated.json file
Deleted the news-aggregated.json file
* Update test_template_validation.py
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ✨ (frontend): introduce CustomInputFileComponent to customize file input component in parameter render component for better flexibility and customization. Remove InputFileComponent from parameter render component and replace it with CustomInputFileComponent.
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ♻️ (components.py): refactor get_and_cache_all_types_dict function to filter out base components path and only load custom components for traditional full loading. This improves code readability and maintainability.
* ✨ (test_component_loading_fix.py): Add tests for the component loading fix that filters out BASE_COMPONENTS_PATH from custom components.
* [autofix.ci] apply automated fixes
* 🐛 (test_component_loading_fix.py): remove unnecessary test case for GitHub issue #8967 and fix test_component_merging_logic method to handle custom component loading failure properly
♻️ (test_component_loading_fix.py): refactor test_component_loading_fix.py to improve readability and remove redundant try-except block in test_component_merging_logic
* [autofix.ci] apply automated fixes
* ♻️ (components.py): refactor _process_single_module function to simplify create_component_template call and improve code readability
♻️ (components.py): refactor _determine_loading_strategy function to handle component loading strategy based on lazy_load_components setting and improve code structure
* 📝 (components.py): add comments and improve readability in _process_single_module function
✨ (components.py): introduce _determine_loading_strategy function to determine and execute the appropriate component loading strategy based on settings service
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* add template tests
* remove files
* adding validate flow build
* add validate endpoint and flow execution
* Update .github/workflows/template-tests.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update src/backend/base/langflow/utils/template_validation.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* [autofix.ci] apply automated fixes
* change workflow running
* add ci
* fix test
* fix test
* delete when push
* fix: Exclude template tests from unit test bundle
Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Exclude template tests from unit test bundle
Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Exclude template tests from unit test bundle
Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Remove remaining merge conflict markers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Improve validate.py unit tests to eliminate CI failures
Fixed 4 failing tests in test_validate.py:
- test_code_with_syntax_error: Better error message handling for syntax errors
- test_raises_error_for_missing_function: Handle StopIteration along with ValueError
- test_creates_simple_class: Use optional constructor parameter to avoid TypeError
- test_handles_validation_error: Use proper ValidationError constructor from pydantic_core
- test_creates_context_with_langflow_imports: Remove invalid module patching
- test_creates_mock_classes_on_import_failure: Use proper import mocking
All 50 validate tests now pass consistently, improving CI stability.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* enhance: Add comprehensive edge case tests for template_validation.py
Added 6 additional test cases to improve coverage of template_validation.py:
- test_validate_stream_exception: Tests Graph.validate_stream() exception handling
- test_code_validation_other_exceptions: Tests TypeError/KeyError/AttributeError handling
- test_vertices_sorted_without_end_vertex_events: Tests variable usage tracking
- test_vertex_count_tracking: Tests vertex_count increment paths
- test_empty_lines_in_stream: Tests empty line handling in event streams
- test_event_stream_validation_exception: Tests exception handling in _validate_event_stream
These tests target the remaining 7 uncovered lines to maximize coverage percentage.
Total tests: 40 (all passing)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add smoke tests workflow for PR validation
- Adds smoke-test label trigger for running tests without API keys
- Runs backend tests excluding api_key_required markers
- Runs full frontend test suite with mocked APIs
- Provides fast feedback (~10-15 min) before lgtm label
- Enables external contributors to validate changes without API costs
- Comments results back to PR automatically
Usage: Add 'smoke-test' label to any PR to trigger
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Fix YAML indentation in smoke-tests workflow script block
* refactor: Focus smoke tests on critical functionality only
- Run only 10 essential backend test files (version, schema, serialization, etc.)
- Run only frontend unit tests (skip integration/e2e)
- Reduce timeout from 15 to 8 minutes
- Target critical functionality without external dependencies
- Avoid problematic database/API-dependent tests
* fix: Use correct Jest CLI option --testPathPatterns
* add frontend tests
* add tests
* change to essential tests
* fix: Create superuser in test_load_bundles_from_urls test
The test_load_bundles_from_urls test was failing because the load_bundles_from_urls
function expects a superuser to exist in the database, but the test client fixture
sets LANGFLOW_AUTO_LOGIN=false by default, which doesn't create a superuser.
This fix creates a superuser in the test database before calling the function,
resolving the 'Superuser not found in the database' error.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* add on conditions
* fix: Check PR labels correctly for smoke test trigger
Change condition from github.event.label.name to
github.event.pull_request.labels.*.name to work with all trigger
events (synchronize, opened, etc), not just labeled events.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* add workdispatch
* remove initial test
* adding timeout minutes
* edit env var
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor: Standardize import statements and improve code formatting in reactflowUtils.ts
* [autofix.ci] apply automated fixes
* refactor: Standardize string quotes and improve test readability across multiple test files
- Updated string quotes from double to single in various test files for consistency.
- Enhanced test readability by replacing specific text selectors with test IDs.
- Adjusted wait conditions and element interactions to align with updated selectors.
- Ensured all tests maintain functionality while improving code clarity.
* [autofix.ci] apply automated fixes
* test: Add comprehensive Jest tests for createNewFlow function
- Introduced a new test file for the createNewFlow function to validate its behavior.
- Covered various scenarios including default value handling, flow parameter processing, edge cases, and special property handling.
- Ensured immutability of input parameters and consistency of output for the same inputs.
- Mocked dependencies to isolate the function's logic and improve test reliability.
* [autofix.ci] apply automated fixes
* test: Standardize string quotes and improve readability in auto-save and MCP server tests
- Updated string quotes from double to single for consistency across test files.
- Enhanced test readability by utilizing test IDs for element selection.
- Adjusted wait conditions and interactions to align with updated selectors while maintaining test functionality.
* [autofix.ci] apply automated fixes
* chore: update ESLint configuration and improve test selectors in auto-save-off.spec.ts
- Simplified ESLint configuration by removing unnecessary plugins and options.
- Enhanced test selectors in auto-save-off.spec.ts to use test IDs for better reliability and clarity.
* chore: enhance ESLint configuration with Prettier integration and improved rules
- Added Prettier as a plugin to the ESLint configuration for better code formatting.
- Updated parser options and extended rules for improved code quality and consistency.
- Ensured compatibility with TypeScript and React environments.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Store mcp server headers
* Add headers on pre check url and is valid url
* adds validation of headers according to RFC 7230
* Fixed sanitized value
* Added backend tests for mcp util.py to increase coverage
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* make key pair input use flatmap id on data test ids
* added testids
* added random test names and added tests for persistence
* fix ruff lint
* [autofix.ci] apply automated fixes
* Fix mypy lint errors
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ✨ (AccountMenu/index.tsx): Add computeNonPrereleaseVersion function to calculate non-prerelease version for comparing versions
📝 (utils.ts): Add computeNonPrereleaseVersion function to extract non-prerelease version for version comparison in AccountMenu component
* refactor: replace computeNonPrereleaseVersion with stripReleaseStageFromVersion for version comparison in AccountMenu component
- Updated AccountMenu to utilize stripReleaseStageFromVersion for determining the latest version.
- Removed computeNonPrereleaseVersion function from utils and replaced it with stripReleaseStageFromVersion for clarity and consistency in version handling.
* ✅ (strip-release-fn.test.ts): add standalone test for stripReleaseStageFromVersion function to avoid dependency issues in test environment
* 📝 (strip-release-fn.test.ts): add detailed documentation for the stripReleaseStageFromVersion function to explain its functionality and examples
* 🐛 (python_code_structured_tool.py): fix issue with handling default values in function arguments to prevent potential errors
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Changed Youtube to YouTube
* Updated AIML to AI/ML API
* Updated AI/ML Model name
* Changed Anthropic description
* updated arXiv name
* Set Astra Vectorize as legacy
* Updated get env var
* Updates firecrawl names
* Updated Icon for Google Gen AI embeddings
* Add Space on Home Assistant
* Updated Hugging Face name
* Updated Maritalk Name
* Updated Not Diamond name
* Updated ScrapeGraph names
* Changed SearchApi Name
* Changed TwelveLabs naming
* Updated AstraDB naming
* Updated VertexAI naming
* Updated Wolfram
* Updated Yahoo naming
* Updated Yahoo Finance name
* Updated Yahoo Finance
* [autofix.ci] apply automated fixes
* Update google serper bundle
* updated ai ml icon name
* Updated maritalk
* Changed ai ml api name
* removed openai from base url
* Revert components-bundles changes
* revert changes on components-vector-stores
* Revert changes on deployment-hugging-face-spaces
* Revert changes on integrations-nvidia-ingest
* Revert changes on release-notes
* Update changes on sequential agent
* [autofix.ci] apply automated fixes
* fixed filterSidebar test
* updated filter edge test
* updated shard 11 test with new sidebar names
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Added color to number
* Group cleanlab outputs
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* init auth forms
* Add iam endpoint
* Add radix radio
* Add radio group UI element
* Add IAM endpoint to types
* Add auth modal
* Remove auth from tools component
* Add auth modal to mcp server tab
* Add placeholders to fields
* Add dynamic headers
* changed authentication name
* CHanged paddings
* Added header and button under feature flag
* [autofix.ci] apply automated fixes
* update api key form field
* add credential handling and fix feature flag
* Update autologin condition
* design update
* style updates
* ci details
* revert ci logs
* test update, ff name update, and username + pass -> basic
* restore ci
* default fix
* added iam endpoint
* add oauth
* remove secretstr
* updated backend test and schema
* updated test
* updated test user can update
* test fix
---------
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ✨ (flows.py): Improve flow naming logic to handle duplicate names more effectively and accurately
📝 (test_rename_flow_to_save.py): Add unit tests to ensure correct numbering and handling of duplicate flow names
* [autofix.ci] apply automated fixes
* ✨ (test_rename_flow_to_save.py): refactor test functions to remove unnecessary session parameter and improve code readability
* 📝 (flows.py): improve regex pattern to extract numbers only from flows following a specific naming convention to avoid extracting numbers from the original flow name if it contains parentheses
* [autofix.ci] apply automated fixes
* 📝 (flows.py): improve comments for better readability and understanding of regex usage in extracting numbers from flow names
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Add dual output support to Agent component with structured JSON parsing
## Summary
- Add "Structured Response" output alongside existing "Response" output
- Filter out conflicting json_mode field from OpenAI inputs
- Implement robust JSON parsing with fallback handling
## Changes Made
### Agent Component (agent.py)
- Add second output: "Structured Response" (Data type) with tool_mode=False
- Filter json_mode from OpenAI inputs to prevent UI conflicts
- Add json_response() method with multi-stage JSON parsing:
- Direct JSON parsing for valid responses
- Regex extraction for embedded JSON in text
- Graceful error handling with diagnostic info
- Share execution between outputs (no duplicate agent runs)
- Fix model building to handle missing json_mode attribute
### Tests (test_agent_component.py)
- Add 9 comprehensive test cases covering:
- Dual output structure validation
- Input filtering verification
- JSON parsing (valid, embedded, error cases)
- Model building without json_mode
- Shared execution efficiency
- Frontend node structure
- Component initialization
## Benefits
- Users get both Message and Data output types to choose from
- Clean UI without confusing duplicate JSON toggles
- Robust JSON parsing handles various response formats
- Efficient single-execution approach
- Maintains backward compatibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* [autofix.ci] apply automated fixes
* update to templates with model list update
* [autofix.ci] apply automated fixes
* Update test_agent_component.py
* update to the test and update to templates
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
✨ (custom-markdown-field.tsx): create a new CustomMarkdownField component to encapsulate MarkdownField with additional props
♻️ (chat-message.tsx): refactor ChatMessage component to use CustomMarkdownField instead of MarkdownField for better customization and reusability
* feat: filter out base components path in custom component loading
* revert changes to allow testing the function
* feat: add module_name parameter to custom component template functions
* feat: include full module name in component template creation
* feat: add module metadata to various starter project JSON files
* feat: add code hash generation for custom component templates
* test: add unit tests for code hash and module metadata functionality
* feat: add code hash to metadata in various starter project JSON files
* feat: refactor code hash generation to accept source code and class name
* feat: implement loading strategy for custom components in settings service
* Update metadata for various starter project JSON files to include code hashes and module references for ChatInput and ChatOutput components. This enhances traceability and consistency across the project configurations.
* refactor: improve _generate_code_hash function for better error handling and clarity
- Simplified the logic to generate a SHA256 hash of the source code.
- Added explicit error handling for empty source code, encoding issues, and type errors.
- Updated docstring to reflect changes in argument descriptions and added information about raised exceptions.
* test: add unit tests for metadata functionality in custom utils
- Introduced tests for the _generate_code_hash function, covering basic hash generation, error handling for empty and None source, hash consistency, and uniqueness for different code.
- Added tests to verify metadata addition in template building functions, ensuring that module names and code hashes are correctly included in the metadata of custom components.
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* feat: implement file upload API snippet generation
Add proper two-step file upload support for API code generation:
- Detect file tweaks in ChatInput (string), File/VideoFile (path/file_path)
- Generate step-based cURL commands with separate copy buttons
- Fix ChatInput to use correct /api/v1/run endpoint with tweaks structure
- Update JavaScript and Python generators with proper endpoints and payloads
- Support dynamic node IDs and processedPayload values
- Implement step parsing UI for cURL with proper formatting
Co-Authored-By: Automagik Genie <genie@namastex.ai>
* fix: update JavaScript API snippet generator for native Node.js
Replace browser-based FormData approach with native Node.js http module
- Use built-in fs, http, and path modules instead of browser APIs
- Manually construct multipart/form-data payloads
- Add proper error handling and HTTP request helpers
- Support both ChatInput and File/VideoFile upload scenarios
- Maintain authentication header support
Co-Authored-By: Automagik Genie <genie@namastex.ai>
* fix: include output_type, input_type, input_value in File component cURL snippets
File/VideoFile components were missing the required payload fields when
generating cURL commands, causing flows to fail execution. Added the missing
fields to match the working pattern used in Chat Input components.
Co-Authored-By: Automagik Genie <genie@namastex.ai>
* fix: include output_type, input_type, input_value in Python and JavaScript File component snippets
File/VideoFile components were missing the required payload fields in Python
and JavaScript generators, matching the fix applied to cURL snippets.
Co-Authored-By: Automagik Genie <genie@namastex.ai>
* fix: use 'path' field for File components instead of 'file_id'
File components require the 'path' field from v2 upload response as an array,
not 'file_id'. Updated all three generators:
- Changed file_id to file_path variable extraction
- Changed "file_id": value to "path": [value] in tweaks
- Updated placeholder text for consistency
This fixes the "No files to process" error in File components.
Co-Authored-By: Automagik Genie <genie@namastex.ai>
* fix: implement additive file upload API snippet generation
- Fixed UI parsing to handle multiple file components correctly
- Consolidated upload steps into single step with multiple commands
- All file components (ChatInput, File, VideoFile) now work additively
- Simplified UI to show only 2 steps: uploads and execution
- Improved scrolling for better debugging experience
- Removed debug console.log statements
* fix: enhance API snippet generation with file upload support and consistent authentication
- Add multi-step file upload handling for ChatInput, File, and VideoFile components
- Implement automatic session ID generation using UUIDs across all snippets
- Ensure API key is always required in generated code (Python, JavaScript, cURL)
- Remove unused isAuth parameter from code generation logic
- Add comprehensive unit tests for file detection and code generation
- Support both Unix/Linux and PowerShell platforms for cURL commands
* [autofix.ci] apply automated fixes
* 📝 CodeRabbit Chat: Fix curl file upload commands for ChatInput and File/VideoFile APIs
* fix: coderabit's feedbacks
* [autofix.ci] apply automated fixes
* fix: use curl.exe for PowerShell to avoid alias conflicts
- Change curl to curl.exe in PowerShell snippets to avoid conflicts with Invoke-WebRequest alias
- Remove unused hasChatFiles variable from all code generators
- Remove redundant edge case check in curl code generator
- Fix Python syntax error (|| to or)
- Fix JavaScript crypto.randomUUID() to generate at runtime
- Remove unused singleLinePayload variable in Unix branch
- Update tests to match new httpModule usage pattern
* [autofix.ci] apply automated fixes
* fix: remove duplicate API key declaration and add file existence validation
- Remove duplicate apiKey declaration from top-level generated code
- Keep only the apiKey declaration inside uploadAndExecuteFlow function
- Add fs.existsSync() validation before reading files in createFormData
- This prevents runtime errors when files don't exist
- Maintains 'YOUR_API_KEY_HERE' placeholder as requested
* fix: improve hostname/port extraction robustness in JavaScript generator
- Replace fragile string splitting with proper URL parsing
- Use URL constructor to reliably extract hostname and port
- Handle IPv6 addresses, URLs with authentication, and complex hostnames
- Apply fix to all three usage locations: ChatInput, File/VideoFile, and execution options
- Fallback to default ports (443 for HTTPS, 80 for HTTP) when port not specified
* [autofix.ci] apply automated fixes
* refactor: streamline code snippet generation for API calls
- Remove deprecated step parsing logic in favor of structured data handling
- Update getNewCurlCode function to return structured steps for curl commands
- Simplify rendering of steps in APITabsComponent to enhance readability and maintainability
- Ensure consistent handling of code snippets across different platforms
* [autofix.ci] apply automated fixes
* test: enhance API snippet generation tests for structured output
- Update tests for getNewCurlCode to validate structured steps output
- Ensure API key and session_id checks accommodate both string and object return types
- Improve clarity and maintainability of test cases for API snippet generation utilities
* fix: update session_id handling in curl code generation
- Replace dynamic session_id generation with a placeholder "YOUR_SESSION_ID_HERE" for both Unix and PowerShell environments.
- Update tests to reflect the change, ensuring they check for the new session_id placeholder instead of UUID generation commands.
- Enhance clarity in generated curl commands and maintain consistency across different platforms.
* 🔧 (frontend): refactor NodeInputField component to improve readability and maintainability
🔧 (frontend): refactor codeTabs component to add support for auto login feature
🔧 (frontend): refactor api-snippet-generation test to include tests for API key authentication
🔧 (frontend): refactor get-curl-code, get-js-api-code, and get-python-api-code to conditionally include API key based on shouldDisplayApiKey parameter
---------
Co-authored-by: Automagik Genie <genie@namastex.ai>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* reactor to have common mcp codes in mcp_support
* [autofix.ci] apply automated fixes
* Refactor MCP API argument passing and function signatures
Updated function calls in mcp_projects.py to use explicit keyword arguments for clarity. Refactored mcp_support.py to use more concise query assignment and added keyword-only arguments to handle_call_tool and handle_list_tools for improved code readability and maintainability.
* Rename mcp_support.py to mcp_utils.py and update imports
Renamed mcp_support.py to mcp_utils.py for clarity and updated all relevant import statements in mcp.py and mcp_projects.py to reflect the new module name.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>