mirror of
https://github.com/lukaszraczylo/harness-sync.git
synced 2026-10-12 00:45:22 +00:00
Dead code removed: - BuildProviders, buildModels, ProviderEntry (no production callers) - ZedLanguageModels (shadowed by adapter-local version, wrong schema) - GatewayProviderID deprecated constant (zero references) - Corresponding dead tests for BuildProviders Deduplication: - Extract common.DefaultHome() to internal/adapter/common/home.go - All 7 adapters call common.DefaultHome() instead of local copies (-49 lines) Simplification: - mcp.go: merge MCPClaudeStyle/MCPCrushStyle branches (identical URL path, one-line difference in stdio path) — clearer intent, fewer lines - kilo.go: extract opencode.jsonc merge to mergeOpenCodeJSONC() helper, Render() drops from 92 to ~55 lines - goose.go: strings.IndexByte → strings.Cut in splitProviderModel
13 lines
203 B
Go
13 lines
203 B
Go
package common
|
|
|
|
import "os"
|
|
|
|
// DefaultHome returns the current user's home directory, or "" on error.
|
|
func DefaultHome() string {
|
|
h, err := os.UserHomeDir()
|
|
if err != nil {
|
|
return ""
|
|
}
|
|
return h
|
|
}
|