Fix agent stuck in waiting state after completion#343
Fix agent stuck in waiting state after completion#343satti-hari-krishna-reddy wants to merge 3 commits intoShuffle:mainfrom
Conversation
| formattedAppName := strings.ReplaceAll(strings.ToLower(app.Name), " ", "_") | ||
|
|
||
| isInternalShuffleApp := false | ||
| switch formattedAppName { |
There was a problem hiding this comment.
Something about just matching name seems off, but I'm not sure exactly why.
I wonder if there is a way to "steal" the URL field/apikey by formatting an app in a certain way.
Just need to think it over before merging 🤔
There was a problem hiding this comment.
Yeah, I think having a special verified field for apps built by support users would be better. Given that we're already overriding the URL field when injecting the auth, if we compare additionally to this special field and both are true, we can trust it. What do you think?
|
|
||
| returnAction, err := HandleAiAgentExecutionStart(workflowExecution, actionResult.Action, true) | ||
| var originalAction Action | ||
| if foundActionResultIndex >= 0 && foundActionResultIndex < len(workflowExecution.Results) { |
There was a problem hiding this comment.
What was the point of this? I'm always confused when we override actions, when things used to work without it
There was a problem hiding this comment.
At line 8295 in ai, we are building actionResult, and inside of that we are setting the action's label name as fmt.Sprintf("Agent Decision %s", decision.RunDetails.Id). Then we call handleAgentDecisionStreamResult, and that one passes actionResult to HandleAiAgentExecutionStart. Now startNode is overwritten with an action with label, e.g., "Agent Decision RNnBU2aY". Due to this, the later nodes in workflow that are trying to refer to the AI agent node with its original label can't find it, resulting in being unable to get any data from the agent node at all.
No description provided.