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
9 changes: 9 additions & 0 deletions assistant/src/daemon/handlers/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,19 @@ export async function handleTaskSubmit(
ctx.send(socket, { type: 'task_routed', sessionId: conversation.id, interactionType: 'text_qa' });
ctx.send(socket, { type: 'assistant_text_delta', text: 'Starting screen recording.', sessionId: conversation.id });
} else {
// Recording was rejected (already active) — clean up the orphaned conversation
ctx.send(socket, { type: 'task_routed', sessionId: conversation.id, interactionType: 'text_qa' });
ctx.send(socket, { type: 'assistant_text_delta', text: 'A recording is already active.', sessionId: conversation.id });
}
ctx.send(socket, { type: 'message_complete', sessionId: conversation.id });

if (!recordingId) {
// Unbind the socket so the ephemeral rejection session doesn't block
// future task_submit routing, but keep the conversation in the DB so
// the client can still send follow-up messages to the routed sessionId.
ctx.socketToSession.delete(socket);
}

rlog.info({ sessionId: conversation.id }, 'Recording-only intent intercepted — routed to standalone recording');
return;
}
Expand Down