Helixform / CodeCursor

An extension for using Cursor in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=ktiays.aicursor
MIT License
1.56k stars 58 forks source link

Can't see the generate code option. #17

Closed MaxwellWei closed 1 year ago

MaxwellWei commented 1 year ago

When I open the command palette and search for "codecursor", the only options I see are

There is no "Code Cursor: Generate Code" as in the picture shown in README.

LiuCH4NG commented 1 year ago

+1

unixzii commented 1 year ago

Hi @MaxwellWei, "Generate Code" command requires an active text editor. Did you attempt to do it without opening any files?

MaxwellWei commented 1 year ago

Hi @MaxwellWei, "Generate Code" command requires an active text editor. Did you attempt to do it without opening any files?

Yes, I tried searching for this command while opening a JS and a TS file. I also tried installing the Cursor app and then restarting VSCode. Then I tried reinstalling the extension, but still not work.

By the way, my VSCode is 1.76.2 user setup.

LiuCH4NG commented 1 year ago

After upgrading to 0.3.1, the issue occurred, and after rolling back to 0.3.0, the function resumed normal.

MaxwellWei commented 1 year ago

After upgrading to 0.3.1, the issue occurred, and after rolling back to 0.3.0, the function resumed normal.

Yes, downgrading to 0.3.0 solved the issue.

unixzii commented 1 year ago

When I opened the command palette, the command was actually listed there. But when I search for something, it disappeared:

image

I guess commit https://github.com/Helixform/CodeCursor/commit/1d0568b930cefe0a01cd1de5aadbb1d5f680534e caused this problem. These commands are controlled by editorFocus context value, as the code shows:

{
    "command": "aicursor.generateCode",
    "title": "Generate Code",
    "enablement": "editorFocus",
    "category": "CodeCursor"
}

That is to say, when editorFocus is false (no editors have focus), the commands are disabled. Just before opening the command palette, editorFocus is indeed true. However, when the command palette opened, the value changed to false. And when you type in the search field, VSCode reloads the command list, making these commands disappear.

This is a regression, we will fix it soon.

unixzii commented 1 year ago

As a workaround, you can bind keyboard shortcuts to these commands, and invoke them without moving focus off the editor.

MaxwellWei commented 1 year ago

As a workaround, you can bind keyboard shortcuts to these commands, and invoke them without moving focus off the editor.

Yes, I'm doing this. Thanks.