mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 00:05:51 +00:00
feat: /login支持codex订阅登录
This commit is contained in:
@@ -81,9 +81,10 @@ const call: LocalCommandCall = async (args, _context) => {
|
||||
// Check env vars when switching to openai (including settings.env)
|
||||
if (arg === 'openai') {
|
||||
const mergedEnv = getMergedEnv()
|
||||
const hasChatGPTAuth = mergedEnv.OPENAI_AUTH_MODE === 'chatgpt'
|
||||
const hasKey = !!mergedEnv.OPENAI_API_KEY
|
||||
const hasUrl = !!mergedEnv.OPENAI_BASE_URL
|
||||
if (!hasKey || !hasUrl) {
|
||||
if (!hasChatGPTAuth && (!hasKey || !hasUrl)) {
|
||||
updateSettingsForSource('userSettings', { modelType: 'openai' })
|
||||
const missing = []
|
||||
if (!hasKey) missing.push('OPENAI_API_KEY')
|
||||
|
||||
Reference in New Issue
Block a user