Verify native usage reporting across recovery and delivery boundaries
This commit is contained in:
@@ -18,6 +18,8 @@ import (
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
|
||||
units "gitea.maximumdirect.net/eric/notarius/internal/modules/generic/chunk/units"
|
||||
jsonoutput "gitea.maximumdirect.net/eric/notarius/internal/modules/generic/output/json"
|
||||
"go.maximumdirect.net/ckconfig"
|
||||
"go.maximumdirect.net/ckprompt"
|
||||
"go.maximumdirect.net/commandkit"
|
||||
"go.maximumdirect.net/promptkit"
|
||||
)
|
||||
@@ -204,7 +206,13 @@ func runFixture(t *testing.T, probe *runProbe, configure ...func(string) string)
|
||||
state = &nativeLoaders{engineOptions: []promptkit.Option{promptkit.WithLLMClient(probe)}}
|
||||
return state
|
||||
}
|
||||
app, err := commandkit.New(commandkit.Identity{Name: "notarius"}, pipelineCommands(newState, func() (pipeline.ModuleCatalog, error) { return catalogFromRegistries(registries), nil }, pipelineRunCommand("development", newState, func() (pipeline.Registries, error) { return registries, nil }, options)), commandkit.Alias("run", "pipeline run"))
|
||||
definitions := ckprompt.FromEngine(func(ctx context.Context, selection ckconfig.Selection, _ struct{}, state *nativeLoaders) (*promptkit.Engine, error) {
|
||||
return state.engine(ctx, selection)
|
||||
})
|
||||
definitions.NewState = newState
|
||||
declarations := []commandkit.Declaration{pipelineCommands(newState, func() (pipeline.ModuleCatalog, error) { return catalogFromRegistries(registries), nil }, pipelineRunCommand("development", newState, func() (pipeline.Registries, error) { return registries, nil }, options)), commandkit.Alias("run", "pipeline run")}
|
||||
declarations = append(declarations, ckprompt.Declarations(definitions)...)
|
||||
app, err := commandkit.New(commandkit.Identity{Name: "notarius"}, declarations...)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user