Compare commits
2 Commits
b3d151c9f9
...
3265b66149
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3265b66149 | ||
|
|
8392677cea |
@ -122,10 +122,10 @@ export async function POST(request: NextRequest) {
|
|||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
|
|
||||||
// 创建默认用户设置(API Key 为空,需要用户自行配置)
|
// 创建默认用户设置(API Key 和服务地址为空,需要用户自行配置)
|
||||||
await db.insert(userSettings).values({
|
await db.insert(userSettings).values({
|
||||||
userId,
|
userId,
|
||||||
cchUrl: process.env.CCH_DEFAULT_URL || 'https://claude.leocoder.cn/',
|
cchUrl: '', // 不设置默认值,让用户自己填写
|
||||||
cchApiKey: null,
|
cchApiKey: null,
|
||||||
cchApiKeyConfigured: false,
|
cchApiKeyConfigured: false,
|
||||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { encryptApiKey } from '@/lib/crypto';
|
|||||||
|
|
||||||
// 默认设置值
|
// 默认设置值
|
||||||
const DEFAULT_SETTINGS = {
|
const DEFAULT_SETTINGS = {
|
||||||
cchUrl: process.env.CCH_DEFAULT_URL || 'https://claude.leocoder.cn/',
|
cchUrl: '', // 不设置默认值,让用户自己填写
|
||||||
cchApiKeyConfigured: false,
|
cchApiKeyConfigured: false,
|
||||||
metasoApiKeyConfigured: false,
|
metasoApiKeyConfigured: false,
|
||||||
apiFormat: 'claude' as 'claude' | 'openai', // API 格式:claude(原生)| openai(兼容)
|
apiFormat: 'claude' as 'claude' | 'openai', // API 格式:claude(原生)| openai(兼容)
|
||||||
|
|||||||
@ -362,7 +362,7 @@ export default function SettingsPage() {
|
|||||||
className="settings-input w-80"
|
className="settings-input w-80"
|
||||||
value={cchUrl}
|
value={cchUrl}
|
||||||
onChange={(e) => setCchUrl(e.target.value)}
|
onChange={(e) => setCchUrl(e.target.value)}
|
||||||
placeholder="https://claude.leocoder.cn/"
|
placeholder="请输入 CCH 服务地址,例如:https://api.example.com"
|
||||||
/>
|
/>
|
||||||
</SettingsItem>
|
</SettingsItem>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useState, useRef, useEffect } from 'react';
|
import { useState, useRef, useEffect } from 'react';
|
||||||
import { Wrench, Search, Terminal, Globe, Check } from 'lucide-react';
|
import { Wrench, Search, Terminal, Globe, Check, FileText, Languages } from 'lucide-react';
|
||||||
import { Toggle } from '@/components/ui/Toggle';
|
import { Toggle } from '@/components/ui/Toggle';
|
||||||
import { Tooltip } from '@/components/ui/Tooltip';
|
import { Tooltip } from '@/components/ui/Tooltip';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
@ -11,6 +11,8 @@ const iconMap: Record<string, React.ComponentType<{ size?: number; className?: s
|
|||||||
Search,
|
Search,
|
||||||
Terminal,
|
Terminal,
|
||||||
Globe,
|
Globe,
|
||||||
|
FileText,
|
||||||
|
Languages,
|
||||||
};
|
};
|
||||||
|
|
||||||
interface ToolsDropdownProps {
|
interface ToolsDropdownProps {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user