mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 06:24:20 +01:00
Pass Real Data to callGenerateReport in TaskQueueView
This commit updates the `TaskQueueView` to pass real data from the `selectedNodeHierarchy` to the `callGenerateReport` method in `SkillTreeViewModel`. An array of test names is constructed from the reversed node hierarchy, and these names are used as the `tests` field in the `ReportRequestBody`. Note: The `category` field is now an empty string as per the new requirement, and `mock` continues to be set to true.
This commit is contained in:
@@ -13,6 +13,10 @@ class TaskQueueView extends StatelessWidget {
|
||||
final reversedHierarchy =
|
||||
viewModel.selectedNodeHierarchy?.reversed.toList() ?? [];
|
||||
|
||||
// Convert reversedHierarchy to a list of test names
|
||||
final List<String> testNames =
|
||||
reversedHierarchy.map((node) => node.data.name).toList();
|
||||
|
||||
return Material(
|
||||
color: Colors.white,
|
||||
child: Stack(
|
||||
@@ -49,8 +53,8 @@ class TaskQueueView extends StatelessWidget {
|
||||
onPressed: () {
|
||||
// Create a ReportRequestBody with hardcoded values
|
||||
ReportRequestBody reportRequestBody = ReportRequestBody(
|
||||
category: "coding",
|
||||
tests: [],
|
||||
category: "",
|
||||
tests: testNames,
|
||||
mock: true,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user