async def test_chat_with_files(self, mock_model_response):
        """Test chat tool with files parameter."""
        tool = ChatTool()

        with patch.object(tool, "create_model") as mock_create_model:
            mock_model = MagicMock()
            mock_model.generate_content.return_value = mock_model_response()
            mock_create_model.return_value = mock_model

            # Mock file reading through the centralized method
            with patch.object(tool, "_prepare_file_content_for_prompt") as mock_prepare_files:
                mock_prepare_files.return_value = "File content here"

                result = await tool.execute({"prompt": "Analyze this code", "files": ["/path/to/file.py"]})

                assert len(result) == 1
                output = json.loads(result[0].text)
                assert output["status"] == "success"
                mock_prepare_files.assert_called_once_with(["/path/to/file.py"], None, "Context files")
Test chat tool with files parameter.
tests/test_prompt_regression.py