mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
wip: Add rich console to getinput.py and reduce sleep time.
This commit is contained in:
parent
351c8206ee
commit
c3f1aa6286
1 changed files with 4 additions and 1 deletions
|
@ -25,17 +25,20 @@ class FileContentCompleter(Completer):
|
|||
yield Completion(word, start_position=-len(last_word))
|
||||
|
||||
|
||||
from rich.console import Console
|
||||
import sys
|
||||
import time
|
||||
import random
|
||||
|
||||
console = Console()
|
||||
|
||||
def get_input(history_file, fnames):
|
||||
if not sys.stdin.isatty():
|
||||
input_line = input()
|
||||
print("> ", end="")
|
||||
for char in input_line:
|
||||
print(char, end="", flush=True)
|
||||
time.sleep(random.uniform(0.05, 0.2))
|
||||
time.sleep(random.uniform(0.05, 0.1))
|
||||
print()
|
||||
print()
|
||||
return input_line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue