feat(chat): add typed change-set summary message in timeline

This commit is contained in:
Ruslan Bakiev
2026-02-20 11:34:42 +07:00
parent 4219d03c56
commit e1f301c913
5 changed files with 149 additions and 4 deletions

View File

@@ -247,11 +247,12 @@ export async function persistChatMessage(input: {
eventType?: "user" | "trace" | "assistant" | "note";
phase?: "pending" | "running" | "final" | "error";
transient?: boolean;
messageKind?: "change_set_summary";
teamId: string;
conversationId: string;
authorUserId?: string | null;
}) {
const hasStoredPayload = Boolean(input.changeSet);
const hasStoredPayload = Boolean(input.changeSet || input.messageKind);
const data: Prisma.ChatMessageCreateInput = {
team: { connect: { id: input.teamId } },
conversation: { connect: { id: input.conversationId } },
@@ -260,6 +261,7 @@ export async function persistChatMessage(input: {
text: input.text,
planJson: hasStoredPayload
? ({
messageKind: input.messageKind ?? null,
changeSet: input.changeSet ?? null,
} as any)
: undefined,