Skip to content
Merged
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
5 changes: 4 additions & 1 deletion assistant/src/daemon/conversation-notifiers.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Incomplete messageId propagation across broader codebase

This PR adds messageId to message_complete events only within conversation-notifiers.ts. There are many other message_complete emissions in conversation-process.ts:415,501,763,871,933 and handlers/recording.ts:493,546,574,607,674,714,839,971,1005 that also omit messageId. Some of those do persist messages (e.g. slash command handlers in conversation-process.ts that call addMessage). If the intent is for clients to reliably receive messageId on all persisted-message completions, those sites would need the same treatment. However, since messageId is optional on MessageComplete (message-types/messages.ts:197) and clients handle its absence gracefully, this is not a bug β€” just a potential follow-up for consistency.

Open in Devin Review

Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export function registerConversationNotifiers(
ctx.sendToClient({
type: "message_complete",
conversationId: conversationId,
messageId: msg.id,
});
}
},
Expand Down Expand Up @@ -133,6 +134,7 @@ export function registerConversationNotifiers(
ctx.sendToClient({
type: "message_complete",
conversationId: conversationId,
messageId: msg.id,
});
}
},
Expand All @@ -145,7 +147,7 @@ export function registerConversationNotifiers(
const callee = callSession?.toNumber ?? "the caller";
const questionText = `**Live call question** (to ${callee}):\n\n${question}\n\n_Use the call answer API to respond._`;

await addMessage(
const msg = await addMessage(
conversationId,
"assistant",
JSON.stringify([{ type: "text", text: questionText }]),
Expand All @@ -168,6 +170,7 @@ export function registerConversationNotifiers(
ctx.sendToClient({
type: "message_complete",
conversationId: conversationId,
messageId: msg.id,
});
},
);
Expand Down
Loading