misc.wolfram: fix output too long always being output

This commit is contained in:
Cynthia Foxwell 2024-06-02 00:51:41 -06:00
parent 34dd8d4464
commit c6b5e2c036
1 changed files with 4 additions and 2 deletions

View File

@ -177,8 +177,10 @@ wolfram.callback = async function (msg, line, args, {verbose, v}) {
string = safeString(data[1].subpods[0].plaintext);
let text;
if (string.length > 2000 - (6 + safeString(query).length)) text = string;
string = "Output too long:";
if (string.length > 2000 - (6 + safeString(query).length)) {
text = string;
string = "Output too long:";
}
return {
content: `\`${safeString(query)}\` -> ${string.length > 0 ? string : ""}`,