What happened?
When agent edit a file then invoke LSP diagnosis again, it still see the old content.
What did you expect to happen?
It can see the latest diagnosis.
Client information
Client Information
Run qwen to enter the interactive CLI, then run the /about command.
$ qwen /about
# paste output here
Login information
No response
Anything else we need to know?
Currently, we don't send textDocument/didChange to LSP server. We should send this to refresh the diagnosis (and anything else like hover, etc.)
For implementation, I propose:
- implement this in
packages/core/src/core/coreToolScheduler.ts, So that we can send notification after hooks, to also consider the changes from hooks. Downside: ACP seems taking a different path, so we may need to implement this again for ACP
- implement this in each tool that edit a file.
With this implemented, we still have some limitations on the LSP integration:
- Changes from Bash tool is not detected (e.g. git checkout)
- Manual changes by user is not detected
protential future works:
- Watch every file in the workspace, like what vscode is doing, and send workspace/didChangeWatchedFiles to LSP server. Heavy, but this enable us to send some system-reminder to agent when files are changed on disk.
- Only watch the files that was opened.
- Compare each file content with last known version on read / turn start. Cheap, but only resolve part of the issue -- files not read by agent maybe still stall.
What happened?
When agent edit a file then invoke LSP diagnosis again, it still see the old content.
What did you expect to happen?
It can see the latest diagnosis.
Client information
Client Information
Run
qwento enter the interactive CLI, then run the/aboutcommand.Login information
No response
Anything else we need to know?
Currently, we don't send textDocument/didChange to LSP server. We should send this to refresh the diagnosis (and anything else like hover, etc.)
For implementation, I propose:
packages/core/src/core/coreToolScheduler.ts, So that we can send notification after hooks, to also consider the changes from hooks. Downside: ACP seems taking a different path, so we may need to implement this again for ACPWith this implemented, we still have some limitations on the LSP integration:
protential future works: