Improve resilience of editor_definition (LSP) against stale line numbers

Aberta
#716 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
66/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
clojure

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Clojure
Estrelas
1k
Forks
82
Merge médio
1d 20h
PRs com merge (30d)
22

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de editor-code-assistant/eca

Todas as issues de editor-code-assistant/eca

Issues semelhantes

Mais issues de Clojure

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.