forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PearAI Overlay * Uncomment layout * Remove comment * Prevent overlay open on every startup + background default color * Fix overlay bug * Border radius
- Loading branch information
1 parent
6644ab2
commit 69b1b03
Showing
10 changed files
with
474 additions
and
9 deletions.
There are no files selected for viewing
Submodule pearai-submodule
updated
8 files
+0 −1 | .gitignore | |
+1 −1 | gui/src/components/ui/badge.tsx | |
+1 −1 | gui/src/components/ui/button.tsx | |
+1 −1 | gui/src/components/ui/card.tsx | |
+1 −1 | gui/src/components/ui/input.tsx | |
+1 −1 | gui/src/components/ui/switch.tsx | |
+1 −1 | gui/src/components/ui/tooltip.tsx | |
+6 −0 | gui/src/lib/utils.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/vs/workbench/browser/parts/overlay/pearOverlayActions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { registerAction2, Action2 } from "vs/platform/actions/common/actions"; | ||
import { ServicesAccessor } from "vs/platform/instantiation/common/instantiation"; | ||
import { IPearOverlayService } from "./pearOverlayService"; | ||
import { KeyCode, KeyMod } from "vs/base/common/keyCodes"; | ||
|
||
export class ClosePearOverlayAction extends Action2 { | ||
static readonly ID = "workbench.action.closePearAI"; | ||
|
||
constructor() { | ||
super({ | ||
id: ClosePearOverlayAction.ID, | ||
title: { value: "Close PearAI Popup", original: "Close PearAI Popup" }, | ||
f1: true, | ||
keybinding: { | ||
weight: 200, | ||
primary: KeyCode.Escape, | ||
}, | ||
}); | ||
} | ||
|
||
run(accessor: ServicesAccessor): void { | ||
const pearaiOverlayService = accessor.get(IPearOverlayService); | ||
pearaiOverlayService.hide(); | ||
} | ||
} | ||
|
||
export class TogglePearOverlayAction extends Action2 { | ||
static readonly ID = "workbench.action.togglePearAI"; | ||
|
||
constructor() { | ||
super({ | ||
id: TogglePearOverlayAction.ID, | ||
title: { value: "Toggle PearAI Popup", original: "Toggle PearAI Popup" }, | ||
f1: true, | ||
keybinding: { | ||
weight: 200, | ||
primary: KeyMod.CtrlCmd | KeyCode.KeyE, | ||
}, | ||
}); | ||
} | ||
|
||
run(accessor: ServicesAccessor): void { | ||
const pearaiOverlayService = accessor.get(IPearOverlayService); | ||
pearaiOverlayService.toggle(); | ||
} | ||
} | ||
|
||
registerAction2(TogglePearOverlayAction); | ||
registerAction2(ClosePearOverlayAction); |
Oops, something went wrong.