mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: The prompt words "plan" are displayed only when the agent operator has sub-agent operators or sub-tool operators. #10000 (#10001)
### What problem does this PR solve? Feat: The prompt words "plan" are displayed only when the agent operator has sub-agent operators or sub-tool operators. . #10000 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -152,6 +152,16 @@ export function isBottomSubAgent(edges: Edge[], nodeId?: string) {
|
||||
return !!edge;
|
||||
}
|
||||
|
||||
export function hasSubAgentOrTool(edges: Edge[], nodeId?: string) {
|
||||
const edge = edges.find(
|
||||
(x) =>
|
||||
x.source === nodeId &&
|
||||
(x.sourceHandle === NodeHandleId.Tool ||
|
||||
x.sourceHandle === NodeHandleId.AgentBottom),
|
||||
);
|
||||
return !!edge;
|
||||
}
|
||||
|
||||
// construct a dsl based on the node information of the graph
|
||||
export const buildDslComponentsByGraph = (
|
||||
nodes: RAGFlowNodeType[],
|
||||
|
||||
Reference in New Issue
Block a user