diff --git a/aider/commands.py b/aider/commands.py index b7d51d6c4..6ae2064de 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1058,7 +1058,7 @@ class Commands: self.io.tool_output("No repository map available.") def cmd_map_refresh(self, args): - "Force a refresh of the repository map and print it out" + "Force a refresh of the repository map" repo_map = self.coder.get_repo_map(force_refresh=True) if repo_map: self.io.tool_output("The repo map has been refreshed, use /map to view it.") diff --git a/aider/io.py b/aider/io.py index 238d79a3b..00435ee8c 100644 --- a/aider/io.py +++ b/aider/io.py @@ -115,7 +115,10 @@ class AutoCompleter(Completer): candidates = self.words candidates.update(set(self.fname_to_rel_fnames)) - candidates = [(word, f"`{word}`") for word in candidates] + candidates = [ + (word, f"`{word}`" if word not in self.fname_to_rel_fnames else word) + for word in candidates + ] last_word = words[-1] for word_match, word_insert in candidates: @@ -124,7 +127,7 @@ class AutoCompleter(Completer): if rel_fnames: for rel_fname in rel_fnames: yield Completion( - f"`{rel_fname}`", start_position=-len(last_word), display=rel_fname + rel_fname, start_position=-len(last_word), display=rel_fname ) else: yield Completion( diff --git a/aider/website/docs/usage/commands.md b/aider/website/docs/usage/commands.md index 2046e86ee..a108038ed 100644 --- a/aider/website/docs/usage/commands.md +++ b/aider/website/docs/usage/commands.md @@ -29,7 +29,7 @@ cog.out(get_help_md()) | **/lint** | Lint and fix provided files or in-chat files if none provided | | **/ls** | List all known files and indicate which are included in the chat session | | **/map** | Print out the current repository map | -| **/map-refresh** | Force a refresh of the repository map and print it out | +| **/map-refresh** | Force a refresh of the repository map | | **/model** | Switch to a new LLM | | **/models** | Search the list of available models | | **/quit** | Exit the application |