refactor: move shell output ANSI stripping to app layer

This commit is contained in:
Mohamed Boudra
2026-01-30 14:57:35 +07:00
parent 25c7d5afa9
commit 025a68c3a4
2 changed files with 5 additions and 5 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import stripAnsi from "strip-ansi";
import { z } from "zod";
import { getNowMs, isPerfLoggingEnabled, perfLog } from "./perf";
@@ -973,7 +974,7 @@ const ShellToolCallSchema = z
return {
type: "shell" as const,
command,
output: resultParsed.data.output,
output: stripAnsi(resultParsed.data.output),
};
}
@@ -983,7 +984,7 @@ const ShellToolCallSchema = z
return {
type: "shell" as const,
command,
output: errorParsed.data.content,
output: stripAnsi(errorParsed.data.content),
};
}