feat(chat): add typed change-set summary message in timeline
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user