Refactor AI Agent configuration and workflow handling
- Removed runtime mode handling from AIAgentConfigWorkbench and related components. - Updated tests to reflect changes in AI Agent policy copy and configuration. - Changed terminology from "workflow" to "revision" in various components and API responses. - Simplified agent binding logic in channel editing. - Cleaned up unused variables and types related to runtime modes. - Updated localization files for consistency with new terminology.
This commit is contained in:
@@ -15,7 +15,7 @@ type interruptMessagePreview struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
func buildConversationInterrupt(conversation models.Conversation, message models.Message, aiAgent models.AIAgent, summary *applicationruntime.Summary) *models.ConversationInterrupt {
|
||||
func buildConversationInterrupt(conversation models.Conversation, message models.Message, aiAgent models.AIAgent, summary *applicationruntime.RunResult) *models.ConversationInterrupt {
|
||||
if summary == nil {
|
||||
return nil
|
||||
}
|
||||
@@ -42,7 +42,7 @@ func buildConversationInterrupt(conversation models.Conversation, message models
|
||||
return item
|
||||
}
|
||||
|
||||
func resolveInterruptPrompt(summary *applicationruntime.Summary) string {
|
||||
func resolveInterruptPrompt(summary *applicationruntime.RunResult) string {
|
||||
if summary == nil || len(summary.Interrupts) == 0 {
|
||||
return i18nx.Get("conversation.interrupt.defaultPrompt")
|
||||
}
|
||||
@@ -67,14 +67,14 @@ func extractInterruptMessage(infoPreview string) string {
|
||||
return strings.TrimSpace(payload.Message)
|
||||
}
|
||||
|
||||
func firstInterruptID(summary *applicationruntime.Summary) string {
|
||||
func firstInterruptID(summary *applicationruntime.RunResult) string {
|
||||
if summary == nil || len(summary.Interrupts) == 0 {
|
||||
return ""
|
||||
}
|
||||
return strings.TrimSpace(summary.Interrupts[0].ID)
|
||||
}
|
||||
|
||||
func firstInterruptType(summary *applicationruntime.Summary) string {
|
||||
func firstInterruptType(summary *applicationruntime.RunResult) string {
|
||||
if summary == nil || len(summary.Interrupts) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user