mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(ai): enforce cross-chat execution budgets
Count complete tool payloads with the runtime tokenizer so Chinese evidence respects the configured model context budget.\n\nResolve contact sources incrementally with cancellation checks and targeted member lookups to keep long cross-chat investigations responsive.
This commit is contained in:
1 parent
5d5355d4f1
commit
dc3bd82c90
11 files changed
+162
-21
No files matched your search
@@ -4,7 +4,7 @@ import type {
|
||||
PreprocessConfig,
|
||||
SessionRuntimeAdapter,
|
||||
} from '@openchatlab/node-runtime'
|
||||
import { preprocessCrossChatMessages } from '@openchatlab/node-runtime'
|
||||
import { countTokens, preprocessCrossChatMessages } from '@openchatlab/node-runtime'
|
||||
import {
|
||||
CROSS_CHAT_AGENT_TOOL_REGISTRY,
|
||||
executeToolForAgent,
|
||||
@@ -23,6 +23,7 @@ export function createCliCrossChatTools(options: {
|
||||
locale: options.locale,
|
||||
analysisService: options.analysisService,
|
||||
maxToolResultTokens: options.maxToolResultTokens,
|
||||
countTokens,
|
||||
preprocessMessagesBySession: (sessionId, messages) =>
|
||||
preprocessCrossChatMessages(
|
||||
options.sessionAdapter,
|
||||
|
||||
Reference in new issue
Block a user