Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux and MacOS support for Keybindings #18

Closed
rorymullen opened this issue Jul 5, 2023 · 6 comments
Closed

Linux and MacOS support for Keybindings #18

rorymullen opened this issue Jul 5, 2023 · 6 comments

Comments

@rorymullen
Copy link

Thank you yaroslavyaroslav for this fantastic package, it's great to have ChatGPT access without leaving sublime text. I'm following up on an issue with keybindings that was mentioned in a comment: #12 (comment) .

I'm running macOS, I havn't been able to get the OpenAI: New Message and OpenAI: Show output panel keybindings to work.

The OpenAI: Show output panel keybinding does appear in the settings file that you've provided under OpenAI completion -> Key Bindings, but the keybinding doesn't work for me (no response when pressed), and I see no key binding for OpenAI: New Message. I have gotten keybindings to work successfully for the insertion and edition commands, they are great.

[
    //     {
    //     "keys": [
    //         "super+shift+;"
    //     ],
    //     "command": "show_panel",
    //     "args": {
    //         "panel": "output.OpenAI"
    //     }
    // },
    // {
    //     "keys": [
    //         "super+shift+'"
    //     ],
    //     "command": "openai",
    //     "args": {
    //         "mode": "completion"
    //     }
    // },
    // {
    //     "keys": [
    //         "super+shift+'"
    //     ],
    //     "command": "openai",
    //     "args": {
    //         "mode": "edition"
    //     }
    // },
    // {
    //     "keys": [
    //         "super+shift+'"
    //     ],
    //     "command": "openai",
    //     "args": {
    //         "mode": "insertion"
    //     }
    // },
]

Even without the keybindings, this package is amazing. If you set up GitHub sponsoring for this project, I would 100% sponsor it. Not a talented programmer, but would be very happy to help with testing :)

Thank you again!

@rorymullen
Copy link
Author

Okay, for New Message I was able to figure it out from the open_worker.py file. This works for me on MacOS:

    {
        "keys": [
            "super+shift+'"
        ],
        "command": "openai",
        "args": {
            "mode": "chat_completion"
        }
    },

Thank you again!!!

@rorymullen
Copy link
Author

Okay, and this also works to show the chat history :)

    {
        "keys": [
            "super+shift+;"
        ],
        "command": "openai",
        "args": {
            "mode": "refresh_output_panel"
        }
    }

@yaroslavyaroslav
Copy link
Owner

yaroslavyaroslav commented Jul 5, 2023

Thank your for kind words!

Yeah, I've recently found out that I forgot to add those new bindings in default file (got bind them in my local one).

Could you please check that file in the last develop branch commit if it's ok for now, as I believe that I've added them there but haven't been released new version yet since the lack of time for now.

Anyway if you'd find some issues within the latest version of the keybinding file ping me out here, I'll check it additionally at release time.

UPD: Nevermind, had released patch with a proper binding just yet.

@yaroslavyaroslav
Copy link
Owner

yaroslavyaroslav commented Jul 5, 2023

And speaking about showing output panel keys, this one is more reliable, since it's just toggle panel on and off, and the one that you've mentioned earlier is redrawing all output from a cache (it's from the very least develop commit):

{
    //     "keys": [
    //         "super+shift+;"
    //     ],
    //     "command": "show_panel",
    //     "args": {
    //         "panel": "output.OpenAI Chat"
    //     }
    // },

@yaroslavyaroslav
Copy link
Owner

@rorymullen
Copy link
Author

rorymullen commented Sep 17, 2023

I've started using this package in earnest now, GPT 4 is working great for me, it's a massive upgrade from constantly toggling between MacGPT and SublimeText, which is what I had been doing. Thank you for this!

One small update on this issue of key bindings, and perhaps this belongs in it's own thread (EDIT: discussion started here), but the OpenAI: Refresh Chat action (and the associated key binding) bring up the chat window in a default position showing the oldest part of the chat, rather than the newest part of the chat.

In a short chat, that's no problem. In a longer chat, it can be a bit cumbersome to scroll all the way to the bottom in order to show GPT's most recent reply. I wonder if the chat window could default to opening at the bottom of the chat rather than the top?

I've attached two screenshots. The first, showing "message 1," is the default position of the chat window after OpenAI: Refresh Chat is activated, the second, showing "message 3," is the position that IMHO would be most useful.

I hope I've been able to describe the issue relatively clearly...

Thanks again for this package, I hope it takes off and gets a large user base, it's fantastic!

Screenshot 2023-09-17 at 9 18 44 AM Screenshot 2023-09-17 at 9 18 57 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants