Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/great-cobras-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
6 changes: 5 additions & 1 deletion server/src/addie/bolt-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,16 @@ async function handleUserMessage({
logger.debug('Addie Bolt: Using streaming response');

// Initialize the stream
// Note: threadTs (line 416) falls back to event.ts for external ID tracking,
// but for the API call we only pass thread_ts when continuing an existing thread.
// This prevents creating unwanted sub-threads on new DM conversations.
const existingThreadTs = 'thread_ts' in event && event.thread_ts ? event.thread_ts : undefined;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const streamer = (client as any).chatStream({
channel: channelId,
recipient_team_id: teamId,
recipient_user_id: userId,
thread_ts: threadTs,
...(existingThreadTs && { thread_ts: existingThreadTs }),
});

// Process Claude response stream (pass conversation history for context)
Expand Down