From 1ec4b171435283e4bd55d80cbb4dc809a1b647a3 Mon Sep 17 00:00:00 2001 From: dal Date: Tue, 8 Jul 2025 17:11:17 -0600 Subject: [PATCH] added title to the update-message tool and routed to the 'summaryTitle' --- .../src/steps/post-processing/format-follow-up-message-step.ts | 3 ++- .../ai/src/tools/post-processing/generate-update-message.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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)