web: compress auto-reply media

This commit is contained in:
Peter Steinberger
2025-11-25 20:09:03 +01:00
parent f81f432af5
commit 0a0418b973
6 changed files with 275 additions and 27 deletions

View File

@@ -389,7 +389,9 @@ export async function getReplyFromConfig(
const baseMsg = `Command timed out after ${timeoutSeconds}s. Try a shorter prompt or split the request.`;
const partial = errorObj.stdout?.trim();
const partialSnippet =
partial && partial.length > 800 ? `${partial.slice(0, 800)}...` : partial;
partial && partial.length > 800
? `${partial.slice(0, 800)}...`
: partial;
const text = partialSnippet
? `${baseMsg}\n\nPartial output before timeout:\n${partialSnippet}`
: baseMsg;