Files

33 lines
536 B
C#

namespace AxCopilot.Services.Agent;
public class ToolResult
{
public bool Success { get; init; }
public string Output { get; init; } = "";
public string? FilePath { get; init; }
public string? Error { get; init; }
public static ToolResult Ok(string output, string? filePath = null)
{
return new ToolResult
{
Success = true,
Output = output,
FilePath = filePath
};
}
public static ToolResult Fail(string error)
{
return new ToolResult
{
Success = false,
Output = error,
Error = error
};
}
}