* 处理列出提示
(clientId: string, message: MCPMessage)
| 348 | * 处理列出提示 |
| 349 | */ |
| 350 | private async handleListPrompts(clientId: string, message: MCPMessage): Promise<void> { |
| 351 | const prompts: MCPPrompt[] = [ |
| 352 | { |
| 353 | name: 'code_review', |
| 354 | description: 'Review code for quality, security, and best practices', |
| 355 | arguments: [ |
| 356 | { |
| 357 | name: 'file_path', |
| 358 | description: 'Path to the file to review', |
| 359 | required: true, |
| 360 | }, |
| 361 | ], |
| 362 | }, |
| 363 | { |
| 364 | name: 'generate_docs', |
| 365 | description: 'Generate documentation for code', |
| 366 | arguments: [ |
| 367 | { |
| 368 | name: 'file_path', |
| 369 | description: 'Path to the file to document', |
| 370 | required: true, |
| 371 | }, |
| 372 | ], |
| 373 | }, |
| 374 | ]; |
| 375 | |
| 376 | this.sendResponse(clientId, message.id, { prompts }); |
| 377 | } |
| 378 | |
| 379 | /** |
| 380 | * 处理获取提示 |
no test coverage detected