I’m trying out Ghostwriter on some fairly simple code. I asked it to explain the code on line 23 of my main.rb file. I was surprised when it explained an entirely different section of the code. Indicating that it had not numbered the code the same way the editor had.
I expect Ghostwriter to report the correct code when I ask for it to explain specific lines.
I asked Ghostwriter to list out the code it sees in main.rb and it did so correctly. Then I asked it to tell me what code was on a specific line, and it gave me the wrong answer.
Steps to reproduce:
In the replit editor My main.rb file shows as 32 lines of code. But here are some quotes from my chat with Ghostwriter where it got a crazy amount of things wrong.
“How many lines of code are in main.rb?”
"There are 24 lines of code in the file main.rb
I didn’t see how its count could be so drastically off. So I asked Ghostwriter “what code do you see in main.rb” and it printed out the correct code. But I saved the code and rehit “run” anyways.
“What code is in line 16?”
Line 16 in main.rb contains the code "phone.add_contact(‘John’, ‘555-555-5555’)
That’s way off. Line 16 is a blank line (for readability) in my editor.
Summary, tl;dr: Ghostwriter is really broken if its idea of how many lines of code are in a file is so off from what the editor is reporting.
The discrepancy between my line count in the editor and Ghostwriter’s goes well beyond simply not seeing blank lines or comments.
Please let me know if this is user error or a bug and if it is a bug with the Ghostwriter Chat beta then can I please be downgraded to the original Ghostwriter? I right clicked all over my code and could not find the “Explain Code” menu option in any context. That is the feature I would like to use, so please apprise me on how to get one or the other option working.
Opera browser, Windows 10, Desktop