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

View File

@@ -6,6 +6,7 @@
- Node bridge: harden keepalive + heartbeat handling (TCP keepalive, better disconnects, and keepalive config tests). (#577) — thanks @steipete
- CLI: add `sandbox list` and `sandbox recreate` commands for managing Docker sandbox containers after image/config updates. (#563) — thanks @pasogott
- Providers: add Microsoft Teams provider with polling, attachments, and CLI send support. (#404) — thanks @onutc
- Slack: honor reply tags + replyToMode while keeping threaded replies in-thread. (#574) — thanks @bolismauro
- Commands: accept /models as an alias for /model.
- Models/Auth: show per-agent auth candidates in `/model status`, and add `clawdbot models auth order {get,set,clear}` (per-agent auth rotation overrides). — thanks @steipete
- Debugging: add raw model stream logging flags and document gateway watch mode.

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({

View File

@@ -291,7 +291,7 @@ describe("monitorSlackProvider tool results", () => {
},
slack: {
dm: { enabled: true, policy: "open", allowFrom: ["*"] },
replyToMode: "first",
replyToMode: "off",
},
};

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;