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

Sidebar shortcut/binding doesn t focus/unfocus properly #259

Open
crimsonduelist opened this issue Jun 10, 2024 · 0 comments
Open

Sidebar shortcut/binding doesn t focus/unfocus properly #259

crimsonduelist opened this issue Jun 10, 2024 · 0 comments

Comments

@crimsonduelist
Copy link

crimsonduelist commented Jun 10, 2024

Describe the bug

I assume that by default the twinny focus sidebar shortcut should actually focus the chat box cuz that s what it actually does when it focuses properly.
I can focus on the sidebar only if I go to explorer view (ctrl+shift+e default) or similar sidebar item and then hit shortcut bound to workbench.view.extension.twinny-sidebar-view. If I m on editor view it will not
I tried with workbench.view.extension.twinny-sidebar-view twinny.sidebar.removeView twinny.sidebar.resetViewLocation workbench.view.extension.twinny-sidebar-view.resetViewContainerLocation thinking maybe on of those would be responsible for reseting the view to last focused item or going back to editor view. Like how pressing ctrl+shift+e (explorer view) goes to editor when u use it from within explorer view.
I tried with the when clause from the other other similar bindings like
viewContainer.workbench.view.XXX.enabled but doesnt seem to be smthing (XXX) for twinny currently

To Reproduce

  1. Set keybinding for workbench.view.extension.twinny-sidebar-view (view: show twinny)
  2. Open the sidebar and navigate to twinny s tab
  3. Change focus to another view i.e. some open file or a integrated terminal
  4. Hit the shortcut u set in step 1. ->

Expected behavior

Hitting the shortcut bound to workbench.view.extension.twinny-sidebar-view should just focus inside twinny s sidebar s chat box

Logging

Not sure which logs u d need, I just went in show log file...-> extension host cuz there doesnt seem to be a file like Code/logs/twinny.logs
exthost.log

API Provider

Ollama

Desktop (please complete the following information):

  • OS: Arch
  • Browser firefox-esr
  • Version latest

Additional context

As I was making this I noticed that the focus is actually inside the twinny sidebar it just doesnt automatically go to the chat box in those cases i.e. unless u re already in another sidebar tab like explorer -> close the sidebar -> now view twinny sidebar it will focus in the chatbox correctly.
To verify select some text from within the sidebar like some output of the model or in the providers tab select some text like label, type, hostname etc. If u focus to smthing else like editor view or integrated terminals or smthing it will become gray. Then hitting the shortcut again focus goes back in and it s blue (i.e. selected). Now if u rwere to close the sidebar go to another view and then click the shortcut it will correctly focus in the twinny chatbox no matter the twinny tab you were in (i.e. providers tab)

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

1 participant