-
Notifications
You must be signed in to change notification settings - Fork 10
feat(auth): add Grok authentication support #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # .gitkeep file auto-generated at 2026-05-15T13:19:37.296Z for PR creation at branch issue-304-3b5ced26375c for issue https://github.com/ProverCoderAI/docker-git/issues/304 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,9 @@ const resolveCommandLabel = (request: AuthTerminalSessionRequest): string => { | |
| const suffix = label === undefined || label.length === 0 ? "" : ` [${label}]` | ||
| return request.flow === "ClaudeOauth" | ||
| ? `docker-git menu auth claude oauth${suffix}` | ||
| : `docker-git menu auth gemini oauth${suffix}` | ||
| : request.flow === "GeminiOauth" | ||
| ? `docker-git menu auth gemini oauth${suffix}` | ||
| : `docker-git menu auth grok oauth${suffix}` | ||
|
Comment on lines
72
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== AuthTerminalFlow declaration(s) =="
rg -n -C3 '\bAuthTerminalFlow\b|ClaudeOauth|GeminiOauth|GrokOauth' packages/api/src/api/contracts.ts packages/api/src/api/schema.ts
echo
echo "== resolveCommandLabel implementation =="
rg -n -C6 'const resolveCommandLabel' packages/api/src/services/auth-terminal-sessions.tsRepository: ProverCoderAI/docker-git Length of output: 1907 Используйте исчерпывающий разбор Сейчас последняя ветка ternary неявно маппит любой новый flow в Замените вложенные ternary на return Match.value(request.flow).pipe(
Match.when("ClaudeOauth", () => `docker-git menu auth claude oauth${suffix}`),
Match.when("GeminiOauth", () => `docker-git menu auth gemini oauth${suffix}`),
Match.when("GrokOauth", () => `docker-git menu auth grok oauth${suffix}`),
Match.exhaustive()
)🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| const resolveRunnerArgs = (flow: AuthTerminalFlow, label: string | null | undefined): ReadonlyArray<string> => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не подменяйте невалидный
flowзначениемClaudeOauthпо умолчанию.Сейчас при ошибочном аргументе silently выбирается Claude-флоу, из-за чего можно авторизовать не того провайдера и получить ложный успех в CI/локально. Лучше fail-fast на невалидном значении.
💡 Предлагаемое исправление
🤖 Prompt for AI Agents