mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
d3ba40090b
# Conflicts: # pkg/agent/loop.go
21 lines
821 B
Go
21 lines
821 B
Go
package commands
|
|
|
|
import "github.com/sipeed/picoclaw/pkg/config"
|
|
|
|
// Runtime provides runtime dependencies to command handlers. It is constructed
|
|
// per-request by the agent loop so that per-request state (like session scope)
|
|
// can coexist with long-lived callbacks (like GetModelInfo).
|
|
type Runtime struct {
|
|
Config *config.Config
|
|
GetModelInfo func() (name, provider string)
|
|
ListAgentIDs func() []string
|
|
ListDefinitions func() []Definition
|
|
ListSkillNames func() []string
|
|
GetEnabledChannels func() []string
|
|
GetActiveTurn func() any // Returning any to avoid circular dependency with agent package
|
|
SwitchModel func(value string) (oldModel string, err error)
|
|
SwitchChannel func(value string) error
|
|
ClearHistory func() error
|
|
ReloadConfig func() error
|
|
}
|