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:
2
logo.mjs
2
logo.mjs
@@ -12,4 +12,4 @@ export const FEYNMAN_ASCII_LOGO = [
|
|||||||
|
|
||||||
export const FEYNMAN_ASCII_LOGO_TEXT = FEYNMAN_ASCII_LOGO.join("\n");
|
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
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@companion-ai/feynman",
|
"name": "@companion-ai/feynman",
|
||||||
"version": "0.2.11",
|
"version": "0.2.12",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@companion-ai/feynman",
|
"name": "@companion-ai/feynman",
|
||||||
"version": "0.2.11",
|
"version": "0.2.12",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@companion-ai/alpha-hub": "^0.1.2",
|
"@companion-ai/alpha-hub": "^0.1.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@companion-ai/feynman",
|
"name": "@companion-ai/feynman",
|
||||||
"version": "0.2.11",
|
"version": "0.2.12",
|
||||||
"description": "Research-first CLI agent built on Pi and alphaXiv",
|
"description": "Research-first CLI agent built on Pi and alphaXiv",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -363,15 +363,13 @@ const oauthPagePath = piAiRoot ? resolve(piAiRoot, "dist", "utils", "oauth", "oa
|
|||||||
|
|
||||||
if (oauthPagePath && existsSync(oauthPagePath)) {
|
if (oauthPagePath && existsSync(oauthPagePath)) {
|
||||||
let source = readFileSync(oauthPagePath, "utf8");
|
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>`;';
|
let changed = false;
|
||||||
if (source.includes(piLogo)) {
|
const target = `const LOGO_SVG = \`${FEYNMAN_LOGO_HTML}\`;`;
|
||||||
const feynmanLogo = `const LOGO_SVG = \`${FEYNMAN_LOGO_HTML}\`;`;
|
if (!source.includes(target)) {
|
||||||
source = source.replace(piLogo, feynmanLogo);
|
source = source.replace(/const LOGO_SVG = `[^`]*`;/, target);
|
||||||
source = source.replaceAll("Authentication successful", "Logged in");
|
changed = true;
|
||||||
source = source.replaceAll("Authentication failed", "Login failed");
|
|
||||||
source = source.replace("You can close this window.", "You can close this tab.");
|
|
||||||
writeFileSync(oauthPagePath, source, "utf8");
|
|
||||||
}
|
}
|
||||||
|
if (changed) writeFileSync(oauthPagePath, source, "utf8");
|
||||||
}
|
}
|
||||||
|
|
||||||
const alphaHubAuthPath = findPackageRoot("@companion-ai/alpha-hub")
|
const alphaHubAuthPath = findPackageRoot("@companion-ai/alpha-hub")
|
||||||
|
|||||||
Reference in New Issue
Block a user