Move prompt debug capture out of state

This commit is contained in:
2026-08-01 19:35:12 +00:00
parent 62a12dd661
commit b184ca7cbd
5 changed files with 13 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import (
"gitea.maximumdirect.net/eric/weatherreporter/internal/fileutil"
"gitea.maximumdirect.net/eric/weatherreporter/internal/generatedtext"
"gitea.maximumdirect.net/eric/weatherreporter/internal/module"
"gitea.maximumdirect.net/eric/weatherreporter/internal/promptdebug"
"gitea.maximumdirect.net/eric/weatherreporter/internal/promptexec"
"gitea.maximumdirect.net/eric/weatherreporter/internal/promptinput"
"gitea.maximumdirect.net/eric/weatherreporter/internal/report"
@@ -21,7 +22,7 @@ type promptReportRequest struct {
Resolved report.Resolved
Collection collect.Result
Inspection PromptInspectionResult
DebugWriter *state.PromptDebugWriter
DebugWriter *promptdebug.PromptDebugWriter
noNotify bool
}
@@ -83,7 +84,7 @@ type promptReportWorkflow struct {
dataPackageBytes []byte
handler generatedtext.Handler
executionArtifact state.PromptExecutionArtifact
debugRef state.PromptDebugRef
debugRef promptdebug.PromptDebugRef
prepared bool
callbackFailed bool
}
@@ -151,7 +152,7 @@ func (w *promptReportWorkflow) buildInputs() error {
if err != nil {
return w.reportError("lookup generated text catalog", err)
}
w.debugRef = state.PromptDebugRef{
w.debugRef = promptdebug.PromptDebugRef{
ReportID: w.req.Resolved.Definition.ID, ValidDate: w.req.Resolved.ValidPeriod.Start.Format("2006-01-02"), RunID: w.metadata.RunID,
}
return nil