Remove AI config approval flow

This commit is contained in:
npc0-hue
2026-09-22 15:33:32 +08:00
parent 20008b4043
commit a8b5d483a3
54 changed files with 364 additions and 875 deletions
+11 -2
View File
@@ -25,8 +25,11 @@ type AIConfigRecommendation struct {
Key string
SuggestedConfig string
DiffSummary string
DiffID string
ExpiresAt string
}
type AIConfigExecution struct {
Status string
Job Job
}
type AIInvocationSafeError struct {
@@ -43,6 +46,7 @@ type AIInvocationResponse struct {
Status string
Recommendation string
ConfigRecommendation *AIConfigRecommendation
ConfigExecution *AIConfigExecution
Usage AIInvocationUsage
Error *AIInvocationSafeError
}
@@ -64,6 +68,11 @@ func CopyAIInvocationResponse(response AIInvocationResponse) AIInvocationRespons
recommendation := *response.ConfigRecommendation
response.ConfigRecommendation = &recommendation
}
if response.ConfigExecution != nil {
execution := *response.ConfigExecution
execution.Job = CopyJob(execution.Job)
response.ConfigExecution = &execution
}
if response.Error != nil {
errorCopy := *response.Error
errorCopy.Details = CopyStringSlice(errorCopy.Details)