diff --git a/packages/ai/src/steps/post-processing/format-follow-up-message-step.ts b/packages/ai/src/steps/post-processing/format-follow-up-message-step.ts index dd77481f6..88b737941 100644 --- a/packages/ai/src/steps/post-processing/format-follow-up-message-step.ts +++ b/packages/ai/src/steps/post-processing/format-follow-up-message-step.ts @@ -127,12 +127,13 @@ Generate a concise update message for the data team.`; } const updateMessage = toolCall.args.update_message; + const title = toolCall.args.title; // Return all input data plus the formatted message return { ...inputData, summaryMessage: updateMessage, - summaryTitle: 'Follow-up Update', // Default title for follow-up messages + summaryTitle: title, message: updateMessage, // Store the update message in the message field as well }; } catch (error) { diff --git a/packages/ai/src/tools/post-processing/generate-update-message.ts b/packages/ai/src/tools/post-processing/generate-update-message.ts index f885d5266..f07b0e95f 100644 --- a/packages/ai/src/tools/post-processing/generate-update-message.ts +++ b/packages/ai/src/tools/post-processing/generate-update-message.ts @@ -9,6 +9,7 @@ interface GenerateUpdateMessageOutput { // Zod schema for generate update message input validation export const generateUpdateMessageSchema = z.object({ + title: z.string().describe('The title of the update message.'), update_message: z .string() .min(1)