@@ -715,7 +715,7 @@ await session.SendAndWaitAsync(new MessageOptions
715715 Prompt = "Describe this image" ,
716716 Attachments =
717717 [
718- new UserMessageAttachmentBlob
718+ new AttachmentBlob
719719 {
720720 Data = pngBase64 ,
721721 MimeType = "image/png" ,
@@ -740,17 +740,17 @@ await session.SendAndWaitAsync(new MessageOptions
740740 Prompt = "Read the attached file and reply with its contents." ,
741741 Attachments =
742742 [
743- new UserMessageAttachmentFile
743+ new AttachmentFile
744744 {
745745 DisplayName = "attached-file.txt" ,
746746 Path = filePath ,
747- LineRange = new UserMessageAttachmentFileLineRange { Start = 1 , End = 1 } ,
747+ LineRange = new AttachmentFileLineRange { Start = 1 , End = 1 } ,
748748 } ,
749749 ] ,
750750 } ) ;
751751
752752 var userMessage = ( await session . GetEventsAsync ( ) ) . OfType < UserMessageEvent > ( ) . Last ( ) ;
753- var attachment = Assert . IsType < UserMessageAttachmentFile > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
753+ var attachment = Assert . IsType < AttachmentFile > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
754754 Assert . Equal ( "attached-file.txt" , attachment . DisplayName ) ;
755755 Assert . Equal ( filePath , attachment . Path ) ;
756756 Assert . Equal ( 1 , attachment . LineRange ! . Start ) ;
@@ -771,7 +771,7 @@ await session.SendAndWaitAsync(new MessageOptions
771771 Prompt = "List the attached directory." ,
772772 Attachments =
773773 [
774- new UserMessageAttachmentDirectory
774+ new AttachmentDirectory
775775 {
776776 DisplayName = "attached-directory" ,
777777 Path = directoryPath ,
@@ -780,7 +780,7 @@ await session.SendAndWaitAsync(new MessageOptions
780780 } ) ;
781781
782782 var userMessage = ( await session . GetEventsAsync ( ) ) . OfType < UserMessageEvent > ( ) . Last ( ) ;
783- var attachment = Assert . IsType < UserMessageAttachmentDirectory > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
783+ var attachment = Assert . IsType < AttachmentDirectory > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
784784 Assert . Equal ( "attached-directory" , attachment . DisplayName ) ;
785785 Assert . Equal ( directoryPath , attachment . Path ) ;
786786 }
@@ -798,22 +798,22 @@ await session.SendAndWaitAsync(new MessageOptions
798798 Prompt = "Summarize the selected code." ,
799799 Attachments =
800800 [
801- new UserMessageAttachmentSelection
801+ new AttachmentSelection
802802 {
803803 DisplayName = "selected-file.cs" ,
804804 FilePath = filePath ,
805805 Text = "string Value = \" SELECTION_SENTINEL\" ;" ,
806- Selection = new UserMessageAttachmentSelectionDetails
806+ Selection = new AttachmentSelectionDetails
807807 {
808- Start = new UserMessageAttachmentSelectionDetailsStart { Line = 1 , Character = 10 } ,
809- End = new UserMessageAttachmentSelectionDetailsEnd { Line = 1 , Character = 45 } ,
808+ Start = new AttachmentSelectionDetailsStart { Line = 1 , Character = 10 } ,
809+ End = new AttachmentSelectionDetailsEnd { Line = 1 , Character = 45 } ,
810810 } ,
811811 } ,
812812 ] ,
813813 } ) ;
814814
815815 var userMessage = ( await session . GetEventsAsync ( ) ) . OfType < UserMessageEvent > ( ) . Last ( ) ;
816- var attachment = Assert . IsType < UserMessageAttachmentSelection > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
816+ var attachment = Assert . IsType < AttachmentSelection > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
817817 Assert . Equal ( "selected-file.cs" , attachment . DisplayName ) ;
818818 Assert . Equal ( filePath , attachment . FilePath ) ;
819819 Assert . Equal ( "string Value = \" SELECTION_SENTINEL\" ;" , attachment . Text ) ;
@@ -833,10 +833,10 @@ await session.SendAndWaitAsync(new MessageOptions
833833 Prompt = "Using only the GitHub reference metadata in this message, summarize the reference. Do not call any tools." ,
834834 Attachments =
835835 [
836- new UserMessageAttachmentGithubReference
836+ new AttachmentGithubReference
837837 {
838838 Number = 1234 ,
839- ReferenceType = UserMessageAttachmentGithubReferenceType . Issue ,
839+ ReferenceType = AttachmentGithubReferenceType . Issue ,
840840 State = "open" ,
841841 Title = "Add E2E attachment coverage" ,
842842 Url = "https://github.com/github/copilot-sdk/issues/1234" ,
@@ -845,9 +845,9 @@ await session.SendAndWaitAsync(new MessageOptions
845845 } ) ;
846846
847847 var userMessage = ( await session . GetEventsAsync ( ) ) . OfType < UserMessageEvent > ( ) . Last ( ) ;
848- var attachment = Assert . IsType < UserMessageAttachmentGithubReference > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
848+ var attachment = Assert . IsType < AttachmentGithubReference > ( Assert . Single ( userMessage . Data . Attachments ! ) ) ;
849849 Assert . Equal ( 1234 , attachment . Number ) ;
850- Assert . Equal ( UserMessageAttachmentGithubReferenceType . Issue , attachment . ReferenceType ) ;
850+ Assert . Equal ( AttachmentGithubReferenceType . Issue , attachment . ReferenceType ) ;
851851 Assert . Equal ( "open" , attachment . State ) ;
852852 Assert . Equal ( "Add E2E attachment coverage" , attachment . Title ) ;
853853 Assert . Equal ( "https://github.com/github/copilot-sdk/issues/1234" , attachment . Url ) ;
0 commit comments