🎉 first commit

This commit is contained in:
LIlGG
2025-09-24 13:06:25 +08:00
commit 1f4fb103e9
409 changed files with 61222 additions and 0 deletions

35
app/types/message.ts Normal file
View File

@@ -0,0 +1,35 @@
import type { UIMessage } from 'ai';
export type UPageUIMessage = UIMessage<UPageMessageMetadata, UPageDataParts>;
export type ElementInfoMetadata = {
tagName: string;
className?: string;
id?: string;
innerHTML?: string;
outerHTML?: string;
};
export type UPageMessageMetadata = {
isHidden?: boolean;
elementInfo?: ElementInfoMetadata;
};
// 自定义的 parts, 用于在前端显示进度条。
export type ProgressAnnotation = {
label: string;
status: 'in-progress' | 'complete' | 'stopped' | 'warning';
order: number;
message: string;
};
// 自定义的 parts, 用于在前端显示摘要。
export type SummaryAnnotation = {
chatId: string;
summary: string;
};
export type UPageDataParts = {
progress: ProgressAnnotation;
summary: SummaryAnnotation;
};