From 0d03813e98e0093fe78b60f37126e1aa21ac12f1 Mon Sep 17 00:00:00 2001 From: oobabooga Date: Thu, 9 Oct 2025 21:01:13 -0300 Subject: [PATCH] Update modules/chat.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- modules/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chat.py b/modules/chat.py index a52d96af..9857479a 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -1196,7 +1196,7 @@ def find_all_histories_with_first_prompts(state): if re.match(r'^[0-9]{8}-[0-9]{2}-[0-9]{2}-[0-9]{2}$', filename): first_prompt = "" if data and 'visible' in data and len(data['visible']) > 0: - if len(data['internal']) > 1 and data['internal'][0][0] == '<|BEGIN-VISIBLE-CHAT|>': + if len(data['internal']) > 0 and data['internal'][0][0] == '<|BEGIN-VISIBLE-CHAT|>': if len(data['visible']) > 1: first_prompt = html.unescape(data['visible'][1][0]) elif i == 0: