Retain OpenCode sessions and verify fresh retry isolation
This commit is contained in:
@@ -310,6 +310,11 @@ func (r *runner) run(ctx context.Context, id int64, d *protocol.PipelineDetail,
|
||||
result, err = (stage.ModelStage{Client: client}).Run(ctx, def, input)
|
||||
} else if stage.EffectiveType(def.Type) == stage.ModelType {
|
||||
plain := &stage.OpenCodeClient{Directory: workspace}
|
||||
plain.OnGenerationSession = func(session, backend, reference string, active bool) error {
|
||||
c, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
return r.store.RunSession(c, id, sequence, session, active, backend, reference)
|
||||
}
|
||||
result, err = (stage.ModelStage{Client: plain}).Run(ctx, def, input)
|
||||
client.Transcript = plain.FormatAudit
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user