diff --git a/pkg/agentic/plan.go b/pkg/agentic/plan.go index 066d1b9..7aae8b0 100644 --- a/pkg/agentic/plan.go +++ b/pkg/agentic/plan.go @@ -4,10 +4,6 @@ package agentic import ( "context" - "crypto/rand" - "encoding/hex" - "strconv" - "sync/atomic" "time" core "dappco.re/go/core" @@ -157,8 +153,6 @@ type PlanListOutput struct { const planListDefaultLimit = 20 -var planIDCounter atomic.Uint64 - // result := c.Action("plan.create").Run(ctx, core.NewOptions( // // core.Option{Key: "title", Value: "AX RFC follow-up"}, @@ -717,17 +711,7 @@ func phaseCriteriaValue(values ...any) []string { } func planID() string { - counter := planIDCounter.Add(1) - suffix := planRandomHex() - return core.Concat("id-", strconv.FormatUint(counter, 10), "-", suffix) -} - -func planRandomHex() string { - bytes := make([]byte, 3) - if _, err := rand.Read(bytes); err != nil { - return "000000" - } - return hex.EncodeToString(bytes) + return core.ID() } func planTaskSliceValue(value any) []PlanTask {