fix: child usage remove (#5698)

* fix: child usage remove

* remove runloop empty usage
This commit is contained in:
Archer
2025-09-24 23:15:46 +08:00
committed by GitHub
parent 051455238c
commit 88633a2a42
5 changed files with 13 additions and 6 deletions

View File

@@ -61,6 +61,7 @@ export const dispatchAppRequest = async (props: Props): Promise<Response> => {
const { flowResponses, flowUsages, assistantResponses, system_memories } = await runWorkflow({
...props,
usageId: undefined,
runningAppInfo: {
id: String(appData._id),
name: appData.name,

View File

@@ -112,6 +112,7 @@ export const runToolCall = async (
// Run entry tool
const toolRunResponse = await runWorkflow({
...workflowProps,
usageId: undefined,
isToolCall: true
});
const stringToolResponse = formatToolResponse(toolRunResponse.toolResponses);

View File

@@ -134,6 +134,7 @@ export const dispatchRunAppNode = async (props: Props): Promise<Response> => {
system_memories
} = await runWorkflow({
...props,
usageId: undefined,
lastInteractive: childrenInteractive,
// Rewrite stream mode
...(system_forbid_stream

View File

@@ -95,6 +95,7 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
const response = await runWorkflow({
...props,
usageId: undefined,
lastInteractive: interactiveData?.childrenResponse,
variables: newVariables,
runtimeNodes,
@@ -150,12 +151,14 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
loopDetail: loopResponseDetail,
mergeSignId: props.node.nodeId
},
[DispatchNodeResponseKeyEnum.nodeDispatchUsages]: [
{
totalPoints,
moduleName: name
}
],
[DispatchNodeResponseKeyEnum.nodeDispatchUsages]: totalPoints
? [
{
totalPoints,
moduleName: name
}
]
: [],
[DispatchNodeResponseKeyEnum.newVariables]: newVariables
};
};

View File

@@ -120,6 +120,7 @@ export const dispatchRunPlugin = async (props: RunPluginProps): Promise<RunPlugi
const { flowResponses, flowUsages, assistantResponses, runTimes, system_memories } =
await runWorkflow({
...props,
usageId: undefined,
// Rewrite stream mode
...(system_forbid_stream
? {