fix(slack): clear assistant thread status after replies

This commit is contained in:
Peter Steinberger
2026-01-06 21:41:30 +01:00
parent 8ebc789d25
commit 84c8209158
6 changed files with 205 additions and 179 deletions

View File

@@ -189,12 +189,20 @@ describe("monitorSlackProvider tool results", () => {
const client = getSlackClient() as {
assistant?: { threads?: { setStatus?: ReturnType<typeof vi.fn> } };
};
expect(client.assistant?.threads?.setStatus).toHaveBeenCalledWith({
const setStatus = client.assistant?.threads?.setStatus;
expect(setStatus).toHaveBeenCalledTimes(2);
expect(setStatus).toHaveBeenNthCalledWith(1, {
token: "bot-token",
channel_id: "C1",
thread_ts: "123",
status: "is typing...",
});
expect(setStatus).toHaveBeenNthCalledWith(2, {
token: "bot-token",
channel_id: "C1",
thread_ts: "123",
status: "",
});
});
it("accepts channel messages when mentionPatterns match", async () => {