mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(ai): keep global memory always enabled
Remove the proactive-memory preference and its cross-platform runtime plumbing so memory behavior has one clear contract. Normalize away the obsolete setting and keep source type limited to provenance.
This commit is contained in:
1 parent
77c4dec9e6
commit
c69a927615
21 files changed
+10
-74
No files matched your search
@@ -86,7 +86,6 @@ export function createCliRunAgentStream(
|
||||
crossChatAnalysisService?: CrossChatAnalysisService
|
||||
sessionAdapter?: SessionRuntimeAdapter
|
||||
memoryService?: AIMemoryService
|
||||
getAllowProactiveMemory?: () => boolean
|
||||
} = {}
|
||||
): (params: AgentStreamRequest, onEvent: (chunk: AgentStreamChunk) => void, abortSignal: AbortSignal) => Promise<void> {
|
||||
const aiDataDir = getAiDir(dbManager)
|
||||
@@ -161,7 +160,6 @@ export function createCliRunAgentStream(
|
||||
maxToolResultTokens: resolveCrossChatToolResultTokenBudget(contextWindow),
|
||||
memoryService: options.memoryService,
|
||||
aiChatId,
|
||||
allowProactiveMemory: options.getAllowProactiveMemory?.() ?? true,
|
||||
})
|
||||
await runCrossChatAgent({
|
||||
userMessage,
|
||||
|
||||
@@ -23,7 +23,6 @@ export function createCliCrossChatTools(options: {
|
||||
maxToolResultTokens: number
|
||||
memoryService: AIMemoryService
|
||||
aiChatId: string
|
||||
allowProactiveMemory: boolean
|
||||
}): AgentTool<any, any>[] {
|
||||
const context: Omit<CrossChatToolExecutionContext, 'abortSignal' | 'reportProgress'> = {
|
||||
locale: options.locale,
|
||||
@@ -31,7 +30,6 @@ export function createCliCrossChatTools(options: {
|
||||
analysisService: options.analysisService,
|
||||
memoryService: options.memoryService,
|
||||
aiChatId: options.aiChatId,
|
||||
allowProactiveMemory: options.allowProactiveMemory,
|
||||
maxToolResultTokens: options.maxToolResultTokens,
|
||||
countTokens,
|
||||
preprocessMessagesBySession: (sessionId, messages) =>
|
||||
|
||||
@@ -233,7 +233,6 @@ export async function startHttpServer(options?: HttpServerOptions): Promise<{
|
||||
crossChatAnalysisService,
|
||||
sessionAdapter,
|
||||
memoryService: aiMemoryService,
|
||||
getAllowProactiveMemory: () => preferencesManager.load().aiGlobalSettings.allowProactiveMemory,
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user