void
void copied to clipboard
[Bug] "Add to Chat": Discrepancy between displayed line reference and actual code processed by AI
- Press
Cmd+Shift+Pin Void, and typeHelp: About. Please paste the information here. Also let us know any other relevant details, like the model and provider you're using if applicable. 版本: 1.99.30033 (system setup) 提交: 1.3.9 日期: b7bb7f2f949a5267274d184a2b7665dc4aa05112 Electron: 2025-05-14T06:04:52.797Z ElectronBuildId: 34.3.2 Chromium: undefined Node.js: 132.0.6834.210 V8: 20.18.3 OS: 13.2.152.41-electron.0 - Describe the issue/feature here! When selecting a portion of code in the editor with the mouse and then clicking the "Add to Chat" button, the AI chat window might correctly display a reference to the selected line numbers. However, based on the AI's response or its subsequent behavior, it appears to have actually read, processed, or understood a different segment of code, not the code the user actually selected. As shown in the attached screenshot, the chat window's reference points to the selected lines 35-37, but the AI's understanding seems to be based on the content of lines 31-33.
After multiple attempts, I found that there is a certain probability of correct application, but in many cases, reference errors still occur.
Thanks for the report! We're currently getting the file contents of the selection when you click send, not when you attach the message. I think that's the problem. This makes sense for full files, but we should probably do it the other way for CodeSelections (line-numbered). Will leave this open
Hi, can I work on this ?
@andrewpareles @vrtnis ?
@praburocking sounds great.. feel free to take this on!