feat(studio): make agent edits live and explicit (#3581)

This commit is contained in:
Miguel Ángel
2026-09-02 01:11:13 -04:00
committed by GitHub
parent f498be94c2
commit 6b5b4cb988
94 changed files with 7181 additions and 985 deletions
@@ -0,0 +1,24 @@
import { existsSync, readdirSync } from "node:fs";
import { homedir } from "node:os";
import { join } from "node:path";
/** Resolve the same Chrome binary for every local Studio browser acceptance test. */
export function resolveChromeExecutable() {
const chromeRoot = join(homedir(), ".cache", "puppeteer", "chrome");
const builds = existsSync(chromeRoot) ? readdirSync(chromeRoot).sort().reverse() : [];
const installed = builds.flatMap((build) =>
[
"chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing",
"chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing",
"chrome-linux64/chrome",
].map((relative) => join(chromeRoot, build, relative)),
);
return [
process.env.PUPPETEER_EXECUTABLE_PATH,
process.env.CHROME_PATH,
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
"/usr/bin/google-chrome",
"/usr/bin/chromium",
...installed,
].find((candidate) => candidate && existsSync(candidate));
}