Skip to content

Commit 9b931c2

Browse files
APX103mmmay0722
authored andcommitted
[feat] Update log pruning
1 parent 5a77190 commit 9b931c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webqa_agent/utils/task_display_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ def _render_frame(self):
128128
out.write("-" * col + "\n")
129129
length = min(self.num_log, len(lines))
130130
for ln in range(length):
131-
line = lines[-length + ln]
132-
if len(remove_ansi_escape_sequences(str(line))) >= col:
133-
out.write("... (to long) \n")
131+
line = remove_ansi_escape_sequences(str(lines[-length + ln]))
132+
if len(line) >= col:
133+
out.write(f"{line[:col-3]}"+"...\n")
134134
else:
135135
out.write(line + "\n")
136136
out.flush()

0 commit comments

Comments
 (0)