Class ToolResultLimits
How much a call of a tool answers at most: the cap of each kind of list, and of the text. A result cut at a cap says so, and says how many there are.
public static class ToolResultLimits
- Inheritance
-
ToolResultLimits
- Inherited Members
Remarks
A list beyond its cap is answered with its first items, its total, and truncated: true; its text ends with a line that says how many are shown
(TruncatedLine<T>(CappedList<T>, CultureInfo)). An assistant narrows the call (a path, a query) to see the others.
Fields
Diagnostics
The most diagnostics a call answers.
public const int Diagnostics = 200
Field Value
OutlineEntries
The most declarations an outline answers, its members not counted.
public const int OutlineEntries = 1000
Field Value
References
The most places a call answers: references, definitions.
public const int References = 500
Field Value
Symbols
The most symbols a call answers.
public const int Symbols = 500
Field Value
TextLength
The most characters the text of a result has (CapText(string, CultureInfo)): 32,768.
public const int TextLength = 32768
Field Value
Methods
CapText(string, CultureInfo)
A text cut at TextLength characters, at the end of its last whole line, with a line that says where it is cut; the text itself when it is not longer.
public static string CapText(string text, CultureInfo culture)
Parameters
textstringThe text.
cultureCultureInfoThe language of the client's user interface.
Returns
- string
The text, cut.
Cap<T>(IEnumerable<T>, int)
The first items of a list, at most cap of them, and how many there are.
public static CappedList<T> Cap<T>(IEnumerable<T> items, int cap)
Parameters
itemsIEnumerable<T>The list, in the order a result has it.
capintThe most items the result answers.
Returns
- CappedList<T>
The items kept, and the total.
Type Parameters
TThe items.
Exceptions
- ArgumentOutOfRangeException
capis negative.
TruncatedLine<T>(CappedList<T>, CultureInfo)
The line a text ends with when its list is cut at its cap: how many are shown, of how many, and how to see the others.
public static string? TruncatedLine<T>(CappedList<T> list, CultureInfo culture)
Parameters
listCappedList<T>The list.
cultureCultureInfoThe language of the client's user interface.
Returns
Type Parameters
TThe items.