Documentation
¶
Index ¶
- func ExtractHint(argsJSON, toolName string) string
- func IntArg(args map[string]any, key string) (int, bool)
- func IntValue(value any) (int, bool)
- func NonNegIntArg(args map[string]any, key string) (value int, present bool, err error)
- func OptionalIntArg(args map[string]any, key string) (int, bool, error)
- func PositiveIntArg(args map[string]any, key string) (value int, present bool, err error)
- func StaticEffect(effect Effect) func(map[string]any) Effect
- type Effect
- type Elicitation
- type Tool
- type ToolCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractHint ¶ added in v0.7.0
ExtractHint returns a short, human-readable summary of a tool call's input, suitable as a one-line UI label (e.g. "edit: /foo.go", "grep: pattern", "shell: build description"). The result is the bare value — callers usually prefix it with the tool name. Used by every UI surface (TUI, web UI live stream, web UI replay) so the same call renders identically everywhere.
func NonNegIntArg ¶ added in v0.6.9
NonNegIntArg reads an optional non-negative integer. Returns present=false when the key is absent; returns an error when the value is present but not a non-negative integer. The error message names the key so callers can surface it without further wrapping.
func OptionalIntArg ¶ added in v0.6.9
func PositiveIntArg ¶ added in v0.6.9
PositiveIntArg reads an optional strictly-positive integer (>= 1). Same contract as NonNegIntArg.