revert(assistant): drop the ChatGPT relay, open-source apps keep the loopback sign-in

OpenAI offers a fixed web redirect for Sign in with ChatGPT only to selected
commercial partners; open-source apps sign in through the 127.0.0.1 loopback
callback. The relay could never be switched on, so it goes again.
This commit is contained in:
Maurice
2026-10-21 22:48:55 +02:00
parent 7bb5784913
commit d1ee2c05f4
12 changed files with 67 additions and 391 deletions
@@ -71,28 +71,6 @@ export function rememberOpenrouterFlow(flowId: string): void {
}
}
const CHATGPT_FLOW_KEY = 'trek.ai.chatgptFlow';
/** Keeps the ChatGPT sign-in that left for OpenAI and comes back by itself, for the page it returns to. */
export function rememberChatgptFlow(flowId: string): void {
try {
sessionStorage.setItem(CHATGPT_FLOW_KEY, flowId);
} catch {
// Storage refused (private mode): the return then reads as an expired sign-in.
}
}
/** The ChatGPT sign-in this tab started, read once. */
export function takeChatgptFlow(): string | null {
try {
const flowId = sessionStorage.getItem(CHATGPT_FLOW_KEY);
sessionStorage.removeItem(CHATGPT_FLOW_KEY);
return flowId;
} catch {
return null;
}
}
/** The flow the OpenRouter sign-in started, read once. */
export function takeOpenrouterFlow(): string | null {
try {