Skip to content

Commit 91133a7

Browse files
committed
Merge upstream/main into feat_inhouse_mcp - 解决冲突并保留MCP服务功能
2 parents 199054d + 692e9de commit 91133a7

File tree

131 files changed

+1368
-2669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1368
-2669
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ spring-ai-alibaba-jmanus/ui-vue3/pnpm-lock.yaml
6262
# MCP configuration files
6363
modified_mcp_config.json
6464
.cursorindexingignore
65+
66+
# ignore code copilot local index
67+
.idea/LocalCodeIndex/

spring-ai-alibaba-graph/spring-ai-alibaba-graph-core/src/main/java/com/alibaba/cloud/ai/graph/CompileConfig.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public class CompileConfig {
4949

5050
private boolean releaseThread = false;
5151

52+
private boolean interruptBeforeEdge = false;
53+
5254
private ObservationRegistry observationRegistry = ObservationRegistry.NOOP;
5355

5456
/**
@@ -101,6 +103,15 @@ public String[] getInterruptAfter() {
101103
return interruptsAfter.toArray(new String[0]);
102104
}
103105

106+
/**
107+
* return the current state of option concerning whether to interrupt the graph
108+
* execution before evaluating conditional edges
109+
* @return true if option is enabled, false otherwise
110+
*/
111+
public boolean interruptBeforeEdge() {
112+
return interruptBeforeEdge;
113+
}
114+
104115
/**
105116
* Returns the set of interrupts that will occur before the specified node.
106117
* @return An unmodifiable set of interruptible nodes.
@@ -233,6 +244,23 @@ public Builder interruptsBefore(Collection<String> interruptsBefore) {
233244
return this;
234245
}
235246

247+
/**
248+
* Sets whether to interrupt the graph execution before evaluating conditional
249+
* edges.
250+
* <p>
251+
* By default, interruptions happen after a node has finished executing. If this
252+
* is set to {@code true}, the interruption will occur after the node finishes but
253+
* *before* any of its conditional edges are evaluated. This allows for inspecting
254+
* the state before a branch is chosen.
255+
* @param interruptBeforeEdge if {@code true}, interrupt before evaluating edges,
256+
* otherwise interrupt after.
257+
* @return The current {@code Builder} instance for method chaining.
258+
*/
259+
public Builder interruptBeforeEdge(boolean interruptBeforeEdge) {
260+
this.config.interruptBeforeEdge = interruptBeforeEdge;
261+
return this;
262+
}
263+
236264
/**
237265
* Sets multiple interrupt points that trigger after node execution from a
238266
* collection.
@@ -283,6 +311,7 @@ private CompileConfig(CompileConfig config) {
283311
this.releaseThread = config.releaseThread;
284312
this.lifecycleListeners = config.lifecycleListeners;
285313
this.observationRegistry = config.observationRegistry;
314+
this.interruptBeforeEdge = config.interruptBeforeEdge;
286315
}
287316

288317
}

0 commit comments

Comments
 (0)