Skip to content

Commit 238b434

Browse files
committed
Update the history file name and exclude the environment/managed-identity credentials from Azure authentication flow
1 parent 513147e commit 238b434

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

shell/ReadLine/Prediction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public PredictiveSuggestion(string suggestion, string toolTip)
8585

8686
public partial class PSConsoleReadLine
8787
{
88-
private const string DefaultName = "PSReadLine";
88+
private const string DefaultName = "AIShell";
8989
private readonly Prediction _prediction;
9090

9191
/// <summary>

shell/agents/AIShell.OpenAI.Agent/Service.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,14 @@ private void RefreshOpenAIClient()
101101
}
102102
else
103103
{
104-
var credential = new DefaultAzureCredential(includeInteractiveCredentials: true);
104+
var credential = new DefaultAzureCredential(
105+
new DefaultAzureCredentialOptions
106+
{
107+
ExcludeInteractiveBrowserCredential = false,
108+
ExcludeEnvironmentCredential = true,
109+
ExcludeManagedIdentityCredential = true,
110+
}
111+
);
105112

106113
var aiClient = new AzureOpenAIClient(
107114
new Uri(_gptToUse.Endpoint),

0 commit comments

Comments
 (0)