Merge branch 'main' of github.com:wavetermdev/waveterm into red/aichat-sidebar

This commit is contained in:
Red Adaya 2024-05-02 08:23:16 +08:00
commit 4f06cd8095

View File

@ -460,22 +460,18 @@ class InputModel {
} }
shouldRenderAuxViewKeybindings(view: InputAuxViewType): boolean { shouldRenderAuxViewKeybindings(view: InputAuxViewType): boolean {
if (view != null && this.getActiveAuxView() != view) { if (GlobalModel.activeMainView.get() != "session") {
return false; return false;
} }
if (view != null && !this.getAuxViewFocus()) { if (GlobalModel.getActiveScreen()?.getFocusType() != "input") {
return false; return false;
} }
if (view == null && this.hasFocus() && !this.getAuxViewFocus()) { // (view == null) means standard cmdinput keybindings
return true; if (view == null) {
return !this.getAuxViewFocus();
} else {
return this.getAuxViewFocus() && view == this.getActiveAuxView();
} }
if (view != null && this.getAuxViewFocus()) {
return true;
}
if (GlobalModel.getActiveScreen().getFocusType() == "input" && GlobalModel.activeMainView.get() == "session") {
return true;
}
return false;
} }
@mobx.action @mobx.action