@@ -118,19 +118,33 @@ def run_auto_gpt(
118
118
cfg .set_plugins (scan_plugins (cfg , cfg .debug_mode ))
119
119
# Create a CommandRegistry instance and scan default folder
120
120
command_registry = CommandRegistry ()
121
- command_registry .import_commands ("autogpt.commands.analyze_code" )
122
- command_registry .import_commands ("autogpt.commands.audio_text" )
123
- command_registry .import_commands ("autogpt.commands.execute_code" )
124
- command_registry .import_commands ("autogpt.commands.file_operations" )
125
- command_registry .import_commands ("autogpt.commands.git_operations" )
126
- command_registry .import_commands ("autogpt.commands.google_search" )
127
- command_registry .import_commands ("autogpt.commands.image_gen" )
128
- command_registry .import_commands ("autogpt.commands.improve_code" )
129
- command_registry .import_commands ("autogpt.commands.twitter" )
130
- command_registry .import_commands ("autogpt.commands.web_selenium" )
131
- command_registry .import_commands ("autogpt.commands.write_tests" )
132
- command_registry .import_commands ("autogpt.app" )
133
- command_registry .import_commands ("autogpt.commands.task_statuses" )
121
+
122
+ command_categories = [
123
+ "autogpt.commands.analyze_code" ,
124
+ "autogpt.commands.audio_text" ,
125
+ "autogpt.commands.execute_code" ,
126
+ "autogpt.commands.file_operations" ,
127
+ "autogpt.commands.git_operations" ,
128
+ "autogpt.commands.google_search" ,
129
+ "autogpt.commands.image_gen" ,
130
+ "autogpt.commands.improve_code" ,
131
+ "autogpt.commands.twitter" ,
132
+ "autogpt.commands.web_selenium" ,
133
+ "autogpt.commands.write_tests" ,
134
+ "autogpt.app" ,
135
+ "autogpt.commands.task_statuses" ,
136
+ ]
137
+ logger .debug (
138
+ f"The following command categories are disabled: { cfg .disabled_command_categories } "
139
+ )
140
+ command_categories = [
141
+ x for x in command_categories if x not in cfg .disabled_command_categories
142
+ ]
143
+
144
+ logger .debug (f"The following command categories are enabled: { command_categories } " )
145
+
146
+ for command_category in command_categories :
147
+ command_registry .import_commands (command_category )
134
148
135
149
ai_name = ""
136
150
ai_config = construct_main_ai_config ()
0 commit comments