Skip to content

Commit a9ed596

Browse files
committed
cp dines
1 parent e4ab828 commit a9ed596

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

src/components/LogsViewer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ export const LogsViewer = ({
137137
const sanitizeMessage = (message: string): string => {
138138
// Strip ANSI escape sequences (colors, cursor movement, etc.)
139139
const strippedAnsi = message.replace(
140-
141140
/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g,
142141
"",
143142
);
@@ -149,7 +148,7 @@ export const LogsViewer = ({
149148
.replace(/\r/g, " ")
150149
.replace(/\t/g, " ")
151150
// Remove any other control characters (ASCII 0-31 except space)
152-
151+
153152
.replace(/[\x00-\x1F]/g, "")
154153
);
155154
};

src/components/StreamingLogsViewer.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,19 +236,16 @@ export const StreamingLogsViewer = ({
236236
// Helper to sanitize log message
237237
const sanitizeMessage = (message: string): string => {
238238
const strippedAnsi = message.replace(
239-
240239
/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g,
241240
"",
242241
);
243-
return (
244-
strippedAnsi
245-
.replace(/\r\n/g, " ")
246-
.replace(/\n/g, " ")
247-
.replace(/\r/g, " ")
248-
.replace(/\t/g, " ")
249-
250-
.replace(/[\x00-\x1F]/g, "")
251-
);
242+
return strippedAnsi
243+
.replace(/\r\n/g, " ")
244+
.replace(/\n/g, " ")
245+
.replace(/\r/g, " ")
246+
.replace(/\t/g, " ")
247+
248+
.replace(/[\x00-\x1F]/g, "");
252249
};
253250

254251
// Calculate visible logs

0 commit comments

Comments
 (0)