The build_component_index.py script was generating component_index.json
without a trailing newline, causing CI failures when autofix.ci tried to
add the missing newline. This fix ensures the generated JSON file always
ends with a newline character, following POSIX text file standards.
Fixes the 'No newline at end of file' error in the update-component-index
workflow job.
* feat: Dynamically load LiteLLM model options in AstraAssistantManager
* fix: Strip options from fields with real_time_refresh to ensure stable component index
* update index
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Remove hash history from index
* first draft of adding component id and stable hash history
* Simplify - use version -> hash mapping
* Add unit tests and simple safeguards for stable vs nightly
* Add uniqueness check for comp id in comp index build
* Remove component id - use name as unique id
* Use component name as unique identifier - fix tests
* regenerate hash history; add script to makefile
* Remove component id
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* ruff
* comp index
* ruff
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* update index
* ruff
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: add script to build static component index for fast startup
This script generates a prebuilt index of all built-in components in the lfx.components package, saving it as a JSON file for quick loading at runtime. It includes versioning and integrity verification through SHA256 hashing.
* chore: update package dependencies and versioning
- Bump revision to 3 in uv.lock.
- Update dependency markers for several packages to improve compatibility with Python versions and platforms.
- Increment versions for langflow (1.6.4) and langflow-base (0.6.4).
- Adjust dependency markers for packages related to darwin platform to enhance specificity.
* chore: update .gitignore to include component index cache
- Added entry for user-specific component index cache directory to .gitignore.
- Included member_servers.json in the ignore list for better file management.
* feat: enhance component loading with custom index support
- Introduced functions to detect development mode and read a custom component index from a specified path or URL.
- Added caching mechanism for dynamically generated component indices to improve performance.
- Updated `import_langflow_components` to utilize the new index reading and caching logic, allowing for faster startup in production mode.
- Added `components_index_path` to settings for user-defined index configuration.
* feat: add GitHub Actions workflow to automatically update component index
- Introduced a new workflow that triggers on pull requests and manual dispatch to update the component index.
- The workflow checks for changes in the component index and commits updates if necessary.
- Added a comment feature to notify users when the component index is updated.
* [autofix.ci] apply automated fixes
* fix: enhance development mode detection logic
- Updated the `_dev_mode` function to improve clarity and functionality in detecting development mode.
- Refined environment variable checks to explicitly handle "1"/"true"/"yes" for development and "0"/"false"/"no" for production.
- Maintained the editable install heuristic as a fallback for determining the mode when the environment variable is not set.
* refactor: simplify development mode detection logic
- Revised the `_dev_mode` function to clarify the detection of development mode.
- Removed the editable install heuristic, making the environment variable `LFX_DEV` the sole determinant for development mode.
- Updated documentation to reflect the new behavior and ensure accurate understanding of the mode switching.
* docs: update DEVELOPMENT.md to clarify component development mode
- Added tips for enabling dynamic component loading with `LFX_DEV=1` for faster development.
- Emphasized the importance of using `LFX_DEV=1` for live reloading of components during development.
- Included instructions for manually rebuilding the component index for testing purposes.
* add component index
* test: add unit tests for component index functionality
- Introduced comprehensive unit tests for the component index system, covering functions such as _dev_mode, _read_component_index, _save_generated_index, and import_langflow_components.
- Tests include various scenarios for development mode detection, reading and saving component indices, and handling custom paths and URLs.
- Enhanced test coverage to ensure robustness and reliability of the component index features.
* chore: update GitHub Actions workflow for component index updates
- Modified the workflow to include separate checkout steps for pull requests and manual dispatch events.
- Added an environment variable `LFX_DEV` to the build step for enhanced development mode support.
- Improved clarity in the workflow structure to accommodate different triggering events.
* chore: update component index with new timezones and remove deprecated entries
- Added new timezone options including America/Boise, Australia/North, and Etc/GMT-2.
- Removed outdated timezone entries to streamline the selection process.
- Updated the component index structure to enhance clarity and maintainability.
* docs: clarify output path determination in build_component_index.py
- Updated comment to specify that the output path is relative to the script location and intended for development/CI use, not from the installed package.
- Enhanced clarity for future developers regarding the script's execution context.
* refactor: update component import logic and structure
- Changed the comment to reflect the correct module path for extracting subpackage names.
- Flattened the custom components dictionary if it has a "components" wrapper for consistency.
- Merged built-in and custom components into a single structure, ensuring the output maintains a "components" wrapper.
- Updated the component count calculation to reflect the new merged structure.
* refactor: streamline component merging logic
- Simplified the merging of built-in and custom components by removing the "components" wrapper at the cache level.
- Updated the component count calculation to directly reflect the new structure of the merged components.
- Enhanced code clarity by refining comments related to the merging process.
* chore: enhance GitHub Actions workflow for component index updates
- Updated the workflow to conditionally comment on pull requests from community forks, instructing users to manually update the component index.
- Refined the commit and push logic to ensure it only executes for changes made within the same repository.
* chore: update component index [skip ci]
* chore: refine GitHub Actions workflow for component index checks
- Enhanced the logic to check for changes in the component index file, ensuring it only triggers actions for changes made within the same repository.
- Updated the PR comment step to clarify that it applies only to pull requests from the same repository, improving workflow accuracy.
* chore: update component index [skip ci]
* chore: update component index [skip ci]
* refactor: rename version retrieval function for clarity
- Changed the function name from _get_lfx_version to _get_langflow_version to accurately reflect the version being retrieved.
- Updated the version retrieval logic in the build_component_index function to use the new function name.
* fix: update version check to reflect langflow instead of lfx
- Changed the version check logic in the _read_component_index and _save_generated_index functions to use "langflow" instead of "lfx".
- Ensured that the component index version matches the installed langflow version for better accuracy.
* fix: sort timezone options in CurrentDateComponent
- Updated the timezone options in the CurrentDateComponent to be sorted for better user experience.
- Ensured that the dropdown displays timezones in a consistent and organized manner.
* chore: update component index with new timezone options and MistralAI model configurations
- Replaced outdated timezone options with a more relevant and diverse set for improved user experience.
- Added new configurations for the MistralAI model component, including input fields for API key, model selection, and request parameters.
- Updated version number to reflect recent changes.
* chore: update component index [skip ci]
* chore: update component index [skip ci]
* chore: update component index [skip ci]
* chore: update component index [skip ci]
* chore: minify component index output to reduce file size
* test: Add unit tests for build_component_index script functionality
* chore: enhance push logic in update-component-index workflow to handle concurrent updates with retries
* chore: update component index [skip ci]
* fix: standardize logging messages for MCP server initialization
* chore: update component index [skip ci]
* test: Add unit tests for build_component_index script functionality
* chore: update component index [skip ci]
* fix: improve error handling for missing LangChain dependencies in run.py
* feat: add deterministic normalization for component index serialization
* chore: update component index [skip ci]
* chore: update component index
* chore: update component index
* chore: update component index
* chore: enhance component index update workflow with detailed diff statistics and SHA256 comparison
* chore: update component index
* chore: update component loading message to reflect total components discovered
* chore: sort model options for improved readability in NVIDIA component
* chore: filter out 'localtime' from timezone options for improved user experience
* chore: update component index with sorted lists
* chore: update component index with mistral
* chore: update component index
* fix: improve error message for langflow tests to include detailed instructions for environment setup
* refactor: rename and enhance _dev_mode function to _parse_dev_mode for improved clarity and functionality; support boolean and list modes for module loading
* docs: enhance DEVELOPMENT.md with updated instructions for Component Development Mode, including dynamic loading options for specific components
* fix: enhance error handling in _read_component_index to log specific issues with fetching and parsing component indices, including corrupted JSON and missing SHA256 hash
* chore: update component index
* feat: add metadata to component index including number of modules and components for improved indexing information
* feat: integrate telemetry for component index loading, capturing metrics on modules and components, and enhancing performance tracking
* feat: add build command for dynamic component index generation
* fix: add missing import for json in CustomComponent definition in LoopTest.json
* fix: improve handling of dotted imports in prepare_global_scope function
* chore: update component index
* fix: refine import handling in prepare_global_scope to correctly manage aliased and dotted imports
* chore: update component index
* feat: enhance component index update workflow with detailed change analysis and summary
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>