-
-
Notifications
You must be signed in to change notification settings - Fork 588
Refine concurrent dictionary #1199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||
PR Type
Enhancement, Bug fix
Description
Replace
Dictionary<string, object>withIDictionary<string, object>andConcurrentDictionaryfor thread-safe concurrent accessRefactor
DeepClonemethod to support object modification and use centralizedBotSharpOptionsAdd
ReferenceHandler.IgnoreCyclesto JSON serialization options to prevent circular reference errorsReplace
.Resultcalls with.ConfigureAwait(false).GetAwaiter().GetResult()for async safetyAdd
Qualityproperty toImageEditSettingand improve image editing functionalityRemove unused
ChatHubCrontabHookclass and clean up unnecessary importsDiagram Walkthrough
File Walkthrough
14 files
Replace Dictionary with IDictionary and ConcurrentDictionaryAdd Quality property to ImageEditSettingReplace Dictionary with IDictionary parameterRefactor DeepClone with modifier and centralized optionsAdd perInstanceCache parameter to SharpCache attributeRefactor agent loading with deep clone modifierUse ConcurrentDictionary for thread-safe rendering dataInject BotSharpOptions and remove local JSON optionsReplace Dictionary with IDictionary parameterRefactor Init method and improve agent parameter handlingChange Init method from async to synchronousRefactor multipart request building with MultipartFormDataContentPass model parameter to GenerateImageEdits methodAdd quality parameter handling to image edit options14 files
Add ReferenceHandler.IgnoreCycles to JSON optionsUse BotSharpOptions.JsonSerializerOptions for deserializationUse BotSharpOptions.JsonSerializerOptions for deserializationReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async patternUse IsNullOrEmpty check and fix error messageReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async patternReplace .Result with ConfigureAwait async pattern2 files
Remove unused BotSharp.Abstraction.Hooks importChange Agent variable declaration from implicit to explicit2 files
Remove unused imports and ChatHubCrontabHook registrationDelete unused ChatHubCrontabHook class1 files
Update test service to use IDictionary and ConcurrentDictionary