mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix build errors from main merge: Throw conflict, ExecuteAsync rename, GetNewSessionAsync rename
- Remove InjectSharedThrow from DurableTask csproj (uses Workflows' internal Throw via InternalsVisibleTo) - Update ExecuteAsync -> ExecuteCoreAsync with WorkflowTelemetryContext.Disabled - Update GetNewSessionAsync -> CreateSessionAsync Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<InjectSharedThrow>true</InjectSharedThrow>
|
||||
<InjectSharedStructuredOutput>true</InjectSharedStructuredOutput>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
using Microsoft.Agents.AI.Workflows;
|
||||
using Microsoft.Agents.AI.Workflows.Checkpointing;
|
||||
using Microsoft.Agents.AI.Workflows.Observability;
|
||||
|
||||
namespace Microsoft.Agents.AI.DurableTask.Workflows;
|
||||
|
||||
@@ -45,10 +46,11 @@ internal static class DurableActivityExecutor
|
||||
object typedInput = DeserializeInput(executorInput, inputType);
|
||||
|
||||
DurableWorkflowContext workflowContext = new(sharedState, executor);
|
||||
object? result = await executor.ExecuteAsync(
|
||||
object? result = await executor.ExecuteCoreAsync(
|
||||
typedInput,
|
||||
new TypeId(inputType),
|
||||
workflowContext,
|
||||
WorkflowTelemetryContext.Disabled,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return SerializeActivityOutput(result, workflowContext);
|
||||
|
||||
@@ -151,7 +151,7 @@ internal static class DurableExecutorDispatcher
|
||||
return $"Agent '{agentName}' not found";
|
||||
}
|
||||
|
||||
AgentSession session = await agent.GetNewSessionAsync().ConfigureAwait(true);
|
||||
AgentSession session = await agent.CreateSessionAsync().ConfigureAwait(true);
|
||||
AgentResponse response = await agent.RunAsync(input, session).ConfigureAwait(true);
|
||||
|
||||
return response.Text;
|
||||
|
||||
Reference in New Issue
Block a user