mirror of
https://github.com/earendil-works/pi.git
synced 2026-10-02 08:44:38 +08:00
Move the codemode script reference, including the models API, into docs/codemode.md and keep only one line per global in the tool description. Declared tools get a one-line note on how scripts call them, and the codemode system prompt guidance and MCP server section are shorter. With the default tools a GPT-5.6 request drops from about 5,300 to 3,300 tokens. Errors now point the way back: unknown tools and models members name close matches, models.classify() and models.generateImages() validate their arguments, unknown or mistyped models point to getAvailableOfType(), store() overflow explains the store, and unshown generated images get a note.
Coding agent suite tests
Use test/suite/ for the new harness-based test suite around AgentSession and AgentSessionRuntime.
Rules:
- Use
test/suite/harness.ts - Use the faux provider from
packages/ai/src/providers/faux.ts - Do not use real provider APIs, real API keys, network calls, or paid tokens
- Keep these tests CI-safe and deterministic
- Do not use or extend the legacy
test/test-harness.tspath unless a missing capability forces it