AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Implemented showing the number of preauthorised commands left. #1035

Open xhypeDE opened this issue 2 years ago • 5 comments

Background

This change was inspired by user request in issue #1035, aiming to improve the user experience of Auto-GPT by providing clear information about the number of authorized commands left and the details of the next action. This enhancement is particularly useful for users who pre-authorize commands and want to track their progress.

Changes

In this pull request, the following modifications were made to the agent.py file:

  1. Added a conditional statement elif under the main control flow to handle cases where self.next_action_count > 0 and cfg.continuous_mode is False.
  2. Used the logger.typewriter_log() function to display the number of authorized commands left and the details of the next action, including the command name and its arguments.

Documentation

The changes are documented through in-code comments and this external documentation, which clearly explain the new behavior added to Auto-GPT after merging this pull request. The number of authorized commands left will be displayed in cyan color when the user is not in continuous mode, and the details of the next action, including the command name and its arguments, will be displayed in both continuous and non-continuous modes.

Test Plan

To test this functionality:

  1. Ran Auto-GPT with the updated autogpt/agent/agent.py file .
  2. Pre-authorized commands using y -n, where n is the numerical value of commands you want to authorize.
  3. Observed the number of authorized commands left and the details of the next action being displayed after every message in the specified color when not in continuous mode.
  4. Verified that the output aligns with the expected behavior as described.

Flake8 and PyTest run without any issues.

PR Quality Checklist

  • [x] My pull request is atomic and focuses on a single change.
  • [x] I have thoroughly tested my changes with multiple different prompts.
  • [x] I have considered potential risks and mitigations for my changes.
  • [x] I have documented my changes clearly and comprehensively.
  • [x] I have not snuck in any "extra" small tweaks changes

xhypeDE avatar Apr 26 '23 13:04 xhypeDE

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 13, 2023 3:13pm

vercel[bot] avatar Apr 26 '23 13:04 vercel[bot]

Please fill out PR

ntindle avatar Apr 26 '23 14:04 ntindle

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 :tada:

Comparison is base (7a34d49) 60.93% compared to head (3696a10) 60.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3322      +/-   ##
==========================================
+ Coverage   60.93%   60.96%   +0.03%     
==========================================
  Files          73       73              
  Lines        3315     3315              
  Branches      543      543              
==========================================
+ Hits         2020     2021       +1     
+ Misses       1156     1155       -1     
  Partials      139      139              
Impacted Files Coverage Δ
autogpt/agent/agent.py 48.29% <100.00%> (+0.68%) :arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Apr 26 '23 16:04 codecov[bot]

This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

p-i- avatar May 05 '23 00:05 p-i-

This looks like a useful and straightforward code addition that could probably be considered for review/integration regardless of the ongoing re-arch effort ?

Boostrix avatar May 06 '23 17:05 Boostrix

Thanks to everyone involved in this PR. Appreciate the efforts!

xhypeDE avatar May 16 '23 13:05 xhypeDE

Thanks to everyone involved in this PR. Appreciate the efforts!

@xhypeDE if you haven't already, please consider joining discord to collect your contributor/catalyst status there and help us get other PRs/issues implemented, reviewed and integrated.

Boostrix avatar May 16 '23 13:05 Boostrix