@@ -14,6 +14,7 @@ import (
14 "github.com/charmbracelet/catwalk/pkg/catwalk"
14 "github.com/charmbracelet/catwalk/pkg/catwalk"
15 "github.com/charmbracelet/crush/internal/csync"
15 "github.com/charmbracelet/crush/internal/csync"
16 "github.com/charmbracelet/crush/internal/env"
16 "github.com/charmbracelet/crush/internal/env"
17+ "github.com/invopop/jsonschema"
17 "github.com/tidwall/sjson"
18 "github.com/tidwall/sjson"
@@ -176,9 +177,19 @@ const (
177type Attribution struct {
178type Attribution struct {
178 TrailerStyle TrailerStyle `json:"trailer_style,omitempty" jsonschema:"description=Style of attribution trailer to add to commits,enum=none,enum=co-authored-by,enum=assisted-by,default=co-authored-by"`
179 TrailerStyle TrailerStyle `json:"trailer_style,omitempty" jsonschema:"description=Style of attribution trailer to add to commits,enum=none,enum=co-authored-by,enum=assisted-by,default=co-authored-by"`
180+ CoAuthoredBy *bool `json:"co_authored_by,omitempty" jsonschema:"description=Deprecated: use trailer_style instead"`
179 GeneratedWith bool `json:"generated_with,omitempty" jsonschema:"description=Add Generated with Crush line to commit messages and issues and PRs,default=true"`
181 GeneratedWith bool `json:"generated_with,omitempty" jsonschema:"description=Add Generated with Crush line to commit messages and issues and PRs,default=true"`
184+// JSONSchemaExtend marks the co_authored_by field as deprecated in the schema.
185+func (Attribution) JSONSchemaExtend(schema *jsonschema.Schema) {
186+ if schema.Properties != nil {
187+ if prop, ok := schema.Properties.Get("co_authored_by"); ok {
188+ prop.Deprecated = true
182type Options struct {
193type Options struct {
183 ContextPaths []string `json:"context_paths,omitempty" jsonschema:"description=Paths to files containing context information for the AI,example=.cursorrules,example=CRUSH.md"`
194 ContextPaths []string `json:"context_paths,omitempty" jsonschema:"description=Paths to files containing context information for the AI,example=.cursorrules,example=CRUSH.md"`
184 TUI *TUIOptions `json:"tui,omitempty" jsonschema:"description=Terminal user interface options"`
195 TUI *TUIOptions `json:"tui,omitempty" jsonschema:"description=Terminal user interface options"`