refactor: deduplicate Orchestrator interface
Export Orchestrator interface from OrchestratorSelector component and import it in page.tsx to avoid silent divergence risk. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
25b3f31a1c
commit
5255f997a1
|
|
@ -1,5 +1,5 @@
|
|||
import type { Metadata } from "next";
|
||||
import { OrchestratorSelector } from "@/components/OrchestratorSelector";
|
||||
import { OrchestratorSelector, type Orchestrator } from "@/components/OrchestratorSelector";
|
||||
import { getServices } from "@/lib/services";
|
||||
import { isOrchestratorSession } from "@composio/ao-core/types";
|
||||
import { getAllProjects } from "@/lib/project-name";
|
||||
|
|
@ -22,16 +22,6 @@ export async function generateMetadata(props: {
|
|||
return { title: { absolute: `ao | ${projectName} - Select Orchestrator` } };
|
||||
}
|
||||
|
||||
interface Orchestrator {
|
||||
id: string;
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
status: string;
|
||||
activity: string | null;
|
||||
createdAt: string | null;
|
||||
lastActivityAt: string | null;
|
||||
}
|
||||
|
||||
export default async function OrchestratorsRoute(props: {
|
||||
searchParams: Promise<{ project?: string }>;
|
||||
}) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useRouter } from "next/navigation";
|
|||
import Link from "next/link";
|
||||
import { cn } from "@/lib/cn";
|
||||
|
||||
interface Orchestrator {
|
||||
export interface Orchestrator {
|
||||
id: string;
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
|
|
|
|||
Loading…
Reference in New Issue