From f176baa3f8a6f75afdc10a4568a1e86c08324316 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 28 Oct 2024 10:39:33 -0700 Subject: [PATCH] Reset the _turnLeft field of the 'azure' agent when a new chat session is created --- shell/agents/Microsoft.Azure.Agent/AzureAgent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/agents/Microsoft.Azure.Agent/AzureAgent.cs b/shell/agents/Microsoft.Azure.Agent/AzureAgent.cs index 2236b95b..f0d2ef7a 100644 --- a/shell/agents/Microsoft.Azure.Agent/AzureAgent.cs +++ b/shell/agents/Microsoft.Azure.Agent/AzureAgent.cs @@ -56,7 +56,7 @@ public AzureAgent() _valueStore = new Dictionary(StringComparer.OrdinalIgnoreCase); _instructions = string.Format(InstructionPrompt, Environment.OSVersion.VersionString); - Name = "Azure"; + Name = "azure"; Company = "Microsoft"; Description = "This AI assistant can generate Azure CLI and Azure PowerShell commands for managing Azure resources, answer questions, and provides information tailored to your specific Azure environment."; @@ -132,6 +132,7 @@ public async Task RefreshChatAsync(IShell shell, bool force) if (!string.IsNullOrEmpty(welcome)) { + _turnsLeft = int.MaxValue; host.WriteLine(welcome); } }