-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Decide which panel should be active for a dock based on ordering panels #22346
Conversation
A minor note: we have a way to disable assistant with zed/assets/settings/default.json Lines 520 to 521 in 515e31a
and implicitly with zed/assets/settings/default.json Line 498 in 515e31a
people with either of these disabled won't be very pleased with the change, it seems. Frankly, I am not fold of this too as I prefer the terminal to be there instead, but it's not important. |
@SomeoneToIgnore thanks! I'll look into making this degrade gracefully when the assistant is disabled in settings.
I didn't think of this because I always have the terminal open in the bottom dock, not the right. I don't think this should break a workflow where you manually make a terminal active for the right dock and toggle it with the action; and my impression from testing was that in the status quo the chat panel occupies that active slot at startup. Am I missing something? |
It's another edge case (not important, as stated), where I have
in the settings and clear the DB, making the next startup "default". |
I think the current approach is too heavy-handed; thinking about alternatives. |
b661696
to
b00cdef
Compare
Pushed a different approach: all defined panels are given a total order, and if no panel is active for some dock when it is toggled open, the first panel in the set for that dock according to the total order is activated. The order is:
This brings the "which panel should be initially active for a dock?" decision under explicit control while hopefully minimizing disruption for users. A natural next step would be to allow configuring this ordering of panels, though I haven't done that here since I'm not sure there's demand for it. |
…ls (zed-industries#22346) This means that `workspace::ToggleRightDock` will open the assistant if no right-dock panel has been manually activated, instead of the chat as before. Also cleans up the `active_panel_index` logic a bit. cc @nathansobo Release Notes: - Make `workspace::ToggleRightDock` open the assistant panel if no right-dock panel has yet been activated
Unless I'm misunderstanding what this is intended to do, it doesn't always honor settings. If I set |
This means that
workspace::ToggleRightDock
will open the assistant if no right-dock panel has been manually activated, instead of the chat as before. Also cleans up theactive_panel_index
logic a bit.cc @nathansobo
Release Notes:
workspace::ToggleRightDock
open the assistant panel if no right-dock panel has yet been activated