Use classic hash method for Node 18

67ebf0fc06a6b712528714623fd39174a844f24d

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Ignore whitespace
src/prompt-converters.js+1 -1
@@ -545,7 +545,7 @@ function convertMistralMessages(messages, charName = '', userName = '') {
545 lastMsg.prefix = true;545 lastMsg.prefix = true;
546 }546 }
547547
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);
549549
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 => {