File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
src/ModelContextProtocol.Core/Protocol Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ using System . Diagnostics ;
12using System . Text . Json . Serialization ;
23
34namespace ModelContextProtocol . Protocol ;
@@ -28,6 +29,7 @@ namespace ModelContextProtocol.Protocol;
2829/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
2930/// </para>
3031/// </remarks>
32+ [ DebuggerDisplay ( "{DebuggerDisplay,nq}" ) ]
3133public sealed class Icon
3234{
3335 /// <summary>
@@ -82,4 +84,14 @@ public sealed class Icon
8284 /// </remarks>
8385 [ JsonPropertyName ( "theme" ) ]
8486 public string ? Theme { get ; set ; }
87+
88+ [ DebuggerBrowsable ( DebuggerBrowsableState . Never ) ]
89+ private string DebuggerDisplay
90+ {
91+ get
92+ {
93+ string mimeInfo = MimeType is not null ? $ ", MimeType = { MimeType } " : "" ;
94+ return $ "Source = { Source } { mimeInfo } ";
95+ }
96+ }
8597}
Original file line number Diff line number Diff line change 1+ using System . Diagnostics ;
12using System . Text . Json . Nodes ;
23using System . Text . Json . Serialization ;
34
@@ -26,6 +27,7 @@ namespace ModelContextProtocol.Protocol;
2627/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
2728/// </para>
2829/// </remarks>
30+ [ DebuggerDisplay ( "{DebuggerDisplay,nq}" ) ]
2931public sealed class SamplingMessage
3032{
3133 /// <summary>
@@ -49,4 +51,16 @@ public sealed class SamplingMessage
4951 /// </remarks>
5052 [ JsonPropertyName ( "_meta" ) ]
5153 public JsonObject ? Meta { get ; set ; }
54+
55+ [ DebuggerBrowsable ( DebuggerBrowsableState . Never ) ]
56+ private string DebuggerDisplay
57+ {
58+ get
59+ {
60+ string contentTypes = Content . Count == 1
61+ ? Content [ 0 ] . Type
62+ : $ "{ Content . Count } items";
63+ return $ "Role = { Role } , Content = { contentTypes } ";
64+ }
65+ }
5266}
You can’t perform that action at this time.
0 commit comments