Перейти к содержимому

Дополнение кода и ассистент программиста

Дополнять, объяснять и править код в редакторе

Код и ПОНачальный#34
входТекстКодКод

Полный текст статьи представлен на английском; заголовок и аннотация локализованы.

Что это за возможность

Takes the code context around the cursor plus an intent — complete a line, change a function, explain the logic — and outputs an edit that can be adopted directly. Its constraint is consistency with the existing repository rather than producing an isolated snippet. Unlike code generation it makes local changes inside existing files and conventions, and therefore leans more on context.

Как это устроено

A common approach concatenates the current file, nearby symbols and retrieved related snippets into the prompt so the model completes or rewrites within full context; repository-level assistants use code retrieval to surface relevant definitions and call sites. Edit requests are often framed as generating a patch that is then applied, which makes review and rollback easy. The system is tightly coupled to the IDE and needs low-latency inference with incremental context updates.

Примеры продуктов

4

Microsoft

GitHub Copilot

Дополняет и переписывает код в редакторе по контексту

2Навыки
Инструмент Freemium
ТекстКодКод
2021

Anysphere (Cursor)

Cursor

Настольный редактор кода, использующий весь репозиторий как контекст

3Навыки
Приложение Freemium
ТекстКодКод
2023

Anthropic

Claude Code

Агент-программист, выполняющий многошаговые задачи прямо из терминала

3Навыки
Инструмент Закрытый
ТекстКодКод
2025

Cognition (Devin)

Devin

Автономный агент-программист со своей оболочкой, редактором и браузером

4Навыки
Приложение Закрытый
ТекстКодКод
2024

Связанные организации

Типичное применение

  • Line-by-line completion while coding
  • Bug fixes and refactoring suggestions
  • Explaining code and onboarding into an unfamiliar repo
  • Writing tests and doc strings

Как её оценивают

Suggestion acceptance rate
Share of suggestions developers keep, closest to real experience
pass@k
One-shot success on tasks with tests
Test pass rate for a single edit
Whether the repository tests still pass after one edit

Границы и трудности

  • It edits the wrong variable or misses call sites, producing code that clashes with the surrounding semantics
  • Repository understanding is capped by the context window, so distant constraints are missed in large projects
  • It can emit outdated or insecure patterns that the author must review

Концепции в основе

Обработка языка и большие языковые модели

Архитектура TransformerСредний

Замена эстафеты по одному слову залом, где все говорят сразу, — и дальние зависимости оказываются в одном шаге

4Связи
Иллюстрации 2 · Данные 2

Инженерия, безопасность и этика ИИ

Генерация с дополнением из поискаНачальный

Вместо того чтобы втискивать знания в параметры, держать их снаружи и обращаться по мере надобности — как экзамен с открытой книгой

4Связи
Иллюстрации 2 · Данные 1

Обработка языка и большие языковые модели

Промптинг и выравниваниеЭкспертный

Сделать модель полезной, честной и безопасной труднее, чем просто увеличить её

4Связи
Иллюстрации 1 · Данные 1