dabf5bfecc
- Replace fixed 6-message compact retention with ratio-based logic: retain ~20% of compactable estimated tokens, with a 6-message floor and user-turn boundary alignment - Add compactRetainedTokenBudget, compactRecentStart, compactTurnBoundary helpers in internal/agent/agent.go - Add TestAgentCompactKeepsTwentyPercentRecentContext - Move startup/session/repl/bootstrap logic from root into internal/app so main.go is a thin binary entry point (15 lines) - Update /compact docs in README.md
16 lines
172 B
Go
16 lines
172 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"agentu/internal/app"
|
|
)
|
|
|
|
func main() {
|
|
if err := app.Run(); err != nil {
|
|
fmt.Fprintln(os.Stderr, "agentu:", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|