mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix: simpler
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/charmbracelet/catwalk/pkg/catwalk"
|
||||
"github.com/charmbracelet/crush/internal/csync"
|
||||
"github.com/charmbracelet/crush/internal/env"
|
||||
"github.com/invopop/jsonschema"
|
||||
"github.com/tidwall/sjson"
|
||||
)
|
||||
|
||||
@@ -46,16 +45,6 @@ const (
|
||||
SelectedModelTypeSmall SelectedModelType = "small"
|
||||
)
|
||||
|
||||
// JSONSchema returns the JSON schema for SelectedModelType
|
||||
func (SelectedModelType) JSONSchema() *jsonschema.Schema {
|
||||
return &jsonschema.Schema{
|
||||
Type: "string",
|
||||
Description: "Model type selection for different use cases",
|
||||
Enum: []any{"large", "small"},
|
||||
Default: "large",
|
||||
}
|
||||
}
|
||||
|
||||
type SelectedModel struct {
|
||||
// The model id as used by the provider API.
|
||||
// Required.
|
||||
@@ -111,16 +100,6 @@ const (
|
||||
MCPHttp MCPType = "http"
|
||||
)
|
||||
|
||||
// JSONSchema returns the JSON schema for MCPType
|
||||
func (MCPType) JSONSchema() *jsonschema.Schema {
|
||||
return &jsonschema.Schema{
|
||||
Type: "string",
|
||||
Description: "Type of MCP connection protocol",
|
||||
Enum: []any{"stdio", "sse", "http"},
|
||||
Default: "stdio",
|
||||
}
|
||||
}
|
||||
|
||||
type MCPConfig struct {
|
||||
Command string `json:"command,omitempty" jsonschema:"description=Command to execute for stdio MCP servers,example=npx"`
|
||||
Env map[string]string `json:"env,omitempty" jsonschema:"description=Environment variables to set for the MCP server"`
|
||||
@@ -239,7 +218,7 @@ type Agent struct {
|
||||
// This is the id of the system prompt used by the agent
|
||||
Disabled bool `json:"disabled,omitempty"`
|
||||
|
||||
Model SelectedModelType `json:"model"`
|
||||
Model SelectedModelType `json:"model" jsonschema:"required,description=The model type to use for this agent,enum=large,enum=small,default=large"`
|
||||
|
||||
// The available tools for the agent
|
||||
// if this is nil, all tools are available
|
||||
|
||||
Reference in New Issue
Block a user