fix(l4): deduplicate history lines in first-occurrence order

This commit is contained in:
ljq committed 2026-11-03 14:35:18 +08:00
1 parent 3f66861d93
commit 48123646bc
1 file changed
+1 -1
+1 -1
View File
@@ -138,7 +138,7 @@ def extract_history(src, session_name=None):
all_blocks = [parsed for m in _RE_HISTORY.finditer(text)
if (parsed := _parse_history_block(m.group(1)))]
if all_blocks:
return _merge_history_blocks(all_blocks)
return list(dict.fromkeys(_merge_history_blocks(all_blocks)))
return []
def format_history_block(session_name, history_lines):