fix: preserve anthropic assistant ids in tool-first streams#480
fix: preserve anthropic assistant ids in tool-first streams#480shaked-frame wants to merge 2 commits intoTanStack:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAnthropic adapter now attaches Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
parentMessageIdto AnthropicTOOL_CALL_STARTchunks so tool-first streams bind to the eventual assistant message id immediatelyTEXT_MESSAGE_STARTparentMessageIdpreserve a single assistant message instead of creating a temporary local idfixes #477
Verification
pnpm exec vitest run packages/typescript/ai/tests/stream-processor.test.tspnpm test:lib -- --runInBandinpackages/typescript/aistream-processorregression passed@tanstack/ai-event-client,examples/ts-svelte-chat/.svelte-kit/tsconfig.json)pnpm test:lib -- --runInBandinpackages/typescript/ai-anthropic@tanstack/aipackage-entry resolution issue before the adapter test file runsSummary by CodeRabbit
Bug Fixes
Tests