Skip to content

Commit

Permalink
feat: simplify the input handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbrayo committed Nov 7, 2024
1 parent 0f8edec commit ec64640
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gptme/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,10 @@ def ask_execute(question="Execute code?", default=True) -> bool: # pragma: no c
answer = console.input(
f"[bold bright_yellow on red] {question} {choicestr}{copystr} [/] ",
)
if copiable and "c" in answer.lower():
if copiable and "c" == answer.lower().strip():
if copy():
print("Copied to clipboard.")
if len(answer) > 1:
answer = answer.lower().strip("c")
return False

global override_auto
if answer.lower() in [
Expand Down

0 comments on commit ec64640

Please sign in to comment.