Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/FunctionInfoUtilities.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System.Linq;

namespace Microsoft.Azure.Functions.PowerShellWorker
{
internal class FunctionInfoUtilities
{
private const string assistantSkillTriggerName = "assistantSkillTrigger";

public static bool hasAssistantSkillTrigger(AzFunctionInfo info)
{
return info.InputBindings.Where(x => x.Value.Type == assistantSkillTriggerName).Any();
}
}
}
2 changes: 1 addition & 1 deletion src/PowerShell/PowerShellManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public Hashtable InvokeFunction(
{
_pwsh.AddCommand(Utils.TracePipelineObjectCmdlet);
}
return ExecuteUserCode(isActivityFunction, outputBindings);
return ExecuteUserCode(isActivityFunction || FunctionInfoUtilities.hasAssistantSkillTrigger(functionInfo), outputBindings);
}
}
catch (RuntimeException e)
Expand Down
2 changes: 1 addition & 1 deletion src/RequestProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ private static void BindOutputFromResult(InvocationResponse response, AzFunction
}
}

if (functionInfo.DurableFunctionInfo.ProvidesForcedDollarReturnValue)
if (functionInfo.DurableFunctionInfo.ProvidesForcedDollarReturnValue || FunctionInfoUtilities.hasAssistantSkillTrigger(functionInfo))
{
response.ReturnValue = results[AzFunctionInfo.DollarReturn].ToTypedData(isDurableData: true);
}
Expand Down
Loading