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:
harshitsinghbhandari 2026-04-04 22:21:26 +05:30
parent 25b3f31a1c
commit 5255f997a1
2 changed files with 2 additions and 12 deletions

View File

@ -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 }>;
}) {

View File

@ -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;