Skip to content

fix: prevent duplicate session creation between newChat and sendMessage#420

Open
aditigupta217 wants to merge 3 commits into
imDarshanGK:mainfrom
aditigupta217:fix/duplicate-session-creation
Open

fix: prevent duplicate session creation between newChat and sendMessage#420
aditigupta217 wants to merge 3 commits into
imDarshanGK:mainfrom
aditigupta217:fix/duplicate-session-creation

Conversation

@aditigupta217

Copy link
Copy Markdown
Contributor

closes #95
Fixes a bug where sessions could be created twice — once eagerly in newChat(), and again lazily in sendMessage() if no current session was detected.

Changes

  • newChat() now always eagerly creates the session via api.createSession()
  • Removed lazy session-creation fallback from sendMessage()
  • sendMessage() now assumes a current session exists
Screenshot 2026-06-19 at 12 47 15 PM

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@aditigupta217 is attempting to deploy a commit to the Darshan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@imDarshanGK imDarshanGK added SSoC26 Part of Social Summer of Code 2026 Easy Beginner-friendly implementation work labels Jun 20, 2026
@imDarshanGK imDarshanGK added unassigned PR opened without issue assignment and removed SSoC26 Part of Social Summer of Code 2026 Easy Beginner-friendly implementation work labels Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unassigned PR opened without issue assignment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: "New Chat" button creates duplicate sessions in sidebar

2 participants