def test_sanitize_filename_outside_workspace(cli_runtime):
    """Test _sanitize_filename with a path outside the workspace."""
    test_path = '/tmp/test.txt'  # Path outside workspace
    with pytest.raises(LLMMalformedActionError) as exc_info:
        cli_runtime._sanitize_filename(test_path)
    assert 'Invalid path:' in str(exc_info.value)
    assert 'You can only work with files in' in str(exc_info.value)
Test _sanitize_filename with a path outside the workspace.
tests/unit/test_cli_workspace.py