Improve resilience of editor_definition (LSP) against stale line numbers

Aperta
#716 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
clojure

Direzione di ricerca

Find the editor_definition implementation and its tests, then read how it uses the supplied symbol and line number. Check how edit_file handles approximate locations for a possible pattern. Done means a symbol with a slightly stale line can still be found, or the failure reports its actual line number; add coverage for both outcomes.

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

Descrizione

The LLM frequently calls editor_definition with an outdated (wrong) line number (often after file edits or approximate context reading), causing the tool to fail immediately instead of finding the symbol:

Expected Behavior

When symbol is provided alongside line, the tool should be more forgiving of minor line drift rather than failing strictly on an exact line match.

Suggested Improvements:

  • Fuzzy line search: If the symbol isn't found on the exact line, search within a window around it (e.g., ±20 lines) or fallback to searching the whole file before failing.

  • Actionable error output: If the symbol exists elsewhere in the file, either resolve it directly or return the actual line number(s) in the error message so the LLM doesn't have to re-read the entire file to retry.

I have a feeling we could reuse a similar mechanism to what edit_file uses, though I haven't looked into it yet.


To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Lingua principale
Clojure
Stelle
1k
Fork
82
Merge medio
1g 20h
PR unite (30g)
22

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 editor-code-assistant/eca

Tutte le issue di editor-code-assistant/eca

Issue simili

Altre issue su Clojure

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.