Commit 5b8a7a4
committed
fix: address PR #14 review — guard missing context in /model-groups, fix deleteGroup error-after-commit
- model-groups/command.ts: add guard for missing ctx.cwd or ctx.modelRegistry
before calling createModelGroupsComponent; surface friendly notification
instead of crashing. Matches refreshModelGroupsState pattern in index.ts.
- model-groups/store.ts deleteGroup(): load opposite-scope config before
saving the delete so a load failure doesn't throw after the delete is
already persisted on disk. Follows moveGroup's pre-validation pattern.1 parent 6733bfd commit 5b8a7a4
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| |||
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
233 | | - | |
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| |||
0 commit comments