Files
Jordan Ritter fa98b9c803 feat(showcase): replace starters/ with on-demand extract-starter
Delete the pre-generated starters/ directory tree (previously
synced from packages/ by generate-starters.ts). Add
extract-starter.ts which produces a starter tarball on demand
from any integration. Move shared starter template files to
showcase/shared/starter-template/.
2026-04-28 07:50:39 -07:00

43 lines
1.1 KiB
TypeScript

"use client";
import React from "react";
import { CopilotKit } from "@copilotkit/react-core";
import { CopilotSidebar } from "@copilotkit/react-core/v2";
import { useShowcaseHooks } from "../../../hooks/use-showcase-hooks";
import { useShowcaseSuggestions } from "../../../hooks/use-showcase-suggestions";
import { SalesDashboard } from "../../sales-dashboard";
import { demonstrationCatalog } from "./renderers";
interface A2UIDashboardProps {
agentId: string;
}
function DashboardContent({ agentId }: A2UIDashboardProps) {
useShowcaseHooks();
useShowcaseSuggestions();
return (
<div className="min-h-screen w-full flex items-center justify-center">
<SalesDashboard agentId={agentId} />
<CopilotSidebar
defaultOpen={true}
labels={{
modalHeaderTitle: "Sales Dashboard Assistant",
}}
/>
</div>
);
}
export function A2UIDashboard({ agentId }: A2UIDashboardProps) {
return (
<CopilotKit
runtimeUrl="/api/copilotkit"
agent={agentId}
a2ui={{ catalog: demonstrationCatalog }}
>
<DashboardContent agentId={agentId} />
</CopilotKit>
);
}