@@ -733,7 +733,7 @@ private async Task HandleElicitationRequestAsync(ElicitationContext context, str
733733 try
734734 {
735735 var result = await handler ( context ) ;
736- await Rpc . Ui . HandlePendingElicitationAsync ( requestId , new SessionUiHandlePendingElicitationRequestResult
736+ await Rpc . Ui . HandlePendingElicitationAsync ( requestId , new UiElicitationResponse
737737 {
738738 Action = result . Action ,
739739 Content = result . Content
@@ -744,9 +744,9 @@ private async Task HandleElicitationRequestAsync(ElicitationContext context, str
744744 // User handler can throw any exception — attempt to cancel so the request doesn't hang.
745745 try
746746 {
747- await Rpc . Ui . HandlePendingElicitationAsync ( requestId , new SessionUiHandlePendingElicitationRequestResult
747+ await Rpc . Ui . HandlePendingElicitationAsync ( requestId , new UiElicitationResponse
748748 {
749- Action = SessionUiElicitationResultAction . Cancel
749+ Action = UiElicitationAction . Cancel
750750 } ) ;
751751 }
752752 catch ( Exception innerEx ) when ( innerEx is IOException or ObjectDisposedException )
@@ -777,7 +777,7 @@ private sealed class SessionUiApiImpl(CopilotSession session) : ISessionUiApi
777777 public async Task < ElicitationResult > ElicitationAsync ( ElicitationParams elicitationParams , CancellationToken cancellationToken )
778778 {
779779 session . AssertElicitation ( ) ;
780- var schema = new SessionUiElicitationRequestRequestedSchema
780+ var schema = new UiElicitationSchema
781781 {
782782 Type = elicitationParams . RequestedSchema . Type ,
783783 Properties = elicitationParams . RequestedSchema . Properties ,
@@ -790,7 +790,7 @@ public async Task<ElicitationResult> ElicitationAsync(ElicitationParams elicitat
790790 public async Task < bool > ConfirmAsync ( string message , CancellationToken cancellationToken )
791791 {
792792 session . AssertElicitation ( ) ;
793- var schema = new SessionUiElicitationRequestRequestedSchema
793+ var schema = new UiElicitationSchema
794794 {
795795 Type = "object" ,
796796 Properties = new Dictionary < string , object >
@@ -800,7 +800,7 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
800800 Required = [ "confirmed" ]
801801 } ;
802802 var result = await session . Rpc . Ui . ElicitationAsync ( message , schema , cancellationToken ) ;
803- if ( result . Action == SessionUiElicitationResultAction . Accept
803+ if ( result . Action == UiElicitationAction . Accept
804804 && result . Content != null
805805 && result . Content . TryGetValue ( "confirmed" , out var val ) )
806806 {
@@ -818,7 +818,7 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
818818 public async Task < string ? > SelectAsync ( string message , string [ ] options , CancellationToken cancellationToken )
819819 {
820820 session . AssertElicitation ( ) ;
821- var schema = new SessionUiElicitationRequestRequestedSchema
821+ var schema = new UiElicitationSchema
822822 {
823823 Type = "object" ,
824824 Properties = new Dictionary < string , object >
@@ -828,7 +828,7 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
828828 Required = [ "selection" ]
829829 } ;
830830 var result = await session . Rpc . Ui . ElicitationAsync ( message , schema , cancellationToken ) ;
831- if ( result . Action == SessionUiElicitationResultAction . Accept
831+ if ( result . Action == UiElicitationAction . Accept
832832 && result . Content != null
833833 && result . Content . TryGetValue ( "selection" , out var val ) )
834834 {
@@ -853,14 +853,14 @@ public async Task<bool> ConfirmAsync(string message, CancellationToken cancellat
853853 if ( options ? . Format != null ) field [ "format" ] = options . Format ;
854854 if ( options ? . Default != null ) field [ "default" ] = options . Default ;
855855
856- var schema = new SessionUiElicitationRequestRequestedSchema
856+ var schema = new UiElicitationSchema
857857 {
858858 Type = "object" ,
859859 Properties = new Dictionary < string , object > { [ "value" ] = field } ,
860860 Required = [ "value" ]
861861 } ;
862862 var result = await session . Rpc . Ui . ElicitationAsync ( message , schema , cancellationToken ) ;
863- if ( result . Action == SessionUiElicitationResultAction . Accept
863+ if ( result . Action == UiElicitationAction . Accept
864864 && result . Content != null
865865 && result . Content . TryGetValue ( "value" , out var val ) )
866866 {
@@ -1141,12 +1141,12 @@ public Task SetModelAsync(string model, CancellationToken cancellationToken = de
11411141 /// <example>
11421142 /// <code>
11431143 /// await session.LogAsync("Build completed successfully");
1144- /// await session.LogAsync("Disk space low", level: SessionLogRequestLevel .Warning);
1145- /// await session.LogAsync("Connection failed", level: SessionLogRequestLevel .Error);
1144+ /// await session.LogAsync("Disk space low", level: GitHub.Copilot.SDK.Rpc.LogLevel .Warning);
1145+ /// await session.LogAsync("Connection failed", level: GitHub.Copilot.SDK.Rpc.LogLevel .Error);
11461146 /// await session.LogAsync("Temporary status", ephemeral: true);
11471147 /// </code>
11481148 /// </example>
1149- public async Task LogAsync ( string message , SessionLogRequestLevel ? level = null , bool ? ephemeral = null , string ? url = null , CancellationToken cancellationToken = default )
1149+ public async Task LogAsync ( string message , GitHub . Copilot . SDK . Rpc . LogLevel ? level = null , bool ? ephemeral = null , string ? url = null , CancellationToken cancellationToken = default )
11501150 {
11511151 await Rpc . LogAsync ( message , level , ephemeral , url , cancellationToken ) ;
11521152 }
@@ -1215,17 +1215,17 @@ await InvokeRpcAsync<object>(
12151215 _elicitationHandler = null ;
12161216 }
12171217
1218- [ LoggerMessage ( Level = LogLevel . Error , Message = "Unhandled exception in broadcast event handler" ) ]
1218+ [ LoggerMessage ( Level = Microsoft . Extensions . Logging . LogLevel . Error , Message = "Unhandled exception in broadcast event handler" ) ]
12191219 private partial void LogBroadcastHandlerError ( Exception exception ) ;
12201220
1221- [ LoggerMessage ( Level = LogLevel . Error , Message = "Unhandled exception in session event handler" ) ]
1221+ [ LoggerMessage ( Level = Microsoft . Extensions . Logging . LogLevel . Error , Message = "Unhandled exception in session event handler" ) ]
12221222 private partial void LogEventHandlerError ( Exception exception ) ;
12231223
12241224 internal record SendMessageRequest
12251225 {
12261226 public string SessionId { get ; init ; } = string . Empty ;
12271227 public string Prompt { get ; init ; } = string . Empty ;
1228- public List < UserMessageDataAttachmentsItem > ? Attachments { get ; init ; }
1228+ public List < UserMessageAttachment > ? Attachments { get ; init ; }
12291229 public string ? Mode { get ; init ; }
12301230 public string ? Traceparent { get ; init ; }
12311231 public string ? Tracestate { get ; init ; }
@@ -1267,7 +1267,7 @@ internal record SessionDestroyRequest
12671267 [ JsonSerializable ( typeof ( SendMessageResponse ) ) ]
12681268 [ JsonSerializable ( typeof ( SessionAbortRequest ) ) ]
12691269 [ JsonSerializable ( typeof ( SessionDestroyRequest ) ) ]
1270- [ JsonSerializable ( typeof ( UserMessageDataAttachmentsItem ) ) ]
1270+ [ JsonSerializable ( typeof ( UserMessageAttachment ) ) ]
12711271 [ JsonSerializable ( typeof ( PreToolUseHookInput ) ) ]
12721272 [ JsonSerializable ( typeof ( PreToolUseHookOutput ) ) ]
12731273 [ JsonSerializable ( typeof ( PostToolUseHookInput ) ) ]
0 commit comments