AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Add RepositoryInfo Class for Benchmark Repository and Team Details
hunteraraujo311f69b7cf0b
diff --git a/frontend/lib/models/benchmark/repository_info.dart b/frontend/lib/models/benchmark/repository_info.dartnew file mode 100644index 0000000000..e8155a36e2--- /dev/null+++ b/frontend/lib/models/benchmark/repository_info.dart@@ -0,0 +1,51 @@+/// `RepositoryInfo` encapsulates details about the repository and team associated with a benchmark run.+///+/// This class contains essential information like the repository URL, team name, and the Git commit SHA for both the benchmark and the agent.+class RepositoryInfo {+ /// The URL of the repository where the benchmark code resides.+ final String repoUrl;++ /// The name of the team responsible for the benchmark.+ final String teamName;++ /// The Git commit SHA for the benchmark. This helps in tracing the exact version of the benchmark code.+ final String benchmarkGitCommitSha;++ /// The Git commit SHA for the agent. This helps in tracing the exact version of the agent code.+ final String agentGitCommitSha;++ /// Constructs a new `RepositoryInfo` instance.+ ///+ /// [repoUrl]: The URL of the benchmark repository.+ /// [teamName]: The name of the team responsible for the benchmark.+ /// [benchmarkGitCommitSha]: The Git commit SHA for the benchmark.+ /// [agentGitCommitSha]: The Git commit SHA for the agent.+ RepositoryInfo({+ required this.repoUrl,+ required this.teamName,+ required this.benchmarkGitCommitSha,+ required this.agentGitCommitSha,+ });++ /// Creates a `RepositoryInfo` instance from a map.+ ///+ /// [json]: A map containing key-value pairs corresponding to `RepositoryInfo` fields.+ ///+ /// Returns a new `RepositoryInfo` populated with values from the map.+ factory RepositoryInfo.fromJson(Map<String, dynamic> json) => RepositoryInfo(+ repoUrl: json['repo_url'],+ teamName: json['team_name'],+ benchmarkGitCommitSha: json['benchmark_git_commit_sha'],+ agentGitCommitSha: json['agent_git_commit_sha'],+ );++ /// Converts the `RepositoryInfo` instance to a map.+ ///+ /// Returns a map containing key-value pairs corresponding to `RepositoryInfo` fields.+ Map<String, dynamic> toJson() => {+ 'repo_url': repoUrl,+ 'team_name': teamName,+ 'benchmark_git_commit_sha': benchmarkGitCommitSha,+ 'agent_git_commit_sha': agentGitCommitSha,+ };+}