Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

apply_patch changes have no Undo

Aperta
#197 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
desktop, tooling

Direzione di ricerca

Start with src/main/tools/apply_patch.ts and trace how write_file and edit_file return undo records, then follow the existing edit:undo handling. The proposal calls for backups and post-change hashes per changed file, with a single undo refused if any file has changed since; deleted and moved files also need records. Done means multi-file patches can be undone together while preserving that safety check.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement priority: medium severity: low

Suggestion from the 2026-10-07 code review (not a bug).

write_file and edit_file return an undo record, so their cards offer Undo. apply_patch (src/main/tools/apply_patch.ts) returns none, so a multi-file patch can't be undone from the transcript, even though it is the tool the model is told to use for larger changes.

Proposal

Return one backup per changed file (before bytes plus the hash after the change) and let edit:undo restore them together. Refuse the undo when any file no longer matches, as single-file undo already does. Deleted and moved files need their own records.

Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
5h 28m
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PierrunoYT/patch

Tutte le issue di PierrunoYT/patch

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.