Appendix: The Code Behind It
Source Link
| File | Role |
|---|---|
src/query.ts | Agent Loop execution engine — the loop body for a single turn's task |
src/QueryEngine.ts | Conversation manager — maintains session state across multiple turns |
src/tools.ts | Tool registry — lists and permission-filters all tools |
src/Task.ts | Task type and status definitions |
src/tools/AgentTool/AgentTool.tsx | Complete implementation of agent launch and routing |
src/services/compact/autoCompact.ts | Auto-compact strategy and threshold calculation |