fix(react-dogfood): only render VisionAgent button in demo environment#2227
fix(react-dogfood): only render VisionAgent button in demo environment#2227
Conversation
Gates the Ask AI Agent button and its status panel on isDemoEnvironment so the Vision Agents flow is no longer surfaced in pronto/restricted builds.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Disabled knowledge base sources:
📝 WalkthroughWalkthroughThe AI agent UI section in ChangesDemo Environment Feature Flag
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
💡 Overview
Gates the Ask AI Agent button (and its accompanying
AIAgentStatusPanel) inActiveCallbehindisDemoEnvironment, so the Vision Agents flow is only surfaced in thedemoenvironment and no longer appears inprontoor restricted builds.📝 Implementation notes
useIsDemoEnvironment()hook was already being called inActiveCall.tsx, so no new imports were needed.rd__ai-agent-anchordiv (button + panel) rather than just the button, because the status panel is positionally anchored to the button. Outsidedemothere is no way to invite an agent anyway, so the panel has nothing to surface.🎫 Ticket: https://linear.app/stream/issue/AI-557/add-a-button-to-invite-an-agent-to-a-demo-call
📑 Docs: n/a (sample app only, no public API change)
Summary by CodeRabbit