Skip to content

Commit ecafa7a

Browse files
Regen
Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 41c3f91 commit ecafa7a

File tree

11 files changed

+132
-132
lines changed

11 files changed

+132
-132
lines changed

dotnet/src/Generated/Rpc.cs

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Generated/SessionEvents.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Session.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ private async Task HandleElicitationRequestAsync(ElicitationContext context, str
727727
try
728728
{
729729
var result = await handler(context);
730-
await Rpc.Ui.HandlePendingElicitationAsync(requestId, new UiElicitationResponse
730+
await Rpc.Ui.HandlePendingElicitationAsync(requestId, new UIElicitationResponse
731731
{
732732
Action = result.Action,
733733
Content = result.Content
@@ -738,9 +738,9 @@ private async Task HandleElicitationRequestAsync(ElicitationContext context, str
738738
// User handler can throw any exception — attempt to cancel so the request doesn't hang.
739739
try
740740
{
741-
await Rpc.Ui.HandlePendingElicitationAsync(requestId, new UiElicitationResponse
741+
await Rpc.Ui.HandlePendingElicitationAsync(requestId, new UIElicitationResponse
742742
{
743-
Action = ElicitationResponseAction.Cancel
743+
Action = UIElicitationResponseAction.Cancel
744744
});
745745
}
746746
catch (Exception innerEx) when (innerEx is IOException or ObjectDisposedException)
@@ -771,7 +771,7 @@ private sealed class SessionUiApiImpl(CopilotSession session) : ISessionUiApi
771771
public async Task<ElicitationResult> ElicitationAsync(ElicitationParams elicitationParams, CancellationToken cancellationToken)
772772
{
773773
session.AssertElicitation();
774-
var schema = new UiElicitationSchema
774+
var schema = new UIElicitationSchema
775775
{
776776
Type = elicitationParams.RequestedSchema.Type,
777777
Properties = elicitationParams.RequestedSchema.Properties,
@@ -784,7 +784,7 @@ public async Task<ElicitationResult> ElicitationAsync(ElicitationParams elicitat
784784
public async Task<bool> ConfirmAsync(string message, CancellationToken cancellationToken)
785785
{
786786
session.AssertElicitation();
787-
var schema = new UiElicitationSchema
787+
var schema = new UIElicitationSchema
788788
{
789789
Type = "object",
790790
Properties = new Dictionary<string, object>
@@ -794,7 +794,7 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
794794
Required = ["confirmed"]
795795
};
796796
var result = await session.Rpc.Ui.ElicitationAsync(message, schema, cancellationToken);
797-
if (result.Action == ElicitationResponseAction.Accept
797+
if (result.Action == UIElicitationResponseAction.Accept
798798
&& result.Content != null
799799
&& result.Content.TryGetValue("confirmed", out var val))
800800
{
@@ -812,7 +812,7 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
812812
public async Task<string?> SelectAsync(string message, string[] options, CancellationToken cancellationToken)
813813
{
814814
session.AssertElicitation();
815-
var schema = new UiElicitationSchema
815+
var schema = new UIElicitationSchema
816816
{
817817
Type = "object",
818818
Properties = new Dictionary<string, object>
@@ -822,7 +822,7 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
822822
Required = ["selection"]
823823
};
824824
var result = await session.Rpc.Ui.ElicitationAsync(message, schema, cancellationToken);
825-
if (result.Action == ElicitationResponseAction.Accept
825+
if (result.Action == UIElicitationResponseAction.Accept
826826
&& result.Content != null
827827
&& result.Content.TryGetValue("selection", out var val))
828828
{
@@ -847,14 +847,14 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
847847
if (options?.Format != null) field["format"] = options.Format;
848848
if (options?.Default != null) field["default"] = options.Default;
849849

850-
var schema = new UiElicitationSchema
850+
var schema = new UIElicitationSchema
851851
{
852852
Type = "object",
853853
Properties = new Dictionary<string, object> { ["value"] = field },
854854
Required = ["value"]
855855
};
856856
var result = await session.Rpc.Ui.ElicitationAsync(message, schema, cancellationToken);
857-
if (result.Action == ElicitationResponseAction.Accept
857+
if (result.Action == UIElicitationResponseAction.Accept
858858
&& result.Content != null
859859
&& result.Content.TryGetValue("value", out var val))
860860
{

dotnet/src/Types.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ public class ElicitationResult
729729
/// <summary>
730730
/// User action: <c>"accept"</c> (submitted), <c>"decline"</c> (rejected), or <c>"cancel"</c> (dismissed).
731731
/// </summary>
732-
public ElicitationResponseAction Action { get; set; }
732+
public UIElicitationResponseAction Action { get; set; }
733733

734734
/// <summary>
735735
/// Form values submitted by the user (present when <see cref="Action"/> is <c>Accept</c>).

dotnet/test/ElicitationTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public async Task Sends_RequestElicitation_When_Handler_Provided()
8080
OnPermissionRequest = PermissionHandler.ApproveAll,
8181
OnElicitationRequest = _ => Task.FromResult(new ElicitationResult
8282
{
83-
Action = ElicitationResponseAction.Accept,
83+
Action = UIElicitationResponseAction.Accept,
8484
Content = new Dictionary<string, object>(),
8585
}),
8686
});
@@ -99,7 +99,7 @@ public async Task Session_With_ElicitationHandler_Reports_Elicitation_Capability
9999
OnPermissionRequest = PermissionHandler.ApproveAll,
100100
OnElicitationRequest = _ => Task.FromResult(new ElicitationResult
101101
{
102-
Action = ElicitationResponseAction.Accept,
102+
Action = UIElicitationResponseAction.Accept,
103103
Content = new Dictionary<string, object>(),
104104
}),
105105
});
@@ -194,17 +194,17 @@ public void ElicitationResult_Types_Are_Properly_Structured()
194194
{
195195
var result = new ElicitationResult
196196
{
197-
Action = ElicitationResponseAction.Accept,
197+
Action = UIElicitationResponseAction.Accept,
198198
Content = new Dictionary<string, object> { ["name"] = "Alice" },
199199
};
200200

201-
Assert.Equal(ElicitationResponseAction.Accept, result.Action);
201+
Assert.Equal(UIElicitationResponseAction.Accept, result.Action);
202202
Assert.NotNull(result.Content);
203203
Assert.Equal("Alice", result.Content!["name"]);
204204

205205
var declined = new ElicitationResult
206206
{
207-
Action = ElicitationResponseAction.Decline,
207+
Action = UIElicitationResponseAction.Decline,
208208
};
209209
Assert.Null(declined.Content);
210210
}
@@ -262,7 +262,7 @@ public async Task Session_Config_OnElicitationRequest_Is_Cloned()
262262
{
263263
ElicitationHandler handler = _ => Task.FromResult(new ElicitationResult
264264
{
265-
Action = ElicitationResponseAction.Cancel,
265+
Action = UIElicitationResponseAction.Cancel,
266266
});
267267

268268
var config = new SessionConfig
@@ -281,7 +281,7 @@ public void Resume_Config_OnElicitationRequest_Is_Cloned()
281281
{
282282
ElicitationHandler handler = _ => Task.FromResult(new ElicitationResult
283283
{
284-
Action = ElicitationResponseAction.Cancel,
284+
Action = UIElicitationResponseAction.Cancel,
285285
});
286286

287287
var config = new ResumeSessionConfig

dotnet/test/MultiClientCommandsElicitationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public async Task Capabilities_Changed_Fires_When_Second_Client_Joins_With_Elici
175175
OnPermissionRequest = PermissionHandler.ApproveAll,
176176
OnElicitationRequest = _ => Task.FromResult(new ElicitationResult
177177
{
178-
Action = Rpc.ElicitationResponseAction.Accept,
178+
Action = Rpc.UIElicitationResponseAction.Accept,
179179
Content = new Dictionary<string, object>(),
180180
}),
181181
DisableResume = true,
@@ -229,7 +229,7 @@ public async Task Capabilities_Changed_Fires_When_Elicitation_Provider_Disconnec
229229
OnPermissionRequest = PermissionHandler.ApproveAll,
230230
OnElicitationRequest = _ => Task.FromResult(new ElicitationResult
231231
{
232-
Action = Rpc.ElicitationResponseAction.Accept,
232+
Action = Rpc.UIElicitationResponseAction.Accept,
233233
Content = new Dictionary<string, object>(),
234234
}),
235235
DisableResume = true,

go/generated_session_events.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)