code-yeongyu / code-yeongyu/senpi
ai: shouldRecoverTextToolCalls id-regex gates the empty-assistant recovery wrapper onto native-tool-call cursor models
- Dominant language
- TypeScript
- Stars
- 429
- Forks
- 98
- Avg merge
- 5h 3m
- Merged PRs (30d)
- 526
Description
shouldRecoverTextToolCalls (packages/ai/src/tool-call-middleware/index.ts:48-57) falls through to claude/kimi id regexes for non-openai-completions apis, so cursor-agent claude-*/kimi-* models get wrapped by withEmptyAssistantRecovery even though the cursor lane never emits text tool calls. The wrapper's outer stream previously hid local tool work from the idle watchdog (fixed by delegating hasPendingLocalWork). Decide whether the recovery wrapper should gate OFF for native-tool-call lanes entirely - behavioral change, needs owner decision. (2026-08-20 audit.)
Contributor guide
Research direction
Start in packages/ai/src/tool-call-middleware/index.ts:48-57 and trace shouldRecoverTextToolCalls for cursor-agent Claude and Kimi models. Compare the native-tool-call lanes with the wrapper's recovery conditions, then confirm the intended behavior with an owner. Done means the agreed gating behavior is documented and covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100