refactor(数据库): 移除 code_execution 工具配置

- 从 userSettings 表的 defaultTools 默认值中移除 code_execution
- 从种子数据中移除 code_execution 工具定义
- 调整 web_fetch 工具的排序值
This commit is contained in:
gaoziman 2025-12-22 00:21:02 +08:00
parent c18bb27794
commit 65028e37ed
2 changed files with 3 additions and 21 deletions

View File

@ -67,7 +67,7 @@ export const userSettings = pgTable('user_settings', {
apiFormat: varchar('api_format', { length: 20 }).default('claude'),
// 默认设置
defaultModel: varchar('default_model', { length: 64 }).default('claude-sonnet-4-5-20250929'),
defaultTools: jsonb('default_tools').$type<string[]>().default(['web_search', 'code_execution', 'web_fetch']),
defaultTools: jsonb('default_tools').$type<string[]>().default(['web_search', 'web_fetch']),
// AI 行为设置
systemPrompt: text('system_prompt'), // 系统提示词
temperature: varchar('temperature', { length: 10 }).default('0.7'), // 温度参数 (0-1)

View File

@ -14,7 +14,7 @@ async function seedUserSettings() {
cchUrl: 'http://localhost:13500',
cchApiKeyConfigured: false,
defaultModel: 'claude-sonnet-4-5-20250929',
defaultTools: ['web_search', 'code_execution', 'web_fetch'],
defaultTools: ['web_search', 'web_fetch'],
theme: 'light',
language: 'zh-CN',
enableThinking: false,
@ -46,24 +46,6 @@ async function seedTools() {
isDefault: true,
sortOrder: 1,
},
{
toolId: 'code_execution',
name: 'code_execution',
displayName: 'Code Execution',
description: '执行代码片段并返回结果',
icon: 'Terminal',
inputSchema: {
type: 'object',
properties: {
code: { type: 'string', description: '要执行的代码' },
language: { type: 'string', description: '编程语言' },
},
required: ['code', 'language'],
},
isEnabled: true,
isDefault: true,
sortOrder: 2,
},
{
toolId: 'web_fetch',
name: 'web_fetch',
@ -79,7 +61,7 @@ async function seedTools() {
},
isEnabled: true,
isDefault: true,
sortOrder: 3,
sortOrder: 2,
},
];