Skip to content

Commit

Permalink
Disable close_context_item when context is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Aug 25, 2023
1 parent 3c48c4a commit 249226c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogpt/commands/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def task_complete(reason: str, agent: Agent) -> None:
"required": True,
}
},
available=lambda a: get_agent_context(a) is not None,
available=lambda a: bool(get_agent_context(a)),
)
def close_context_item(index: int, agent: Agent) -> str:
assert (context := get_agent_context(agent)) is not None
Expand Down

0 comments on commit 249226c

Please sign in to comment.