fix: checkpoint store correctly initialize in multi-layered sub-workf… (#755)

This commit is contained in:
shentongmartin
2025-08-14 16:34:39 +08:00
committed by GitHub
parent c79ee64fe8
commit 3030d4d627
4 changed files with 16 additions and 9 deletions

View File

@@ -731,10 +731,7 @@ func (c *Config) Build(ctx context.Context, ns *schema2.NodeSchema, _ ...schema2
_ = g.AddEdge(llmNodeKey, outputConvertNodeKey)
_ = g.AddEdge(outputConvertNodeKey, compose.END)
requireCheckpoint := false
if len(tools) > 0 {
requireCheckpoint = true
}
requireCheckpoint := c.RequireCheckpoint()
var compileOpts []compose.GraphCompileOption
if requireCheckpoint {
@@ -759,8 +756,16 @@ func (c *Config) Build(ctx context.Context, ns *schema2.NodeSchema, _ ...schema2
func (c *Config) RequireCheckpoint() bool {
if c.FCParam != nil {
if c.FCParam.WorkflowFCParam != nil || c.FCParam.PluginFCParam != nil {
return true
if c.FCParam.WorkflowFCParam != nil {
if len(c.FCParam.WorkflowFCParam.WorkflowList) > 0 {
return true
}
}
if c.FCParam.PluginFCParam != nil {
if len(c.FCParam.PluginFCParam.PluginList) > 0 {
return true
}
}
}