mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-22 00:47:45 +08:00
feat: prevent raw tool call JSON leakage for unknown or rejected tool calls and consolidate container publishing to GHCR.
This commit is contained in:
@@ -205,8 +205,17 @@ function consumeToolCapture(state, toolNames) {
|
||||
suffix: '',
|
||||
};
|
||||
}
|
||||
const rawParsed = parseStandaloneToolCalls(captured.slice(start, obj.end), []);
|
||||
const parsed = parseStandaloneToolCalls(captured.slice(start, obj.end), toolNames);
|
||||
if (parsed.length === 0) {
|
||||
if (rawParsed.length > 0 && Array.isArray(toolNames) && toolNames.length > 0) {
|
||||
return {
|
||||
ready: true,
|
||||
prefix: prefixPart,
|
||||
calls: [],
|
||||
suffix: suffixPart,
|
||||
};
|
||||
}
|
||||
if (state.toolNameSent) {
|
||||
return {
|
||||
ready: true,
|
||||
|
||||
Reference in New Issue
Block a user