chore: 切换到生产模式并清理配置
- 移除 docker-compose.yml 中已过时的 version 字段 - 将 dev_mode 设置为 false - 添加 accounts.json 加载调试日志 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
3
auth.js
3
auth.js
@@ -68,10 +68,13 @@ function generateClientId() {
|
|||||||
function loadAuthConfig() {
|
function loadAuthConfig() {
|
||||||
// 0. Check accounts.json for multi-account mode (highest priority)
|
// 0. Check accounts.json for multi-account mode (highest priority)
|
||||||
const accountsPath = path.join(process.cwd(), 'accounts.json');
|
const accountsPath = path.join(process.cwd(), 'accounts.json');
|
||||||
|
logDebug(`Checking accounts.json at: ${accountsPath}`);
|
||||||
try {
|
try {
|
||||||
if (fs.existsSync(accountsPath)) {
|
if (fs.existsSync(accountsPath)) {
|
||||||
|
logDebug('accounts.json exists, reading...');
|
||||||
const accountsContent = fs.readFileSync(accountsPath, 'utf-8');
|
const accountsContent = fs.readFileSync(accountsPath, 'utf-8');
|
||||||
const accountsData = JSON.parse(accountsContent);
|
const accountsData = JSON.parse(accountsContent);
|
||||||
|
logDebug(`accounts.json parsed, accounts: ${accountsData.accounts?.length || 0}`);
|
||||||
|
|
||||||
if (accountsData.accounts && accountsData.accounts.length > 0) {
|
if (accountsData.accounts && accountsData.accounts.length > 0) {
|
||||||
const activeAccounts = accountsData.accounts.filter(acc => acc.status === 'active');
|
const activeAccounts = accountsData.accounts.filter(acc => acc.status === 'active');
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
"provider": "google"
|
"provider": "google"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dev_mode": true,
|
"dev_mode": false,
|
||||||
"user_agent": "factory-cli/0.40.2",
|
"user_agent": "factory-cli/0.40.2",
|
||||||
"system_prompt": "You are Droid, an AI software engineering agent built by Factory.\n\n"
|
"system_prompt": "You are Droid, an AI software engineering agent built by Factory.\n\n"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
droid2api:
|
droid2api:
|
||||||
build: .
|
build: .
|
||||||
|
|||||||
Reference in New Issue
Block a user