* 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>
* minimal-working-code
* remove-old-files-and-add-new-content
* cleanup
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* intro-and-sidebars
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
* add-fake-resume
* docs: update chat-with-files tutorial to include Langflow API key and clarify file upload process
* docs: enhance chat-with-files tutorial to support multiple file uploads with example code
* move-file-and-fixpath
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs: update fake resume with new example details
* Apply suggestions from code review
* initial-content
* basic-app
* more
* more
* fix-screenshot
* cleanup
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* clarify-server-side-geolocation
* revise intro
* pt 2
* last part
* change file type
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>
🐛 (api.tsx): fix issue where Authorization header was not being set correctly for internal requests
💡 (api.tsx): improve logic to set Authorization header only for internal requests and add custom headers for all requests
* test: enhance agent component tests and add new fixture for database-less sessions
- Added `use_noop_session` fixture to facilitate testing without a database.
- Expanded `TestAgentComponent` with new tests for agent responses using the Calculator tool and validation across all OpenAI and Anthropic models.
- Updated `test_component.py` to include tests for message sending without a database, ensuring proper event handling and message integrity.
- Refactored existing tests for clarity and consistency.
* fix: enhance user retrieval logic in get_or_create_super_user and teardown_superuser functions
- Updated user retrieval in both functions to handle different result types from the database query, ensuring robustness against unexpected return values.
- Added checks for `first()` method and list type to improve error handling and maintainability.
* feat: add support for no-op database operations in settings
- Introduced `use_noop_database` configuration option to disable all database operations, controlled by the `LANGFLOW_USE_NOOP_DATABASE` environment variable.
- Updated the `use_noop_session` fixture to reflect the new environment variable for testing without a database.
* feat: implement NoopSession for database-less operations
- Added NoopSession class to provide a no-operation database session, allowing for testing and operation without a real database connection.
- Updated DatabaseService to utilize NoopSession when the `use_noop_database` setting is enabled, ensuring all database operations are disabled in this mode.
- Enhanced error handling and logging for session management, improving robustness in scenarios where the database is not in use.
* refactor: update import paths for NoopSession in test files
- Changed import path for NoopSession from `langflow.services.database.service` to `langflow.services.database.session` in both `test_agent_component.py` and `test_component.py`.
- This refactor improves code organization and aligns with recent changes in the project structure.
* feat: enhance NoopSession with result handling methods
- Added an internal _NoopResult class to the NoopSession, providing methods `first()`, `all()`, and `one_or_none()` for better handling of no-operation results.
- This enhancement improves the usability of NoopSession in testing scenarios by mimicking expected database query behaviors.
* refactor: improve logging for NOOP database session
- Changed the log level from warning to info for the NOOP database session message in the DatabaseService class.
- This adjustment enhances clarity in logging, indicating that all DB operations are disabled without implying an error condition.
* docs: improve docstring formatting for custom_component_update function
- Reformatted the docstring for the custom_component_update function to enhance readability by breaking long lines into multiple lines.
- This change improves documentation clarity, making it easier for developers to understand the function's purpose and behavior.
* docs: add LANGFLOW_USE_NOOP_DATABASE environment variable documentation
- Introduced documentation for the new LANGFLOW_USE_NOOP_DATABASE environment variable, which allows users to enable a no-op database mode, avoiding database connections and operations.
- This addition enhances the clarity of configuration options available for Langflow, aiding users in understanding how to run flows without a database.
* refactor: move NOOP database session logging to settings
- Removed the logging statement from the DatabaseService class and added it to the `set_use_noop_database` field validator in the Settings class.
- This change centralizes the logging for the NOOP database session, improving code organization and ensuring that the message is logged whenever the setting is applied.
* docs: Add heading and codeblock events for segment
* docs: Update scroll event names
* docs: improve capture of code block language
* docs: ensure code block language capture for mobile
* refactor: update config response handling and import structure
- Moved EventManager import to the correct module path.
- Refactored get_config endpoint to utilize ConfigResponse.from_settings for improved clarity and maintainability.
- Updated ConfigResponse to include a class method for instantiating from Settings, enhancing the encapsulation of configuration logic.
* 📝 Add docstrings to `improve-docs-and-configsetup` (#8677)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
---------
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>
* semver
* make-h3
* move-version-match-note
* comma
* important
* Update docs/docs/Support/release-notes.md
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* 📝 (frontend): Add helper lines feature to display alignment guides for nodes during drag and drop operations. This feature includes the ability to toggle helper lines on and off, snap nodes to alignment positions, and visually display horizontal and vertical lines for alignment.
* ♻️ (helper-lines.ts): Remove unnecessary comments and improve code readability by removing redundant comments explaining basic logic in helper-lines.ts
* 🔧 (canvasControlsComponent): improve tooltip text and icon based on the state of helperLineEnabled to provide better user experience
* ✨ (PageComponent/index.tsx): Add support for dragging nodes with helper lines and snapping to grid position during drag for better user experience.
* 🔧 (applies.css): reduce stroke width from 1.5 to 1 for better visual appearance
* ✨ (JigsawStack/index.tsx): introduce useDarkStore hook to handle dark mode state in JigsawStackIcon component
* 🐛 (JigsawStackIcon.jsx): fix issue where isdark prop was not being converted to a boolean before being used in the fill color logic
📝 (header-buttons.tsx): Add useEffect hook to update state variables based on userData changes
🔧 (header-buttons.tsx): Refactor useState calls to initialize state variables with userData values and update them on userData changes using useEffect
* 🐛 (index.tsx): Fix logic to switch between flow types based on other tab items presence
📝 (index.tsx): Update dependencies for useEffect hook to include all relevant variables for proper functionality
* ♻️ (index.tsx): refactor dependencies of the useEffect hook to only include isEmptyFolder as it is the only dependency used within the hook. This improves code readability and maintainability.
* Fix check for server ready when using 0.0.0.0 as host
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* fix: add noqa comment to health check host assignment for clarity
---------
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 NVIDIA Remix starter template
Introduced a new JSON configuration file for the NVIDIA Remix starter project, defining nodes and edges for chat input, output, and agent interactions. This setup enhances the integration of the NVIDIA RTX Remix Toolkit REST API, providing a structured approach for building chat-based applications.
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
feat: add code field to build configuration in custom component update if it was removed
- Introduced `add_code_field_to_build_config` utility function to enhance build configuration with a code field.
- Updated `custom_component_update` to conditionally add the code field if it is not already present, improving component customization capabilities.
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* docs: add env var setup for macOS and Windows GUI
* style-and-cleanup
* docs-review
* add-env-vars-to-troubleshooting
* Update docs/docs/Get-Started/get-started-installation.md
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs-review
---------
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Improved health check and stream URL check on MCP
* Improved health check by validating session connectivity
* Changed mcp servers from json checks
* Fixed imports
* Fixed mcp server tab test
* minimal-working-code
* remove-old-files-and-add-new-content
* cleanup
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* intro-and-sidebars
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
* add-fake-resume
* docs: update chat-with-files tutorial to include Langflow API key and clarify file upload process
* docs: enhance chat-with-files tutorial to support multiple file uploads with example code
* move-file-and-fixpath
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs: update fake resume with new example details
* Apply suggestions from code review
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* initial-content
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* peer-review
* fix-broken-link
* link
* language
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* add-mac-uninstall-error
* windows-commands
* style
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* tabs-and-tab-groups
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* add-package-management-for-lf-desktop
* username
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* combine-oss-dependency-management
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* add-api-key-header-to-examples
* api-examples-add-keys
* auth-login-behavior-changes
* no-all-endpoint
* syntax
* text
* cleanup
* notice-for-mcp
* include-instructions-for-exporting-key
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* chat-io-double-quotes
* auth-page-docs-review
* docs-review
* update-api-overview-page-docs-review
* docs-and-eng-review
* details-title
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs-review
* add-env-var-to-table
* clarify-cli-key-requirements
* docs: update API key creation instructions in CLI documentation
- Changed the requirement for creating API keys from needing superuser status to allowing `AUTO_LOGIN` to be set to `TRUE`.
- Added a reference to the API keys documentation for additional information.
- Updated command examples for clarity.
* public-server-update-env-vars
* reference-page
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>