Skip to content

Conversation

@BegoniaHe
Copy link
Member

This pull request introduces a new request timeout configuration for API calls, improves error handling and logging consistency, and fixes a bug related to memory keyword handling. It also updates some configuration defaults and documentation. The main themes are enhanced robustness for network requests, improved error reporting, and bug fixes for memory management.

Request timeout and robustness improvements:

  • Added a configurable request timeout (请求超时时限/ms) to RequestConfig, and applied this timeout to all relevant API calls using a new withTimeout utility function to prevent hanging requests. [1] [2] [3] [4] [5] [6] [7]
  • Removed the manual message handling timeout from the AI class, as the new global request timeout makes it redundant. [1] [2]

Error handling and logging consistency:

  • Standardized error logging by using e.message instead of logging the entire error object and removed Chinese full-width colons in log messages for consistency. [1] [2] [3] [4] [5] [6] [7] [8]

Memory management bug fix:

  • Fixed an issue where keywords could be null when adding memory; now defaults to an empty array if not provided. Also ensured content defaults to an empty string if undefined. [1] [2]

Configuration and documentation updates:

  • Changed the default URL for the usage chart service in BackendConfig and updated the QQ group number in the plugin header. [1] [2]
  • Updated the changelog to reflect the new features and bug fixes in version 4.10.2.

Minor improvements:

  • Improved early return logic in the stream start function to prevent further processing if the stream ID is empty.

@BegoniaHe BegoniaHe merged commit 2ee9f42 into DCRepairCenter:main Oct 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants