The `save_to_memory` function works by saving content to persistent vector memory in ChromaDB. It uses tree-sitter for code parsing for supported file types: .py, .js, .ts, .css, .html, and .md. Other formats fall back on DeepSeek/Ollama LLM summarization. It uses deterministic md5 IDs so re-scans overwrite duplicates and logs token usage to `zerikai.db`. Sources: main.py:1072, README.md:279, code_indexer.py:169, code_indexer.py:204, code_indexer.py:30