fix(slack): keep thread session fork/history context after first turn (#23843)

* Slack thread sessions: keep forking and history context after first turn

* Update CHANGELOG.md
This commit is contained in:
Vincent Koc
2026-02-22 14:39:00 -05:00
committed by GitHub
parent 02772b029d
commit 5e73f33448
8 changed files with 120 additions and 14 deletions

View File

@@ -169,6 +169,20 @@ describe("runPreparedReply media-only handling", () => {
expect(call?.followupRun.prompt).toContain("[User sent media without caption]");
});
it("keeps thread history context on follow-up turns", async () => {
const result = await runPreparedReply(
baseParams({
isNewSession: false,
}),
);
expect(result).toEqual({ text: "ok" });
const call = vi.mocked(runReplyAgent).mock.calls[0]?.[0];
expect(call).toBeTruthy();
expect(call?.followupRun.prompt).toContain("[Thread history - for context]");
expect(call?.followupRun.prompt).toContain("Earlier message in this thread");
});
it("returns the empty-body reply when there is no text and no media", async () => {
const result = await runPreparedReply(
baseParams({