Skip to content

Commit 3776879

Browse files
authored
Ignore the current active agent from the agent completion results for the @ operator (#372)
1 parent b10735a commit 3776879

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

shell/AIShell.Kernel/Utility/ReadLineHelper.cs

+6
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ private CommandCompletion CompleteForAgent(string input, int cursorIndex)
201201

202202
foreach (var a in _shell.Agents)
203203
{
204+
if (ReferenceEquals(a, _shell.ActiveAgent))
205+
{
206+
// Skip the current active agent.
207+
continue;
208+
}
209+
204210
string agentName = a.Impl.Name;
205211
if (agentName.StartsWith(targetName, StringComparison.OrdinalIgnoreCase))
206212
{

0 commit comments

Comments
 (0)