Setting Up Code Assistant for VS Code: Project Indexing and Customization
Code Assistant from Yandex has been updated: it now supports chat, diff viewing, skill settings, and project indexing in LLM embeddings. This allows for codebase analysis without external services. For setup, use a local stack—Ollama with a lightweight model (~500 MB) and Qdrant as a vector database.
Installation is straightforward: run Qdrant in a Docker container with docker run -d --name qdrant --restart unless-stopped -p 6333:6333 -p 6334:6334 -v qdrant_data:/qdrant/storage qdrant/qdrant:latest. Ollama is installed via a script from the official website, automatically detecting GPU or falling back to CPU.
After indexing the project (activated in chat), the agent independently uses the database for code analysis. On a test project, it accurately described the logic without prompts.
Indexing and Code Analysis
Indexing stores project embeddings locally, speeding up LLM queries. The agent confirms database usage as needed. Diffs with suggestions are generated automatically—accept or reject changes.
On a consumer GPU (e.g., with 4–6 GB VRAM), indexing proceeds smoothly: the model uses exactly the memory required. For CPU mode, Ollama works but slowly—use it for small tasks.
Example interaction:
- Task: "Analyze the code's purpose."
- Agent: uses the index, outputs a diff.
Provider and Skill Settings
In settings, choose a provider: default Yandex or your own (local/API, only large LLMs). Skills are custom scripts, with examples in the documentation repository.
Modes limit the agent: add your own for junior developers (docs only) or production tasks.
Key rules for the agent (add to settings):
- Always answer in Russian
- You — Senior Python Backend Developer & Architect & DevOps
- answer laconic for a specialist of your level
- Always give priority to python, bash, and powershell code
- Answer in a structured way: Conclusion - Arguments - Recommendations
- Round the numbers to 2 digits
- If there is not enough data, clearly indicate what is missing
- Before changing >3 files, suggest a plan
- Do not delete the code, comment with a note [DEPRECATED]
- After each successful step, offer to commit in GIT
- Use subtasks & subagent wherever necessary with prior approval
- Keep documentation of functions and classes when writing and editing code
- Follow these rules, unless they are redefined further.
These rules structure the output, minimizing errors.
Subagents and Operating Modes
Subagent support: delegate subtasks with approval. Useful for refactoring or tests—the agent suggests a plan itself.
In modes, set the context: for docstrings, limit to markdown generation; for DevOps, focus on bash/PowerShell.
Testing on a 700-line project (PowerShell, Win10): the agent adapted from bash to PoSh after failed tests. Token consumption is minimal for the free tier.
Pricing and Limitations
Free access + paid at 700 rub./month. No intermediary fees. Downside: sequential task processing—a new chat stops the current one.
What's important:
- Indexing in embeddings speeds up local project analysis.
- Local stack (Ollama + Qdrant) works on consumer-GPU without cloud.
- Custom rules and subagents structure complex tasks.
- Support for Python/Bash/PoSh with priority on structured output.
For middle/senior: integrate into CI/CD, combine with Git hooks for auto-commit after steps.
— Editorial Team
No comments yet.