ToolCall. Diagnostic
(ToolCall v0.4.0)
Copy Markdown
A structured compile-time diagnostic returned by a function-declaration source.
line and column point at the declaration that produced the diagnostic, such
as the @spec line, and are optional: a source that cannot locate its input
leaves them nil and the builder falls back to the definition location.
severity decides what the builder does with it: :warning is reported and
the affected tool is skipped, :error fails the compile.
Summary
Functions
Returns the diagnostic's own {line, column}, or nil when unknown.
Types
@type location() :: [line: pos_integer(), column: pos_integer()]
@type severity() :: :warning | :error
@type t() :: %ToolCall.Diagnostic{ column: pos_integer() | nil, line: pos_integer() | nil, message: String.t(), severity: severity() }
Functions
@spec position(t()) :: {pos_integer() | nil, pos_integer() | nil} | nil
Returns the diagnostic's own {line, column}, or nil when unknown.