mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 23:01:30 +00:00
Remove Anthropic OAuth support
This commit is contained in:
parent
2e362fbfd2
commit
f5e6bcac1b
12 changed files with 121 additions and 183 deletions
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Removed
|
||||
|
||||
- Anthropic OAuth support (`/login`). Use API keys instead.
|
||||
|
||||
## [0.40.0] - 2026-01-08
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ Add API keys to `~/.pi/agent/auth.json`:
|
|||
|
||||
| Provider | Auth Key | Environment Variable |
|
||||
|----------|--------------|---------------------|
|
||||
| Anthropic | `anthropic` | `ANTHROPIC_API_KEY` |
|
||||
| Anthropic | `anthropic` | `ANTHROPIC_API_KEY`, `ANTHROPIC_OAUTH_TOKEN` |
|
||||
| OpenAI | `openai` | `OPENAI_API_KEY` |
|
||||
| Google | `google` | `GEMINI_API_KEY` |
|
||||
| Mistral | `mistral` | `MISTRAL_API_KEY` |
|
||||
|
|
@ -176,7 +176,6 @@ Use `/login` to authenticate with subscription-based or free-tier providers:
|
|||
|
||||
| Provider | Models | Cost |
|
||||
|----------|--------|------|
|
||||
| Anthropic (Claude Pro/Max) | Claude models via your subscription | Subscription |
|
||||
| GitHub Copilot | GPT-4o, Claude, Gemini via Copilot subscription | Subscription |
|
||||
| Google Gemini CLI | Gemini 2.0/2.5 models | Free (Google account) |
|
||||
| Google Antigravity | Gemini 3, Claude, GPT-OSS | Free (Google account) |
|
||||
|
|
|
|||
|
|
@ -156,9 +156,23 @@ class SnakeComponent {
|
|||
this.onClose();
|
||||
return;
|
||||
}
|
||||
// Any other key resumes
|
||||
// Any other key resumes (including P)
|
||||
this.paused = false;
|
||||
this.startGame();
|
||||
this.version++;
|
||||
this.tui.requestRender();
|
||||
return;
|
||||
}
|
||||
|
||||
// P to pause without closing
|
||||
if (data === "p" || data === "P") {
|
||||
this.paused = true;
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval);
|
||||
this.interval = null;
|
||||
}
|
||||
this.version++;
|
||||
this.tui.requestRender();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +289,7 @@ class SnakeComponent {
|
|||
} else if (this.state.gameOver) {
|
||||
footer = `${red(bold("GAME OVER!"))} Press ${bold("R")} to restart, ${bold("Q")} to quit`;
|
||||
} else {
|
||||
footer = `↑↓←→ or WASD to move, ${bold("ESC")} pause, ${bold("Q")} quit`;
|
||||
footer = `↑↓←→ or WASD to move, ${bold("P")} pause, ${bold("ESC")} save+quit, ${bold("Q")} quit`;
|
||||
}
|
||||
lines.push(this.padLine(boxLine(footer), width));
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
import {
|
||||
getEnvApiKey,
|
||||
getOAuthApiKey,
|
||||
loginAnthropic,
|
||||
loginAntigravity,
|
||||
loginGeminiCli,
|
||||
loginGitHubCopilot,
|
||||
|
|
@ -170,12 +169,6 @@ export class AuthStorage {
|
|||
let credentials: OAuthCredentials;
|
||||
|
||||
switch (provider) {
|
||||
case "anthropic":
|
||||
credentials = await loginAnthropic(
|
||||
(url) => callbacks.onAuth({ url }),
|
||||
() => callbacks.onPrompt({ message: "Paste the authorization code:" }),
|
||||
);
|
||||
break;
|
||||
case "github-copilot":
|
||||
credentials = await loginGitHubCopilot({
|
||||
onAuth: (url, instructions) => callbacks.onAuth({ url, instructions }),
|
||||
|
|
|
|||
|
|
@ -303,5 +303,6 @@ Documentation:
|
|||
prompt += `\nCurrent date and time: ${dateTime}`;
|
||||
prompt += `\nCurrent working directory: ${resolvedCwd}`;
|
||||
|
||||
prompt = "You are a helpful assistant. Be concise.";
|
||||
return prompt;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue