fix(vercel): enable auto-delete session on Vercel stream release

The "delete current conversation" feature was not working on Vercel
deployment because the stream flow uses a separate lease mechanism.
The session_id created during prepare phase was not preserved for
deletion when the stream ends.

Changes:
- Add SessionID field to streamLease struct to preserve session_id
- Pass session_id to holdStreamLease during prepare
- Modify releaseStreamLease to return auth and session_id
- Call autoDeleteRemoteSession in handleVercelStreamRelease when
  releasing a lease with auto-delete mode enabled

Closes #vercel-auto-delete
This commit is contained in:
ds2api-bot
2026-05-10 02:05:05 +00:00
parent 6a8edf96c3
commit df6859bddc
3 changed files with 105 additions and 10 deletions

View File

@@ -33,6 +33,7 @@ type Handler struct {
type streamLease struct {
Auth *auth.RequestAuth
SessionID string
ExpiresAt time.Time
}