From b0b85e6e8108ef3f9fc46714759a3e25648324b5 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 6 Aug 2025 22:17:26 -0300 Subject: [PATCH] fix: add $schema to jsonschema closes #620 Signed-off-by: Carlos Alexandro Becker Co-authored-by: Sam Mohr --- internal/config/config.go | 3 ++- schema.json | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/config/config.go b/internal/config/config.go index b4682ce876bb4980bbe119c187538bf467d2f514..2735b5a536487b3137b3fd574a0455d284d06da1 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -20,7 +20,6 @@ import ( const ( appName = "crush" defaultDataDirectory = ".crush" - defaultLogLevel = "info" ) var defaultContextPaths = []string{ @@ -244,6 +243,8 @@ type Agent struct { // Config holds the configuration for crush. type Config struct { + Schema string `json:"$schema,omitempty"` + // We currently only support large/small as values here. Models map[SelectedModelType]SelectedModel `json:"models,omitempty" jsonschema:"description=Model configurations for different model types,example={\"large\":{\"model\":\"gpt-4o\",\"provider\":\"openai\"}}"` diff --git a/schema.json b/schema.json index 05dcc56c573405c6e4c3eb67762dd7ffd2d38ad7..43e12da906318fda31f00f6c1d3b4c49b02be94f 100644 --- a/schema.json +++ b/schema.json @@ -5,6 +5,9 @@ "$defs": { "Config": { "properties": { + "$schema": { + "type": "string" + }, "models": { "additionalProperties": { "$ref": "#/$defs/SelectedModel"