blob: 127ef6fa927b4174f841699afcaf6b125e27202f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package hexaiaction
import "codeberg.org/snonux/hexai/internal/appconfig"
// actionConfig narrows dependencies to the config sections needed by actions.
type actionConfig interface {
CoreSection() appconfig.CoreConfig
ProviderSection() appconfig.ProviderConfig
PromptSection() appconfig.PromptConfig
}
func actionConfigAsApp(cfg actionConfig) appconfig.App {
app := appconfig.App{}
app.ApplyCoreSection(cfg.CoreSection())
app.ApplyProviderSection(cfg.ProviderSection())
app.ApplyPromptSection(cfg.PromptSection())
return app
}
|