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

Smarter context: tell the agent what changed in git and in files since its last turn

Chiusa
#85 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
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start by tracing how the first user message is assembled and how later turns are prepared; the issue names pendingNotes as the natural place to queue change notices. Check how the app detects the current branch, HEAD, changed files, and files read or edited in the chat before estimating the work. Done means the proposed git context appears at chat start, later notes appear only for relevant external changes, and notices are capped and skipped outside repositories.

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

Descrizione

enhancement priority: medium severity: low

Today

The system prompt shows the project's top-level listing and AGENTS.md, but nothing about git:

  • no branch;
  • no uncommitted changes;
  • no recent commits.

Between turns the user may also edit files, switch branches or pull. The agent only notices when an edit fails because a file changed since it was read (the read-before-edit check), or not at all, and may build on stale reads.

Proposal

  1. At chat start: add a short git block to the first user message, not the system prompt, so the cached prefix stays stable:
    • the branch;
    • ahead/behind counts;
    • up to 20 changed files with their status;
    • the last 5 commit subjects.
  2. Before each later turn: if files the agent read or edited in this chat changed outside it, or the branch or HEAD moved, prepend one note, e.g. "Changed since your last turn: src/a.ts (modified), branch main → feature/x". The mechanism Undo uses to queue notes (pendingNotes) is the natural place.
  3. Cap it and skip it when nothing changed or the project is not a repository.

Measure

Fewer failed edits from stale reads, and fewer "check git status" tool calls, on the benchmark (#49) and in real use (counts in the local log, numbers only).

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

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.