cherry-studio/packages/aiCore/src
MyPrototypeWhat 96aba33077
fix: correct token calculation in prompt tool use plugin (#11867)
* fix: correct token calculation in prompt tool use plugin

- Fix duplicate token accumulation in recursive stream handling
- Accumulate usage for finish-step without tool calls
- Filter out recursive stream's start/finish events (only one per conversation)
- Make accumulateUsage method public for reuse

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: simplify pipeRecursiveStream method in StreamEventManager

- Removed unnecessary context parameter from pipeRecursiveStream method
- Streamlined the invocation of pipeRecursiveStream in recursive call handling

This change enhances code clarity and reduces complexity in stream management.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 18:23:49 +08:00
..
__tests__ fix: preserve openrouter reasoning with web search (#11505) 2025-11-28 13:56:46 +08:00
core fix: correct token calculation in prompt tool use plugin (#11867) 2025-12-12 18:23:49 +08:00
index.ts Feat/aisdk package (#7404) 2025-09-04 14:03:04 +08:00
types.ts Feat/aisdk package (#7404) 2025-09-04 14:03:04 +08:00