refactor: rename AssistantChatPage to CockpitPage, consume useAssistantSession hook
Replace all inline session management with the shared useAssistantSession hook. Keep cockpit-specific state (triageMeta, workZonePct, steps, onboarding) and handlers. Wire onSessionLoadedRef/onTriageUpdateRef callbacks. Add feature flag redirect for flowpilot_cockpit. Update router and prefetch references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ const FeedbackPage = lazyWithRetry(() => import('@/pages/FeedbackPage'))
|
||||
const StepLibraryPage = lazyWithRetry(() => import('@/pages/StepLibraryPage'))
|
||||
const ScriptLibraryPage = lazyWithRetry(() => import('@/pages/ScriptLibraryPage'))
|
||||
const ScriptManagePage = lazyWithRetry(() => import('@/pages/ScriptManagePage'))
|
||||
const AssistantChatPage = lazyWithRetry(() => import('@/pages/AssistantChatPage'))
|
||||
const CockpitPage = lazyWithRetry(() => import('@/pages/CockpitPage'))
|
||||
const FlowAssistPage = lazyWithRetry(() => import('@/pages/FlowAssistPage'))
|
||||
const FlowPilotSessionPage = lazyWithRetry(() => import('@/pages/FlowPilotSessionPage'))
|
||||
const EscalationQueuePage = lazyWithRetry(() => import('@/pages/EscalationQueuePage'))
|
||||
@@ -197,8 +197,8 @@ export const router = sentryCreateBrowserRouter([
|
||||
{ path: 'scripts/manage', element: page(ScriptManagePage) },
|
||||
{ path: 'script-builder', element: page(ScriptBuilderPage) },
|
||||
{ path: 'kb-accelerator', element: page(KBAcceleratorPage) },
|
||||
{ path: 'assistant', element: page(AssistantChatPage) },
|
||||
{ path: 'assistant/:sessionId', element: page(AssistantChatPage) },
|
||||
{ path: 'assistant', element: page(CockpitPage) },
|
||||
{ path: 'assistant/:sessionId', element: page(CockpitPage) },
|
||||
{ path: 'flow-assist', element: page(FlowAssistPage) },
|
||||
{ path: 'pilot', element: page(FlowPilotSessionPage) },
|
||||
{ path: 'pilot/:sessionId', element: page(FlowPilotSessionPage) },
|
||||
|
||||
Reference in New Issue
Block a user