async def test_multiple_files_with_prompt_txt(self, temp_prompt_file):
        """Test handling of prompt.txt alongside other files."""
        tool = ChatTool()
        other_file = "/some/other/file.py"

        with patch.object(tool, "create_model") as mock_create_model:
            mock_model = MagicMock()
            mock_response = MagicMock()
            mock_response.candidates = [
                MagicMock(
                    content=MagicMock(parts=[MagicMock(text="Success")]),
                    finish_reason="STOP",
                )
            ]
            mock_model.generate_content.return_value = mock_response
            mock_create_model.return_value = mock_model

            # Mock the centralized file preparation method to avoid file system access
            with patch.object(tool, "_prepare_file_content_for_prompt") as mock_prepare_files:
                mock_prepare_files.return_value = "File content"

                await tool.execute({"prompt": "", "files": [temp_prompt_file, other_file]})

                # Verify prompt.txt was removed from files list
                mock_prepare_files.assert_called_once()
                files_arg = mock_prepare_files.call_args[0][0]
                assert len(files_arg) == 1
                assert files_arg[0] == other_file

        temp_dir = os.path.dirname(temp_prompt_file)
        shutil.rmtree(temp_dir)
Test handling of prompt.txt alongside other files.
tests/test_large_prompt_handling.py