mirror of
https://github.com/lukaszraczylo/harness-sync.git
synced 2026-10-12 00:45:22 +00:00
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
37 lines
771 B
Go
37 lines
771 B
Go
package adapter
|
|
|
|
import "os"
|
|
|
|
type File struct {
|
|
Dest string
|
|
SymlinkTarget string
|
|
Content []byte
|
|
Kind Kind
|
|
Mode os.FileMode
|
|
// NoMerge skips the 3-way git merge and always writes the rendered content.
|
|
// Use for files the adapter partially manages via JSON/YAML merge (e.g. live
|
|
// state files where the adapter already reconciles at the key level).
|
|
NoMerge bool
|
|
}
|
|
|
|
type FileSet struct {
|
|
files []File
|
|
}
|
|
|
|
func NewFileSet() *FileSet { return &FileSet{} }
|
|
|
|
func (fs *FileSet) Add(f File) {
|
|
if f.Mode == 0 && f.Kind == RenderedFile {
|
|
f.Mode = 0o644
|
|
}
|
|
fs.files = append(fs.files, f)
|
|
}
|
|
|
|
func (fs *FileSet) ForEach(fn func(File)) {
|
|
for _, f := range fs.files {
|
|
fn(f)
|
|
}
|
|
}
|
|
|
|
func (fs *FileSet) Len() int { return len(fs.files) }
|