Complete library adoption validation and cleanup

This commit is contained in:
2026-11-23 04:51:51 +00:00
parent 58ff21e4df
commit 338e93a7eb
7 changed files with 35 additions and 14 deletions

View File

@@ -33,6 +33,11 @@ type processInputs struct {
ProtectedPaths []string
}
type runtimePreparationError struct{ cause error }
func (e *runtimePreparationError) Error() string { return e.cause.Error() }
func (e *runtimePreparationError) Unwrap() error { return e.cause }
func loadProcessInputs(ctx context.Context, input processInput, mode commandkit.ReportingMode) (*processInputs, error) {
if mode == commandkit.ReportingModeQuiet && input.Output.Value == "" {
return nil, fmt.Errorf("quiet processing requires an output file or /dev/null")
@@ -44,7 +49,7 @@ func loadProcessInputs(ctx context.Context, input processInput, mode commandkit.
}
runtime, err := llm.NewRuntime(ctx, loaded, nil)
if err != nil {
return nil, err
return nil, &runtimePreparationError{cause: err}
}
if err := ctx.Err(); err != nil {
return nil, err