Skip to content

Commit 0ec5938

Browse files
MackinnonBuckCopilot
authored andcommitted
Fix LogAsync compilation error by adding missing url parameter
The generated Rpc.LogAsync method added a 'url' parameter between 'ephemeral' and 'cancellationToken', causing a type mismatch when Session.LogAsync passed cancellationToken as the 4th positional arg. Added the 'url' parameter to Session.LogAsync to match the generated Rpc method signature and pass it through correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e24886f commit 0ec5938

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dotnet/src/Session.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ public Task SetModelAsync(string model, CancellationToken cancellationToken = de
749749
/// <param name="message">The message to log.</param>
750750
/// <param name="level">Log level (default: info).</param>
751751
/// <param name="ephemeral">When <c>true</c>, the message is not persisted to disk.</param>
752+
/// <param name="url">Optional URL to associate with the log entry.</param>
752753
/// <param name="cancellationToken">Optional cancellation token.</param>
753754
/// <example>
754755
/// <code>
@@ -758,9 +759,9 @@ public Task SetModelAsync(string model, CancellationToken cancellationToken = de
758759
/// await session.LogAsync("Temporary status", ephemeral: true);
759760
/// </code>
760761
/// </example>
761-
public async Task LogAsync(string message, SessionLogRequestLevel? level = null, bool? ephemeral = null, CancellationToken cancellationToken = default)
762+
public async Task LogAsync(string message, SessionLogRequestLevel? level = null, bool? ephemeral = null, string? url = null, CancellationToken cancellationToken = default)
762763
{
763-
await Rpc.LogAsync(message, level, ephemeral, cancellationToken);
764+
await Rpc.LogAsync(message, level, ephemeral, url, cancellationToken);
764765
}
765766

766767
/// <summary>

0 commit comments

Comments
 (0)