Skip to content

Fix empty session cleanup when multiple windows opened in parallel#89

Open
daniel-kurzynski wants to merge 1 commit intomainfrom
fix-empty-session-cleanup
Open

Fix empty session cleanup when multiple windows opened in parallel#89
daniel-kurzynski wants to merge 1 commit intomainfrom
fix-empty-session-cleanup

Conversation

@daniel-kurzynski
Copy link
Collaborator

Defer session persistence until the first prompt arrives instead of creating sessions immediately in new_session(). This prevents empty sessions from being created when the client opens multiple windows simultaneously but the user only interacts with one.

  • Add PendingSession struct to hold session config before materialization
  • Store pending sessions in a HashMap keyed by session ID
  • Materialize pending sessions on first prompt() call
  • Add create_session_with_id() to SessionManager for deferred creation

Defer session persistence until the first prompt arrives instead of
creating sessions immediately in new_session(). This prevents empty
sessions from being created when the client opens multiple windows
simultaneously but the user only interacts with one.

- Add PendingSession struct to hold session config before materialization
- Store pending sessions in a HashMap keyed by session ID
- Materialize pending sessions on first prompt() call
- Add create_session_with_id() to SessionManager for deferred creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant