feat(配置): 集成翻译工具到默认配置
- seed.ts: 添加翻译工具到种子数据 - 配置工具ID、名称、图标 - 定义输入参数schema - 设为默认启用工具 - register/route.ts: 新用户默认启用翻译工具
This commit is contained in:
parent
d16f72c035
commit
a7972f8768
@ -129,7 +129,7 @@ export async function POST(request: NextRequest) {
|
||||
cchApiKey: null,
|
||||
cchApiKeyConfigured: false,
|
||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||
defaultTools: ['web_search', 'web_fetch'],
|
||||
defaultTools: ['web_search', 'web_fetch', 'youdao_translate'],
|
||||
theme: 'light',
|
||||
language: 'zh-CN',
|
||||
fontSize: 15,
|
||||
|
||||
@ -15,7 +15,7 @@ async function seedUserSettings() {
|
||||
cchApiKeyConfigured: false,
|
||||
metasoApiKeyConfigured: false,
|
||||
defaultModel: 'claude-sonnet-4-5-20250929',
|
||||
defaultTools: ['web_search', 'web_fetch', 'mita_search', 'mita_reader'],
|
||||
defaultTools: ['web_search', 'web_fetch', 'youdao_translate'],
|
||||
theme: 'light',
|
||||
language: 'zh-CN',
|
||||
enableThinking: false,
|
||||
@ -99,6 +99,31 @@ async function seedTools() {
|
||||
isDefault: true,
|
||||
sortOrder: 4,
|
||||
},
|
||||
{
|
||||
toolId: 'youdao_translate',
|
||||
name: 'youdao_translate',
|
||||
displayName: 'Translate',
|
||||
description: '有道智云高质量多语言翻译,支持100+种语言互译',
|
||||
icon: 'Languages',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
text: { type: 'string', description: '待翻译的文本内容' },
|
||||
from: {
|
||||
type: 'string',
|
||||
description: '源语言代码,如 en/zh-CHS/ja/ko/fr/de 等,默认auto自动检测',
|
||||
},
|
||||
to: {
|
||||
type: 'string',
|
||||
description: '目标语言代码,如 zh-CHS/en/ja/ko/fr/de 等,默认zh-CHS简体中文',
|
||||
},
|
||||
},
|
||||
required: ['text'],
|
||||
},
|
||||
isEnabled: true,
|
||||
isDefault: true,
|
||||
sortOrder: 5,
|
||||
},
|
||||
];
|
||||
|
||||
for (const tool of toolsData) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user