Merge pull request #1022 from yileicn/master

optimize naming, ConfigureAwait
This commit is contained in:
Haiping 2025-04-21 09:27:17 -05:00 committed by GitHub
commit 49d615a6a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View file

@ -19,7 +19,7 @@ public abstract class AgentHookBase : IAgentHook
_settings = settings; _settings = settings;
} }
public void SetAget(Agent agent) public void SetAgent(Agent agent)
{ {
_agent = agent; _agent = agent;
} }

View file

@ -9,7 +9,7 @@ public interface IAgentHook
/// </summary> /// </summary>
string SelfId { get; } string SelfId { get; }
Agent Agent { get; } Agent Agent { get; }
void SetAget(Agent agent); void SetAgent(Agent agent);
/// <summary> /// <summary>
/// Triggered when agent is loading. /// Triggered when agent is loading.

View file

@ -50,7 +50,7 @@ public partial class AgentService
continue; continue;
} }
hook.SetAget(agent); hook.SetAgent(agent);
if (!string.IsNullOrEmpty(agent.Instruction)) if (!string.IsNullOrEmpty(agent.Instruction))
{ {

View file

@ -49,7 +49,7 @@ public static class Utilities
{ {
// Clear whole cache. // Clear whole cache.
var sharpCache = new SharpCacheAttribute(0); var sharpCache = new SharpCacheAttribute(0);
sharpCache.ClearCacheAsync().ConfigureAwait(false).GetAwaiter().GetResult(); sharpCache.ClearCacheAsync().GetAwaiter().GetResult();
} }
public static string HideMiddleDigits(string input, bool isEmail = false) public static string HideMiddleDigits(string input, bool isEmail = false)

View file

@ -76,7 +76,7 @@ public class RealtimeChatSession : IDisposable
return; return;
} }
await _clientEventSemaphore.WaitAsync().ConfigureAwait(false); await _clientEventSemaphore.WaitAsync();
try try
{ {