forked from trypear/pearai-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from trypear/main
Merge Main
- Loading branch information
Showing
11 changed files
with
475 additions
and
10 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
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.