fix(coding-agent): do not highlight read errors (#6731)
This commit is contained in:
@@ -176,7 +176,7 @@ function formatReadResult(
|
||||
|
||||
const rawPath = str(args?.file_path ?? args?.path);
|
||||
const output = getTextOutput(result, showImages);
|
||||
const lang = rawPath ? getLanguageFromPath(rawPath) : undefined;
|
||||
const lang = !isError && rawPath ? getLanguageFromPath(rawPath) : undefined;
|
||||
const renderedLines = lang ? highlightCode(replaceTabs(output), lang) : output.split("\n");
|
||||
const lines = trimTrailingEmptyLines(renderedLines);
|
||||
const maxLines = options.expanded ? lines.length : 10;
|
||||
|
||||
Reference in New Issue
Block a user