forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 180
Feat: PearAI Creator View Facilitation #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1604945
feat: created creator overlay code container code
Acorn221 0f65fb6
Merge remote-tracking branch 'origin/main' into acorn/211-implement-p…
Acorn221 1ce9efa
WIP: message shows when the creator overview is toggled
Acorn221 70d269d
chore: commented code
Acorn221 59df0ca
WIP: Creator overlay
Acorn221 e60f037
fix: z-index/display issues when overlay is initialized
Acorn221 1070368
feat: added hideLoadingOverlay functionality to hide the loading mess…
Acorn221 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
120 changes: 120 additions & 0 deletions
120
src/vs/workbench/browser/parts/overlay/creatorView/creatorOverlayActions.ts
This file contains hidden or 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,120 @@ | ||
/* eslint-disable header/header */ | ||
|
||
import { | ||
registerAction2, | ||
Action2, | ||
} from "../../../../../platform/actions/common/actions.js"; | ||
import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js"; | ||
import { ICreatorOverlayService } from "./creatorOverlayService.js"; // Added .js extension | ||
import { KeyCode, KeyMod } from "../../../../../base/common/keyCodes.js"; | ||
// import { PearAICreatorVisibleContext } from "../../../../common/contextkeys.js"; | ||
|
||
export class HideCreatorLoadingOverlayAction extends Action2 { | ||
static readonly ID = "workbench.action.hideCreatorLoadingOverlay"; | ||
|
||
constructor() { | ||
super({ | ||
id: HideCreatorLoadingOverlayAction.ID, | ||
title: { | ||
value: "Close Creator Loading Overlay", | ||
original: "Close Creator Loading Overlay", | ||
}, | ||
f1: false, | ||
}); | ||
} | ||
|
||
run(accessor: ServicesAccessor): void { | ||
const creatorOverlayService = accessor.get(ICreatorOverlayService); | ||
creatorOverlayService.hideLoadingOverlay(); | ||
} | ||
} | ||
|
||
export class CloseCreatorOverlayAction extends Action2 { | ||
static readonly ID = "workbench.action.closeCreatorView"; | ||
|
||
constructor() { | ||
super({ | ||
id: CloseCreatorOverlayAction.ID, | ||
title: { | ||
value: "Close Creator View Popup", | ||
original: "Close Creator View Popup", | ||
}, | ||
f1: true, | ||
keybinding: { | ||
weight: 210, | ||
primary: KeyCode.Escape, | ||
// when: PearAICreatorVisibleContext, | ||
}, | ||
}); | ||
} | ||
|
||
run(accessor: ServicesAccessor): void { | ||
const creatorOverlayService = accessor.get(ICreatorOverlayService); | ||
creatorOverlayService.hide(); | ||
} | ||
} | ||
|
||
export class ToggleCreatorOverlayAction extends Action2 { | ||
static readonly ID = "workbench.action.toggleCreatorView"; | ||
|
||
constructor() { | ||
super({ | ||
id: ToggleCreatorOverlayAction.ID, | ||
title: { | ||
value: "Toggle Creator View Popup", | ||
original: "Toggle Creator View Popup", | ||
}, | ||
f1: true, | ||
keybinding: { | ||
weight: 200, | ||
primary: KeyMod.CtrlCmd | KeyCode.KeyE, | ||
}, | ||
}); | ||
} | ||
|
||
run(accessor: ServicesAccessor): void { | ||
const creatorOverlayService = accessor.get(ICreatorOverlayService); | ||
creatorOverlayService.toggle(); | ||
} | ||
} | ||
|
||
export class LockCreatorOverlayAction extends Action2 { | ||
static readonly ID = "workbench.action.lockCreatorView"; | ||
|
||
constructor() { | ||
super({ | ||
id: LockCreatorOverlayAction.ID, | ||
title: { value: "Lock Creator View", original: "Lock Creator View" }, | ||
f1: true, | ||
}); | ||
} | ||
|
||
run(accessor: ServicesAccessor): void { | ||
const creatorOverlayService = accessor.get(ICreatorOverlayService); | ||
creatorOverlayService.lock(); | ||
} | ||
} | ||
|
||
export class UnlockCreatorOverlayAction extends Action2 { | ||
static readonly ID = "workbench.action.unlockCreatorView"; | ||
|
||
constructor() { | ||
super({ | ||
id: UnlockCreatorOverlayAction.ID, | ||
title: { value: "Unlock Creator View", original: "Unlock Creator View" }, | ||
f1: true, | ||
}); | ||
} | ||
|
||
run(accessor: ServicesAccessor): void { | ||
const creatorOverlayService = accessor.get(ICreatorOverlayService); | ||
creatorOverlayService.unlock(); | ||
} | ||
} | ||
|
||
// Register all actions | ||
registerAction2(CloseCreatorOverlayAction); | ||
registerAction2(ToggleCreatorOverlayAction); | ||
registerAction2(LockCreatorOverlayAction); | ||
registerAction2(UnlockCreatorOverlayAction); | ||
registerAction2(HideCreatorLoadingOverlayAction); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.