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.
Integrate SkillTreeViewModel into MainLayout
hunteraraujo60264d68b509
diff --git a/frontend/lib/views/main_layout.dart b/frontend/lib/views/main_layout.dartindex 96a8a5c55d..44808e1e54 100644--- a/frontend/lib/views/main_layout.dart+++ b/frontend/lib/views/main_layout.dart@@ -1,3 +1,4 @@+import 'package:auto_gpt_flutter_client/viewmodels/skill_tree_viewmodel.dart';import 'package:auto_gpt_flutter_client/viewmodels/task_viewmodel.dart';import 'package:auto_gpt_flutter_client/viewmodels/chat_viewmodel.dart';import 'package:auto_gpt_flutter_client/views/side_bar/side_bar_view.dart';@@ -23,6 +24,9 @@ class MainLayout extends StatelessWidget {// Access the ChatViewModel from the contextfinal chatViewModel = Provider.of<ChatViewModel>(context);+ // Access the ChatViewModel from the context+ final skillTreeViewModel = Provider.of<SkillTreeViewModel>(context);+// Check the screen width and return the appropriate layoutif (width > 800) {// For larger screens, return a side-by-side layout@@ -36,7 +40,8 @@ class MainLayout extends StatelessWidget {return SizedBox(width: 280, child: TaskView(viewModel: taskViewModel));} else {- return const Expanded(child: SkillTreeView());+ return Expanded(+ child: SkillTreeView(viewModel: skillTreeViewModel));}},),