def METHOD_NAME(self, dialog, _response_id, old_wish):
    wish = dialog.get_entry_value().strip()
    if not wish:
        return
    core.search.remove_wish(old_wish)
    core.search.add_wish(wish)
    self.select_wish(wish)