In src/ai_interaction.py, when parsing text-format edit or delete actions, an empty line 2 caused memory_id to resolve to empty string. Because startswith("") is always True, the first stored memory was inadvertently edited or deleted.
This change validates that memory_id is non-empty before searching the memory list, restoring parity with the MCP memory tool.
Fixes#6342.