Hand checked processing selections to execution
This commit is contained in:
@@ -163,11 +163,9 @@ func (r *Runner) Run(ctx context.Context, input RunInput) (RunOutput, error) {
|
||||
}
|
||||
|
||||
policy := module.ReplacementPolicy()
|
||||
glossaryVariables, err := promptcontext.PrepareGlossaryVariables(spec.Glossary, spec.ProtectedTerms)
|
||||
if err != nil {
|
||||
if err := spec.PrepareGlossary(); err != nil {
|
||||
return snapshot(), fmt.Errorf("module %q glossary preparation: %w", spec.InstanceName, err)
|
||||
}
|
||||
glossaryView := validators.PrepareGlossaryView(spec.Glossary, spec.ProtectedTerms)
|
||||
pipelineResult, pipelineErr := runModulePipeline(ctx, collectSectionProposalsInput{
|
||||
Module: module,
|
||||
Spec: spec,
|
||||
@@ -176,8 +174,8 @@ func (r *Runner) Run(ctx context.Context, input RunInput) (RunOutput, error) {
|
||||
ProposalClient: spec.ProposalClient,
|
||||
Interactions: input.Interactions,
|
||||
ValidationClient: spec.ValidationClient,
|
||||
GlossaryVariables: &glossaryVariables,
|
||||
GlossaryView: glossaryView,
|
||||
GlossaryVariables: spec.GlossaryVariables,
|
||||
GlossaryView: spec.GlossaryView,
|
||||
})
|
||||
if input.CaptureCandidates {
|
||||
candidates = append(candidates, pipelineResult.Candidates...)
|
||||
@@ -213,7 +211,7 @@ func (r *Runner) Run(ctx context.Context, input RunInput) (RunOutput, error) {
|
||||
return snapshot(), fmt.Errorf("module %q failed: %w", spec.InstanceName, pipelineErr)
|
||||
}
|
||||
|
||||
updated, applied, skipped, appliedBySection, applyErr := applyWithinSections(sections, pipelineResult.Approved, policy, glossaryView.Protection, spec.ModuleKey == modulecatalog.KeySpokenWord)
|
||||
updated, applied, skipped, appliedBySection, applyErr := applyWithinSections(sections, pipelineResult.Approved, policy, spec.GlossaryView.Protection, spec.ModuleKey == modulecatalog.KeySpokenWord)
|
||||
if applyErr != nil {
|
||||
for i := range pipelineResult.WorkUnits {
|
||||
unit := &pipelineResult.WorkUnits[i]
|
||||
|
||||
Reference in New Issue
Block a user