|
39 | 39 | "icon": "resources/icons/codacy-logo.svg", |
40 | 40 | "when": "Codacy:RepositoryManagerStateContext == NeedsAuthentication" |
41 | 41 | }, |
42 | | - { |
43 | | - "id": "codacy:mcp", |
44 | | - "name": "Codacy MCP Server", |
45 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP", |
46 | | - "icon": "$(gear)", |
47 | | - "initialSize": 2 |
48 | | - }, |
49 | 42 | { |
50 | 43 | "id": "codacy:prSummary", |
51 | 44 | "name": "Pull request", |
|
73 | 66 | "icon": "$(library)", |
74 | 67 | "when": "Codacy:RepositoryManagerStateContext == NoRepository || Codacy:RepositoryManagerStateContext == NoRemote || Codacy:RepositoryManagerStateContext == Initializing || (Codacy:RepositoryManagerStateContext == Loaded && Codacy:PullRequestStateContext == NoPullRequest)", |
75 | 68 | "initialSize": 1 |
76 | | - } |
| 69 | + }, |
| 70 | + { |
| 71 | + "id": "codacy:mcp", |
| 72 | + "name": "Codacy MCP Server", |
| 73 | + "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP", |
| 74 | + "icon": "$(gear)", |
| 75 | + "initialSize": 2 |
| 76 | + } |
77 | 77 | ] |
78 | 78 | }, |
79 | 79 | "viewsWelcome": [ |
|
82 | 82 | "contents": "You have not yet signed in with Codacy\n[Sign in](command:codacy.signIn)", |
83 | 83 | "when": "Codacy:RepositoryManagerStateContext == NeedsAuthentication" |
84 | 84 | }, |
85 | | - { |
86 | | - "view": "codacy:mcp", |
87 | | - "contents": "Enable your AI Chat to talk to Codacy's Cloud API \n[Add Codacy MCP Server](command:codacy.configureMCP)", |
88 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && !codacy:mcpConfigured" |
89 | | - }, |
90 | | - { |
91 | | - "view": "codacy:mcp", |
92 | | - "contents": "MCP Server is enabled\n[Reset MCP Server](command:codacy.configureMCP.reset)", |
93 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && codacy:mcpConfigured" |
94 | | - }, |
95 | 85 | { |
96 | 86 | "view": "codacy:statuses", |
97 | 87 | "contents": "No repositories open.", |
|
111 | 101 | "view": "codacy:statuses", |
112 | 102 | "contents": "No open pull request found.\n[Try again](command:codacy.pr.load)", |
113 | 103 | "when": "Codacy:RepositoryManagerStateContext == Loaded && Codacy:PullRequestStateContext == NoPullRequest" |
114 | | - } |
| 104 | + }, |
| 105 | + { |
| 106 | + "view": "codacy:mcp", |
| 107 | + "contents": "Enable your AI Chat to talk to Codacy's Cloud API \n[Add Codacy MCP Server](command:codacy.configureMCP)", |
| 108 | + "when": "Codacy:RepositoryManagerStateContext == Loaded && codacy:supportsMCP && !codacy:mcpConfigured" |
| 109 | + }, |
| 110 | + { |
| 111 | + "view": "codacy:mcp", |
| 112 | + "contents": "MCP Server is enabled\n[Reset MCP Server](command:codacy.configureMCP.reset)", |
| 113 | + "when": "Codacy:RepositoryManagerStateContext == Loaded && codacy:supportsMCP && codacy:mcpConfigured" |
| 114 | + } |
115 | 115 | ], |
116 | 116 | "commands": [ |
117 | 117 | { |
|
193 | 193 | "command": "codacy.configureMCP", |
194 | 194 | "title": "Configure Codacy MCP Server", |
195 | 195 | "category": "Codacy commands", |
196 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && !codacy:mcpConfigured" |
| 196 | + "when": "Codacy:RepositoryManagerStateContext == Loaded && codacy:supportsMCP && !codacy:mcpConfigured" |
197 | 197 | }, |
198 | 198 | { |
199 | 199 | "command": "codacy.configureMCP.reset", |
200 | 200 | "title": "Reset Codacy MCP Server", |
201 | 201 | "category": "Codacy commands", |
202 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && codacy:mcpConfigured" |
203 | | - }, |
204 | | - { |
205 | | - "command": "codacy.configureMCP", |
206 | | - "title": "Configure Codacy MCP Server", |
207 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && !codacy:mcpConfigured" |
208 | | - }, |
209 | | - { |
210 | | - "command": "codacy.configureMCP.reset", |
211 | | - "title": "Reset Codacy MCP Server configuration", |
212 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && !codacy:mcpConfigured" |
| 202 | + "when": "Codacy:RepositoryManagerStateContext == Loaded && codacy:supportsMCP && codacy:mcpConfigured" |
213 | 203 | } |
214 | 204 | ], |
215 | 205 | "menus": { |
|
228 | 218 | }, |
229 | 219 | { |
230 | 220 | "command": "codacy.configureMCP", |
231 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && !codacy:mcpConfigured" |
| 221 | + "when": "Codacy:RepositoryManagerStateContext == Loaded && codacy:supportsMCP && !codacy:mcpConfigured" |
232 | 222 | }, |
233 | 223 | { |
234 | 224 | "command": "codacy.configureMCP.reset", |
235 | | - "when": "Codacy:RepositoryManagerStateContext != NeedsAuthentication && codacy:supportsMCP && codacy:mcpConfigured" |
| 225 | + "when": "Codacy:RepositoryManagerStateContext == Loaded && codacy:supportsMCP && codacy:mcpConfigured" |
236 | 226 | } |
237 | 227 | ], |
238 | 228 | "view/title": [ |
|
0 commit comments