Skip to content
Merged
Changes from all 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
13 changes: 10 additions & 3 deletions dotnet/src/Microsoft.Agents.AI.Hosting/HostedWorkflowState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,7 @@ private void UpdateCursor(string sessionId, CheckpointInfo? checkpoint)
private void WarnOnNoProgress(string sessionId)
// The resumed turn drove no work: the checkpoint may be stale or the input may not match the workflow's
// expected type, so the session's state may not have progressed.
=> this._logger.LogWarning(
"Resuming workflow session '{SessionId}' produced no events; the checkpoint may be stale or the input may not match the workflow's expected input type. Session state may not have progressed.",
sessionId);
=> this._logger.LogWorkflowResumeMadeNoProgress(sessionId);

/// <summary>
/// Gets the recorded head checkpoint for <paramref name="sessionId"/>, if any.
Expand All @@ -383,3 +381,12 @@ internal bool TryGetCheckpoint(string sessionId, out CheckpointInfo? checkpoint)
return this._cursor.TryGetValue(sessionId, out checkpoint);
}
}

[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal static partial class HostedWorkflowStateLogMessages
{
[LoggerMessage(
Level = LogLevel.Warning,
Message = "Resuming workflow session '{SessionId}' produced no events; the checkpoint may be stale or the input may not match the workflow's expected input type. Session state may not have progressed.")]
public static partial void LogWorkflowResumeMadeNoProgress(this ILogger logger, string sessionId);
}
Loading