Route console diagnostics and stage progress through native reporting

This commit is contained in:
2026-11-20 05:59:09 +00:00
parent c7a5ff316d
commit c523def852
23 changed files with 309 additions and 76 deletions

View File

@@ -0,0 +1,22 @@
package stage
func (env *Env) Info(message string, fields ...any) {
if env != nil && env.Reporter != nil {
env.Reporter.Info(message, fields...)
}
}
func (env *Env) Warn(message string, fields ...any) {
if env != nil && env.Reporter != nil {
env.Reporter.Warn(message, fields...)
}
}
func (env *Env) Debug(message string, fields ...any) {
if env != nil && env.Reporter != nil {
env.Reporter.Debug(message, fields...)
}
}
func (env *Env) Progress(message string, fields ...any) {
if env != nil && env.Reporter != nil {
env.Reporter.Progress(message, fields...)
}
}

View File

@@ -2,7 +2,6 @@ package stage
import (
"context"
"log/slog"
"strings"
"unicode/utf8"
@@ -15,6 +14,7 @@ import (
"gitea.maximumdirect.net/eric/narratio/internal/adapters/whisperx"
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
"gitea.maximumdirect.net/eric/narratio/internal/config"
"gitea.maximumdirect.net/eric/narratio/internal/logging"
"gitea.maximumdirect.net/eric/narratio/internal/manifest"
)
@@ -25,7 +25,7 @@ type Env struct {
EffectiveArtifacts artifacts.EffectiveArtifactSet
ArtifactStore artifacts.Store
ManifestStore manifest.Store
Logger *slog.Logger
Reporter logging.Reporter
Force bool
WhisperX whisperx.Client