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 {
if (view != null && this.getActiveAuxView() != view) {
if (GlobalModel.activeMainView.get() != "session") {
return false;
}
if (view != null && !this.getAuxViewFocus()) {
if (GlobalModel.getActiveScreen()?.getFocusType() != "input") {
return false;
}
if (view == null && this.hasFocus() && !this.getAuxViewFocus()) {
return true;
// (view == null) means standard cmdinput keybindings
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