feat(cli): add /clear command to clear terminal screen#968
Merged
ErikBjare merged 1 commit intogptme:masterfrom Dec 18, 2025
Merged
feat(cli): add /clear command to clear terminal screen#968ErikBjare merged 1 commit intogptme:masterfrom
ErikBjare merged 1 commit intogptme:masterfrom
Conversation
Implements Issue gptme#963 - adds a /clear command (with /cls alias) that clears the terminal screen using ANSI escape codes. Features: - /clear command to clear the terminal - /cls alias for Windows users familiar with that command - Uses ANSI escape codes for cross-platform compatibility Closes gptme#963
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to c0df4bf in 1 minute and 0 seconds. Click for details.
- Reviewed
35lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. gptme/commands.py:276
- Draft comment:
Good implementation of the clear command. Consider flushing stdout (e.g. sys.stdout.flush()) after printing the ANSI escape code to ensure immediate screen clearing in all environments. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. gptme/commands.py:280
- Draft comment:
Consider extracting the ANSI escape sequence into a named constant for improved readability and potential reuse. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_byHiaRdygjtizJJm
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Issue #963 - adds a
/clearcommand (with/clsalias) that clears the terminal screen using ANSI escape codes.Changes
clearto the Actions type in commands.py/clearcommand with/clsalias\033[2J\033[H) for cross-platform terminal clearingFeatures
/clear- clears the terminal screen/cls- alias for Windows users familiar with that commandTesting
Closes #963
Important
Adds
/clearcommand and/clsalias incommands.pyto clear the terminal screen using ANSI escape codes, ensuring cross-platform compatibility./clearcommand and/clsalias incommands.pyto clear the terminal screen using ANSI escape codes (\033[2J\033[H).clearinActionsandaction_descriptionsincommands.py.cmd_clear()function incommands.pyto execute the clear command.This description was created by
for c0df4bf. You can customize this summary. It will automatically update as commits are pushed.