Loading src/McpBase.McpServer/McpBase.McpServer.csproj +0 −5 Original line number Diff line number Diff line Loading @@ -45,9 +45,4 @@ <ProjectReference Include="..\McpBase.Shared\McpBase.Shared.csproj" /> </ItemGroup> <!-- McpBase.Request 输出文件路径与项目路径 --> <PropertyGroup> <McpBaseRequestProjectPath>$(MSBuildThisFileDirectory)..\McpBase.Request\McpBase.Request.csproj</McpBaseRequestProjectPath> <McpBaseRequestOutputPath>$(MSBuildThisFileDirectory)..\McpBase.Request\bin\$(Configuration)\$(TargetFramework)\</McpBaseRequestOutputPath> </PropertyGroup> </Project> src/McpBase.McpServer/Tools/RequestTools.cs +7 −3 Original line number Diff line number Diff line using System.ComponentModel; using System.ComponentModel; using System.Diagnostics; using McpBase.Shared; using ModelContextProtocol.Server; Loading @@ -7,9 +7,10 @@ namespace McpBase.McpServer.Tools; public class RequestTools { [McpServerTool, Description("进行无限等待。由用户决定是否结束。")] public async Task InfiniteWait([Description("message")]string? msg) [McpServerTool, Description("进行无限等待。由用户决定是否结束。返回从请求等待到同意继续之间的耗时(秒)。")] public async Task<string> InfiniteWait([Description("message")]string? msg) { var sw = Stopwatch.StartNew(); var self = Process.GetCurrentProcess().Id; var psi = new ProcessStartInfo(Path.Join(AppDomain.CurrentDomain.BaseDirectory, "McpBase.Request.exe")) { Loading @@ -25,5 +26,8 @@ public class RequestTools }; await Process.Start(psi)?.WaitForExitAsync()!; sw.Stop(); return sw.Elapsed.TotalSeconds.ToString("f3"); } } No newline at end of file src/McpBase.Request/McpBase.Request.csproj +1 −1 Original line number Diff line number Diff line <Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> Loading src/McpBase.Request/Program.cs +0 −10 Original line number Diff line number Diff line Loading @@ -7,16 +7,6 @@ class Program { static void Main(string[] args) { try { Console.WriteLine(args[0]); } catch (Exception e) { Console.WriteLine(e); } Console.ReadLine(); if (args.Length < 1) return; Loading src/McpBase.Shared/Transport.cs +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ public class Transport<TSelf> : Transport public static string GetTransportString(Transport<TSelf> instance) { var json = JsonSerializer.Serialize<Transport<TSelf>>(instance); var json = JsonSerializer.Serialize(instance); return json; } Loading Loading
src/McpBase.McpServer/McpBase.McpServer.csproj +0 −5 Original line number Diff line number Diff line Loading @@ -45,9 +45,4 @@ <ProjectReference Include="..\McpBase.Shared\McpBase.Shared.csproj" /> </ItemGroup> <!-- McpBase.Request 输出文件路径与项目路径 --> <PropertyGroup> <McpBaseRequestProjectPath>$(MSBuildThisFileDirectory)..\McpBase.Request\McpBase.Request.csproj</McpBaseRequestProjectPath> <McpBaseRequestOutputPath>$(MSBuildThisFileDirectory)..\McpBase.Request\bin\$(Configuration)\$(TargetFramework)\</McpBaseRequestOutputPath> </PropertyGroup> </Project>
src/McpBase.McpServer/Tools/RequestTools.cs +7 −3 Original line number Diff line number Diff line using System.ComponentModel; using System.ComponentModel; using System.Diagnostics; using McpBase.Shared; using ModelContextProtocol.Server; Loading @@ -7,9 +7,10 @@ namespace McpBase.McpServer.Tools; public class RequestTools { [McpServerTool, Description("进行无限等待。由用户决定是否结束。")] public async Task InfiniteWait([Description("message")]string? msg) [McpServerTool, Description("进行无限等待。由用户决定是否结束。返回从请求等待到同意继续之间的耗时(秒)。")] public async Task<string> InfiniteWait([Description("message")]string? msg) { var sw = Stopwatch.StartNew(); var self = Process.GetCurrentProcess().Id; var psi = new ProcessStartInfo(Path.Join(AppDomain.CurrentDomain.BaseDirectory, "McpBase.Request.exe")) { Loading @@ -25,5 +26,8 @@ public class RequestTools }; await Process.Start(psi)?.WaitForExitAsync()!; sw.Stop(); return sw.Elapsed.TotalSeconds.ToString("f3"); } } No newline at end of file
src/McpBase.Request/McpBase.Request.csproj +1 −1 Original line number Diff line number Diff line <Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> Loading
src/McpBase.Request/Program.cs +0 −10 Original line number Diff line number Diff line Loading @@ -7,16 +7,6 @@ class Program { static void Main(string[] args) { try { Console.WriteLine(args[0]); } catch (Exception e) { Console.WriteLine(e); } Console.ReadLine(); if (args.Length < 1) return; Loading
src/McpBase.Shared/Transport.cs +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ public class Transport<TSelf> : Transport public static string GetTransportString(Transport<TSelf> instance) { var json = JsonSerializer.Serialize<Transport<TSelf>>(instance); var json = JsonSerializer.Serialize(instance); return json; } Loading