- Updated the `print_stream` function to utilize a new utility function `try_parse_json` for safer JSON parsing, improving error handling for invalid input.
- Enhanced output formatting for various event types, including status updates, assistant messages, and tool execution results, ensuring clearer and more informative logs.
- Added checks for empty content and improved handling of parsing failures to maintain robustness in stream processing.
- Introduced a new utility function `print_stream` in `utils.py` to process and print events from an asynchronous string generator.
- The function handles various event types including status updates, assistant responses, and tool execution results, providing formatted output for each case.
- Added error handling for JSON parsing to ensure robustness against invalid input.
- Updated the UsageLogEntry interface to include new fields: message_id, thread_id, created_at, content, total_tokens, estimated_cost, and project_id.
- Modified the truncateString function to handle optional string input, returning an empty string if no input is provided.
- Introduced separate mappings for production and staging environments.
- Updated the configuration to dynamically select the appropriate yearly commitment plans based on the current environment mode.
- Modified the configuration file to update the Stripe pricing IDs for yearly commitment plans in the production environment.
- Ensured consistency with the latest pricing structure for subscription tiers.
- Added support for yearly commitment plans with associated pricing tiers in the billing service.
- Introduced validation functions to manage plan changes and restrictions based on business rules.
- Updated configuration to include new yearly commitment pricing in both production and staging environments.
- Enhanced frontend components to handle subscription management, including cancellation and reactivation features.
- Refactored billing-related hooks and API calls to accommodate new subscription types and improve error handling.