Fix duplicate entries in viewer caused by untracked SDK agent promise (#86)

* Initial plan

* Initial analysis: Found root cause of double entries bug

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>

* Fix double entries by assigning generatorPromise in handleSessionInit

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>
Co-authored-by: Alex Newman <thedotmack@gmail.com>
This commit is contained in:
Copilot
2025-11-10 17:30:02 -05:00
committed by GitHub
parent 9f8499fe54
commit 1bb203cbb5
2 changed files with 2 additions and 2 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -262,7 +262,7 @@ export class WorkerService {
this.broadcastProcessingStatus(true);
// Start SDK agent in background (pass worker ref for spinner control)
this.sdkAgent.startSession(session, this).catch(err => {
session.generatorPromise = this.sdkAgent.startSession(session, this).catch(err => {
logger.failure('WORKER', 'SDK agent error', { sessionId: sessionDbId }, err);
});