refactor(配置): 移除默认CCH服务地址配置
- 注册接口不再设置默认CCH URL,需用户自行配置 - 设置API默认值改为空字符串 - 更新设置页面placeholder为更通用的提示文本 - 增强用户配置的灵活性
This commit is contained in:
parent
b3d151c9f9
commit
8392677cea
@ -122,10 +122,10 @@ export async function POST(request: NextRequest) {
|
||||
})
|
||||
.returning();
|
||||
|
||||
// 创建默认用户设置(API Key 为空,需要用户自行配置)
|
||||
// 创建默认用户设置(API Key 和服务地址为空,需要用户自行配置)
|
||||
await db.insert(userSettings).values({
|
||||
userId,
|
||||
cchUrl: process.env.CCH_DEFAULT_URL || 'https://claude.leocoder.cn/',
|
||||
cchUrl: '', // 不设置默认值,让用户自己填写
|
||||
cchApiKey: null,
|
||||
cchApiKeyConfigured: false,
|
||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||
|
||||
@ -7,7 +7,7 @@ import { encryptApiKey } from '@/lib/crypto';
|
||||
|
||||
// 默认设置值
|
||||
const DEFAULT_SETTINGS = {
|
||||
cchUrl: process.env.CCH_DEFAULT_URL || 'https://claude.leocoder.cn/',
|
||||
cchUrl: '', // 不设置默认值,让用户自己填写
|
||||
cchApiKeyConfigured: false,
|
||||
metasoApiKeyConfigured: false,
|
||||
apiFormat: 'claude' as 'claude' | 'openai', // API 格式:claude(原生)| openai(兼容)
|
||||
|
||||
@ -362,7 +362,7 @@ export default function SettingsPage() {
|
||||
className="settings-input w-80"
|
||||
value={cchUrl}
|
||||
onChange={(e) => setCchUrl(e.target.value)}
|
||||
placeholder="https://claude.leocoder.cn/"
|
||||
placeholder="请输入 CCH 服务地址,例如:https://api.example.com"
|
||||
/>
|
||||
</SettingsItem>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user