- Added bot_id parameter to DriveMonitor::new() and pass it through BotOrchestrator
- Modified DriveMonitor to store bot_id as a field
- Simplified ConfigManager::sync_gbot_config() to accept content directly instead of file path
- Removed file reading logic from sync_gbot_config
- Cleaned up logging messages in config sync
- Improved error handling and logging in DriveMonitor's gbot check
These changes better associate monitoring with specific bots and make the config sync more flexible by accepting content directly rather than requiring a file path.
- Removed database-based config loading from server_configuration table
- Simplified AppConfig::from_database to use empty HashMap since config is now loaded from bot_configuration table via drive_monitor
- Removed unused load_config_from_db function
- Removed config sync hash checking logic from ConfigManager
- Cleaned up config update logic in ConfigManager
The changes reflect the shift to loading configuration from the bot_configuration table instead of server_configuration, removing now-unused code paths and simplifying the configuration loading process.
- Split AIConfig into separate LLMConfig and embedding config structs
- Update create_site.rs to use config.llm instead of config.ai
- Improve config loading comments in bootstrap manager
- Add new LLM-related environment variables with defaults
- Maintain backward compatibility with existing config loading
- Clean up unused AIConfig struct and related code
The change better organizes the AI-related configuration by separating LLM and embedding configurations, making the code more maintainable and flexible for future AI service integrations.
- Remove unused diesel::Connection import
- Rename unused database_url variable to _database_url
- Mark unused config parameter in upload_templates_to_drive with underscore
- Maintain same functionality while cleaning up compiler warnings
- Replace direct database connection establishment with shared `establish_pg_connection` utility
- Add "llm" to required components list in bootstrap manager
- Lower default RUST_LOG level from debug to info in VSCode config
- Clean up imports and connection error messages
- Remove hardcoded database URL strings in favor of centralized connection handling
The changes improve code maintainability by centralizing database connection logic and adding support for the new LLM component in the bootstrap process.
- Added new ADD_SUGGESTION keyword handler to support sending suggestions in responses
- Removed unused env import in hear_talk module
- Simplified bot_id assignment to use static string
- Added suggestions field to BotResponse struct
- Improved SET_CONTEXT keyword to take both name and value parameters
- Fixed whitespace in auth handler
- Enhanced error handling for suggestion sending
The changes improve the suggestion system functionality while cleaning up unused code and standardizing response handling.
Changed the Redis RPUSH command to return the new list length (`Result<i64, RedisError>`) and added a debug log that includes this length. Updated the HSET command to capture its result (`Result<i64, RedisError>`), logging the number of fields added on success and handling errors explicitly. Removed unnecessary `unwrap_or_else` and added comments to clarify behavior, improving observability and error handling for suggestion storage.
- Changed RUST_LOG level from 'trace' to 'debug' in VSCode launch config
- Simplified auth handler by removing direct bot ID lookup logic
- Added HttpRequest parameter to auth handler
- Implemented bot_from_url helper for bot identification
- Updated auth script path to use bot-specific directory structure
- Removed unused warn import
- Improved error handling for auth script reading and execution
The changes streamline the authentication process by:
1. Moving bot identification to a dedicated helper function
2. Making the auth script path dynamic based on bot name
3. Reducing log verbosity in development
4. Cleaning up unused imports and code
- Added RUST_LOG=trace to VSCode debug configurations for better debugging
- Removed unused imports (uuid, Selectable, SelectableHelper) from bootstrap module
- Simplified bot name handling by removing name formatting logic, using raw bot folder names
- Renamed check_default_gbot to check_gbot for consistency
- Improved logging format in drive monitor initialization
- Fixed S3 bucket reference in bootstrap manager (removed 'templates/' prefix)
Introduce bot mounting logic in `BotOrchestrator` to load and manage active bots from the database. Enhance `BootstrapManager` by refining Diesel query usage and connection handling for better reliability and maintainability.
The migration file 6.0.6.sql was deleted as it contained default LLM server configurations that are no longer needed. The file was originally used to set up local LLM server settings including model paths and URLs, but these configurations are now handled differently in the system.
Removed the default server configuration section from migrations as these values should now be managed through environment variables. Updated default database username from 'postgres' to 'gbuser' in bootstrap and changed default database name from 'gbuser' to 'botserver' in config to align with the removed server configuration defaults.
Added functionality to load configuration from CSV files in S3 when available, with fallback to existing methods. The changes include:
1. Added new `load_config_from_csv` method to handle CSV config loading
2. Improved legacy mode handling by attempting CSV load before falling back to database
3. Added new dependencies (uuid, Arc, Mutex) for config management
4. Enhanced error handling and logging for config loading scenarios
The changes maintain backward compatibility while adding the ability to load configurations from CSV files stored in S3, which provides more flexibility in configuration management.
Removed the automatic upload of default config.csv to S3 during bootstrap initialization. This functionality was previously uploading a local config file to the S3 bucket 'default.gbai/default.gbot' if the file existed. The change simplifies the bootstrap process by removing this implicit behavior.
Added functionality to write drive configuration (MinIO settings) to a .env file when the AppConfig is created. The new write_drive_config_to_env function handles the file operations and logs warnings if the write fails. This change ensures drive configuration is persisted for future use while maintaining backward compatibility.
- Renamed unclear function `c` to more descriptive `create_s3_operator`
- Removed duplicate `create_s3_operator` function implementation
- Consolidated imports from aws_sdk_s3 and diesel crates
- Removed unused import `aws_s3_bucket_create`
- Improved code formatting and organization
The changes make the code more maintainable by removing duplication and improving clarity while maintaining the same functionality.
- Added bucket parameter to upload_directory_recursive for explicit bucket specification
- Improved key construction logic to handle path prefixes more robustly
- Removed redundant trace logs and added more informative upload messages
- Fixed potential issue with bucket name extraction from prefix
- Ensured consistent path separator handling in S3 keys
The changes make the S3 upload functionality more reliable and maintainable by:
1. Explicitly passing bucket names instead of extracting from prefixes
2. Properly handling path separators in S3 keys
3. Providing clearer logging for upload operations
- Added AWS SDK S3 dependencies including aws-config, aws-sdk-s3, and related crates
- Removed opendal dependency and replaced with AWS SDK S3 client
- Implemented new get_file_content helper function using AWS SDK
- Updated MinIOHandler to use AWS SDK client instead of opendal Operator
- Modified file change detection to work with AWS SDK's S3 client
The change was made to standardize on AWS's official SDK for S3 operations, which provides better maintenance and feature support compared to the opendal crate. This also aligns with AWS best practices for interacting with S3 services.
Added new `add_suggestion` module to support suggestion handling logic.
Updated `index.html` to include a dynamic suggestions container that fetches and displays context suggestions.
This improves user experience by enabling quick context changes through interactive suggestion buttons.
Enhance the bucket creation process in `BootstrapManager` to handle existing buckets gracefully. Adds logic to reuse the default template when a bucket already exists and ensures proper path formatting before creation. This improves reliability and prevents redundant bucket creation errors.
Add logic to automatically upload an initial `config.csv` to the default S3 bucket during bootstrap. Enhance S3 operator creation by ensuring endpoint formatting, setting default bucket and region, and enabling path style. Improve template upload flow by validating bucket existence and creating it if missing. Also include debug logging for better traceability.
Eliminates the `s3_bucket` field from `AppConfig` and deletes related initialization code in `main.rs`. This simplifies configuration management since S3 bucket handling is no longer required or used in the application.
Introduces an async helper function to verify and create the configured S3 bucket if missing. This ensures the application has a valid storage target before initializing the drive, improving reliability in environments with dynamic bucket provisioning.
Replaces hardcoded alias setup with commands that create and configure a MinIO admin user, ensuring proper authentication and permissions during installation.
Introduce environment existence check to prevent redundant bootstrap runs and ensure smoother startup. Refactor `update_bot_config` to use globally unique config keys and atomic updates for better data consistency.
Reload configuration from environment to ensure latest DATABASE_URL and credentials are used before creating the database connection. This prevents stale config values when environment variables change.
Add logic to retrieve a default bot ID from the database and pass it to `update_bot_config`, ensuring configuration entries are linked to a specific bot. Updated SQL queries to include `bot_id` and `id` fields for consistency and improved data integrity.
- Removed unused Tauri dependencies and replaced aws-sdk-s3 with opendal for S3 services.
- Cleaned up feature flags in Cargo.toml.
- Simplified the welcome message logic in start.bas and removed redundant comments.