Skip to content

feat: added tools registry. 6 core tools. - #1

Merged
Blankeos merged 9 commits into
mainfrom
agent-toolcalls
Jan 30, 2026
Merged

feat: added tools registry. 6 core tools.#1
Blankeos merged 9 commits into
mainfrom
agent-toolcalls

Conversation

@Blankeos

Copy link
Copy Markdown
Owner

What changed

  • Added an OpenCode-style tool system with a registry + 6 core tools (glob, list, read, write, edit, bash) under src/tools/*.
  • Wired tool definitions into LLM requests via aisdk and surfaced tool call lifecycle into the UI (tool rows + previews) (src/tools/aisdk_bridge.rs, src/ui/components/chat.rs, src/llm/client.rs).
  • Implemented provider-aware system prompt composition (OpenAI/Anthropic/Gemini/Codex heuristics) and automatic rules loading from AGENTS.md / CLAUDE.md (local upward traversal + global fallbacks, size limits, disable env flags) (src/prompt/mod.rs, src/prompt/rules.rs).
  • Added /refreshmodels to force-refresh the models.dev cache (src/command/handlers.rs, src/model/discovery.rs).
  • Improved streaming metrics: persist timing primitives (t0_ms/t1_ms/tn_ms) + output_tokens, and display total latency + TTFT + TPS in chat metadata (src/session/types.rs, src/persistence/*, src/ui/components/chat.rs).
  • Added planning docs under _plans/ that capture the intended tool/prompt architecture.

Why

  • Enable first-class tool calling (file ops + bash) and better agent ergonomics.
  • Make prompts consistent with OpenCode/Claude Code conventions via automatic rule discovery.
  • Provide accurate, spec-aligned latency metrics (TTFT/TPS/total) instead of approximate “duration since first token”.
    Notes / reviewer callouts
  • Cargo.toml patches aisdk to a local path (/Users/carlo/Desktop/Projects/aisdk-rs); this likely needs to be reverted to a git/registry dependency before merge.
  • Tool-call parsing fallback exists (src/llm/tool_calls.rs) but primary execution is via aisdk tool streaming (src/tools/aisdk_bridge.rs).

@Blankeos
Blankeos merged commit baefe8c into main Jan 30, 2026
@Blankeos Blankeos mentioned this pull request Jul 24, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant