File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 {{- if and $server .enabled $opencodeEnabled $conditionsMatch -}}
2828 {{- if $first }}{{- $first = false }}{{ else }},{{ end }}
2929 " {{ $serverId }}" : {
30- {{- if hasKey $server " local" }}
30+ {{- if hasKey $server " local" - }}
3131 {{- $openCodeCommandName := $server .local.command -}}
3232 {{- $openCodeCommandArgs := list -}}
3333 {{- range $arg := $server .local.args -}}
4040 {{- end -}}
4141 {{- $openCodeCommandArgs = append $openCodeCommandArgs $resolvedArg -}}
4242 {{- end -}}
43- {{- $openCodeCommand := prepend $openCodeCommandArgs $openCodeCommandName - }}
44- " type" : " local" ,
45- " command" : {{ $openCodeCommand | toPrettyJson " " }},
43+ {{- $openCodeCommand := prepend $openCodeCommandArgs $openCodeCommandName }}
44+ " type" : {{ " local" | toJson }} ,
45+ " command" : {{ $openCodeCommand | toPrettyJson | indent 6 | trim }},
4646 {{- else if hasKey $server " remote" }}
47- " type" : " remote" ,
48- " url" : " {{ $server.remote.url }} " ,
47+ " type" : {{ " remote" | toJson }} ,
48+ " url" : {{ $server .remote.url | toJson }} ,
4949 {{- end }}
50- " enabled" : {{ $server .enabled | toPrettyJson }}
50+ " enabled" : {{ $server .enabled | toJson }}
5151 }
5252 {{- end -}}
5353{{- end }}
Original file line number Diff line number Diff line change 4444 {{- end -}}
4545
4646 {{- if and $conditionsMatch (eq $rule .kind $kindName ) -}}
47+ {{- $pattern := replace " {{ .chezmoi.homeDir }}" $ .chezmoi.homeDir $rule .pattern -}}
4748 {{- $supportsMatchMode := false -}}
4849 {{- if hasKey $kindCfg " supportsMatchMode" -}}
4950 {{- $supportsMatchMode = $kindCfg .supportsMatchMode -}}
6465
6566 {{- if or (eq $matchMode " exact" ) (eq $matchMode " exactAndWithArgs" ) -}}
6667 {{- if $firstEntry }}{{- $firstEntry = false }}{{ else }},{{ end }}
67- " {{ $rule. pattern }} " : " {{ $rule.op }} "
68+ {{ $pattern | toJson }}: {{ $rule .op | toJson }}
6869 {{- end -}}
6970 {{- if or (eq $matchMode " withArgs" ) (eq $matchMode " exactAndWithArgs" ) -}}
7071 {{- if $firstEntry }}{{- $firstEntry = false }}{{ else }},{{ end }}
71- " {{ $rule. pattern }}{{ $wildcardSuffix }} " : " {{ $rule.op }} "
72+ {{ printf " %s%s " $ pattern $wildcardSuffix | toJson }}: {{ $rule .op | toJson }}
7273 {{- end -}}
7374 {{- else -}}
7475 {{- if $firstEntry }}{{- $firstEntry = false }}{{ else }},{{ end }}
75- " {{ $rule. pattern }} " : " {{ $rule.op }} "
76+ {{ $pattern | toJson }}: {{ $rule .op | toJson }}
7677 {{- end -}}
7778 {{- end -}}
7879 {{- end }}
9697 {{- $kindCfg = index $kinds $rule .kind -}}
9798 {{- end -}}
9899 {{- if and $conditionsMatch (eq (default " " (index $kindCfg " destinationType" )) " top_level" ) -}}
100+ {{- $pattern := replace " {{ .chezmoi.homeDir }}" $ .chezmoi.homeDir $rule .pattern -}}
99101 {{- if $firstField }}{{- $firstField = false }}{{ else }},{{ end }}
100- " {{ $rule. pattern }} " : " {{ $rule.op }} "
102+ {{ $pattern | toJson }}: {{ $rule .op | toJson }}
101103 {{- end -}}
102104{{- end }}
Original file line number Diff line number Diff line change 77 " model" : " github-copilot/claude-sonnet-4.6" ,
88
99 " permission" : {
10- {{- includeTemplate " .chezmoitemplates/opencode-permission.tmpl" . }}
10+ {{- includeTemplate " .chezmoitemplates/opencode-permission.tmpl" . | trimSuffix " \n " }}
1111 },
1212
1313 " plugin" : [
1616 ],
1717
1818 " mcp" : {
19- {{- includeTemplate " .chezmoitemplates/opencode-mcp.jsonc.tmpl" . }}
19+ {{- includeTemplate " .chezmoitemplates/opencode-mcp.jsonc.tmpl" . | trimSuffix " \n " }}
2020 }
2121}
You can’t perform that action at this time.
0 commit comments