mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
enable right sidebar (#663)
This commit is contained in:
parent
652250ac3c
commit
1234919229
@ -334,7 +334,7 @@
|
||||
"keys": ["Cmd:p"]
|
||||
},
|
||||
{
|
||||
"command": "rightsidebar:open",
|
||||
"command": "rightsidebar:toggle",
|
||||
"keys": ["Cmd:Shift:Space"]
|
||||
}
|
||||
]
|
@ -160,7 +160,7 @@ class App extends React.Component<{}, {}> {
|
||||
</div>
|
||||
</If>
|
||||
<If condition={rightSidebarCollapsed && activeMainView == "session"}>
|
||||
<div className="right-sidebar-triggers" title="Open Wave AI">
|
||||
<div className="right-sidebar-triggers" title="Open Wave AI (Cmd-Shift-Space)">
|
||||
<Button
|
||||
className="secondary ghost right-sidebar-trigger"
|
||||
onClick={this.openRightSidebar}
|
||||
|
@ -57,21 +57,17 @@ class SidebarKeyBindings extends React.Component<{ component: RightSideBar; isOp
|
||||
componentDidMount(): void {
|
||||
const { component } = this.props;
|
||||
const keybindManager = GlobalModel.keybindManager;
|
||||
keybindManager.registerKeybinding("pane", "rightsidebar", "rightsidebar:open", (waveEvent) => {
|
||||
return component.onOpen();
|
||||
keybindManager.registerKeybinding("pane", "rightsidebar", "rightsidebar:toggle", (waveEvent) => {
|
||||
if (this.props.isOpen) {
|
||||
return component.onClose();
|
||||
} else {
|
||||
return component.onOpen();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
componentDidUpdate(): void {
|
||||
if (this.props.isOpen) {
|
||||
const { component } = this.props;
|
||||
const keybindManager = GlobalModel.keybindManager;
|
||||
keybindManager.registerKeybinding("pane", "rightsidebar:close", "generic:cancel", (waveEvent) => {
|
||||
return component.onClose();
|
||||
});
|
||||
} else {
|
||||
GlobalModel.keybindManager.unregisterDomain("rightsidebar:close");
|
||||
}
|
||||
// remove for now (needs to take into account right sidebar focus so it doesn't conflict with other ESC keybindings)
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
|
@ -250,7 +250,7 @@ class CmdInput extends React.Component<{}, {}> {
|
||||
</If>
|
||||
<div
|
||||
key="aichat"
|
||||
title="Wave AI (Ctrl-Space)"
|
||||
title="Wave AI (Cmd-Shift-Space)"
|
||||
className="cmdinput-icon"
|
||||
onClick={this.clickAIChatAction}
|
||||
>
|
||||
|
@ -70,10 +70,6 @@ class RightSidebarModel implements SidebarModel {
|
||||
}
|
||||
|
||||
getCollapsed(): boolean {
|
||||
// disable right sidebar in production
|
||||
if (!this.globalModel.isDev) {
|
||||
return true;
|
||||
}
|
||||
const clientData = this.globalModel.clientData.get();
|
||||
const collapsed = clientData?.clientopts?.rightsidebar?.collapsed;
|
||||
if (this.isDragging.get()) {
|
||||
|
@ -88,7 +88,7 @@ const PacketEOFStr = "EOF"
|
||||
|
||||
var TypeStrToFactory map[string]reflect.Type
|
||||
|
||||
const OpenAICmdInfoChatGreetingMessage = "Hello, may I help you with this command? \n(Ctrl-Space: open, ESC: close, Ctrl+L: clear chat buffer, Up/Down: select code blocks, Enter: to copy a selected code block to the command input)"
|
||||
const OpenAICmdInfoChatGreetingMessage = "Hello, how may I help you with this command? \n(Cmd-Shift-Space: open/close, Ctrl+L: clear chat buffer, Up/Down: select code blocks, Enter: to copy a selected code block to the command input)"
|
||||
|
||||
func init() {
|
||||
TypeStrToFactory = make(map[string]reflect.Type)
|
||||
|
Loading…
Reference in New Issue
Block a user