Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai>
Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai>
Co-authored-by: Lucas Marandat <31749711+lucasmrdt@users.noreply.github.com>
Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com>
Co-authored-by: Paul Cacheux <paul.cacheux@mistral.ai>
Co-authored-by: Peter Evers <pevers90@gmail.com>
Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai>
Co-authored-by: Pierre Rossinès <pierre.rossines@protonmail.com>
Co-authored-by: Quentin <quentin.torroba@mistral.ai>
Co-authored-by: Simon Van de Kerckhove <simon.vandekerckhove@mistral.ai>
Co-authored-by: Val <102326092+vdeva@users.noreply.github.com>
Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Mathias Gesbert 2026-04-09 18:40:46 +02:00 committed by GitHub
parent 90763daf81
commit e9a9217cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
113 changed files with 7202 additions and 541 deletions

View file

@ -61,14 +61,15 @@ def test_history_manager_filters_invalid_and_duplicated_entries(tmp_path: Path)
assert reloaded.get_previous(current_input="") is None
def test_history_manager_filters_commands(tmp_path: Path) -> None:
def test_history_manager_stores_slash_prefixed_entries(tmp_path: Path) -> None:
history_file = tmp_path / "history.jsonl"
manager = HistoryManager(history_file, max_entries=5)
manager.add("first")
manager.add("/skip")
manager.add("/tool_call arg1 arg2")
reloaded = HistoryManager(history_file)
assert reloaded.get_previous(current_input="") == "/tool_call arg1 arg2"
assert reloaded.get_previous(current_input="") == "first"
assert reloaded.get_previous(current_input="") is None