| 545 | lastMsg.prefix = true; | 545 | lastMsg.prefix = true; |
| 546 | } | 546 | } |
| 547 | | 547 | |
| 548 | const sanitizeToolId = (id) => crypto.hash('sha512', id, 'hex').slice(0, 9); | 548 | const sanitizeToolId = (id) => crypto.createHash('sha512').update(id).digest('hex').slice(0, 9); |
| 549 | | 549 | |
| 550 | // Doesn't support completion names, so prepend if not already done by the frontend (e.g. for group chats). | 550 | // Doesn't support completion names, so prepend if not already done by the frontend (e.g. for group chats). |
| 551 | messages.forEach(msg => { | 551 | messages.forEach(msg => { |