From 9d84c35b7a5fdca8e3c63285707d633ef006253d Mon Sep 17 00:00:00 2001 From: digua Date: Fri, 30 Jan 2026 00:43:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=96=87=E6=A1=88=E5=92=8C=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main/ai/tools/registry.ts | 10 +++++----- .../common/settings/AI/AIPromptConfigTab.vue | 2 +- src/i18n/locales/en-US/home.json | 2 +- src/i18n/locales/zh-CN/settings.json | 2 +- src/pages/home/components/AgreementModal.vue | 4 ++-- src/stores/prompt.ts | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/electron/main/ai/tools/registry.ts b/electron/main/ai/tools/registry.ts index c59d6635..e21e798e 100644 --- a/electron/main/ai/tools/registry.ts +++ b/electron/main/ai/tools/registry.ts @@ -212,7 +212,7 @@ const searchMessagesTool: ToolDefinition = { }, limit: { type: 'number', - description: '返回消息数量限制,默认 100,最大 5000', + description: '返回消息数量限制,默认 1000,最大 50000', }, year: { type: 'number', @@ -261,8 +261,8 @@ async function searchMessagesExecutor( context: ToolContext ): Promise { const { sessionId, timeFilter: contextTimeFilter, maxMessagesLimit, locale } = context - // 用户配置优先:如果用户设置了 maxMessagesLimit,使用它;否则使用 LLM 指定的值或默认值 100,上限 5000 - const limit = Math.min(maxMessagesLimit || params.limit || 100, 5000) + // 用户配置优先:如果用户设置了 maxMessagesLimit,使用它;否则使用 LLM 指定的值或默认值 1000,上限 50000 + const limit = Math.min(maxMessagesLimit || params.limit || 1000, 50000) // 使用扩展的时间参数解析 const effectiveTimeFilter = parseExtendedTimeParams(params, contextTimeFilter) @@ -876,7 +876,7 @@ const getSessionMessagesTool: ToolDefinition = { }, limit: { type: 'number', - description: '返回消息数量限制,默认 500。对于超长会话可以限制返回数量以节省 token', + description: '返回消息数量限制,默认 1000。对于超长会话可以限制返回数量以节省 token', }, }, required: ['session_id'], @@ -893,7 +893,7 @@ async function getSessionMessagesExecutor( ): Promise { const { sessionId, maxMessagesLimit, locale } = context // 用户配置优先 - const limit = maxMessagesLimit || params.limit || 500 + const limit = maxMessagesLimit || params.limit || 1000 const result = await workerManager.getSessionMessages(sessionId, params.session_id, limit) diff --git a/src/components/common/settings/AI/AIPromptConfigTab.vue b/src/components/common/settings/AI/AIPromptConfigTab.vue index 40262bc8..a922ce70 100644 --- a/src/components/common/settings/AI/AIPromptConfigTab.vue +++ b/src/components/common/settings/AI/AIPromptConfigTab.vue @@ -19,7 +19,7 @@ const emit = defineEmits<{ const globalMaxMessages = computed({ get: () => aiGlobalSettings.value.maxMessagesPerRequest, set: (val: number) => { - const clampedVal = Math.max(0, Math.min(50000, val || 200)) + const clampedVal = Math.max(0, Math.min(50000, val || 1000)) promptStore.updateAIGlobalSettings({ maxMessagesPerRequest: clampedVal }) emit('config-changed') }, diff --git a/src/i18n/locales/en-US/home.json b/src/i18n/locales/en-US/home.json index b80fa6ff..82347517 100644 --- a/src/i18n/locales/en-US/home.json +++ b/src/i18n/locales/en-US/home.json @@ -1,6 +1,6 @@ { "title": "ChatLab", - "subtitle": "Your local chat analysis lab ヾ(*ゝω・*)ノ", + "subtitle": "Chat History Analysis Lab", "features": { "privacy": { "title": "Privacy First", diff --git a/src/i18n/locales/zh-CN/settings.json b/src/i18n/locales/zh-CN/settings.json index 948502d8..3d2f7e07 100644 --- a/src/i18n/locales/zh-CN/settings.json +++ b/src/i18n/locales/zh-CN/settings.json @@ -32,7 +32,7 @@ "network": { "title": "网络设置", "proxyMode": "代理模式", - "proxyModeDesc": "访问外网时使用的代理方式", + "proxyModeDesc": "访问网络时使用的代理方式", "modeOff": "关闭", "modeSystem": "跟随系统", "modeManual": "手动配置", diff --git a/src/pages/home/components/AgreementModal.vue b/src/pages/home/components/AgreementModal.vue index f0b70685..61b850c0 100644 --- a/src/pages/home/components/AgreementModal.vue +++ b/src/pages/home/components/AgreementModal.vue @@ -50,13 +50,13 @@ onMounted(() => { }) // 倒计时状态 -const countdown = ref(15) +const countdown = ref(10) let timer: ReturnType | null = null // 监听 modal 打开状态,启动倒计时 watch(isOpen, (open) => { if (open) { - countdown.value = 15 + countdown.value = 10 timer = setInterval(() => { if (countdown.value > 0) { countdown.value-- diff --git a/src/stores/prompt.ts b/src/stores/prompt.ts index c24e0eea..a2341bf7 100644 --- a/src/stores/prompt.ts +++ b/src/stores/prompt.ts @@ -45,7 +45,7 @@ export const usePromptStore = defineStore( }) const aiConfigVersion = ref(0) const aiGlobalSettings = ref({ - maxMessagesPerRequest: 500, + maxMessagesPerRequest: 1000, maxHistoryRounds: 5, // AI上下文会话轮数限制 exportFormat: 'markdown' as 'markdown' | 'txt', // 对话导出格式 sqlExportFormat: 'csv' as 'csv' | 'json', // SQL Lab 导出格式