misc.wolfram: fix output too long always being output
This commit is contained in:
parent
34dd8d4464
commit
c6b5e2c036
1 changed files with 4 additions and 2 deletions
|
@ -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)) {
|
||||||
string = "Output too long:";
|
text = string;
|
||||||
|
string = "Output too long:";
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: `\`${safeString(query)}\` -> ${string.length > 0 ? string : ""}`,
|
content: `\`${safeString(query)}\` -> ${string.length > 0 ? string : ""}`,
|
||||||
|
|
Loading…
Reference in a new issue