mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-06 15:53:24 +08:00
Merge remote-tracking branch 'origin/master' into feat/cross-platform-ai-cards
This commit is contained in:
@@ -188,7 +188,7 @@ class PersistentStateStore:
|
||||
except json.JSONDecodeError:
|
||||
pass # Skip invalid JSON
|
||||
|
||||
# Seed external.conversation_id from event.conversation_id if not set
|
||||
# Seed the host conversation ID only before the conversation is reset.
|
||||
if self._check_scope_enabled('conversation', binding) and event.conversation_id:
|
||||
if 'external.conversation_id' not in snapshot['conversation']:
|
||||
from .context_reset import get_reset_generation
|
||||
@@ -196,7 +196,8 @@ class PersistentStateStore:
|
||||
generation = await get_reset_generation(
|
||||
self._db_engine, event.workspace_id, event.bot_id, event.conversation_id
|
||||
)
|
||||
snapshot['conversation']['external.conversation_id'] = generation or event.conversation_id
|
||||
if generation is None:
|
||||
snapshot['conversation']['external.conversation_id'] = event.conversation_id
|
||||
|
||||
return snapshot
|
||||
|
||||
|
||||
Reference in New Issue
Block a user