fix(server): omit rewind identity for daemon prompts

This commit is contained in:
Mohamed Boudra
2026-08-01 12:35:18 +02:00
parent e64716b3ed
commit 2ec542e066
2 changed files with 3 additions and 4 deletions
@@ -8373,7 +8373,6 @@ test("authoritative timeline records a daemon-handled submitted prompt before it
type: "user_message",
text: "/handled",
clientMessageId: "msg-client-daemon-handled",
messageId: "msg-client-daemon-handled",
},
{ type: "assistant_message", text: "Handled by the daemon" },
]);
@@ -8384,7 +8383,6 @@ test("authoritative timeline records a daemon-handled submitted prompt before it
type: "user_message",
text: "/handled",
clientMessageId: "msg-client-daemon-handled",
messageId: "msg-client-daemon-handled",
},
{ type: "assistant_message", text: "Handled by the daemon" },
]);
@@ -2080,6 +2080,7 @@ export class AgentManager {
: undefined;
if (options?.clientMessageId) {
this.recordSubmittedPrompt(agent, prompt, options.clientMessageId, {
messageId: options.clientMessageId,
providerMessageId:
stagedSubmittedPromptEcho?.item.type === "user_message"
? stagedSubmittedPromptEcho.item.messageId
@@ -3945,7 +3946,7 @@ export class AgentManager {
agent: ActiveManagedAgent,
prompt: AgentPromptInput,
clientMessageId: string,
options?: { providerMessageId?: string },
options?: { messageId?: string; providerMessageId?: string },
): void {
if (this.timelineStore.getSubmittedUserMessage(agent.id, clientMessageId)) {
return;
@@ -3956,7 +3957,7 @@ export class AgentManager {
type: "user_message",
text: submittedPromptText(prompt),
clientMessageId,
messageId: clientMessageId,
...(options?.messageId ? { messageId: options.messageId } : {}),
};
this.recordAndDispatchTimelineItem(agent.id, item, agent.provider, undefined, options);
}