Refactor backend to support interface-definition driven model resources
- Introduce a new model structure for managing interface definitions and model resources, enhancing the backend's capability to handle various service integrations. - Update the Makefile to reflect changes in database seeding and resource management commands. - Remove the deprecated credentials management routes and replace them with a unified model registry API. - Modify existing routes and schemas to align with the new model structure, ensuring seamless integration with the frontend. - Enhance database seeding scripts to populate new model resources and their configurations. - Update README documentation to reflect the new architecture and usage instructions for model resources and interface definitions.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export type PageHeaderProps = {
|
||||
title: string;
|
||||
description?: ReactNode;
|
||||
/** 右侧主操作(如「创建助手」按钮) */
|
||||
action?: ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/** 列表/资源页统一页头:标题 + 说明 + 右侧操作,移动端纵向堆叠 */
|
||||
export function PageHeader({
|
||||
title,
|
||||
description,
|
||||
action,
|
||||
className,
|
||||
}: PageHeaderProps) {
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-col items-start justify-between gap-5 sm:flex-row sm:gap-6",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<div>
|
||||
<h1 className="font-display display-lg text-ink">{title}</h1>
|
||||
{description && (
|
||||
<p className="mt-3 max-w-2xl text-[15px] leading-7 text-muted-foreground">
|
||||
{description}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{action && <div className="w-full shrink-0 sm:w-auto">{action}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user