ci / go (push) Waiting to run
ci / go-db (agent) (push) Waiting to run
ci / go-db (config) (push) Waiting to run
ci / go-db (db) (push) Waiting to run
ci / go-db (evidence) (push) Waiting to run
ci / go-db (llmrec) (push) Waiting to run
ci / go-db (server) (push) Waiting to run
web / web (push) Waiting to run
docs / links (push) Canceled after 0s
detections / detections (push) Canceled after 0s
24 lines
671 B
Go
24 lines
671 B
Go
package agent
|
|
|
|
import (
|
|
"context"
|
|
"strconv"
|
|
"strings"
|
|
|
|
"github.com/Autumn-27/artex/sidequestion"
|
|
"github.com/Autumn-27/norma/agentcore"
|
|
)
|
|
|
|
func attachSideCapture(ctx context.Context, opts *agentcore.Options) context.Context {
|
|
ri := RunInfoFrom(ctx)
|
|
p := sidequestion.Parent{TaskID: ri.TaskID, ExplorationID: ri.ExplorationID, IntentID: ri.IntentID}
|
|
if strings.HasPrefix(ri.SessionID, "conv-") {
|
|
p.ConversationID, _ = strconv.ParseInt(strings.TrimPrefix(ri.SessionID, "conv-"), 10, 64)
|
|
}
|
|
if p.ConversationID == 0 && (p.TaskID == 0 || p.ExplorationID == 0) {
|
|
return ctx
|
|
}
|
|
ctx, opts.Deps = sidequestion.Attach(ctx, p, opts.Deps, opts.Provider)
|
|
return ctx
|
|
}
|