feat: add AgentRealtimeProvider and integrate it into WorkbenchLayout and ConversationsPage
This commit is contained in:
@@ -35,7 +35,6 @@ import {
|
||||
} from "@/components/ui/resizable";
|
||||
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { Sheet, SheetContent } from "@/components/ui/sheet";
|
||||
import { useAgentConversationRealtime } from "@/hooks/use-agent-conversation-realtime";
|
||||
import { useI18n } from "@/i18n/provider";
|
||||
import {
|
||||
agentConversationFilterOptions,
|
||||
@@ -135,8 +134,6 @@ export function ConversationWorkbench() {
|
||||
});
|
||||
}
|
||||
|
||||
useAgentConversationRealtime();
|
||||
|
||||
const handleSidebarToggle = () => {
|
||||
const panel = sidebarPanelRef.current;
|
||||
if (!panel) {
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import { AgentRealtimeProvider } from "@/components/agent-realtime-provider";
|
||||
|
||||
import { ConversationWorkbench } from "./_components/conversation-workbench";
|
||||
|
||||
export default function ConversationsPage() {
|
||||
return <ConversationWorkbench />;
|
||||
return (
|
||||
<>
|
||||
<AgentRealtimeProvider />
|
||||
<ConversationWorkbench />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { usePathname, useRouter } from "next/navigation"
|
||||
import type { CSSProperties, ReactNode } from "react"
|
||||
import { useEffect } from "react"
|
||||
|
||||
import { AgentRealtimeProvider } from "@/components/agent-realtime-provider"
|
||||
import { useAuth } from "@/components/auth-provider"
|
||||
import { NotificationProvider } from "@/components/notification-provider"
|
||||
import { WorkbenchHeader } from "@/components/workbench-header"
|
||||
@@ -56,6 +57,7 @@ export default function WorkbenchLayout({
|
||||
}
|
||||
>
|
||||
<NotificationProvider>
|
||||
<AgentRealtimeProvider />
|
||||
<WorkbenchRail />
|
||||
<div className="flex min-w-0 flex-1 flex-col overflow-hidden">
|
||||
<WorkbenchHeader />
|
||||
|
||||
Reference in New Issue
Block a user