fix: preserve cockpit steps across view toggles and show full step info
Backend: stop wiping pending_task_lane when AI response has no new [ACTIONS]/[QUESTIONS] markers — previous task lane state is still relevant until replaced by new markers. Frontend (selectChat): don't eagerly clear task lane before server response arrives; restore from sessionStorage as fallback when pending_task_lane is null (covers sessions before backend fix). StepsPanel: show description and command for all steps instead of hiding behind hover/active-only visibility. Commands render as inline code blocks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -339,14 +339,12 @@ async def send_chat_message(
|
||||
except Exception:
|
||||
logger.exception("Failed to create fork within branch for session %s", session.id)
|
||||
|
||||
# Persist task lane state on session
|
||||
# Persist task lane state on session — only overwrite when new markers present
|
||||
if branch_questions_data or branch_actions_data:
|
||||
session.pending_task_lane = {
|
||||
"questions": branch_questions_data or [],
|
||||
"actions": branch_actions_data or [],
|
||||
}
|
||||
else:
|
||||
session.pending_task_lane = None
|
||||
|
||||
suggested_flows = extract_suggested_flows(
|
||||
await rag_search(query=message, account_id=account_id, db=db, limit=8)
|
||||
@@ -472,14 +470,12 @@ async def send_chat_message(
|
||||
logger.exception("Failed to create fork for session %s", session_id)
|
||||
# Fork failed but chat message still sent — don't break the response
|
||||
|
||||
# Persist task lane state on session
|
||||
# Persist task lane state on session — only overwrite when new markers present
|
||||
if questions_data or actions_data:
|
||||
session.pending_task_lane = {
|
||||
"questions": questions_data or [],
|
||||
"actions": actions_data or [],
|
||||
}
|
||||
else:
|
||||
session.pending_task_lane = None
|
||||
|
||||
suggested_flows = extract_suggested_flows(rag_results)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user