mirror of
https://github.com/lukaszraczylo/harness-sync.git
synced 2026-10-12 00:45:22 +00:00
fix(zed): switch to language_models.openai_compatible for Agent panel visibility
The Zed Agent panel (new ACP-based UI) only discovers providers registered
under language_models.openai_compatible.<name>, not language_models.openai.
Each named entry appears as its own provider in the LLM Providers list.
- language_models.openai_compatible.harness-sync-gateway holds gateway URL + models
- agent.default_model.provider = 'harness-sync-gateway' (was 'openai')
- Model entries include capabilities {tools,images,parallel_tool_calls}
- Export common.GatewayProviderID so zed.go can reference it
- Fix staticcheck QF1001 (De Morgan's law) in io.go
- Fix struct field alignment in File (80→72 bytes)
- gofmt remaining files
This commit is contained in:
@@ -12,7 +12,7 @@ const (
|
||||
MCPCrushStyle
|
||||
// MCPOpencodeStyle: kilo + opencode shape — type: local|remote, command as []string.
|
||||
MCPOpencodeStyle
|
||||
// MCPZedStyle: zed context_servers — {enabled, source, command, args} or {enabled, url}.
|
||||
// MCPZedStyle: zed context_servers — {enabled, command, args} or {enabled, url}.
|
||||
MCPZedStyle
|
||||
)
|
||||
|
||||
@@ -94,11 +94,12 @@ func mcpEntry(s canonical.MCPServer, style MCPStyle) map[string]any {
|
||||
}
|
||||
e["enabled"] = true
|
||||
case MCPZedStyle:
|
||||
e["enabled"] = true
|
||||
// Do NOT emit "enabled" — Zed 1.3.x has a serde flatten+deny_unknown_fields
|
||||
// bug where outer-struct fields bleed into the untagged enum variants and
|
||||
// fail all of them. Omitting "enabled" defaults to true.
|
||||
if s.URL != "" {
|
||||
e["url"] = s.URL
|
||||
} else {
|
||||
e["source"] = "custom"
|
||||
if s.Command != "" {
|
||||
e["command"] = s.Command
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user