Visual improvements to debug mode for better information visibility

This commit is contained in:
2026-09-23 18:19:35 -03:00
parent 6c5db94aaa
commit 3ef0d2aafd
16 changed files with 862 additions and 107 deletions

View File

@@ -1,4 +1,5 @@
function createHttpBackgroundJson({
previewDebugBody,
DEBUG_BODY_LIMIT,
environment
}) {
@@ -120,17 +121,7 @@ function createHttpBackgroundJson({
}
function createDebugBody(text) {
if (text.length > DEBUG_BODY_LIMIT) {
return {
value: `${text.slice(0, DEBUG_BODY_LIMIT)}\n... truncated ${text.length - DEBUG_BODY_LIMIT} characters`,
truncated: true
};
}
return {
value: text || "(empty response body)",
truncated: false
};
return previewDebugBody(text, DEBUG_BODY_LIMIT);
}
function normalizeDebugHeaders(headers) {