mirror of
https://github.com/Hopiu/llm.git
synced 2026-04-21 21:44:46 +00:00
left/right arrow key readline bindings in chat, closes #376
This commit is contained in:
parent
029d8e9e26
commit
1a4853d80e
1 changed files with 3 additions and 1 deletions
|
|
@ -341,7 +341,9 @@ def chat(
|
|||
"""
|
||||
Hold an ongoing chat with a model.
|
||||
"""
|
||||
readline.parse_and_bind("")
|
||||
# Left and right arrow keys to move cursor:
|
||||
readline.parse_and_bind("\\e[D: backward-char")
|
||||
readline.parse_and_bind("\\e[C: forward-char")
|
||||
log_path = logs_db_path()
|
||||
(log_path.parent).mkdir(parents=True, exist_ok=True)
|
||||
db = sqlite_utils.Database(log_path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue