fix(coding-agent): fixed tab character rendering causing UI holes by converting tabs to spaces

- Fixed tab character rendering in tool output previews and code cell displays by converting tabs to spaces for consistent terminal display.
- Applied replaceTabs() function across patch rendering, write tool output, and code cell output to ensure uniform tab handling.
This commit is contained in:
can1357
2026-02-06 07:10:33 +01:00
parent 97628bfe0f
commit 685736667e
4 changed files with 9 additions and 5 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ import {
formatStatusIcon,
getDiffStats,
PREVIEW_LIMITS,
replaceTabs,
shortenPath,
ToolUIKit,
truncateDiffByHunk,
@@ -181,7 +182,7 @@ export const editToolRenderer = {
const maxLines = 6;
text += "\n\n";
for (const line of previewLines.slice(0, maxLines)) {
text += `${uiTheme.fg("toolOutput", ui.truncate(line, 80))}\n`;
text += `${uiTheme.fg("toolOutput", ui.truncate(replaceTabs(line), 80))}\n`;
}
if (previewLines.length > maxLines) {
text += uiTheme.fg("dim", `… ${previewLines.length - maxLines} more lines`);
@@ -191,7 +192,7 @@ export const editToolRenderer = {
const maxLines = 6;
text += "\n\n";
for (const line of previewLines.slice(0, maxLines)) {
text += `${uiTheme.fg("toolOutput", ui.truncate(line, 80))}\n`;
text += `${uiTheme.fg("toolOutput", ui.truncate(replaceTabs(line), 80))}\n`;
}
if (previewLines.length > maxLines) {
text += uiTheme.fg("dim", `… ${previewLines.length - maxLines} more lines`);