Commit e42792d
Move packages to top level under each environment (#435)
## Problem
Currently, in the Python Projects sidebar view, packages are nested
under an extra "Packages" dropdown under each environment, creating an
unnecessary level of nesting:

## Changes
This PR removes the intermediate "Packages" dropdown and shows packages
directly under each environment:
- Modified `ProjectView.getChildren()` to skip the PackageRoot level
- Updated `ProjectPackage` constructor to accept a `ProjectEnvironment`
parent
- Updated package refresh logic to work with the new structure
- Updated command handlers in `envCommands.ts` to handle the modified
package structure
- Updated menu condition in `package.json` to attach refresh command to
environment nodes
After this change, users can access installed packages with just one
expansion from the environment level, which improves the user experience
by reducing clicks and making the structure more intuitive.
Fixes #330.
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Co-authored-by: karthiknadig <3840081+karthiknadig@users.noreply.github.com>1 parent f26451b commit e42792d
File tree
6 files changed
+71
-121
lines changed- src
- features
- views
6 files changed
+71
-121
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
| 398 | + | |
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
| |||
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| |||
193 | 201 | | |
194 | 202 | | |
195 | 203 | | |
196 | | - | |
| 204 | + | |
| 205 | + | |
197 | 206 | | |
198 | 207 | | |
199 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
34 | | - | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
| |||
42 | 39 | | |
43 | 40 | | |
44 | 41 | | |
45 | | - | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
| |||
165 | 161 | | |
166 | 162 | | |
167 | 163 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
176 | 175 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 176 | | |
195 | 177 | | |
196 | 178 | | |
| |||
219 | 201 | | |
220 | 202 | | |
221 | 203 | | |
222 | | - | |
223 | | - | |
224 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
225 | 209 | | |
226 | 210 | | |
227 | 211 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
231 | 216 | | |
232 | 217 | | |
233 | 218 | | |
234 | 219 | | |
235 | 220 | | |
236 | 221 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 222 | + | |
241 | 223 | | |
242 | 224 | | |
243 | 225 | | |
244 | 226 | | |
245 | 227 | | |
246 | 228 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 229 | + | |
251 | 230 | | |
252 | 231 | | |
253 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| |||
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
37 | | - | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
| 84 | + | |
| 85 | + | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
128 | 134 | | |
129 | 135 | | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
| |||
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| 197 | + | |
| 198 | + | |
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
193 | 202 | | |
194 | 203 | | |
195 | 204 | | |
196 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
197 | 208 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
204 | 212 | | |
205 | | - | |
206 | | - | |
207 | 213 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 214 | + | |
| 215 | + | |
214 | 216 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 217 | + | |
220 | 218 | | |
221 | 219 | | |
| 220 | + | |
222 | 221 | | |
223 | 222 | | |
224 | 223 | | |
| |||
0 commit comments