diff --git a/skills/slack/SKILL.md b/skills/slack/SKILL.md index b72bab1f3..4b1cf0f08 100644 --- a/skills/slack/SKILL.md +++ b/skills/slack/SKILL.md @@ -16,7 +16,7 @@ Use `slack` to react, manage pins, send/edit/delete messages, and fetch member i - For reactions, an `emoji` (Unicode or `:name:`). - For message sends, a `to` target (`channel:` or `user:`) and `content`. -Message context lines include `slack message id` and `channel` fields you can reuse directly. +Message text no longer includes `slack message id`. Use metadata fields like `MessageSid` or `ReplyToId`. ## Actions diff --git a/src/auto-reply/reply/followup-runner.ts b/src/auto-reply/reply/followup-runner.ts index 7f5bdde21..a9351a5a6 100644 --- a/src/auto-reply/reply/followup-runner.ts +++ b/src/auto-reply/reply/followup-runner.ts @@ -241,6 +241,7 @@ export function createFollowupRunner(params: { messageProvider: queued.run.messageProvider, messagingToolSentTargets: runResult.messagingToolSentTargets, originatingTo: queued.originatingTo, + originatingThreadId: queued.originatingThreadId, accountId: queued.run.agentAccountId, }); const finalPayloads = suppressMessagingToolReplies ? [] : dedupedPayloads; diff --git a/src/slack/monitor/message-handler/prepare.ts b/src/slack/monitor/message-handler/prepare.ts index 5073d262e..a93fc725d 100644 --- a/src/slack/monitor/message-handler/prepare.ts +++ b/src/slack/monitor/message-handler/prepare.ts @@ -398,7 +398,6 @@ export async function prepareSlackMessage(params: { GroupSubject: isRoomish ? roomLabel : undefined, From: slackFrom, }) ?? (isDirectMessage ? senderName : roomLabel); - const textWithId = `${rawBody}\n[slack message id: ${message.ts} channel: ${message.channel}]`; const storePath = resolveStorePath(ctx.cfg.session?.store, { agentId: route.agentId, }); @@ -411,7 +410,7 @@ export async function prepareSlackMessage(params: { channel: "Slack", from: envelopeFrom, timestamp: message.ts ? Math.round(Number(message.ts) * 1000) : undefined, - body: textWithId, + body: rawBody, chatType: isDirectMessage ? "direct" : "channel", sender: { name: senderName, id: senderId }, previousTimestamp, @@ -430,9 +429,7 @@ export async function prepareSlackMessage(params: { channel: "Slack", from: roomLabel, timestamp: entry.timestamp, - body: `${entry.body}${ - entry.messageId ? ` [id:${entry.messageId} channel:${message.channel}]` : "" - }`, + body: entry.body, chatType: "channel", senderLabel: entry.sender, envelope: envelopeOptions, @@ -466,12 +463,11 @@ export async function prepareSlackMessage(params: { if (starter?.text) { const starterUser = starter.userId ? await ctx.resolveUserName(starter.userId) : null; const starterName = starterUser?.name ?? starter.userId ?? "Unknown"; - const starterWithId = `${starter.text}\n[slack message id: ${starter.ts ?? threadTs} channel: ${message.channel}]`; threadStarterBody = formatThreadStarterEnvelope({ channel: "Slack", author: starterName, timestamp: starter.ts ? Math.round(Number(starter.ts) * 1000) : undefined, - body: starterWithId, + body: starter.text, envelope: envelopeOptions, }); const snippet = starter.text.replace(/\s+/g, " ").slice(0, 80);