mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
feat(coderd/x/chatd/chattool): add description tags to tool parameter structs (#24394)
This commit is contained in:
@@ -74,9 +74,9 @@ type CreateWorkspaceOptions struct {
|
||||
}
|
||||
|
||||
type createWorkspaceArgs struct {
|
||||
TemplateID string `json:"template_id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Parameters map[string]string `json:"parameters,omitempty"`
|
||||
TemplateID string `json:"template_id" description:"The UUIDv4 of the template to create the workspace from. Obtain this from list_templates."`
|
||||
Name string `json:"name,omitempty" description:"The name of the workspace to create. If not provided, a random name will be generated."`
|
||||
Parameters map[string]string `json:"parameters,omitempty" description:"Key-value pairs of template parameters to use when creating the workspace. Obtain available parameters from read_template."`
|
||||
}
|
||||
|
||||
// CreateWorkspace returns a tool that creates a new workspace from a
|
||||
|
||||
@@ -27,8 +27,8 @@ type ListTemplatesOptions struct {
|
||||
}
|
||||
|
||||
type listTemplatesArgs struct {
|
||||
Query string `json:"query,omitempty"`
|
||||
Page int `json:"page,omitempty"`
|
||||
Query string `json:"query,omitempty" description:"Optional text to filter templates by name or description."`
|
||||
Page int `json:"page,omitempty" description:"Page number for pagination (starts at 1). Each page returns up to 10 templates."`
|
||||
}
|
||||
|
||||
// ListTemplates returns a tool that lists available workspace templates.
|
||||
|
||||
@@ -19,7 +19,7 @@ type ReadTemplateOptions struct {
|
||||
}
|
||||
|
||||
type readTemplateArgs struct {
|
||||
TemplateID string `json:"template_id"`
|
||||
TemplateID string `json:"template_id" description:"The UUIDv4 of the template to read details for. Obtain this from list_templates."`
|
||||
}
|
||||
|
||||
// ReadTemplate returns a tool that retrieves details about a specific
|
||||
|
||||
Reference in New Issue
Block a user