Documentation
¶
Overview ¶
Package toolargs parses the arguments of the two read-side internal tools, search_context and retrieve (spec §13.1, §16). Every dialect codec hands over the arguments JSON of its own call shape, and the parsing rules are the same for all of them: fences, braces around the value, double-encoded strings and the alternate field names that models produce.
Index ¶
Constants ¶
const ( ScopeSession = "session" // this conversation only (the default) ScopeProject = "project" // every conversation of the project )
Scopes of search_context.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Retrieve ¶
type Retrieve struct {
Ref string // message ref, for example m00042
BlockID string // block id, for example b12
Range string // optional message range, for example m00340..m00412
}
Retrieve is a normalized retrieve call. Exactly one of Ref and BlockID is set.
func ParseRetrieve ¶
ParseRetrieve parses the arguments of a retrieve call. Refs may be strings or numbers. Giving both a ref and a block id is an error.