refactor(config): удалена опция opencode.config (OPENCODE_CONFIG)
Some checks failed
CI / test (push) Failing after 1m20s
CI / build-and-package (amd64, linux) (push) Failing after 1m4s
CI / build-and-package (amd64, windows) (push) Successful in 30s

This commit is contained in:
ki.sagidullin
2026-08-23 18:18:25 +05:00
parent 8c91c83024
commit 3c51ffee4e
6 changed files with 1 additions and 33 deletions

View File

@@ -24,7 +24,6 @@ import (
// отдаёт URL, процессом не владеет.
type Server struct {
Bin string // путь к opencode (по умолчанию "opencode")
Config string // OPENCODE_CONFIG
DBPath string // рабочая БД сервера (передам env, если задана)
Host string // hostname для прослушивания
@@ -127,12 +126,7 @@ func (s *Server) serveCmd(ctx context.Context) *exec.Cmd {
"OPENCODE_DISABLE_AUTOUPDATE=1",
"OPENCODE_DISABLE_MODELS_FETCH=1")
// Агенты (analyst/dev/...) opencode находит сам через project-каталог
// .opencode (см. internal/agents); OPENCODE_CONFIG_DIR не выставляем,
// чтобы не перенаправлять Global.Path.config и сохранить глобальный
// конфиг opencode (модель/провайдеры).
if s.Config != "" {
env = append(env, "OPENCODE_CONFIG="+s.Config)
}
// .opencode (см. internal/agents).
if s.DBPath != "" {
env = append(env, "OPENCODE_DB="+s.DBPath)
}