Skip to content

Commit 0cf094f

Browse files
committed
fix(@angular/cli): use narrower types for new MCP TS SDK compatibility
1 parent 13c8c4c commit 0cf094f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/angular/cli/src/commands/mcp/tools/best-practices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function createBestPracticesHandler({ logger }: McpToolContext) {
211211
type: 'text' as const,
212212
text: content,
213213
annotations: {
214-
audience: ['assistant'],
214+
audience: ['assistant' as const],
215215
priority: 0.9,
216216
source,
217217
},

packages/angular/cli/src/commands/mcp/tools/doc-search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,13 @@ function createDocSearchHandler({ logger }: McpToolContext) {
176176
const textContent: {
177177
type: 'text';
178178
text: string;
179-
annotations?: { audience: string[]; priority: number };
179+
annotations?: { audience: ('assistant' | 'user')[]; priority: number };
180180
}[] = [
181181
{
182182
type: 'text' as const,
183183
text: `Showing results for Angular v${finalSearchedVersion} documentation.`,
184184
annotations: {
185-
audience: ['assistant'],
185+
audience: ['assistant' as const],
186186
priority: 0.9,
187187
},
188188
},

0 commit comments

Comments
 (0)