Skip to content

Commit 50cdf80

Browse files
authored
Merge pull request opactorai#7 from opactorai/fix/cursor-system-prompt-path
fix: Correct system prompt path resolution for Cursor Agent
2 parents e2a8c9c + 100f58b commit 50cdf80

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apps/api/app/services/cli/unified_manager.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
def get_project_root() -> str:
1919
"""Get project root directory using relative path navigation"""
2020
current_file_dir = os.path.dirname(os.path.abspath(__file__))
21-
# unified_manager.py -> cli -> services -> app -> api -> apps -> project-root
21+
# unified_manager.py is in: app/services/cli/
22+
# Navigate: cli -> services -> app -> api -> apps -> project-root
2223
project_root = os.path.join(current_file_dir, "..", "..", "..", "..", "..")
2324
return os.path.abspath(project_root)
2425

@@ -1026,8 +1027,9 @@ async def _ensure_agent_md(self, project_path: str) -> None:
10261027
try:
10271028
# Read system prompt from the source file using relative path
10281029
current_file_dir = os.path.dirname(os.path.abspath(__file__))
1029-
# unified_manager.py -> cli -> services -> app
1030-
app_dir = os.path.join(current_file_dir, "..", "..", "..")
1030+
# unified_manager.py is in: app/services/cli/
1031+
# Navigate: cli -> services -> app
1032+
app_dir = os.path.join(current_file_dir, "..", "..")
10311033
app_dir = os.path.abspath(app_dir)
10321034
system_prompt_path = os.path.join(app_dir, "prompt", "system-prompt.md")
10331035

0 commit comments

Comments
 (0)