Documentation
¶
Overview ¶
Package toolview says how clients present a tool call: its title, the verb of a progress line, its main parameter and the secondary ones.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyName ¶
PrettyName turns a tool id into words: "skill_view" becomes "Skill View".
Types ¶
type Call ¶
type Call struct {
Name string // tool id, lower case
Title string // header title, e.g. "Search Web"
Verb string // progress phrase, e.g. "Searching web"
Detail string // main parameter, whitespace collapsed, not shortened
Params []Param // secondary parameters in display order
// Known is false for tools the table does not list.
Known bool
}
Call is the presentation of one tool call.
type FileChange ¶
type FileChange struct {
Path string
// Edits is how many edits a multiedit asked for.
Edits int
// Done is set once the result's metadata describes the change.
Done bool
Old, New string
Additions, Removals int
}
FileChange is what a write, edit or multiedit call does to its file.
func FileChangeOf ¶
func FileChangeOf(name string, input string, metadata string) (FileChange, bool)
FileChangeOf reads a file-changing call from its input and, once it has run, its result metadata; ok is false for other tools and unreadable input.