feat(walkthrough): guided AI walkthrough for diffs, branches, and PRs (#2572)
A diff is ordered by file path, which is almost never the order in which a change makes sense. This adds a Walkthrough surface that reorders it: the model groups related hunks into stops, explains what each group changes about behavior, and orders the stops so each builds on the last. It explains and orders; judging code stays with the existing Review action. Reviews uncommitted work (all, staged, unstaged), a branch against its base, or a pull request. Generation is always user-initiated — nothing runs on a timer, on a file change, or as a side effect of opening a panel. Invariants worth preserving: - Hunk identity is derived on the server and only there. Ids are content hashes, so an anchor that no longer resolves is proof the code it described changed, and staleness needs no heuristics. The client matches ids to ids and never recomputes them; two implementations would have to agree forever. - The digest is never truncated. A diff that does not fit the model's context is refused with an actionable reason, because a walkthrough written against half a diff reads as confident and is wrong. - Nothing disappears. Lockfiles and other generated output are excluded from the model's input by name — never by size — and everything no stop covers is listed at the end, so "have I seen all of it" stays answerable. - Cost is explicit. Results are content-addressed, so returning the working tree to an earlier state costs nothing; generation outlives its request, so a refresh detaches the client rather than discarding paid-for work, and only an explicit cancel stops it. Supporting changes to shared modules: - git: expose the existing getRangeDiff as GET /api/git listUntrackedPaths and getUntrackedDiffs. The latter resolve the repository once for a batch instead of per file, taking a panel ~340ms on an 80-file working tree. - small-model: structured output across four wire forma and abort signal, and an onOverflow policy so an oversized prompt fails loudly instead of being silently clipped. A provider remembered so the prompt-side fallback goes first next time. - models.dev metadata: surface structured_output as tri false blocks a model, a missing field does not, because the catalog omits it for roughly half of all models. Desktop and tablet only: VS Code serves Git through its these routes, and the mobile shell does not consume the surface registry. Docs: packages/docs walkthrough page in English and all eight locales.
This commit is contained in:
committed by
GitHub
parent
b1ec34162e
commit
34d0ff7383
@@ -1096,6 +1096,56 @@ export const dict: Record<I18nKey, string> = {
|
||||
"contextRail.surface.git.description": "Коміти, гілки та pull request-и",
|
||||
"contextRail.surface.terminal.description": "Вбудований термінал",
|
||||
"contextRail.surface.diff.description": "Перегляд поточних змін",
|
||||
"contextPanel.mode.walkthrough": "Розбір",
|
||||
"contextRail.surface.walkthrough.description": "Покроковий розбір ваших змін за допомогою AI",
|
||||
"walkthrough.scope.all": "Усе незакомічене",
|
||||
"walkthrough.scope.group.workingTree": "Робоче дерево",
|
||||
"walkthrough.scope.group.committed": "Закомічене",
|
||||
"walkthrough.scope.staged": "В індексі",
|
||||
"walkthrough.scope.working": "Поза індексом",
|
||||
"walkthrough.scope.branch": "Ця гілка",
|
||||
"walkthrough.scope.selectorAria": "Обрати, що розбирати",
|
||||
"walkthrough.scope.pullRequest": "PR #{number}",
|
||||
"walkthrough.action.generate": "Створити розбір",
|
||||
"walkthrough.action.regenerate": "Створити заново",
|
||||
"walkthrough.action.cancel": "Скасувати",
|
||||
"walkthrough.action.next": "Наступний крок",
|
||||
"walkthrough.action.previous": "Попередній крок",
|
||||
"walkthrough.action.refresh": "Оновити",
|
||||
"walkthrough.action.open": "AI-розбір",
|
||||
"walkthrough.stage.collecting": "Збираю зміни",
|
||||
"walkthrough.stage.asking": "Чекаю на модель",
|
||||
"walkthrough.stage.assembling": "Складаю розбір",
|
||||
"walkthrough.empty.title": "Розбору ще немає",
|
||||
"walkthrough.empty.description": "Побудуйте маршрут читання цих змін. Це звертається до small model і витрачає токени, тому запускається лише на ваш запит.",
|
||||
"walkthrough.stale.banner": "Код змінився після цього розбору. Застарілих кроків: {count}",
|
||||
"walkthrough.stop.staleAll": "Увесь код, який описував цей крок, змінився.",
|
||||
"walkthrough.stop.stalePartial": "Частина коду, який описував цей крок, змінилася. Втрачених фрагментів: {count}",
|
||||
"walkthrough.stop.staleShort": "Застаріле",
|
||||
"walkthrough.stop.noCode": "Коду для цього кроку немає в поточному diff.",
|
||||
"walkthrough.uncovered.title": "Зміни, які розбір не описав: {count}",
|
||||
"walkthrough.uncovered.description": "Розбір визнав їх рутинними. Розгорніть, щоб переглянути самостійно.",
|
||||
"walkthrough.toc.moreFiles": "Ще файлів: {count}",
|
||||
"walkthrough.toc.uncovered": "Не описано: {count}",
|
||||
"walkthrough.toc.resize": "Змінити ширину колонки змісту",
|
||||
"walkthrough.importance.critical": "Критично",
|
||||
"walkthrough.importance.context": "Контекст",
|
||||
"walkthrough.blocked.noModel.title": "Немає доступної small model",
|
||||
"walkthrough.blocked.noModel.description": "Увійдіть до провайдера моделей, щоб створити розбір.",
|
||||
"walkthrough.blocked.emptyDiff.title": "Немає що оглядати",
|
||||
"walkthrough.blocked.emptyDiff.description": "У цій області поки що немає змін.",
|
||||
"walkthrough.blocked.contextTooSmall.title": "Цей diff завеликий для поточної моделі",
|
||||
"walkthrough.blocked.contextTooSmall.description": "{model} вміщає близько {available} тис. символів, а цьому diff потрібно близько {required} тис. Нічого не обрізається — оберіть модель із більшим контекстом.",
|
||||
"walkthrough.blocked.structuredOutput.title": "Ця модель не вміє structured output",
|
||||
"walkthrough.blocked.structuredOutput.description": "{model} не підтримує структуровані відповіді, потрібні для розбору.",
|
||||
"walkthrough.blocked.chooseModel": "Оберіть small model",
|
||||
"walkthrough.blocked.outputExhausted.title": "Моделі забракло бюджету на відповідь",
|
||||
"walkthrough.blocked.outputExhausted.description": "{model} витратила весь бюджет виводу на роздуми й нічого не повернула. Reasoning-моделі часто так поводяться на великих diff — допоможе модель, яка менше «думає», або вужча область огляду.",
|
||||
"walkthrough.blocked.outputExhausted.descriptionUnknownModel": "Small model витратила весь бюджет виводу на роздуми й нічого не повернула. Reasoning-моделі часто так поводяться на великих diff — допоможе модель, яка менше «думає», або вужча область огляду.",
|
||||
"walkthrough.blocked.onlyGenerated.title": "Змінились лише згенеровані файли",
|
||||
"walkthrough.blocked.onlyGenerated.description": "Усі зміни тут — це lock-файли чи інший результат роботи інструментів, які розбір свідомо пропускає.",
|
||||
"walkthrough.blocked.contextTooSmall.descriptionUnknownModel": "Small model вміщає близько {available} тис. символів, а цьому diff потрібно близько {required} тис. Нічого не обрізається — оберіть модель із більшим контекстом.",
|
||||
"walkthrough.blocked.structuredOutput.descriptionUnknownModel": "Small model не підтримує структуровані відповіді, потрібні для розбору.",
|
||||
"contextRail.surface.plan.description": "Перегляд поточного плану",
|
||||
"contextRail.surface.pr.description": "Створюйте, переглядайте та зливайте pull request поточної гілки",
|
||||
"contextRail.surface.notes.description": "Нотатки, задачі та плани проєкту",
|
||||
|
||||
Reference in New Issue
Block a user