chore: Disable AI chat when workbenches exist - #4049
Conversation
…sable-ai-chat-when-workbenches-exist
Soffi AI SummaryThis PR disables the legacy AI chat/thread experience in the UI when workbenches exist, effectively routing users to the newer Workbench-based AI experience instead of the old chatbot/thread flow. The core motivation is to progressively sunset the old AI chat interface in favor of Workbenches. When a user has workbenches available, the "Chat threads" tab is hidden from the AI section, the Command Palette's Threads tab is suppressed, the floating ChatbotButton is hidden, and navigating directly to the threads URL redirects to the Workbenches page. All of this is gated on a new Commits
Updated: 2026-08-24 14:39 UTC |
Greptile SummaryThe PR disables legacy AI chat surfaces when workbenches exist or workbench availability cannot be confirmed.
Confidence Score: 5/5The PR appears safe to merge. The previously reported thread-route failure is fixed: loading renders a skeleton instead of the thread outlet, while workbench presence or a query error redirects away, leaving no blocking failure.
|
| Filename | Overview |
|---|---|
| assets/src/components/ai/AI.tsx | Gates the chat-thread tab and outlet on confirmed workbench absence; the revised loading and redirect handling closes the previously reported fail-open route. |
| assets/src/components/workbenches/useWorkbenchOptions.ts | Centralizes workbench query state and distinguishes confirmed absence from loading and query errors. |
| assets/src/components/ai/useLegacyAiChatEnabled.ts | Combines AI configuration with confirmed workbench absence into a shared legacy-chat capability gate. |
| assets/src/components/ai/AIContext.tsx | Prevents opening legacy chat and closes an existing chat panel when the capability becomes unavailable. |
| assets/src/components/layout/TopLevelSidePanel.tsx | Filters and clears legacy AI panel requests when legacy chat is disabled. |
| assets/src/components/commandpalette/CommandPalette.tsx | Removes thread history navigation and falls back to commands when legacy chat is unavailable. |
Reviews (2): Last reviewed commit: "apply review suggestion" | Re-trigger Greptile
Test Plan
Test environment: local
Checklist
Plural Flow: console