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

View file

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