fix: idle-таймер сбрасывается по live-стриму LLM + дефолт 5м; агенты opencode в agents/ с mode: primary
All checks were successful
CI / test (push) Successful in 56s
CI / build-and-package (amd64, linux) (push) Successful in 42s
CI / build-and-package (amd64, windows) (push) Successful in 40s

- opencode ищет кастомных агентов в поддиректории agents/ (как .opencode),
  а не в корне OPENCODE_CONFIG_DIR → распаковка теперь в <dir>/agents/*.md
- markdown-агентам добавлен mode: primary (иначе subagent по умолчанию)
- idle-детекция сбрасывает таймер при live-строках (text/tool/agent/reasoning),
  а не только по росту БД → «LLM думает и стримит» не считается зависанием
- дефолт idle_timeout поднят с 2м до 5м
This commit is contained in:
Hermes
2026-08-17 10:57:19 +05:00
parent da775ac227
commit 9c5f38698c
10 changed files with 75 additions and 12 deletions

View File

@@ -73,7 +73,7 @@ telegram:
if cfg.OpenCode.HardTimeout.Duration() != 20*time.Minute {
t.Errorf("hard timeout = %v", cfg.OpenCode.HardTimeout)
}
if cfg.OpenCode.IdleTimeout.Duration() != 2*time.Minute {
if cfg.OpenCode.IdleTimeout.Duration() != 5*time.Minute {
t.Errorf("idle timeout = %v", cfg.OpenCode.IdleTimeout)
}
if cfg.Paths.Worktree != "./worktrees" {

View File

@@ -76,7 +76,7 @@ type OpenCodeCfg struct {
Config string `yaml:"config" env:"OPENCODE_CONFIG"`
ConfigDir string `yaml:"config_dir" env:"OPENCODE_CONFIG_DIR"`
HardTimeout Duration `yaml:"hard_timeout" default:"20m"`
IdleTimeout Duration `yaml:"idle_timeout" default:"2m"`
IdleTimeout Duration `yaml:"idle_timeout" default:"5m"`
PollMs Duration `yaml:"poll_ms" default:"2s"`
}