feat: 新增会话相关function calling调用

This commit is contained in:
digua
2026-01-11 18:49:20 +08:00
committed by digua
parent a5513cbad5
commit af6418ffe9
5 changed files with 473 additions and 1 deletions
+4
View File
@@ -54,6 +54,8 @@ import {
getSessionStats,
updateSessionGapThreshold,
getSessions,
searchSessions,
getSessionMessages,
} from './query'
import { streamImport, streamParseFileInfo } from './import'
@@ -130,6 +132,8 @@ const syncHandlers: Record<string, (payload: any) => any> = {
getSessionStats: (p) => getSessionStats(p.sessionId),
updateSessionGapThreshold: (p) => updateSessionGapThreshold(p.sessionId, p.gapThreshold),
getSessions: (p) => getSessions(p.sessionId),
searchSessions: (p) => searchSessions(p.sessionId, p.keywords, p.timeFilter, p.limit, p.previewCount),
getSessionMessages: (p) => getSessionMessages(p.sessionId, p.chatSessionId, p.limit),
}
// 异步消息处理器(流式操作)