Skip to content

Commit 46a7e0e

Browse files
fix: improve warning message clarity and fix user_root consistency for vscode target
Co-authored-by: sergio-sisternes-epam <207026618+sergio-sisternes-epam@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/apm/sessions/b36f06ca-13e4-472b-a4ec-95e22f01f52e
1 parent 98c0a02 commit 46a7e0e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/apm_cli/core/scope.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def ensure_user_dirs() -> Path:
161161
},
162162
"vscode": {
163163
"supported": True,
164-
"user_root": "~/settings.json",
164+
"user_root": "~/.vscode",
165165
"primitives": ["mcp_servers"],
166166
"description": "MCP servers only (via VS Code user settings.json)",
167167
"reference": "https://code.visualstudio.com/docs/configure/settings",
@@ -200,7 +200,12 @@ def warn_unsupported_user_scope() -> str:
200200
if not unsupported:
201201
return ""
202202
names = ", ".join(unsupported)
203+
supported = [
204+
name for name, info in USER_SCOPE_TARGETS.items()
205+
if info["supported"]
206+
]
207+
supported_names = ", ".join(supported)
203208
return (
204-
f"[!] Some targets do not support user-scope primitives. "
209+
f"[!] User-scope primitives are supported by {supported_names}. "
205210
f"Targets without native user-level support: {names}"
206211
)

tests/unit/core/test_scope.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,7 @@ def test_warn_message_includes_unsupported_names(self):
228228
assert msg # non-empty
229229
assert "cursor" in msg
230230
assert "opencode" in msg
231+
# Supported targets should appear as supported, not unsupported
232+
unsupported_part = msg.split("without native user-level support:")[-1]
233+
assert "claude" not in unsupported_part.lower()
234+
assert "copilot_cli" not in unsupported_part

0 commit comments

Comments
 (0)