Merge pull request #2498 from continuedev/tomasz/toggle-full-screen
Toggle full screen mode
This commit is contained in:
commit
afb324b4aa
3 changed files with 36 additions and 7 deletions
|
|
@ -22,7 +22,7 @@ export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & {
|
|||
toggleDevTools: [undefined, void];
|
||||
reloadWindow: [undefined, void];
|
||||
focusEditor: [undefined, void];
|
||||
toggleFullScreen: [undefined, void];
|
||||
toggleFullScreen: [{ newWindow?: boolean } | undefined, void];
|
||||
insertAtCursor: [{ text: string }, void];
|
||||
copyText: [{ text: string }, void];
|
||||
"jetbrains/editorInsetHeight": [{ height: number }, void];
|
||||
|
|
|
|||
|
|
@ -189,6 +189,12 @@
|
|||
"icon": "$(fullscreen)",
|
||||
"group": "Continue"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleNewWindow",
|
||||
"category": "Continue",
|
||||
"title": "Open New Window",
|
||||
"icon": "$(link-external)"
|
||||
},
|
||||
{
|
||||
"command": "continue.openConfigJson",
|
||||
"category": "Continue",
|
||||
|
|
@ -452,6 +458,11 @@
|
|||
"command": "continue.toggleFullScreen",
|
||||
"group": "navigation@3",
|
||||
"when": "view == continue.continueGUIView"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleNewWindow",
|
||||
"group": "navigation@4",
|
||||
"when": "view == continue.continueGUIView"
|
||||
}
|
||||
],
|
||||
"editor/title": [
|
||||
|
|
@ -464,11 +475,6 @@
|
|||
"command": "continue.viewHistory",
|
||||
"group": "navigation@2",
|
||||
"when": "activeWebviewPanelId == continue.continueGUIView"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleFullScreen",
|
||||
"group": "navigation@3",
|
||||
"when": "activeWebviewPanelId == continue.continueGUIView"
|
||||
}
|
||||
],
|
||||
"terminal/context": [
|
||||
|
|
|
|||
|
|
@ -483,7 +483,11 @@ const commandsMap: (
|
|||
"continue.applyCodeFromChat": () => {
|
||||
sidebar.webviewProtocol.request("applyCodeFromChat", undefined);
|
||||
},
|
||||
"continue.toggleFullScreen": () => {
|
||||
"continue.toggleFullScreen": ({
|
||||
newWindow,
|
||||
}: { newWindow?: boolean } = {}) => {
|
||||
focusGUI();
|
||||
|
||||
// Check if full screen is already open by checking open tabs
|
||||
const fullScreenTab = getFullScreenTab();
|
||||
|
||||
|
|
@ -532,6 +536,18 @@ const commandsMap: (
|
|||
null,
|
||||
extensionContext.subscriptions,
|
||||
);
|
||||
|
||||
if (newWindow) {
|
||||
vscode.commands.executeCommand(
|
||||
"workbench.action.copyEditorToNewWindow",
|
||||
);
|
||||
}
|
||||
},
|
||||
"continue.toggleNewWindow": () => {
|
||||
focusGUI();
|
||||
vscode.commands.executeCommand("continue.toggleFullScreen", {
|
||||
newWindow: true,
|
||||
});
|
||||
},
|
||||
"continue.openConfigJson": () => {
|
||||
ide.openFile(getConfigJsonPath());
|
||||
|
|
@ -654,6 +670,9 @@ const commandsMap: (
|
|||
{
|
||||
label: "$(screen-full) Open full screen chat (Cmd+K Cmd+M)",
|
||||
},
|
||||
{
|
||||
label: "$(link-external) Open chat in a new window",
|
||||
},
|
||||
{
|
||||
label: quickPickStatusText(targetStatus),
|
||||
},
|
||||
|
|
@ -705,6 +724,10 @@ const commandsMap: (
|
|||
"$(screen-full) Open full screen chat (Cmd+K Cmd+M)"
|
||||
) {
|
||||
vscode.commands.executeCommand("continue.toggleFullScreen");
|
||||
} else if (
|
||||
selectedOption === "$(link-external) Open chat in a new window"
|
||||
) {
|
||||
vscode.commands.executeCommand("continue.toggleNewWindow");
|
||||
} else if (selectedOption === "$(question) Open help center") {
|
||||
focusGUI();
|
||||
vscode.commands.executeCommand("continue.navigateTo", "/more");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue