Skip to content

Commit

Permalink
Removed 'fuzzy' search
Browse files Browse the repository at this point in the history
  • Loading branch information
A-F-V committed Feb 23, 2024
1 parent ccec8af commit 7121dc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"request": "launch",
"program": "${workspaceFolder}/cli.py",
"args": [
"run"
"run",
"What is the signature of the function beginning with 'lowest'"
],
"justMyCode": true,
"console": "integratedTerminal",
Expand Down
6 changes: 3 additions & 3 deletions src/actions/code_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class SearchInput(BaseModel):
query: str = Field(description="a symbol to search for in repository.")
fuzzy: bool = Field(description="whether to use fuzzy search", default=False)
# fuzzy: bool = Field(description="whether to use fuzzy search", default=False)
file_path: Optional[str] = Field(
description="whether to narrow the search to a specific file. If not provided, search the entire repository.",
default=None,
Expand All @@ -39,7 +39,7 @@ def code_search(state: RefactoringAgentState, args: SearchInput) -> str:
context = state["project_context"]
folder_path = context.folder_path
query = args.query
fuzzy = args.fuzzy
# fuzzy = args.fuzzy
file_path = args.file_path

# searcher
Expand All @@ -51,7 +51,7 @@ def code_search(state: RefactoringAgentState, args: SearchInput) -> str:
path = os.path.join(folder_path, file_path)
searcher = jedi.Script(path=path)

completions = list(searcher.complete_search(query, fuzzy=fuzzy))
completions = list(searcher.complete_search(query))
symbols = [
jedi_name_to_symbol(completion, context) for completion in completions
]
Expand Down

0 comments on commit 7121dc3

Please sign in to comment.