mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
cleanup
This commit is contained in:
parent
d97bf17e19
commit
09605788d5
1 changed files with 4 additions and 5 deletions
|
@ -1,9 +1,9 @@
|
||||||
|
import glob
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import glob
|
|
||||||
|
|
||||||
import git
|
import git
|
||||||
import tiktoken
|
import tiktoken
|
||||||
|
@ -11,6 +11,7 @@ from prompt_toolkit.completion import Completion
|
||||||
|
|
||||||
from aider import prompts, utils
|
from aider import prompts, utils
|
||||||
|
|
||||||
|
|
||||||
class Commands:
|
class Commands:
|
||||||
def __init__(self, io, coder):
|
def __init__(self, io, coder):
|
||||||
self.io = io
|
self.io = io
|
||||||
|
@ -216,14 +217,12 @@ class Commands:
|
||||||
if partial.lower() in fname.lower():
|
if partial.lower() in fname.lower():
|
||||||
yield Completion(fname, start_position=-len(partial))
|
yield Completion(fname, start_position=-len(partial))
|
||||||
|
|
||||||
import glob
|
|
||||||
|
|
||||||
def cmd_add(self, args):
|
def cmd_add(self, args):
|
||||||
"Add matching files to the chat session using glob patterns"
|
"Add matching files to the chat session using glob patterns"
|
||||||
|
|
||||||
added_fnames = []
|
added_fnames = []
|
||||||
for pattern in args.split():
|
for word in args.split():
|
||||||
matched_files = glob.glob(pattern, recursive=True)
|
matched_files = glob.glob(word, recursive=True)
|
||||||
|
|
||||||
if not matched_files:
|
if not matched_files:
|
||||||
if self.coder.repo is not None:
|
if self.coder.repo is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue