Skip to content

Commit 95a149b

Browse files
authored
Merge branch 'main' into standalone-fto-async
2 parents 9c05130 + fdaf6c0 commit 95a149b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

codeflash/lsp/beta.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ProvideApiKeyParams:
4545
@server.feature("getOptimizableFunctionsInCurrentDiff")
4646
def get_functions_in_current_git_diff(
4747
server: CodeflashLanguageServer, _params: OptimizableFunctionsParams
48-
) -> dict[str, str | list[str]]:
48+
) -> dict[str, str | dict[str, list[str]]]:
4949
functions = get_functions_within_git_diff(uncommitted_changes=True)
5050
file_to_funcs_to_optimize, _ = filter_functions(
5151
modified_functions=functions,
@@ -55,8 +55,10 @@ def get_functions_in_current_git_diff(
5555
module_root=server.optimizer.args.module_root,
5656
previous_checkpoint_functions={},
5757
)
58-
qualified_names: list[str] = [func.qualified_name for funcs in file_to_funcs_to_optimize.values() for func in funcs]
59-
return {"functions": qualified_names, "status": "success"}
58+
file_to_qualified_names: dict[str, list[str]] = {
59+
str(path): [f.qualified_name for f in funcs] for path, funcs in file_to_funcs_to_optimize.items()
60+
}
61+
return {"functions": file_to_qualified_names, "status": "success"}
6062

6163

6264
@server.feature("getOptimizableFunctions")

0 commit comments

Comments
 (0)