Conversation
📝 WalkthroughWalkthroughThis PR reorganizes the public API surface by removing model exports from main index files, relocates one export to a type exports section, updates test streaming chunk structures to use new type names and field conventions, and adds a comprehensive cleanup script to the root package configuration. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 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 |
|
View your CI Pipeline Execution ↗ for commit d7ee13d
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-anthropic
@tanstack/ai-client
@tanstack/ai-devtools-core
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-openrouter
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 17: The "clean:all" npm script currently uses --exclude="!.env" which
negates the pattern and makes .env eligible for deletion; update the "clean:all"
script (script name: clean:all) to use --exclude=".env" (remove the leading "!")
so the .env file is preserved by git clean.
| }, | ||
| "scripts": { | ||
| "clean": "pnpm --filter \"./packages/**\" run clean", | ||
| "clean:all": "git clean -fdx --exclude=\"!.env\"", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify git clean --exclude behavior with both patterns
cd "$(mktemp -d)"
git init test-repo && cd test-repo
# Setup: Create tracked and untracked files
echo "hello" > tracked.txt
git add tracked.txt && git commit -m "init"
echo "SECRET=123" > .env
echo "untracked" > untracked.txt
echo "=== Test 1: --exclude=\"!.env\" (current code) ==="
echo "Before cleanup (--exclude='!.env'):"
ls -la | grep -E '\.env|untracked'
# Use --dry-run to see what would be deleted
echo -e "\nWhat git clean would delete (--exclude='!.env'):"
git clean -fdx --exclude="!.env" --dry-run 2>&1 | head -20
echo ""
echo "=== Test 2: --exclude=\".env\" (proposed fix) ==="
# Reset for clean state
echo "SECRET=123" > .env
echo "untracked" > untracked.txt
echo "Before cleanup (--exclude='.env'):"
ls -la | grep -E '\.env|untracked'
echo -e "\nWhat git clean would delete (--exclude='.env'):"
git clean -fdx --exclude=".env" --dry-run 2>&1 | head -20
echo ""
echo "=== Test 3: No exclude (baseline) ==="
echo "SECRET=123" > .env
echo "untracked" > untracked.txt
echo -e "\nWhat git clean would delete (no exclude):"
git clean -fdx --dry-run 2>&1 | head -20Repository: TanStack/ai
Length of output: 1721
--exclude="!.env" does not preserve .env — remove the ! negation prefix.
git clean --exclude=PATTERN uses gitignore-style pattern matching. The ! prefix negates the pattern, so --exclude="!.env" makes .env eligible for deletion instead of protecting it. The pattern should be .env without the negation.
Proposed fix
- "clean:all": "git clean -fdx --exclude=\"!.env\"",
+ "clean:all": "git clean -fdx --exclude=.env",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "clean:all": "git clean -fdx --exclude=\"!.env\"", | |
| "clean:all": "git clean -fdx --exclude=.env", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` at line 17, The "clean:all" npm script currently uses
--exclude="!.env" which negates the pattern and makes .env eligible for
deletion; update the "clean:all" script (script name: clean:all) to use
--exclude=".env" (remove the leading "!") so the .env file is preserved by git
clean.
🎯 Changes
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
Release Notes
Chores
Refactor
Tests