Fix update AgentName

This commit is contained in:
2025-09-24 11:35:40 +07:00
parent 68350e3c24
commit 44846a1817
6 changed files with 65 additions and 0 deletions

View File

@@ -85,6 +85,9 @@ public class AgentGrain : Grain, IAgentGrain
{
_state.State.AgentName = agentName;
await _state.WriteStateAsync();
// Use the efficient method to update only the agent name in the summary
await _agentService.UpdateAgentSummaryNameAsync((int)this.GetPrimaryKeyLong(), agentName);
_logger.LogInformation("Agent {UserId} updated with name {AgentName}", this.GetPrimaryKeyLong(), agentName);
}