fix: honor slack reply threading (#574, thanks @bolismauro)

This commit is contained in:
Peter Steinberger
2026-01-09 15:38:43 +00:00
parent 96149d1f71
commit facf5c09a0
4 changed files with 6 additions and 8 deletions
+1
View File
@@ -196,6 +196,7 @@ export function createFollowupRunner(params: {
| undefined);
const applyReplyToMode = createReplyToModeFilter(
resolveReplyToMode(queued.run.config, replyToChannel),
{ allowTagsWhenOff: replyToChannel === "slack" },
);
const replyTaggedPayloads: ReplyPayload[] = applyReplyThreading({
+1 -1
View File
@@ -291,7 +291,7 @@ describe("monitorSlackProvider tool results", () => {
},
slack: {
dm: { enabled: true, policy: "open", allowFrom: ["*"] },
replyToMode: "first",
replyToMode: "off",
},
};
+3 -7
View File
@@ -1101,14 +1101,10 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {
const incomingThreadTs = message.thread_ts;
const eventTs = message.event_ts;
const messageTs = message.ts ?? eventTs;
const replyThreadTs =
replyToMode === "all"
? (incomingThreadTs ?? message.ts ?? eventTs)
: replyToMode === "first"
? incomingThreadTs
: undefined;
const statusThreadTs =
replyThreadTs ?? incomingThreadTs ?? message.ts ?? eventTs;
incomingThreadTs ?? (replyToMode === "all" ? messageTs : undefined);
const statusThreadTs = replyThreadTs ?? messageTs;
let didSetStatus = false;
const onReplyStart = async () => {
didSetStatus = true;