Skip to content

Commit 2a2212f

Browse files
authored
Fix a null-reference exception bug when built-in tools are not available (#396)
1 parent d24bd31 commit 2a2212f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shell/AIShell.Kernel/MCP/McpManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ internal async Task<List<AIFunction>> ListAvailableTools()
8181
await _initTask;
8282

8383
List<AIFunction> tools = null;
84-
if (_builtInTools.Count > 0)
84+
if (_builtInTools is { Count: > 0 })
8585
{
8686
(tools ??= []).AddRange(_builtInTools.Values);
8787
}

0 commit comments

Comments
 (0)