* 处理列出资源
(clientId: string, message: MCPMessage)
| 212 | * 处理列出资源 |
| 213 | */ |
| 214 | private async handleListResources(clientId: string, message: MCPMessage): Promise<void> { |
| 215 | const resources: MCPResource[] = [ |
| 216 | { |
| 217 | uri: 'file://workspace', |
| 218 | name: 'Current Workspace', |
| 219 | description: 'Files and directories in the current workspace', |
| 220 | mimeType: 'application/json', |
| 221 | }, |
| 222 | { |
| 223 | uri: 'git://status', |
| 224 | name: 'Git Status', |
| 225 | description: 'Current git repository status', |
| 226 | mimeType: 'application/json', |
| 227 | }, |
| 228 | { |
| 229 | uri: 'git://log', |
| 230 | name: 'Git Log', |
| 231 | description: 'Recent git commits', |
| 232 | mimeType: 'application/json', |
| 233 | }, |
| 234 | ]; |
| 235 | |
| 236 | this.sendResponse(clientId, message.id, { resources }); |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * 处理读取资源 |
no test coverage detected