Add module correction repair prompts
This commit is contained in:
23
internal/framework/proposal_generation/repair_request.go
Normal file
23
internal/framework/proposal_generation/repair_request.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package proposal_generation
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// RepairFinding contains safe validator feedback for the current correction.
|
||||
type RepairFinding struct {
|
||||
Status string `json:"status,omitempty"`
|
||||
Validator string `json:"validator"`
|
||||
Reason string `json:"reason"`
|
||||
Explanation string `json:"explanation,omitempty"`
|
||||
}
|
||||
|
||||
// RepairRequest identifies the proposal version and its ordered findings.
|
||||
type RepairRequest struct {
|
||||
ProposalRef int `json:"proposal_ref"`
|
||||
Correction StructuredCorrectionProposal `json:"correction"`
|
||||
Findings []RepairFinding `json:"findings"`
|
||||
}
|
||||
|
||||
func (r RepairRequest) JSON() (string, error) {
|
||||
data, err := json.Marshal(r)
|
||||
return string(data), err
|
||||
}
|
||||
Reference in New Issue
Block a user