fix: history messages should not be change[kvcache]

This commit is contained in:
chengyongru
2026-02-13 15:10:07 +08:00
parent 32c9431191
commit 740294fd74
5 changed files with 336 additions and 187 deletions

View File

@@ -12,7 +12,8 @@ def mock_prompt_session():
"""Mock the global prompt session."""
mock_session = MagicMock()
mock_session.prompt_async = AsyncMock()
with patch("nanobot.cli.commands._PROMPT_SESSION", mock_session):
with patch("nanobot.cli.commands._PROMPT_SESSION", mock_session), \
patch("nanobot.cli.commands.patch_stdout"):
yield mock_session