Skip to content

Commit a6bf583

Browse files
committed
Rename 'get_current_location' to 'get_working_directory'
1 parent 68df308 commit a6bf583

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

shell/AIShell.Kernel/MCP/BuiltInTool.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
using AIShell.Abstraction;
22
using Microsoft.Extensions.AI;
33
using System.Diagnostics;
4-
using System.Runtime.CompilerServices;
5-
using System.Runtime.InteropServices.ObjectiveC;
64
using System.Text.Json;
7-
using System.Xml.Linq;
85

96
namespace AIShell.Kernel.Mcp;
107

118
internal class BuiltInTool : AIFunction
129
{
1310
private enum ToolType : int
1411
{
15-
get_current_location = 0,
12+
get_working_directory = 0,
1613
get_command_history = 1,
1714
get_terminal_content = 2,
1815
get_environment_variables = 3,
@@ -25,8 +22,8 @@ private enum ToolType : int
2522

2623
private static readonly string[] s_toolDescription =
2724
[
28-
// get_current_location
29-
"Get the current location of the connected PowerShell session, including the provider name (e.g., `FileSystem`, `Certificate`) and the path (e.g., `C:\\`, `cert:\\`).",
25+
// get_working_directory
26+
"Get the current working directory of the connected PowerShell session, including the provider name (e.g., `FileSystem`, `Certificate`) and the path (e.g., `C:\\`, `cert:\\`).",
3027

3128
// get_command_history
3229
"Get up to 5 of the most recent commands executed in the connected PowerShell session.",
@@ -74,7 +71,7 @@ private enum ToolType : int
7471

7572
private static readonly string[] s_toolSchema =
7673
[
77-
// get_current_location
74+
// get_working_directory
7875
"""
7976
{
8077
"type": "object",
@@ -272,7 +269,7 @@ internal async Task<PipeMessage> CallAsync(
272269
{
273270
AskContextMessage contextRequest = _toolType switch
274271
{
275-
ToolType.get_current_location => new(ContextType.CurrentLocation),
272+
ToolType.get_working_directory => new(ContextType.CurrentLocation),
276273
ToolType.get_command_history => new(ContextType.CommandHistory),
277274
ToolType.get_terminal_content => new(ContextType.TerminalContent),
278275
ToolType.get_environment_variables => new(

0 commit comments

Comments
 (0)