fix QoL and Ai integration
This commit is contained in:
7
ai.go
7
ai.go
@@ -145,6 +145,7 @@ type AIPreview struct {
|
||||
chunks []string
|
||||
details PRDetails
|
||||
threadID string
|
||||
message string
|
||||
validLines map[string]map[int]bool
|
||||
validDeleted map[string]map[int]bool
|
||||
diffText map[string]string
|
||||
@@ -243,7 +244,7 @@ func (c *AIController) Prepare(ctx context.Context, details PRDetails, threadID,
|
||||
Included: included,
|
||||
Redactions: redactions, HeadOID: details.HeadOID,
|
||||
Model: firstNonEmpty(c.config.Model, status.Model), chunks: chunks,
|
||||
details: details, threadID: threadID,
|
||||
details: details, threadID: threadID, message: message,
|
||||
validLines: validLines,
|
||||
validDeleted: validDeleted,
|
||||
diffText: diffText,
|
||||
@@ -316,8 +317,8 @@ func (c *AIController) RunWithProgress(
|
||||
return AIResult{}, err
|
||||
}
|
||||
findings, comments := state.Apply(
|
||||
preview.details, combined, c.provider.Name(), model, preview.threadID, preview.validLines,
|
||||
preview.validDeleted, preview.diffText,
|
||||
preview.details, combined, c.provider.Name(), model, preview.threadID, preview.message,
|
||||
preview.validLines, preview.validDeleted, preview.diffText,
|
||||
)
|
||||
if err := c.store.Save(preview.details, state); err != nil {
|
||||
return AIResult{}, err
|
||||
|
||||
Reference in New Issue
Block a user