File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/Libraries/Microsoft.Extensions.AI.Abstractions/Contents Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ namespace Microsoft.Extensions.AI;
25
25
/// a <see cref="ReadOnlyMemory{T}"/>. In that case, a data URI will be constructed and returned.
26
26
/// </para>
27
27
/// </remarks>
28
+ [ DebuggerDisplay ( "{DebuggerDisplay,nq}" ) ]
28
29
public class DataContent : AIContent
29
30
{
30
31
// Design note:
@@ -193,4 +194,16 @@ public ReadOnlyMemory<byte>? Data
193
194
return _data ;
194
195
}
195
196
}
197
+
198
+ /// <summary>Gets a string representing this instance to display in the debugger.</summary>
199
+ private string DebuggerDisplay
200
+ {
201
+ get
202
+ {
203
+ const int MaxLength = 80 ;
204
+
205
+ string uri = Uri ;
206
+ return uri . Length <= MaxLength ? uri : $ "{ uri . Substring ( 0 , MaxLength ) } ...";
207
+ }
208
+ }
196
209
}
You can’t perform that action at this time.
0 commit comments