vikingowl
|
e1a47a7620
|
feat: rate limit pools, elf tree view, permission prompts, dep updates
Rate limits:
- Add PoolRPS/PoolTPM/PoolTokensMonth/PoolCostMonth pool kinds
- Provider defaults for Mistral/Anthropic/OpenAI/Google (tier-aware)
- Config override via [rate_limits.<provider>] TOML section
- Pools auto-attached to arms on registration
Elf tree view (CC-style):
- Structured elf.Progress type replaces flat string channel
- Tree with ├─/└─ branches, per-elf stats (tool uses, tokens)
- Live activity updates: tool calls, "generating… (N chars)"
- Completed elfs stay in tree with "Done (duration)" until turn ends
- Suppress raw elf output from chat (tree + LLM summary instead)
- Remove background elf mode (wait: false) — always wait
- Truncate elf results to 2000 chars for parent context
- Parallel hint in system prompt and tool description
Permission prompts:
- Show actual command in prompt: "bash wants to execute: find . -name '*.go'"
- Compact hint in separator bar: "⚠ bash: find . | wc -l [y/n]"
- PermReqMsg carries tool name + args
Other:
- Fix /model not updating status bar (session.Local.SetModel)
- Add make targets: run, check, install
- Update deps: BurntSushi/toml v1.6.0, chroma v2.23.1, x/text v0.35.0, cloud.google.com/go v0.123.0
|
2026-04-03 20:54:48 +02:00 |
|
vikingowl
|
704f3a7302
|
feat: M6 context intelligence — token tracker + truncation compaction
internal/context/:
- Tracker: monitors token usage with OK/Warning/Critical states
(thresholds from CC: 20K warning buffer, 13K autocompact buffer)
- TruncateStrategy: drops oldest messages, preserves system prompt +
recent N turns, adds compaction boundary marker
- Window: manages message history with auto-compaction trigger,
circuit breaker after 3 consecutive failures
Engine integration:
- Context window tracks usage per turn
- Auto-compacts when critical threshold reached
- History syncs with context window after compaction
TUI status bar:
- Token count with percentage (tokens: 1234 (5%))
- Color-coded: green=ok, yellow=warning, red=critical
Session Status extended: TokensMax, TokenPercent, TokenState.
7 context tests.
|
2026-04-03 18:46:03 +02:00 |
|
vikingowl
|
0f93ee18e4
|
feat: add session interface with channel-based local implementation
Session interface decouples UI from engine via channels:
- Send(input) starts agentic turn in background goroutine
- Events() returns channel for streaming events
- TurnResult() returns completed Turn after drain
- Cancel() propagates context cancellation
- Status() reports state, provider, model, token usage, turn count
Local implementation: engine runs on dedicated goroutine per turn,
events pushed to buffered channel (64), context cancellation
propagated. 5 tests.
|
2026-04-03 15:12:12 +02:00 |
|