Commit 31d4dfc
refactor(@angular/cli): add experimental flag for MCP examples
This commit introduces a feature to mark and filter code examples that use experimental APIs, ensuring that the `find_examples` tool provides production-safe results by default.
Key changes:
- The example format now supports an optional `experimental: true` flag in the front matter.
- The database schema is updated with an `experimental` column. Both the build-time and runtime database generators now parse and store this flag.
- The `find_examples` tool's input schema is enhanced with an `includeExperimental` boolean flag, which defaults to `false`.
- The query logic is updated to filter out experimental examples unless `includeExperimental` is explicitly set to `true`.
- The schema description for the new flag includes a strong prescriptive guardrail, instructing the AI to warn the user when it shows an experimental example.1 parent def412a commit 31d4dfc
File tree
2 files changed
+43
-9
lines changed- packages/angular/cli/src/commands/mcp/tools
- tools
2 files changed
+43
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| |||
181 | 191 | | |
182 | 192 | | |
183 | 193 | | |
184 | | - | |
| 194 | + | |
185 | 195 | | |
186 | 196 | | |
187 | 197 | | |
| |||
209 | 219 | | |
210 | 220 | | |
211 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
212 | 226 | | |
213 | 227 | | |
214 | 228 | | |
| |||
402 | 416 | | |
403 | 417 | | |
404 | 418 | | |
| 419 | + | |
405 | 420 | | |
406 | 421 | | |
407 | 422 | | |
| |||
435 | 450 | | |
436 | 451 | | |
437 | 452 | | |
438 | | - | |
439 | | - | |
| 453 | + | |
| 454 | + | |
440 | 455 | | |
441 | 456 | | |
442 | 457 | | |
| |||
446 | 461 | | |
447 | 462 | | |
448 | 463 | | |
| 464 | + | |
449 | 465 | | |
450 | 466 | | |
451 | 467 | | |
| |||
464 | 480 | | |
465 | 481 | | |
466 | 482 | | |
467 | | - | |
468 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
469 | 492 | | |
470 | 493 | | |
471 | 494 | | |
| |||
474 | 497 | | |
475 | 498 | | |
476 | 499 | | |
| 500 | + | |
477 | 501 | | |
478 | 502 | | |
479 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
124 | | - | |
| 124 | + | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | | - | |
156 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
157 | 166 | | |
158 | 167 | | |
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
163 | 172 | | |
| 173 | + | |
164 | 174 | | |
165 | 175 | | |
166 | 176 | | |
| |||
0 commit comments