Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion pkg/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import (

type ResumeType string

type modelStore interface {
GetModel(ctx context.Context, modelID string) (*modelsdev.Model, error)
}

const (
ResumeTypeApprove ResumeType = "approve"
ResumeTypeApproveSession ResumeType = "approve-session"
Expand Down Expand Up @@ -61,7 +65,7 @@ type runtime struct {
resumeChan chan ResumeType
oauthManager oauth.Manager
tracer trace.Tracer
modelsStore *modelsdev.Store
modelsStore modelStore
sessionCompaction bool
}

Expand All @@ -86,6 +90,12 @@ func WithSessionCompaction(sessionCompaction bool) Opt {
}
}

func WithModelStore(store modelStore) Opt {
return func(r *runtime) {
r.modelsStore = store
}
}

// New creates a new runtime for an agent and its team
func New(agents *team.Team, opts ...Opt) (Runtime, error) {
modelsStore, err := modelsdev.NewStore()
Expand Down
Loading
Loading