Skip to content

Commit 4a03d42

Browse files
committed
feat(agent): use max_matches_per_word in autocomplete extraction
1 parent b407f51 commit 4a03d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codetide/agents/tide/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ async def agent_loop(self, codeIdentifiers :Optional[List[str]]=None):
141141
autocomplete = AutoComplete(self.tide.cached_ids)
142142
if self._direct_mode:
143143
self.contextIdentifiers = None
144-
exact_matches = autocomplete.extract_words_from_text(self.history[-1])["all_found_words"]
144+
exact_matches = autocomplete.extract_words_from_text(self.history[-1], max_matches_per_word=1)["all_found_words"]
145145
self.modifyIdentifiers = self.tide._as_file_paths(exact_matches)
146146
codeIdentifiers = self.modifyIdentifiers
147147
self._direct_mode = False
148148

149149
else:
150-
matches = autocomplete.extract_words_from_text("\n\n".join(self.history))
150+
matches = autocomplete.extract_words_from_text("\n\n".join(self.history), max_matches_per_word=1)
151151

152152
# --- Begin Unified Identifier Retrieval ---
153153
identifiers_accum = set(matches["all_found_words"]) if codeIdentifiers is None else set(codeIdentifiers + matches["all_found_words"])

0 commit comments

Comments
 (0)