fix: land #569 (thanks @bjesuiter)
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
command: pnpm lint
|
||||
- runtime: node
|
||||
task: test
|
||||
command: pnpm test
|
||||
command: node scripts/ci-sanitize-output.mjs pnpm test
|
||||
- runtime: node
|
||||
task: build
|
||||
command: pnpm build
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
- WhatsApp: group `/model list` output by provider for scannability. (#456) - thanks @mcinteerj
|
||||
- Hooks: allow per-hook model overrides for webhook/Gmail runs (e.g. GPT 5 Mini).
|
||||
- Control UI: logs tab opens at the newest entries (bottom).
|
||||
- Control UI: default to relative paths for control UI assets. (#569) — thanks @bjesuiter
|
||||
- Control UI: add Docs link, remove chat composer divider, and add New session button.
|
||||
- Control UI: link sessions list to chat view. (#471) — thanks @HazAT
|
||||
- Control UI: show/patch per-session reasoning level and render extracted reasoning in chat.
|
||||
|
||||
37
scripts/ci-sanitize-output.mjs
Normal file
37
scripts/ci-sanitize-output.mjs
Normal file
@@ -0,0 +1,37 @@
|
||||
import { spawn } from "node:child_process";
|
||||
|
||||
function sanitizeBuffer(input) {
|
||||
const out = Buffer.allocUnsafe(input.length);
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
const b = input[i];
|
||||
// Keep: tab/newline/carriage return + printable ASCII; replace everything else.
|
||||
out[i] = b === 9 || b === 10 || b === 13 || (b >= 32 && b <= 126) ? b : 63;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
const [command, ...args] = process.argv.slice(2);
|
||||
if (!command) {
|
||||
process.stderr.write(
|
||||
"Usage: node scripts/ci-sanitize-output.mjs <cmd> [args...]\n",
|
||||
);
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
const child = spawn(command, args, {
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
shell: process.platform === "win32",
|
||||
});
|
||||
|
||||
child.stdout.on("data", (chunk) => {
|
||||
process.stdout.write(sanitizeBuffer(Buffer.from(chunk)));
|
||||
});
|
||||
|
||||
child.stderr.on("data", (chunk) => {
|
||||
process.stderr.write(sanitizeBuffer(Buffer.from(chunk)));
|
||||
});
|
||||
|
||||
child.on("exit", (code, signal) => {
|
||||
if (signal) process.exit(1);
|
||||
process.exit(code ?? 1);
|
||||
});
|
||||
Reference in New Issue
Block a user