Fix OAuth logo: VT323 font, only patch logo not text

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Advait Paliwal
2026-03-24 08:19:21 -07:00
parent d1ead853d7
commit 6ff4dde341
4 changed files with 10 additions and 12 deletions

View File

@@ -12,4 +12,4 @@ export const FEYNMAN_ASCII_LOGO = [
export const FEYNMAN_ASCII_LOGO_TEXT = FEYNMAN_ASCII_LOGO.join("\n");
export const FEYNMAN_LOGO_HTML = `<style>.logo{width:auto!important;height:auto!important;margin-bottom:16px!important}</style><span style="font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:36px;font-weight:700;letter-spacing:-0.03em;color:#10b981">feynman</span>`;
export const FEYNMAN_LOGO_HTML = `<style>@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');.logo{width:auto!important;height:auto!important;margin-bottom:16px!important}</style><span style="font-family:'VT323',monospace;font-size:48px;color:#10b981">feynman</span>`;

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@companion-ai/feynman",
"version": "0.2.11",
"version": "0.2.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@companion-ai/feynman",
"version": "0.2.11",
"version": "0.2.12",
"hasInstallScript": true,
"dependencies": {
"@companion-ai/alpha-hub": "^0.1.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@companion-ai/feynman",
"version": "0.2.11",
"version": "0.2.12",
"description": "Research-first CLI agent built on Pi and alphaXiv",
"type": "module",
"engines": {

View File

@@ -363,15 +363,13 @@ const oauthPagePath = piAiRoot ? resolve(piAiRoot, "dist", "utils", "oauth", "oa
if (oauthPagePath && existsSync(oauthPagePath)) {
let source = readFileSync(oauthPagePath, "utf8");
const piLogo = 'const LOGO_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" aria-hidden="true"><path fill="#fff" fill-rule="evenodd" d="M165.29 165.29 H517.36 V400 H400 V517.36 H282.65 V634.72 H165.29 Z M282.65 282.65 V400 H400 V282.65 Z"/><path fill="#fff" d="M517.36 400 H634.72 V634.72 H517.36 Z"/></svg>`;';
if (source.includes(piLogo)) {
const feynmanLogo = `const LOGO_SVG = \`${FEYNMAN_LOGO_HTML}\`;`;
source = source.replace(piLogo, feynmanLogo);
source = source.replaceAll("Authentication successful", "Logged in");
source = source.replaceAll("Authentication failed", "Login failed");
source = source.replace("You can close this window.", "You can close this tab.");
writeFileSync(oauthPagePath, source, "utf8");
let changed = false;
const target = `const LOGO_SVG = \`${FEYNMAN_LOGO_HTML}\`;`;
if (!source.includes(target)) {
source = source.replace(/const LOGO_SVG = `[^`]*`;/, target);
changed = true;
}
if (changed) writeFileSync(oauthPagePath, source, "utf8");
}
const alphaHubAuthPath = findPackageRoot("@companion-ai/alpha-hub")