async def test_conversation_memory_integration(self, tool, temp_repo, mock_redis):
        """Test that conversation memory works with mock storage"""
        temp_dir, config_path = temp_repo

        # Mock conversation memory functions to use our mock redis
        with patch("utils.conversation_memory.get_redis_client", return_value=mock_redis):
            # First request - should embed file content
            PrecommitRequest(path=temp_dir, files=[config_path], original_request="First review")

            # Simulate conversation thread creation
            from utils.conversation_memory import add_turn, create_thread

            thread_id = create_thread("precommit", {"files": [config_path]})

            # Test that file embedding works
            files_to_embed = tool.filter_new_files([config_path], None)
            assert config_path in files_to_embed, "New conversation should embed all files"

            # Add a turn to the conversation
            add_turn(thread_id, "assistant", "First response", files=[config_path], tool_name="precommit")

            # Second request with continuation - should skip already embedded files
            PrecommitRequest(
                path=temp_dir, files=[config_path], continuation_id=thread_id, original_request="Follow-up review"
            )

            files_to_embed_2 = tool.filter_new_files([config_path], thread_id)
            assert len(files_to_embed_2) == 0, "Continuation should skip already embedded files"
Test that conversation memory works with mock storage
tests/test_precommit_with_mock_store.py