@@ -200,7 +200,15 @@ function rebuildBashResultRenderComponent(
|
||||
const state = component.state;
|
||||
component.clear();
|
||||
|
||||
const output = getTextOutput(result as any, showImages).trim();
|
||||
let output = getTextOutput(result as any, showImages).trim();
|
||||
const truncation = result.details?.truncation;
|
||||
const fullOutputPath = result.details?.fullOutputPath;
|
||||
if (!options.isPartial && truncation?.truncated && fullOutputPath && output.endsWith("]")) {
|
||||
const footerStart = output.lastIndexOf("\n\n[");
|
||||
if (footerStart !== -1 && output.slice(footerStart).includes(fullOutputPath)) {
|
||||
output = output.slice(0, footerStart).trimEnd();
|
||||
}
|
||||
}
|
||||
|
||||
if (output) {
|
||||
const styledOutput = output
|
||||
@@ -236,8 +244,6 @@ function rebuildBashResultRenderComponent(
|
||||
}
|
||||
}
|
||||
|
||||
const truncation = result.details?.truncation;
|
||||
const fullOutputPath = result.details?.fullOutputPath;
|
||||
if (truncation?.truncated || fullOutputPath) {
|
||||
const warnings: string[] = [];
|
||||
if (fullOutputPath) {
|
||||
|
||||
Reference in New Issue
Block a user