chore(unity): 固定Unity CLI Loop本地包并移除UnitySkills依赖
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace io.github.hatayama.uLoopMCP
|
||||
{
|
||||
/// <summary>
|
||||
/// GetLogs tool handler - Type-safe implementation using Schema and Response
|
||||
/// Retrieves Unity console logs with filtering options
|
||||
///
|
||||
///
|
||||
/// This Tool class delegates to GetLogsUseCase for business logic execution,
|
||||
/// following the UseCase + Tool pattern for separation of concerns.
|
||||
///
|
||||
/// Related classes:
|
||||
/// - GetLogsUseCase: Business logic and orchestration
|
||||
/// - GetLogsSchema: Type-safe parameter schema
|
||||
/// - GetLogsResponse: Type-safe response structure
|
||||
/// </summary>
|
||||
[McpTool(Description = "Retrieve logs from Unity Console")]
|
||||
public class GetLogsTool : AbstractUnityTool<GetLogsSchema, GetLogsResponse>
|
||||
{
|
||||
public override string ToolName => "get-logs";
|
||||
|
||||
|
||||
protected override async Task<GetLogsResponse> ExecuteAsync(GetLogsSchema parameters, CancellationToken cancellationToken)
|
||||
{
|
||||
// Create and execute GetLogsUseCase instance
|
||||
GetLogsUseCase useCase = new(new LogRetrievalService(), new LogFilteringService());
|
||||
return await useCase.ExecuteAsync(parameters, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user