v0.1.4版本 #2

Merged
PeterZhong merged 70 commits from host into master 2025-06-15 14:42:58 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 544bc8cd40 - Show all commits

View File

@ -24,7 +24,7 @@ public class ArcGisPro
[McpServerTool, Description("可以通过调用ArcGIS Pro的地理处理工具实现一些数据处理功能传入参数必须严格遵循ArcGIS Pro调用工具的标准调用名和参数要求知识库。")] [McpServerTool, Description("可以通过调用ArcGIS Pro的地理处理工具实现一些数据处理功能传入参数必须严格遵循ArcGIS Pro调用工具的标准调用名和参数要求知识库。")]
public static async Task<JsonRpcResultEntity> ArcGisProTool(string toolName, List<string> toolParams) public static async Task<JsonRpcResultEntity> ArcGisProTool(string toolName, List<string> toolParams)
{ {
IGPResult results = await Geoprocessing.ExecuteToolAsync(toolName, toolParams); IGPResult results = await Geoprocessing.ExecuteToolAsync(toolName, toolParams,null,null,null,GPExecuteToolFlags.InheritGPOptions|GPExecuteToolFlags.GPThread);
JsonRpcResultEntity jsonRpcResultEntity; JsonRpcResultEntity jsonRpcResultEntity;
if (results.IsFailed) if (results.IsFailed)
{ {

View File

@ -636,7 +636,8 @@ public class Gateway
private static async Task<string> GetToolInfos(McpServerList mcpServerList) private static async Task<string> GetToolInfos(McpServerList mcpServerList)
{ {
StringBuilder toolInfos = new StringBuilder(); StringBuilder toolInfos = new StringBuilder();
int i = 0; int i = 0;
List<int> failedMcp = new List<int>();
foreach (McpServer mcpServer in mcpServerList.GetAllServers()) foreach (McpServer mcpServer in mcpServerList.GetAllServers())
{ {
i++; i++;
@ -715,7 +716,7 @@ public class Gateway
}catch (Exception e) }catch (Exception e)
{ {
log.Error(e.Message); log.Error(e.Message);
MessageBox.Show(e.Message, $"第{i}MCP读取错误"); failedMcp.Add(i);
} }
} }
@ -731,9 +732,9 @@ public class Gateway
catch (Exception e) catch (Exception e)
{ {
log.Error(e.Message); log.Error(e.Message);
MessageBox.Show(e.Message, $"{userPrompt.Name}提示词读取错误");
} }
} }
MessageBox.Show($"读取失败的MCP序号{JsonConvert.SerializeObject(failedMcp)}","MCP读取错误");
return toolInfos.ToString(); return toolInfos.ToString();
} }