Add devtools usage in NextJS#454
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)
📝 WalkthroughWalkthroughAdds a documentation section to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 1bd5a14
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-anthropic
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-skills
@tanstack/ai-devtools-core
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@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 `@docs/getting-started/devtools.md`:
- Around line 64-79: Close the open TypeScript fenced block after the register
function so the explanatory paragraph renders as text: add a closing ```
immediately after the end of the export async function register() { ... } block
(i.e., after the await bus.start(); }), and remove the stray extra closing fence
at the end so there's only one proper closing ``` separating the code and the
paragraph; reference the register function and the surrounding ts fenced block
to locate the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d7af1597-56df-48f5-86fd-b13a9cf90f6a
📒 Files selected for processing (1)
docs/getting-started/devtools.md
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/getting-started/devtools.md (1)
64-76:⚠️ Potential issue | 🔴 CriticalClose the TypeScript code block and add the explanatory paragraph.
The TypeScript code block that opens at line 64 is never closed. This will cause the Markdown to render incorrectly—any content after the code block will be treated as code instead of text. Additionally, based on past review suggestions, an explanatory paragraph about what the code accomplishes is missing.
📝 Proposed fix to close the code block and add explanation
const bus = new ServerEventBus(); await bus.start(); } } +``` + +This sets `globalThis.__TANSTACK_EVENT_TARGET__` so the server-side devtoolsMiddleware (which runs automatically inside every `chat()` call) can emit tool call events to the bus, which then forwards them to the devtools panel.As per coding guidelines, "docs/**/*.md: Use Markdown for documentation in the docs/ directory with auto-generated docs via TypeDoc".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/getting-started/devtools.md` around lines 64 - 76, The TypeScript code block opened in register() is not closed and lacks the explanatory paragraph; close the fenced code block after the shown code and add a brief paragraph explaining that the snippet sets globalThis.__TANSTACK_EVENT_TARGET__ so the server-side devtoolsMiddleware (which runs automatically inside every chat() call) can emit tool call events to the ServerEventBus and forward them to the devtools panel; ensure the explanation references ServerEventBus and the bus.start() behavior and appears immediately after the closed code fence.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@docs/getting-started/devtools.md`:
- Around line 64-76: The TypeScript code block opened in register() is not
closed and lacks the explanatory paragraph; close the fenced code block after
the shown code and add a brief paragraph explaining that the snippet sets
globalThis.__TANSTACK_EVENT_TARGET__ so the server-side devtoolsMiddleware
(which runs automatically inside every chat() call) can emit tool call events to
the ServerEventBus and forward them to the devtools panel; ensure the
explanation references ServerEventBus and the bus.start() behavior and appears
immediately after the closed code fence.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e4cda598-b0ae-4964-b258-0b86a2f1f5f1
📒 Files selected for processing (1)
docs/getting-started/devtools.md
🎯 Changes
This adds a section about how to run the SSE bus in NextJS
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit