(body)
| 45 | } |
| 46 | |
| 47 | function buildAnswer(body) { |
| 48 | const prompt = lastUserMessage(body.messages) |
| 49 | const toolInfo = Array.isArray(body.tools) && body.tools.length > 0 |
| 50 | ? `,当前暴露工具数 ${body.tools.length}` |
| 51 | : '' |
| 52 | return `Recovered Claude mock 已连通。你刚才说的是:${prompt || '(空输入)'}${toolInfo}。` |
| 53 | } |
| 54 | |
| 55 | const server = http.createServer(async (req, res) => { |
| 56 | if (req.method === 'GET' && req.url === '/health') { |
no test coverage detected