diff --git a/sema4ai/src/sema4ai_code/robocorp_language_server.py b/sema4ai/src/sema4ai_code/robocorp_language_server.py index d0a97add..e7651a77 100644 --- a/sema4ai/src/sema4ai_code/robocorp_language_server.py +++ b/sema4ai/src/sema4ai_code/robocorp_language_server.py @@ -2284,7 +2284,10 @@ def _fix_wrong_agent_import(self, agent_dir, monitor: IMonitor) -> ActionResultD # Move files and directories from the versioned folder to the root action directory for item in temp_extract_path.rglob("*"): - if item.is_file() and item.name != "metadata.json": + if ( + item.is_file() + and item.name != "__action_server_metadata__.json" + ): relative_path = item.relative_to(temp_extract_path) final_path = zip_path.parent / relative_path diff --git a/sema4ai/tests/sema4ai_code_tests/test_vscode_integration.py b/sema4ai/tests/sema4ai_code_tests/test_vscode_integration.py index f1a24707..74219878 100644 --- a/sema4ai/tests/sema4ai_code_tests/test_vscode_integration.py +++ b/sema4ai/tests/sema4ai_code_tests/test_vscode_integration.py @@ -3093,3 +3093,6 @@ def test_fix_wrong_agent_import( assert not action_zip.exists() assert (action_zip.parent / "package.yaml").exists() assert not (temp_dir / "__agent_package_metadata__.json").exists() + assert not ( + temp_dir / "actions/MyActions/action-one/__action_server_metadata__.json" + ).exists()