Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent c9dd68d890
commit 84aa9a91de
871 changed files with 265870 additions and 27854 deletions
+13 -1
View File
@@ -9,7 +9,7 @@ deletion mirror the in-memory rule.
"""
from types import SimpleNamespace
from routes.history_routes import _merge_continue_rows_to_delete
from routes.history_routes import _has_immediate_continue_marker, _merge_continue_rows_to_delete
def _m(role, content=""):
@@ -39,3 +39,15 @@ def test_plain_user_between_not_deleted():
a1, usr, a2 = _m("assistant", "a1"), _m("user", "a real follow-up question"), _m("assistant", "a2")
rows = _merge_continue_rows_to_delete([a1, usr, a2], a1, a2)
assert rows == [a2] and usr not in rows
def test_merge_requires_immediate_continue_marker():
a1, plain, a2 = _m("assistant", "calendar answer"), _m("user", "delete it"), _m("assistant", "search answer")
assert not _has_immediate_continue_marker([a1, plain, a2], 0, 2)
def test_merge_allows_only_interrupted_continue_marker():
a1, cont, a2 = (_m("assistant", "partial"),
_m("user", "Your previous response was interrupted. Continue."),
_m("assistant", "rest"))
assert _has_immediate_continue_marker([a1, cont, a2], 0, 2)