Do not load disabled commands (faster exec & benchmark runs) (#5078)

* Use modern material theme for docs

* Do not load disabled commands

* black .

---------

Co-authored-by: lc0rp <2609411+lc0rp@users.noreply.github.com>
This commit is contained in:
Luke
2023-07-30 14:51:50 -04:00
committed by GitHub
parent c9bf2ee48d
commit c1567c22f5
3 changed files with 4 additions and 34 deletions

View File

@@ -22,7 +22,7 @@ def bootstrap_agent(task):
config.continuous_mode = False
config.temperature = 0
config.plain_output = True
command_registry = get_command_registry(config)
command_registry = CommandRegistry.with_command_modules(COMMAND_CATEGORIES, config)
config.memory_backend = "no_memory"
config.workspace_path = Workspace.init_workspace_directory(config)
config.file_logger_path = Workspace.build_file_logger_path(config.workspace_path)
@@ -39,13 +39,3 @@ def bootstrap_agent(task):
config=config,
triggering_prompt=DEFAULT_TRIGGERING_PROMPT,
)
def get_command_registry(config: Config):
command_registry = CommandRegistry()
enabled_command_categories = [
x for x in COMMAND_CATEGORIES if x not in config.disabled_command_categories
]
for command_category in enabled_command_categories:
command_registry.import_commands(command_category)
return command_registry