Accept and protect processing glossary files
This commit is contained in:
@@ -43,10 +43,11 @@ func loadProcessInputs(ctx context.Context, input processInput, mode commandkit.
|
||||
return nil, fmt.Errorf("quiet processing requires an output file or /dev/null")
|
||||
}
|
||||
selection := ckconfig.Selection{Config: input.Config, Overlay: input.Overlay, Overrides: input.Overrides}
|
||||
loaded, err := loadApplication(ctx, selection, struct{}{}, nil)
|
||||
acquired, err := acquireApplication(ctx, selection, acquisitionInput{GlossaryFiles: input.GlossaryFiles})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
loaded := acquired.Result
|
||||
runtime, err := llm.NewRuntime(ctx, loaded, nil)
|
||||
if err != nil {
|
||||
return nil, &runtimePreparationError{cause: err}
|
||||
@@ -69,6 +70,7 @@ func loadProcessInputs(ctx context.Context, input processInput, mode commandkit.
|
||||
raw = nil
|
||||
}
|
||||
protected := append([]string(nil), runtime.SourcePaths...)
|
||||
protected = append(protected, acquired.GlossarySources...)
|
||||
for _, entry := range loaded.Sources() {
|
||||
if entry.Kind == ck.SourceKindFile && entry.Path != "" {
|
||||
protected = append(protected, entry.Path)
|
||||
|
||||
Reference in New Issue
Block a user