mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-13 08:05:01 +00:00
Merge branch 'main' into gitignore
This commit is contained in:
commit
6f7936e5f8
6 changed files with 41 additions and 4 deletions
|
@ -407,8 +407,8 @@ class Coder:
|
|||
if cmds:
|
||||
matching_commands, _, _ = cmds
|
||||
if len(matching_commands) == 1:
|
||||
cmd = matching_commands[0]
|
||||
if cmd in ("/exit", "/commit"):
|
||||
cmd = matching_commands[0][1:]
|
||||
if cmd in "add clear commit diff drop exit help ls tokens".split():
|
||||
return
|
||||
|
||||
if not self.dirty_commits:
|
||||
|
|
|
@ -5,6 +5,7 @@ from pathlib import Path
|
|||
|
||||
from prompt_toolkit.completion import Completer, Completion
|
||||
from prompt_toolkit.history import FileHistory
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
from prompt_toolkit.lexers import PygmentsLexer
|
||||
from prompt_toolkit.shortcuts import CompleteStyle, PromptSession, prompt
|
||||
from prompt_toolkit.styles import Style
|
||||
|
@ -203,7 +204,13 @@ class InputOutput:
|
|||
if self.input_history_file is not None:
|
||||
session_kwargs["history"] = FileHistory(self.input_history_file)
|
||||
|
||||
session = PromptSession(**session_kwargs)
|
||||
kb = KeyBindings()
|
||||
|
||||
@kb.add("escape", "c-m", eager=True)
|
||||
def _(event):
|
||||
event.current_buffer.insert_text("\n")
|
||||
|
||||
session = PromptSession(key_bindings=kb, **session_kwargs)
|
||||
line = session.prompt()
|
||||
|
||||
if line and line[0] == "{" and not multiline_input:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue