Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#85 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).

Lenguaje dominante
TypeScript
Estrellas
2
Forks
2
Merge medio
4 h 43 min
PR fusionados (30 d)
91

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PierrunoYT/patch

Todos los issues de PierrunoYT/patch

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.