From cc3d1c7e43fad587e3d89d24b397b0f49643016b Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Fri, 17 Oct 2025 14:16:38 +0300 Subject: [PATCH] Use proper chat widget instead of sidebar --- .../frontend/components/Agent.tsx | 102 ++++++++++-------- .../frontend/components/StateDisplay.tsx | 78 +++++++++----- 2 files changed, 106 insertions(+), 74 deletions(-) diff --git a/examples/ag-ui-research/frontend/components/Agent.tsx b/examples/ag-ui-research/frontend/components/Agent.tsx index a7902872..2b77934a 100644 --- a/examples/ag-ui-research/frontend/components/Agent.tsx +++ b/examples/ag-ui-research/frontend/components/Agent.tsx @@ -5,7 +5,7 @@ import { useCoAgent, useCoAgentStateRender, } from "@copilotkit/react-core"; -import { CopilotSidebar } from "@copilotkit/react-ui"; +import { CopilotChat } from "@copilotkit/react-ui"; import "@copilotkit/react-ui/styles.css"; import StateDisplay from "./StateDisplay"; @@ -113,57 +113,69 @@ function AgentContent() { }); return ( -
-
+ <> + +
+ {/* Chat on the left */} +
+ +
+ + {/* State display on the right */}
-
-

- Haiku.rag Research Assistant -

-

- Interactive research powered by Haiku.rag,{" "} - Pydantic AI, and AG-UI -

-
+
+
+

+ Research State +

+

+ Live updates from the research agent +

+
- + +
- - -
+ ); } diff --git a/examples/ag-ui-research/frontend/components/StateDisplay.tsx b/examples/ag-ui-research/frontend/components/StateDisplay.tsx index 686ec3e8..eb822463 100644 --- a/examples/ag-ui-research/frontend/components/StateDisplay.tsx +++ b/examples/ag-ui-research/frontend/components/StateDisplay.tsx @@ -72,26 +72,20 @@ export default function StateDisplay({ state }: StateDisplayProps) { return (
-

- Research State -

- - {/* Phase Progress */} -
0 && (
0 && ( -
+