mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-27 09:11:48 +08:00
feat: 优化部分文案和交互
This commit is contained in:
@@ -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<unknown> {
|
||||
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<unknown> {
|
||||
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)
|
||||
|
||||
|
||||
@@ -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')
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"title": "ChatLab",
|
||||
"subtitle": "Your local chat analysis lab ヾ(*ゝω・*)ノ",
|
||||
"subtitle": "Chat History Analysis Lab",
|
||||
"features": {
|
||||
"privacy": {
|
||||
"title": "Privacy First",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"network": {
|
||||
"title": "网络设置",
|
||||
"proxyMode": "代理模式",
|
||||
"proxyModeDesc": "访问外网时使用的代理方式",
|
||||
"proxyModeDesc": "访问网络时使用的代理方式",
|
||||
"modeOff": "关闭",
|
||||
"modeSystem": "跟随系统",
|
||||
"modeManual": "手动配置",
|
||||
|
||||
@@ -50,13 +50,13 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
// 倒计时状态
|
||||
const countdown = ref(15)
|
||||
const countdown = ref(10)
|
||||
let timer: ReturnType<typeof setInterval> | null = null
|
||||
|
||||
// 监听 modal 打开状态,启动倒计时
|
||||
watch(isOpen, (open) => {
|
||||
if (open) {
|
||||
countdown.value = 15
|
||||
countdown.value = 10
|
||||
timer = setInterval(() => {
|
||||
if (countdown.value > 0) {
|
||||
countdown.value--
|
||||
|
||||
@@ -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 导出格式
|
||||
|
||||
Reference in New Issue
Block a user