Files
ratatoskr-go/internal/agents/agents_test.go
Hermes 9c5f38698c
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
fix: idle-таймер сбрасывается по live-стриму LLM + дефолт 5м; агенты opencode в agents/ с mode: primary
- opencode ищет кастомных агентов в поддиректории agents/ (как .opencode),
  а не в корне OPENCODE_CONFIG_DIR → распаковка теперь в <dir>/agents/*.md
- markdown-агентам добавлен mode: primary (иначе subagent по умолчанию)
- idle-детекция сбрасывает таймер при live-строках (text/tool/agent/reasoning),
  а не только по росту БД → «LLM думает и стримит» не считается зависанием
- дефолт idle_timeout поднят с 2м до 5м
2026-08-17 10:57:19 +05:00

26 lines
578 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package agents
import (
"os"
"path/filepath"
"strings"
"testing"
)
func TestWriteTo(t *testing.T) {
dir := t.TempDir()
if err := WriteTo(dir); err != nil {
t.Fatalf("WriteTo: %v", err)
}
for _, name := range Names {
// opencode ищет агентов в поддиректории agents/, как у .opencode
p := filepath.Join(dir, "agents", name+".md")
data, err := os.ReadFile(p)
if err != nil {
t.Fatalf("read %s: %v", p, err)
}
if !strings.Contains(string(data), "name: "+name) {
t.Errorf("%s: нет frontmatter name: %s", p, name)
}
}
}