Skip to content

Commit 31248c9

Browse files
committed
A few more minor agent fixes
1 parent 5b60f06 commit 31248c9

4 files changed

Lines changed: 20 additions & 1 deletion

File tree

ai.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8636,6 +8636,13 @@ You are the Action Execution Agent for the Shuffle platform. You receive tools (
86368636
Result: string(marshalledDecision),
86378637
}
86388638

8639+
for _, action := range execution.Workflow.Actions {
8640+
if action.ID == actionResult.Action.ID {
8641+
actionResult.Action = action
8642+
break
8643+
}
8644+
}
8645+
86398646
// This is required as the result for the agent isn't set yet on the first run. Minor delay to wait up a bit
86408647
if decisionIndex == 0 {
86418648
go func() {

cloudSync.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,13 @@ func RunAgentDecisionAction(execution WorkflowExecution, agentOutput AgentOutput
23682368
Result: string(marshalledDecision),
23692369
}
23702370

2371+
for _, action := range execution.Workflow.Actions {
2372+
if action.ID == parsedAction.Action.ID {
2373+
parsedAction.Action = action
2374+
break
2375+
}
2376+
}
2377+
23712378
marshalledAction, err := json.Marshal(parsedAction)
23722379
if err != nil {
23732380
log.Printf("[ERROR][%s] AI Agent: Failed marshalling action in agent decision: %s", execution.ExecutionId, err)

db-connector.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,6 +1999,11 @@ func Fixexecution(ctx context.Context, workflowExecution WorkflowExecution) (Wor
19991999
workflowExecution.Workflow.Actions[actionIndex].LargeImage = ""
20002000
workflowExecution.Workflow.Actions[actionIndex].SmallImage = ""
20012001
for resultIndex, innerresult := range workflowExecution.Results {
2002+
// There was some WAITING issue here. This is a hotfix from agent issues.
2003+
if innerresult.Status == "WAITING" && innerresult.Action.AppName == "Shuffle Tools" && innerresult.CompletedAt > 0 {
2004+
workflowExecution.Results[resultIndex].Status = "SUCCESS"
2005+
}
2006+
20022007
if innerresult.Action.ID != action.ID {
20032008
continue
20042009
}

shared.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22511,7 +22511,7 @@ func PrepareSingleAction(ctx context.Context, user User, appId string, body []by
2251122511
})
2251222512
}
2251322513

22514-
log.Printf("[AUDIT] Injected system AI credentials (fallback) for org %s", user.ActiveOrg.Id)
22514+
//log.Printf("[AUDIT] Injected system AI credentials (fallback) for org %s", user.ActiveOrg.Id)
2251522515

2251622516
// Mapping to internal so the execution itself is not referencable
2251722517
if project.Environment == "cloud" {

0 commit comments

Comments
 (0)