diff --git a/.gitignore b/.gitignore index 74e52369abf16..bcce54865f0fa 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ product.overrides.json .vscode-test extensions/pearai-submodule extensions/pearai-ref +.prompts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 464c6234d895c..baf5f1d8b2827 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -146,16 +146,16 @@ You can also directly ping the maintainers or admins in the [Discord](https://di ## ⚙️ Packaging -This section outlines how to package the app for a new release/distribution. This process is a bit manual currently. +This section outlines how to the app for a new release/distribution. This process is a bit manual currently. -### Step 1: Package PearAI App +### Step 1: PearAI App -PearAI can be packaged for the following platforms: `win32-ia32 | win32-x64 | darwin-x64 | darwin-arm64 | linux-ia32 | linux-x64 | linux-arm`. +PearAI can be d for the following platforms: `win32-ia32 | win32-x64 | darwin-x64 | darwin-arm64 | linux-ia32 | linux-x64 | linux-arm`. These `gulp` tasks are available: -- `vscode-[platform]`: Builds a packaged version for `[platform]`. -- `vscode-[platform]-min`: Builds a packaged and minified version for `[platform]`. +- `vscode-[platform]`: Builds a d version for `[platform]`. +- `vscode-[platform]-min`: Builds a d and minified version for `[platform]`. 1. If you have not already, run `./scripts/pearai/setup-environment.[sh,ps1]`. 2. If already ran that upon your first install, run `./scripts/pearai/install-dependencies.[sh,ps1]`. @@ -176,9 +176,14 @@ This will generate the new PearAI app and takes around 1 hour. ### Step 3: Integrate the Extension -1. Copy the contents of the generated `extensions` folder into the `extensions/` folder of the packaged PearAI App. +1. Copy the generated `pearai.pearai-1.x.x` folder under `~/.vscode/extensions` to the `extensions` folder of the packaged PearAI App (right click on packaged app -> Show Package Contents). 2. Delete any existing `pearai-submodule` folder in the `extensions/` folder of the packaged PearAI app. 3. Double-click your overall PearAI app, and the extension should be built-in. + - On MacOS for example (Using VScode for .vsix installation) + 1. `cp -r ~/.vscode/extensions/pearai.pearai-{PEARAI_VERSION} {PATH_TO_PearAI.app}/Contents/Resources/app/extension` + 2. `rm -rf {PATH_TO_PearAI.app}/Contents/Resources/app/extensions/pearai-submodule ` + 3. Double-click your overall PearAI app, and the extension should be built-in. + ### Step 4: Signing and Turn Into Installer diff --git a/README.md b/README.md index 472f6a9c44fd2..15c7d774b2d70 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,13 @@ # PearAI: The Open Source AI-Powered Code Editor -Supercharge your development with an editor designed for less coding, using AI. PearAI is forked from VSCode and Continue, and aims to reduce the time from ideation to conception for your product development by achieving the most seamless integration with AI. +## Note: This is our fork of VSCode. Our main functionality lives in our submodule, which you can find here: https://github.com/trypear/pearai-submodule. The number of commits to this repository will be fewer than our submodule. -To download the full product visit our homepage at https://trypear.ai. +Supercharge your development with an editor designed for less coding, using AI. PearAI is a fork of VSCode, and PearAI Submodule (https://github.com/trypear/pearai-submodule) is a fork of Continue. This is our starting point, and we aim to reduce the time from ideation to conception for your product development by achieving the most seamless integration with AI. -# Prerequisites - -Get an API key from your favourite LLM provider. To obtain an OpenAI API key go to [platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys). +To download the full app, visit our homepage at https://trypear.ai. ## Features -* **Knows your code** - Pear has context on your database so you can ask questions about your code. +* **Knows your code** - Pear has context on your codebase so you can ask questions directly (code is stored locally on your computer). * **UI/UX focused** - Pear puts the user experience first, making developing as seamless as possible. * **Familiar feel** - Pear is a fork of VSCode, so you can pick up exactly where you left off. @@ -22,7 +20,7 @@ Our [Master Document](https://docs.google.com/document/d/14jusGNbGRPT8X6GgEDbP1i ## Contributing We welcome contributions from the community! Whether you're fixing a bug, improving the documentation, or adding a new feature, we appreciate your help in making PearAI better. There is a lot of context involved and we understand it can be overwhelming when first trying to join the project. Here is a quick summary of key information and how we currently work together: -- Pan and Nang conduct "Quests", which are 1-3 weeks sprints. We will pick out the current highest priority issues for these quests, ping everyone in our [Discord]([url](https://discord.gg/7QMraJUsQt)), and ask for applications to participate in them. The chosen people will help finish the tasks alongside us, participating in calls and working together. If help is needed, we may add more people to the quest. +- Pan and Nang conduct "Quests", which are 1-3 weeks sprints. We will pick out the current highest priority issues for these quests, ping everyone in our [Discord]([url](https://discord.gg/7QMraJUsQt)), and ask for applications to participate in them. The chosen people will help finish the tasks alongside us, participating in calls and working together. If help is needed, we may add more people to the quest. You can see the current open quests [here](https://github.com/orgs/trypear/projects?query=is%3Aopen). - Outside of dedicated Quests, we also have a bunch of issues ([good first ones](https://github.com/trypear/pearai-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)) which are free to tackle. Make sure to leave a comment indicating you're working on it (check for existing comments also). You can raise a PR anytime and we usually review them pretty quickly. - We have a lot on our plate so it's easy for us to miss something. The best way to get our attention is to ping us directly in our Discord server. @@ -81,6 +79,24 @@ Thanks to these wonderful people who have contributed to this project: - [Justain-Train](https://github.com/Justain-Train) - [anisharaz](https://github.com/anisharaz) - [sea-lene](https://github.com/sea-lene) +- [wflore19](https://github.com/wflore19) +- [MaxFSP](https://github.com/MaxFSP) +- [AdityaBhate](https://github.com/AdityaBhate) +- [jpan8866](https://github.com/jpan8866) +- [somwrks](https://github.com/somwrks) +- [seanlodhammar](https://github.com/seanlodhammar) +- [Yashasewi](https://github.com/Yashasewi) +- [jespiron](https://github.com/jespiron) +- [Pockylee](https://github.com/Pockylee) +- [quangcito](https://github.com/quangcito) +- [oracle-code](https://github.com/oracle-code) +- [Hi-Van](https://github.com/Hi-Van) +- [jeffrey-zang](https://github.com/jeffrey-zang) +- [MitchTM17](https://github.com/MitchTM17) +- [Alvarixxs](https://github.com/Alvarixxs) +- [vedantgrover](https://github.com/vedantgrover) +- [Vincexodus](https://github.com/Vincexodus) +- [AkMoh](https://github.com/AkMoh) Feel free to join them and contribute! diff --git a/extensions/pearai-submodule b/extensions/pearai-submodule index 38f18484d6f0d..14cbe49a2774e 160000 --- a/extensions/pearai-submodule +++ b/extensions/pearai-submodule @@ -1 +1 @@ -Subproject commit 38f18484d6f0d702af09b12f8ea82bafe4509497 +Subproject commit 14cbe49a2774ec61ce81e64db75bb4347b07b989 diff --git a/extensions/theme-defaults/package.json b/extensions/theme-defaults/package.json index 2458ef317da70..f2ebd470f0910 100644 --- a/extensions/theme-defaults/package.json +++ b/extensions/theme-defaults/package.json @@ -13,6 +13,12 @@ }, "contributes": { "themes": [ + { + "id": "Default PearAI Dark", + "label": "%pearAIDarkThemeLabel%", + "uiTheme": "vs-dark", + "path": "./themes/pearai_dark.json" + }, { "id": "Default Dark+", "label": "%darkPlusColorThemeLabel%", @@ -25,6 +31,12 @@ "uiTheme": "vs-dark", "path": "./themes/dark_modern.json" }, + { + "id": "Default PearAI Light", + "label": "%pearAILightThemeLabel%", + "uiTheme": "vs", + "path": "./themes/pearai_light.json" + }, { "id": "Default Light+", "label": "%lightPlusColorThemeLabel%", @@ -43,6 +55,12 @@ "uiTheme": "vs-dark", "path": "./themes/dark_vs.json" }, + { + "id": "Hacker", + "label": "Hacker", + "uiTheme": "vs-dark", + "path": "./themes/hacker.json" + }, { "id": "Visual Studio Light", "label": "%lightColorThemeLabel%", diff --git a/extensions/theme-defaults/package.nls.json b/extensions/theme-defaults/package.nls.json index cacbd6b8d9a87..c4f2a340e7d40 100644 --- a/extensions/theme-defaults/package.nls.json +++ b/extensions/theme-defaults/package.nls.json @@ -1,8 +1,10 @@ { "displayName": "Default Themes", "description": "The default Visual Studio light and dark themes", + "pearAIDarkThemeLabel": "PearAI Dark", "darkPlusColorThemeLabel": "Dark+", "darkModernThemeLabel": "Dark Modern", + "pearAILightThemeLabel": "PearAI Light", "lightPlusColorThemeLabel": "Light+", "lightModernThemeLabel": "Light Modern", "darkColorThemeLabel": "Dark (Visual Studio)", diff --git a/extensions/theme-defaults/themes/hacker.json b/extensions/theme-defaults/themes/hacker.json new file mode 100644 index 0000000000000..0f1a00df56aa3 --- /dev/null +++ b/extensions/theme-defaults/themes/hacker.json @@ -0,0 +1,666 @@ +{ + "name": "Hacker", + "colors": { + "editor.background": "#14050C", + "editor.foreground": "#98D99B", + "editor.lineHighlightBorder": "#731440", + "activityBarBadge.background": "#731440", + "sideBarTitle.foreground": "#98D99B", + "sideBar.border": "#98D99B", + "menu.border": "#98D99B", + "menubar.selectionBackground": "#731440", + "activityBar.border": "#98D99B", + "titleBar.border": "#98D99B", + "tab.border": "#98D99B", + "input.border": "#98D99B", + "terminal.border": "#98D99B", + "sideBar.background": "#14050C", + "sideBar.foreground": "#D6F0D7", + "sideBarSectionHeader.background": "#731440", + "titleBar.activeBackground": "#0D0508", + "titleBar.activeForeground": "#98D99B", + "tab.inactiveBackground": "#333333", + "tab.inactiveForeground": "#aaa", + "tab.activeBackground": "#0D0508", + "tab.activeForeground": "#CC528B", + "activityBar.foreground": "#98D99B", + "activityBar.background": "#0D0508", + "button.background": "#98D99B", + "button.foreground": "#731440", + "button.hoverBackground": "#CC528B", + "textLink.activeForeground": "#CC528B", + "textLink.foreground": "#98D99B", + "inputOption.activeBorder": "#CC528B", + "focusBorder": "#CC528B", + "terminal.foreground": "#98D99B", + "terminalCursor.foreground": "#CC528B", + "panel.border": "#98D99B", + "panel.background": "#0D0508", + "panelTitle.activeBorder": "#CC528B", + "panelTitle.activeForeground": "#8ED926", + "menu.background": "#14050C", + "menu.foreground": "#98D99B", + "menu.selectionBackground": "#0D0508", + "menu.selectionForeground": "#CC528B", + "banner.background": "#731440" + }, + "tokenColors": [ + { + "name": "Comment", + "scope": [ + "comment", + "punctuation.definition.comment" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#546E7A" + } + }, + { + "name": "Variables", + "scope": [ + "variable", + "string constant.other.placeholder" + ], + "settings": { + "foreground": "#D6F0D7" + } + }, + { + "name": "Colors", + "scope": [ + "constant.other.color" + ], + "settings": { + "foreground": "#ffffff" + } + }, + { + "name": "Invalid", + "scope": [ + "invalid", + "invalid.illegal" + ], + "settings": { + "foreground": "#DE6A64" + } + }, + { + "name": "Keyword, Storage", + "scope": [ + "keyword", + "storage.type", + "storage.modifier" + ], + "settings": { + "foreground": "#CC528B" + } + }, + { + "name": "Operator, Misc", + "scope": [ + "keyword.control", + "constant.other.color", + "punctuation", + "meta.tag", + "punctuation.definition.tag", + "punctuation.separator.inheritance.php", + "punctuation.definition.tag.html", + "punctuation.definition.tag.begin.html", + "punctuation.definition.tag.end.html", + "punctuation.section.embedded", + "keyword.other.template", + "keyword.other.substitution" + ], + "settings": { + "foreground": "#98D99B" + } + }, + { + "name": "Tag", + "scope": [ + "entity.name.tag", + "meta.tag.sgml", + "markup.deleted.git_gutter" + ], + "settings": { + "foreground": "#CC528B" + } + }, + { + "name": "Function, Special Method", + "scope": [ + "entity.name.function", + "meta.function-call", + "variable.function", + "support.function", + "keyword.other.special-method" + ], + "settings": { + "foreground": "#98D99B" + } + }, + { + "name": "Block Level Variables", + "scope": [ + "meta.block variable.other" + ], + "settings": { + "foreground": "#8ED926" + } + }, + { + "name": "Other Variable, String Link", + "scope": [ + "support.other.variable", + "string.other.link" + ], + "settings": { + "foreground": "#8ED926" + } + }, + { + "name": "Number, Constant, Function Argument, Tag Attribute, Embedded", + "scope": [ + "constant.numeric", + "constant.language", + "support.constant", + "constant.character", + "constant.escape", + "variable.parameter", + "keyword.other.unit", + "keyword.other" + ], + "settings": { + "foreground": "#8ED926" + } + }, + { + "name": "String, Symbols, Inherited Class, Markup Heading", + "scope": [ + "string", + "constant.other.symbol", + "constant.other.key", + "entity.other.inherited-class", + "markup.heading", + "markup.inserted.git_gutter", + "meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js" + ], + "settings": { + "foreground": "#F3E492" + } + }, + { + "name": "Class, Support", + "scope": [ + "entity.name", + "support.type", + "support.class", + "support.other.namespace.use.php", + "meta.use.php", + "support.other.namespace.php", + "markup.changed.git_gutter", + "support.type.sys-types" + ], + "settings": { + "foreground": "#fff" + } + }, + { + "name": "Entity Types", + "scope": [ + "support.type" + ], + "settings": { + "foreground": "#D6F0D7" + } + }, + { + "name": "CSS Class and Support", + "scope": [ + "source.css support.type.property-name", + "source.sass support.type.property-name", + "source.scss support.type.property-name", + "source.less support.type.property-name", + "source.stylus support.type.property-name", + "source.postcss support.type.property-name" + ], + "settings": { + "foreground": "#D6F0D7" + } + }, + { + "name": "Sub-methods", + "scope": [ + "entity.name.module.js", + "variable.import.parameter.js", + "variable.other.class.js" + ], + "settings": { + "foreground": "#FF5370" + } + }, + { + "name": "Language methods", + "scope": [ + "variable.language" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FF5370" + } + }, + { + "name": "entity.name.method.js", + "scope": [ + "entity.name.method.js" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#82AAFF" + } + }, + { + "name": "meta.method.js", + "scope": [ + "meta.class-method.js entity.name.function.js", + "variable.function.constructor" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Attributes", + "scope": [ + "entity.other.attribute-name" + ], + "settings": { + "foreground": "#8ED926" + } + }, + { + "name": "HTML Attributes", + "scope": [ + "text.html.basic entity.other.attribute-name.html", + "text.html.basic entity.other.attribute-name" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#8ED926" + } + }, + { + "name": "CSS Classes", + "scope": [ + "entity.other.attribute-name.class" + ], + "settings": { + "foreground": "#8ED926" + } + }, + { + "name": "CSS ID's", + "scope": [ + "source.sass keyword.control" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Inserted", + "scope": [ + "markup.inserted" + ], + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Deleted", + "scope": [ + "markup.deleted" + ], + "settings": { + "foreground": "#FF5370" + } + }, + { + "name": "Changed", + "scope": [ + "markup.changed" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Regular Expressions", + "scope": [ + "string.regexp" + ], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "Escape Characters", + "scope": [ + "constant.character.escape" + ], + "settings": { + "foreground": "#89DDFF" + } + }, + { + "name": "URL", + "scope": [ + "*url*", + "*link*", + "*uri*" + ], + "settings": { + "fontStyle": "underline" + } + }, + { + "name": "Decorators", + "scope": [ + "tag.decorator.js entity.name.tag.js", + "tag.decorator.js punctuation.definition.tag.js" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#82AAFF" + } + }, + { + "name": "ES7 Bind Operator", + "scope": [ + "source.js constant.other.object.key.js string.unquoted.label.js" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#FF5370" + } + }, + { + "name": "JSON Key - Level 0", + "scope": [ + "source.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#CC528B" + } + }, + { + "name": "JSON Key - Level 1", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#F3E492" + } + }, + { + "name": "JSON Key - Level 2", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#DE6A64" + } + }, + { + "name": "JSON Key - Level 3", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#8ED926" + } + }, + { + "name": "JSON Key - Level 4", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#D6F0D7" + } + }, + { + "name": "JSON Key - Level 5", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#f07178" + } + }, + { + "name": "JSON Key - Level 6", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#98D99B" + } + }, + { + "name": "JSON Key - Level 7", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "JSON Key - Level 8", + "scope": [ + "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" + ], + "settings": { + "foreground": "#FFF" + } + }, + { + "name": "Markdown - Plain", + "scope": [ + "text.html.markdown", + "punctuation.definition.list_item.markdown" + ], + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Markdown - Markup Raw Inline", + "scope": [ + "text.html.markdown markup.inline.raw.markdown" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Markdown - Markup Raw Inline Punctuation", + "scope": [ + "text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown" + ], + "settings": { + "foreground": "#65737E" + } + }, + { + "name": "Markdown - Heading", + "scope": [ + "markdown.heading", + "markup.heading | markup.heading entity.name", + "markup.heading.markdown punctuation.definition.heading.markdown" + ], + "settings": { + "foreground": "#C3E88D" + } + }, + { + "name": "Markup - Italic", + "scope": [ + "markup.italic" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#f07178" + } + }, + { + "name": "Markup - Bold", + "scope": [ + "markup.bold", + "markup.bold string" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#f07178" + } + }, + { + "name": "Markup - Bold-Italic", + "scope": [ + "markup.bold markup.italic", + "markup.italic markup.bold", + "markup.quote markup.bold", + "markup.bold markup.italic string", + "markup.italic markup.bold string", + "markup.quote markup.bold string" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#f07178" + } + }, + { + "name": "Markup - Underline", + "scope": [ + "markup.underline" + ], + "settings": { + "fontStyle": "underline", + "foreground": "#F78C6C" + } + }, + { + "name": "Markdown - Blockquote", + "scope": [ + "markup.quote punctuation.definition.blockquote.markdown" + ], + "settings": { + "foreground": "#98D99B" + } + }, + { + "name": "Markup - Quote", + "scope": [ + "markup.quote" + ], + "settings": { + "fontStyle": "italic" + } + }, + { + "name": "Markdown - Link", + "scope": [ + "string.other.link.title.markdown" + ], + "settings": { + "foreground": "#82AAFF" + } + }, + { + "name": "Markdown - Link Description", + "scope": [ + "string.other.link.description.title.markdown" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Markdown - Link Anchor", + "scope": [ + "constant.other.reference.link.markdown" + ], + "settings": { + "foreground": "#FFCB6B" + } + }, + { + "name": "Markup - Raw Block", + "scope": [ + "markup.raw.block" + ], + "settings": { + "foreground": "#C792EA" + } + }, + { + "name": "Markdown - Raw Block Fenced", + "scope": [ + "markup.raw.block.fenced.markdown" + ], + "settings": { + "foreground": "#00000050" + } + }, + { + "name": "Markdown - Fenced Bode Block", + "scope": [ + "punctuation.definition.fenced.markdown" + ], + "settings": { + "foreground": "#00000050" + } + }, + { + "name": "Markdown - Fenced Bode Block Variable", + "scope": [ + "markup.raw.block.fenced.markdown", + "variable.language.fenced.markdown", + "punctuation.section.class.end" + ], + "settings": { + "foreground": "#EEFFFF" + } + }, + { + "name": "Markdown - Fenced Language", + "scope": [ + "variable.language.fenced.markdown" + ], + "settings": { + "foreground": "#65737E" + } + }, + { + "name": "Markdown - Separator", + "scope": [ + "meta.separator" + ], + "settings": { + "fontStyle": "bold", + "foreground": "#98D99B" + } + }, + { + "name": "Markup - Table", + "scope": [ + "markup.table" + ], + "settings": { + "foreground": "#EEFFFF" + } + } + ] +} diff --git a/extensions/theme-defaults/themes/pearai_dark.json b/extensions/theme-defaults/themes/pearai_dark.json new file mode 100644 index 0000000000000..5ad9b7b4f5d11 --- /dev/null +++ b/extensions/theme-defaults/themes/pearai_dark.json @@ -0,0 +1,518 @@ +{ + "name": "PearAI Dark", + "tokenColors": [ + { + "settings": { + "foreground": "#839496" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#839496" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "italic", + "foreground": "#586E75" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#2AA198" + } + }, + { + "name": "Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Variable", + "scope": [ + "variable.language", + "variable.other" + ], + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "bold", + "foreground": "#93A1A1" + } + }, + { + "name": "Class name", + "scope": [ + "entity.name.class", + "entity.name.type", + "entity.name.namespace", + "entity.name.scope-resolution" + ], + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Variable start", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Embedded code markers", + "scope": [ + "punctuation.section.embedded.begin", + "punctuation.section.embedded.end" + ], + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "meta.preprocessor" + ], + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Support.construct", + "scope": [ + "support.function.construct", + "keyword.other.new" + ], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "User-defined constant", + "scope": [ + "constant.character", + "constant.other" + ], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#6C71C4" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": {} + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Tag start/end", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#586E75" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Continuation", + "scope": "punctuation.separator.continuation", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Library constant", + "scope": [ + "support.constant", + "support.variable" + ], + "settings": {} + }, + { + "name": "Library class/type", + "scope": [ + "support.type", + "support.class" + ], + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Library Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": {} + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "diff: header", + "scope": [ + "meta.diff", + "meta.diff.header" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#268BD2" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "fontStyle": "", + "foreground": "#DC322F" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Markup Styling", + "scope": [ + "markup.bold", + "markup.italic" + ], + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Markup: Strong", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup: Emphasis", + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#2AA198" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#268BD2" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#268BD2" + } + } + ], + "colors": { + // Base + // "foreground": "", + "focusBorder": "#2AA19899", + // "contrastActiveBorder": "", + // "contrastBorder": "", + + // "widget.shadow": "", + + "selection.background": "#2AA19899", + + "input.background": "#003847", + "input.foreground": "#93A1A1", + "input.placeholderForeground": "#93A1A1AA", + // "input.border": "", + + "inputOption.activeBorder": "#2AA19899", + "inputValidation.infoBorder": "#363b5f", + "inputValidation.infoBackground": "#052730", + "inputValidation.warningBackground": "#5d5938", + "inputValidation.warningBorder": "#9d8a5e", + "inputValidation.errorBackground": "#571b26", + "inputValidation.errorBorder": "#a92049", + + "errorForeground": "#ffeaea", + + "badge.background": "#047aa6", + "progressBar.background": "#047aa6", + + "dropdown.background": "#00212B", + "dropdown.border": "#2AA19899", + // "dropdown.foreground": "", + + "button.background": "#2AA19899", + // "button.foreground": "", + + "list.activeSelectionBackground": "#005A6F", + // "list.activeSelectionForeground": "", + "quickInputList.focusBackground": "#005A6F", + "list.hoverBackground": "#004454AA", + "list.inactiveSelectionBackground": "#00445488", + "list.dropBackground": "#00445488", + "list.highlightForeground": "#1ebcc5", + + // "scrollbar.shadow": "", + // "scrollbarSlider.activeBackground": "", + // "scrollbarSlider.background": "", + // "scrollbarSlider.hoverBackground": "", + + // Editor + "editor.background": "#002B36", + "editor.foreground": "#839496", + "editorWidget.background": "#00212B", + "editorCursor.foreground": "#D30102", + "editorWhitespace.foreground": "#93A1A180", + "editor.lineHighlightBackground": "#073642", + "editorLineNumber.activeForeground": "#949494", + "editor.selectionBackground": "#274642", + "minimap.selectionHighlight": "#274642", + "editorIndentGuide.background": "#93A1A180", + "editorIndentGuide.activeBackground": "#C3E1E180", + "editorHoverWidget.background": "#004052", + // "editorHoverWidget.border": "", + // "editorLineNumber.foreground": "", + // "editorMarkerNavigation.background": "", + "editorMarkerNavigationError.background": "#AB395B", + "editorMarkerNavigationWarning.background": "#5B7E7A", + // "editorLink.activeForeground": "", + // "editor.findMatchBackground": "", + // "editor.findMatchHighlightBackground": "", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + // "editor.rangeHighlightBackground": "", + "editor.selectionHighlightBackground": "#005A6FAA", + "editor.wordHighlightBackground": "#004454AA", + "editor.wordHighlightStrongBackground": "#005A6FAA", + + // Editor: Colorized Bracket Highlighting + "editorBracketHighlight.foreground1": "#cdcdcdff", + "editorBracketHighlight.foreground2": "#b58900ff", + "editorBracketHighlight.foreground3": "#d33682ff", + + // Editor: Suggest + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", + + // Editor: Peek View + "peekViewResult.background": "#00212B", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#10192c", + "peekViewTitle.background": "#00212B", + "peekView.border": "#2b2b4a", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + // "peekViewResult.fileForeground": "", + // "peekViewResult.matchHighlightBackground": "", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", + + // Editor: Diff + // "diffEditor.insertedTextBackground": "", + // "diffEditor.insertedTextBorder": "", + // "diffEditor.removedTextBackground": "", + // "diffEditor.removedTextBorder": "", + + // Workbench: Title + "titleBar.activeBackground": "#002C39", + // "titleBar.inactiveBackground": "", + // "titleBar.activeForeground": "", + // "titleBar.inactiveForeground": "", + + // Workbench: Editors + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#00212B", + "editorGroup.dropBackground": "#2AA19844", + "editorGroupHeader.tabsBackground": "#004052", + + // Workbench: Tabs + "tab.activeForeground": "#d6dbdb", + "tab.activeBackground": "#002B37", + "tab.inactiveForeground": "#93A1A1", + "tab.inactiveBackground": "#004052", + "tab.border": "#003847", + "tab.lastPinnedBorder": "#2AA19844", + + // Workbench: Activity Bar + "activityBar.background": "#003847", + // "activityBarBadge.background": "", + // "activityBar.foreground": "", + // "activityBarBadge.foreground": "", + + // Workbench: Panel + // "panel.background": "", + "panel.border": "#2b2b4a", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", + + // Workbench: Side Bar + "sideBar.background": "#00212B", + "sideBarTitle.foreground": "#93A1A1", + // "sideBarSectionHeader.background": "", + + // Workbench: Status Bar + "statusBar.foreground": "#93A1A1", + "statusBar.background": "#00212B", + "statusBar.debuggingBackground": "#00212B", + "statusBar.noFolderBackground": "#00212B", + "statusBarItem.remoteBackground": "#2AA19899", + "ports.iconRunningProcessForeground": "#369432", + "statusBarItem.prominentBackground": "#003847", + "statusBarItem.prominentHoverBackground": "#003847", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", + + // Workbench: Debug + "debugToolBar.background": "#00212B", + "debugExceptionWidget.background": "#00212B", + "debugExceptionWidget.border": "#AB395B", + + // Workbench: Quick Open + "pickerGroup.foreground": "#2AA19899", + "pickerGroup.border": "#2AA19899", + + // Workbench: Terminal + // Colors sourced from the official palette http://ethanschoonover.com/solarized + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" + }, + "semanticHighlighting": true +} diff --git a/extensions/theme-defaults/themes/pearai_light.json b/extensions/theme-defaults/themes/pearai_light.json new file mode 100644 index 0000000000000..fadc61884fa45 --- /dev/null +++ b/extensions/theme-defaults/themes/pearai_light.json @@ -0,0 +1,500 @@ +{ + "name": "PearAI Light", + "tokenColors": [ + { + "settings": { + "foreground": "#657B83" + } + }, + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#657B83" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "italic", + "foreground": "#93A1A1" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#2AA198" + } + }, + { + "name": "Regexp", + "scope": "string.regexp", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Variable", + "scope": [ + "variable.language", + "variable.other" + ], + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "bold", + "foreground": "#586E75" + } + }, + { + "name": "Class name", + "scope": [ + "entity.name.class", + "entity.name.type", + "entity.name.namespace", + "entity.name.scope-resolution" + ], + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Variable start", + "scope": "punctuation.definition.variable", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Embedded code markers", + "scope": [ + "punctuation.section.embedded.begin", + "punctuation.section.embedded.end" + ], + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Built-in constant", + "scope": [ + "constant.language", + "meta.preprocessor" + ], + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Support.construct", + "scope": [ + "support.function.construct", + "keyword.other.new" + ], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "User-defined constant", + "scope": [ + "constant.character", + "constant.other" + ], + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "foreground": "#6C71C4" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": {} + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Tag start/end", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#93A1A1" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "foreground": "#268BD2" + } + }, + { + "name": "Continuation", + "scope": "punctuation.separator.continuation", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "Library constant", + "scope": [ + "support.constant", + "support.variable" + ], + "settings": {} + }, + { + "name": "Library class/type", + "scope": [ + "support.type", + "support.class" + ], + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Library Exception", + "scope": "support.type.exception", + "settings": { + "foreground": "#CB4B16" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": {} + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "foreground": "#DC322F" + } + }, + { + "name": "diff: header", + "scope": [ + "meta.diff", + "meta.diff.header" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#268BD2" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "fontStyle": "", + "foreground": "#DC322F" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "fontStyle": "", + "foreground": "#CB4B16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#859900" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#B58900" + } + }, + { + "name": "Markup Styling", + "scope": [ + "markup.bold", + "markup.italic" + ], + "settings": { + "foreground": "#D33682" + } + }, + { + "name": "Markup: Strong", + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "name": "Markup: Emphasis", + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#2AA198" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#268BD2" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#268BD2" + } + } + ], + "colors": { + // Base + // "foreground": "", + "focusBorder": "#b49471", + // "contrastActiveBorder": "", + // "contrastBorder": "", + // "widget.shadow": "", + "input.background": "#DDD6C1", + // "input.border": "", + "input.foreground": "#586E75", + "input.placeholderForeground": "#586E75AA", + "inputOption.activeBorder": "#D3AF86", + // "inputValidation.infoBorder": "", + // "inputValidation.infoBackground": "", + // "inputValidation.warningBackground": "", + // "inputValidation.warningBorder": "", + // "inputValidation.errorBackground": "", + // "inputValidation.errorBorder": "", + "badge.background": "#B58900AA", + "progressBar.background": "#B58900", + "dropdown.background": "#EEE8D5", + // "dropdown.foreground": "", + "dropdown.border": "#D3AF86", + "button.background": "#AC9D57", + // "button.foreground": "", + "selection.background": "#878b9180", + "list.activeSelectionBackground": "#DFCA88", + "list.activeSelectionForeground": "#6C6C6C", + "quickInputList.focusBackground": "#DFCA8866", + "list.hoverBackground": "#DFCA8844", + "list.inactiveSelectionBackground": "#D1CBB8", + "list.highlightForeground": "#B58900", + // "scrollbar.shadow": "", + // "scrollbarSlider.activeBackground": "", + // "scrollbarSlider.background": "", + // "scrollbarSlider.hoverBackground": "", + // Editor + "editor.background": "#FDF6E3", + "editor.foreground": "#657B83", + "notebook.cellEditorBackground": "#F7F0E0", + "editorWidget.background": "#EEE8D5", + "editorCursor.foreground": "#657B83", + "editorWhitespace.foreground": "#586E7580", + "editor.lineHighlightBackground": "#EEE8D5", + "editor.selectionBackground": "#EEE8D5", + "minimap.selectionHighlight": "#EEE8D5", + "editorIndentGuide.background": "#586E7580", + "editorIndentGuide.activeBackground": "#081E2580", + "editorHoverWidget.background": "#CCC4B0", + "editorLineNumber.activeForeground": "#567983", + // "editorHoverWidget.border": "", + // "editorLineNumber.foreground": "", + // "editorMarkerNavigation.background": "", + // "editorMarkerNavigationError.background": "", + // "editorMarkerNavigationWarning.background": "", + // "editorLink.activeForeground": "", + // "editor.findMatchBackground": "", + // "editor.findMatchHighlightBackground": "", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + // "editor.rangeHighlightBackground": "", + // "editor.selectionHighlightBackground": "", + // "editor.wordHighlightBackground": "", + // "editor.wordHighlightStrongBackground": "", + // Editor: Suggest Widget + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", + // Editor: Peek View + "peekViewResult.background": "#EEE8D5", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#FFFBF2", + "peekViewTitle.background": "#EEE8D5", + "peekView.border": "#B58900", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + // "peekViewResult.fileForeground": "", + // "peekViewResult.matchHighlightBackground": "", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", + // Editor: Diff + // "diffEditor.insertedTextBackground": "", + // "diffEditor.insertedTextBorder": "", + // "diffEditor.removedTextBackground": "", + // "diffEditor.removedTextBorder": "", + // Workbench: Title + "titleBar.activeBackground": "#EEE8D5", + // "titleBar.activeForeground": "", + // "titleBar.inactiveBackground": "", + // "titleBar.inactiveForeground": "", + // Workbench: Editors + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#DDD6C1", + "editorGroup.dropBackground": "#DDD6C1AA", + "editorGroupHeader.tabsBackground": "#D9D2C2", + // Workbench: Tabs + "tab.border": "#DDD6C1", + "tab.activeBackground": "#FDF6E3", + "tab.inactiveForeground": "#586E75", + "tab.inactiveBackground": "#D3CBB7", + "tab.activeModifiedBorder": "#cb4b16", + // "tab.activeBackground": "", + // "tab.activeForeground": "", + // "tab.inactiveForeground": "", + "tab.lastPinnedBorder": "#FDF6E3", + // Workbench: Activity Bar + "activityBar.background": "#DDD6C1", + "activityBar.foreground": "#584c27", + "activityBarBadge.background": "#B58900", + // "activityBarBadge.foreground": "", + // Workbench: Panel + // "panel.background": "", + "panel.border": "#DDD6C1", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", + // Workbench: Side Bar + "sideBar.background": "#EEE8D5", + "sideBarTitle.foreground": "#586E75", + // "sideBarSectionHeader.background": "", + // Workbench: Status Bar + "statusBar.foreground": "#586E75", + "statusBar.background": "#EEE8D5", + "statusBar.debuggingBackground": "#EEE8D5", + "statusBar.noFolderBackground": "#EEE8D5", + // "statusBar.foreground": "", + "statusBarItem.remoteBackground": "#AC9D57", + "ports.iconRunningProcessForeground": "#2AA19899", + "statusBarItem.prominentBackground": "#DDD6C1", + "statusBarItem.prominentHoverBackground": "#DDD6C199", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", + // Workbench: Debug + "debugToolBar.background": "#DDD6C1", + "debugExceptionWidget.background": "#DDD6C1", + "debugExceptionWidget.border": "#AB395B", + // Workbench: Quick Open + "pickerGroup.border": "#2AA19899", + "pickerGroup.foreground": "#2AA19899", + // Extensions + "extensionButton.prominentBackground": "#b58900", + "extensionButton.prominentHoverBackground": "#584c27aa", + // Workbench: Terminal + // Colors sourced from the official palette http://ethanschoonover.com/solarized + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3", + // Set terminal background explicitly, otherwise selection becomes invisible when the + // terminal is in the side bar + "terminal.background": "#FDF6E3", + // Interactive Playground + "walkThrough.embeddedEditorBackground": "#00000014" + }, + "semanticHighlighting": true +} diff --git a/extensions/theme-solarized-dark/package.json b/extensions/theme-solarized-dark/package.json index c3eed2573d8cf..9d021a56132f5 100644 --- a/extensions/theme-solarized-dark/package.json +++ b/extensions/theme-solarized-dark/package.json @@ -11,12 +11,6 @@ "categories": ["Themes"], "contributes": { "themes": [ - { - "id": "Solarized Dark", - "label": "%themeLabel%", - "uiTheme": "vs-dark", - "path": "./themes/solarized-dark-color-theme.json" - } ] }, "repository": { diff --git a/extensions/theme-solarized-light/package.json b/extensions/theme-solarized-light/package.json index 0d016de93dc90..c1fc50a05c4db 100644 --- a/extensions/theme-solarized-light/package.json +++ b/extensions/theme-solarized-light/package.json @@ -11,12 +11,6 @@ "categories": ["Themes"], "contributes": { "themes": [ - { - "id": "Solarized Light", - "label": "%themeLabel%", - "uiTheme": "vs", - "path": "./themes/solarized-light-color-theme.json" - } ] }, "repository": { diff --git a/package.json b/package.json index ab9ea9b408962..03ced8162e1b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pearai", - "version": "1.89.1", + "version": "1.94.2", "distro": "25c9442cad1fee4c5b7fd96dd526ae00022f881b", "author": { "name": "Microsoft Corporation" diff --git a/product.json b/product.json index 79b47d0400cfd..b35e9cdec816d 100644 --- a/product.json +++ b/product.json @@ -1,6 +1,7 @@ { "nameShort": "PearAI", "nameLong": "PearAI", + "pearAIVersion": "1.4.5", "applicationName": "PearAI", "dataFolderName": ".pearai", "win32MutexName": "pearai", @@ -10,12 +11,14 @@ "serverGreeting": [], "serverLicense": [], "serverLicensePrompt": "", - "serverApplicationName": "code-server-oss", - "serverDataFolderName": ".vscode-server-oss", - "tunnelApplicationName": "code-tunnel-oss", - "win32DirName": "Microsoft Code OSS", - "win32NameVersion": "Microsoft Code OSS", - "win32RegValueName": "CodeOSS", + "serverApplicationName": "code-server", + "serverDataFolderName": ".pearai-server", + "tunnelApplicationName": "code-tunnel", + "downloadUrl": "https://trypear.ai/", + "updateUrl": "https://stingray-app-gb2an.ondigitalocean.app/pearai-server-api2", + "win32DirName": "PearAI", + "win32NameVersion": "PearAI", + "win32RegValueName": "PearAI", "win32x64AppId": "{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}", "win32arm64AppId": "{{D1ACE434-89C5-48D1-88D3-E2991DF85475}", "win32x64UserAppId": "{{CC6B787D-37A0-49E8-AE24-8559A032BE0C}", @@ -30,6 +33,7 @@ "reportIssueUrl": "https://github.com/microsoft/vscode/issues/new", "nodejsRepository": "https://nodejs.org", "urlProtocol": "pearai", + "quality": "stable", "webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/", "extensionsGallery": { "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", @@ -2367,6 +2371,7 @@ } } ], + "VSCodeCommit": "f1e16e1e6214d7c44d078b1f0607b2388f29d729", "commit": "f1e16e1e6214d7c44d078b1f0607b2388f29d729", "date": "2024-07-09T22:07:54.982Z", "checksums": { @@ -2377,6 +2382,5 @@ "vs/code/electron-sandbox/workbench/workbench.html": "MOHfHsuI+CL4nPwyAQjuFCAjFomNep+vcvjL0sLDlbw", "vs/code/electron-sandbox/workbench/workbench.js": "UfEYJUwE/3rVxokZpMqXUk+OC+ZVfikR++K0yTZ+on8" }, - "version": "1.91.1", - "darwinUniversalAssetId": "darwin-universal" + "version": "1.91.1" } diff --git a/scripts/pearai/setup-environment.sh b/scripts/pearai/setup-environment.sh index 0c65cb724b833..1d27965f96a65 100755 --- a/scripts/pearai/setup-environment.sh +++ b/scripts/pearai/setup-environment.sh @@ -90,7 +90,7 @@ execute "./scripts/install-and-build.sh" "Failed to install dependencies for the # Discard the package.json and package-lock.json version update changes execute "git reset --hard" "Failed to reset --hard after submodule dependencies install" -execute "cd $app_dir" "Failed to change directory to application root" +execute "cd '$app_dir'" "Failed to change directory to application root" echo -e "\nSetting up root application..." pwd diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts index 66d902964904d..8265e9e77bc5f 100644 --- a/src/vs/base/common/product.ts +++ b/src/vs/base/common/product.ts @@ -55,10 +55,12 @@ export type ExtensionVirtualWorkspaceSupport = { }; export interface IProductConfiguration { - readonly version: string; + readonly pearAIVersion?: string; + readonly version: string; // vscode version readonly date?: string; readonly quality?: string; - readonly commit?: string; + readonly commit?: string; // pearAI commit, generated when building and packaging + readonly VSCodeCommit?: string; readonly nameShort: string; readonly nameLong: string; diff --git a/src/vs/nls.ts b/src/vs/nls.ts index 233840e65abff..33ed6d07a5221 100644 --- a/src/vs/nls.ts +++ b/src/vs/nls.ts @@ -65,8 +65,7 @@ function _format(message: string, args: (string | number | boolean | undefined | if (args.length === 0) { result = message; } else { - result = message.replace(/\{(\d+)\}/g, (match, rest) => { - const index = rest[0]; + result = message.replace(/\{(\d+)\}/g, (match, index) => { const arg = args[index]; let result = match; if (typeof arg === 'string') { diff --git a/src/vs/platform/update/common/update.config.contribution.ts b/src/vs/platform/update/common/update.config.contribution.ts index 4134233def670..2856d209c4901 100644 --- a/src/vs/platform/update/common/update.config.contribution.ts +++ b/src/vs/platform/update/common/update.config.contribution.ts @@ -20,7 +20,7 @@ configurationRegistry.registerConfiguration({ enum: ['none', 'manual', 'start', 'default'], default: 'default', scope: ConfigurationScope.APPLICATION, - description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."), + description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from PearAI servers."), tags: ['usesOnlineServices'], enumDescriptions: [ localize('none', "Disable updates."), @@ -37,7 +37,7 @@ configurationRegistry.registerConfiguration({ type: 'string', default: 'default', scope: ConfigurationScope.APPLICATION, - description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."), + description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from PearAI servers."), deprecationMessage: localize('deprecated', "This setting is deprecated, please use '{0}' instead.", 'update.mode') }, 'update.enableWindowsBackgroundUpdates': { @@ -52,7 +52,7 @@ configurationRegistry.registerConfiguration({ type: 'boolean', default: true, scope: ConfigurationScope.APPLICATION, - description: localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are fetched from a Microsoft online service."), + description: localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are fetched from PearAI servers."), tags: ['usesOnlineServices'] } } diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts index ea18f4ab5a665..da770a443bedd 100644 --- a/src/vs/platform/update/electron-main/abstractUpdateService.ts +++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts @@ -15,7 +15,8 @@ import { IRequestService } from 'vs/platform/request/common/request'; import { AvailableForDownload, DisablementReason, IUpdateService, State, StateType, UpdateType } from 'vs/platform/update/common/update'; export function createUpdateURL(platform: string, quality: string, productService: IProductService): string { - return `${productService.updateUrl}/api/update/${platform}/${quality}/${productService.commit}`; + let updateURL = `${productService.updateUrl}/update/${platform}/${quality}/${productService.pearAIVersion}`; + return updateURL; } export type UpdateNotAvailableClassification = { @@ -80,7 +81,7 @@ export abstract class AbstractUpdateService implements IUpdateService { return; } - if (!this.productService.updateUrl || !this.productService.commit) { + if (!this.productService.updateUrl || !this.productService.pearAIVersion) { this.setState(State.Disabled(DisablementReason.MissingConfiguration)); this.logService.info('update#ctor - updates are disabled as there is no update URL'); return; diff --git a/src/vs/workbench/browser/actions/layoutActions.ts b/src/vs/workbench/browser/actions/layoutActions.ts index 8660a9a084393..11670e97d7420 100644 --- a/src/vs/workbench/browser/actions/layoutActions.ts +++ b/src/vs/workbench/browser/actions/layoutActions.ts @@ -22,7 +22,7 @@ import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/b import { ToggleAuxiliaryBarAction } from 'vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions'; import { TogglePanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { ICommandService } from 'vs/platform/commands/common/commands'; -import { AuxiliaryBarVisibleContext, PanelAlignmentContext, PanelVisibleContext, SideBarVisibleContext, FocusedViewContext, InEditorZenModeContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, IsMainWindowFullscreenContext, PanelPositionContext, IsAuxiliaryWindowFocusedContext, TitleBarStyleContext } from 'vs/workbench/common/contextkeys'; +import { AuxiliaryBarVisibleContext, PanelAlignmentContext, PanelVisibleContext, SideBarVisibleContext, FocusedViewContext, InEditorZenModeContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, IsMainWindowFullscreenContext, PanelPositionContext, IsAuxiliaryWindowFocusedContext, TitleBarStyleContext, PearAIVisibleContext } from 'vs/workbench/common/contextkeys'; import { Codicon } from 'vs/base/common/codicons'; import { ThemeIcon } from 'vs/base/common/themables'; import { DisposableStore } from 'vs/base/common/lifecycle'; @@ -31,6 +31,7 @@ import { ICommandActionTitle } from 'vs/platform/action/common/action'; import { mainWindow } from 'vs/base/browser/window'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { TitlebarStyle } from 'vs/platform/window/common/window'; +import { TogglePearOverlayAction } from 'vs/workbench/browser/parts/overlay/pearOverlayActions'; // Register Icons const menubarIcon = registerIcon('menuBar', Codicon.layoutMenubar, localize('menuBarIcon', "Represents the menu bar")); @@ -42,6 +43,7 @@ const panelRightIcon = registerIcon('panel-right', Codicon.layoutSidebarRight, l const panelRightOffIcon = registerIcon('panel-right-off', Codicon.layoutSidebarRightOff, localize('panelRightOff', "Represents side bar in the right position toggled off")); const panelIcon = registerIcon('panel-bottom', Codicon.layoutPanel, localize('panelBottom', "Represents the bottom panel")); const statusBarIcon = registerIcon('statusBar', Codicon.layoutStatusbar, localize('statusBarIcon', "Represents the status bar")); +const pearaiIcon = registerIcon('pearai', Codicon.archive, localize('pearaiIcon', "Represents the PearAI overlay")); const panelAlignmentLeftIcon = registerIcon('panel-align-left', Codicon.layoutPanelLeft, localize('panelBottomLeft', "Represents the bottom panel alignment set to the left")); const panelAlignmentRightIcon = registerIcon('panel-align-right', Codicon.layoutPanelRight, localize('panelBottomRight', "Represents the bottom panel alignment set to the right")); @@ -1341,6 +1343,7 @@ ToggleVisibilityActions.push(...[ CreateToggleLayoutItem(ToggleAuxiliaryBarAction.ID, AuxiliaryBarVisibleContext, localize('secondarySideBar', "Secondary Side Bar"), { whenA: ContextKeyExpr.equals('config.workbench.sideBar.location', 'left'), iconA: panelRightIcon, iconB: panelLeftIcon }), CreateToggleLayoutItem(TogglePanelAction.ID, PanelVisibleContext, localize('panel', "Panel"), panelIcon), CreateToggleLayoutItem(ToggleStatusbarVisibilityAction.ID, ContextKeyExpr.equals('config.workbench.statusBar.visible', true), localize('statusBar', "Status Bar"), statusBarIcon), + CreateToggleLayoutItem(TogglePearOverlayAction.ID, PearAIVisibleContext, 'PearAI', pearaiIcon) ]); const MoveSideBarActions: CustomizeLayoutItem[] = [ diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 4e2809e149c2a..0b68fda1b778a 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -264,6 +264,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi private auxiliaryBarPartView!: ISerializableView; private editorPartView!: ISerializableView; private statusBarPartView!: ISerializableView; + private pearOverlayPartView!: ISerializableView; private environmentService!: IBrowserWorkbenchEnvironmentService; private extensionService!: IExtensionService; @@ -1483,6 +1484,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi const auxiliaryBarPart = this.getPart(Parts.AUXILIARYBAR_PART); const sideBar = this.getPart(Parts.SIDEBAR_PART); const statusBar = this.getPart(Parts.STATUSBAR_PART); + const pearOverlayPart = this.getPart(Parts.PEAROVERLAY_PART); // View references for all parts this.titleBarPartView = titleBar; @@ -1493,6 +1495,22 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi this.panelPartView = panelPart; this.auxiliaryBarPartView = auxiliaryBarPart; this.statusBarPartView = statusBar; + this.pearOverlayPartView = pearOverlayPart; + + // Create a new container for PearOverlayPart + const pearOverlayPartContainer = document.createElement("div"); + pearOverlayPartContainer.style.position = "absolute"; + pearOverlayPartContainer.style.top = "0"; + pearOverlayPartContainer.style.left = "0"; + pearOverlayPartContainer.style.right = "0"; + pearOverlayPartContainer.style.bottom = "0"; + pearOverlayPartContainer.style.zIndex = "-10"; + pearOverlayPartContainer.style.display = "absolute"; + pearOverlayPartContainer.classList.add("pearoverlay-part-container"); + pearOverlayPartContainer.style.backgroundColor = 'var(--vscode-editor-background)'; + + this.mainContainer.appendChild(pearOverlayPartContainer); + pearOverlayPart.create(pearOverlayPartContainer); const viewMap = { [Parts.ACTIVITYBAR_PART]: this.activityBarPartView, @@ -1502,7 +1520,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi [Parts.PANEL_PART]: this.panelPartView, [Parts.SIDEBAR_PART]: this.sideBarPartView, [Parts.STATUSBAR_PART]: this.statusBarPartView, - [Parts.AUXILIARYBAR_PART]: this.auxiliaryBarPartView + [Parts.AUXILIARYBAR_PART]: this.auxiliaryBarPartView, + [Parts.PEAROVERLAY_PART]: this.pearOverlayPartView, }; const fromJSON = ({ type }: { type: Parts }) => viewMap[type]; @@ -1571,6 +1590,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi // Layout the grid widget this.workbenchGrid.layout(this._mainContainerDimension.width, this._mainContainerDimension.height); + this.pearOverlayPartView.layout(this._mainContainerDimension.width, this._mainContainerDimension.height, 0, 0); this.initialized = true; // Emit as event diff --git a/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts b/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts index 16c40e836f214..35625fc8b5857 100644 --- a/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts +++ b/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.ts @@ -45,7 +45,7 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart { static readonly viewContainersWorkspaceStateKey = 'workbench.auxiliarybar.viewContainersWorkspaceState'; // Use the side bar dimensions - override readonly minimumWidth: number = 170; + override readonly minimumWidth: number = 400; override readonly maximumWidth: number = Number.POSITIVE_INFINITY; override readonly minimumHeight: number = 0; override readonly maximumHeight: number = Number.POSITIVE_INFINITY; diff --git a/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts b/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts index 0617008ccc5ce..9c121dad69829 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts @@ -9,13 +9,18 @@ import { isMacintosh, isWeb, OS } from 'vs/base/common/platform'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { append, clearNode, $, h } from 'vs/base/browser/dom'; +import { append, clearNode, $, h, addDisposableListener, EventType } from 'vs/base/browser/dom'; import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel'; -import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; import { ContextKeyExpr, ContextKeyExpression, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { defaultKeybindingLabelStyles } from 'vs/platform/theme/browser/defaultStyles'; import { editorForeground, registerColor, transparent } from 'vs/platform/theme/common/colorRegistry'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; +import { isRecentFolder, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; +import { IWindowOpenable } from 'vs/platform/window/common/window'; +import { ILabelService, Verbosity } from 'vs/platform/label/common/label'; +import { IHostService } from 'vs/workbench/services/host/browser/host'; +import { splitRecentLabel } from 'vs/base/common/labels'; registerColor('editorWatermark.foreground', { dark: transparent(editorForeground, 0.6), light: transparent(editorForeground, 0.68), hcDark: editorForeground, hcLight: editorForeground }, localize('editorLineHighlight', 'Foreground color for the labels in the editor watermark.')); @@ -26,7 +31,7 @@ interface WatermarkEntry { readonly when?: ContextKeyExpression; } -const openPearAIChat: WatermarkEntry = { text: localize('watermark.openPearAIChat', "Open Chat"), id: 'pearai.focusContinueInput', when: ContextKeyExpr.has('pearAIExtensionLoaded') }; +const openPearAIChat: WatermarkEntry = { text: localize('watermark.openPearAIChat', "Open Chat"), id: 'pearai.focusContinueInput', when: ContextKeyExpr.has('pearAIExtensionLoaded') }; const bigChat: WatermarkEntry = { text: localize('watermark.pearAIBigChat', "Big Chat"), id: 'pearai.resizeAuxiliaryBarWidth', when: ContextKeyExpr.has('pearAIExtensionLoaded') }; const prevChat: WatermarkEntry = { text: localize('watermark.pearAIPrevChat', "Previous Chat"), id: 'pearai.loadRecentChat', when: ContextKeyExpr.has('pearAIExtensionLoaded') }; const showCommands: WatermarkEntry = { text: localize('watermark.showCommands', "Show All Commands"), id: 'workbench.action.showCommands' }; @@ -68,7 +73,7 @@ const folderEntries = [ ]; export class EditorGroupWatermark extends Disposable { - private readonly shortcuts: HTMLElement; + private readonly watermark: HTMLElement; private readonly transientDisposables = this._register(new DisposableStore()); private enabled: boolean = false; private workbenchState: WorkbenchState; @@ -80,21 +85,21 @@ export class EditorGroupWatermark extends Disposable { @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IContextKeyService private readonly contextKeyService: IContextKeyService, @IConfigurationService private readonly configurationService: IConfigurationService, - @IExtensionService private readonly extensionService: IExtensionService + @IExtensionService private readonly extensionService: IExtensionService, + @IWorkspacesService private readonly workspacesService: IWorkspacesService, + @ILabelService private readonly labelService: ILabelService, + @IHostService private readonly hostService: IHostService, + @ICommandService private readonly commandService: ICommandService ) { super(); + this.workbenchState = contextService.getWorkbenchState(); + const hasWorkspace = this.workbenchState !== WorkbenchState.EMPTY; - const elements = h('.editor-group-watermark', [ - h('.letterpress'), - h('.shortcuts@shortcuts'), - ]); + const elements = h('.editor-group-watermark-' + (hasWorkspace ? 'workspace' : 'no-workspace')); append(container, elements.root); - this.shortcuts = elements.shortcuts; - + this.watermark = elements.root; this.registerListeners(); - - this.workbenchState = contextService.getWorkbenchState(); this.render(); } @@ -127,7 +132,7 @@ export class EditorGroupWatermark extends Disposable { private async render(): Promise { // Wait for the all extensions to be activated await this.extensionService.activateByEvent('onStartupFinished'); - // TODO: @Himanshu-Singh-Chauhan - this should be set from inside the extension, test it later, if it works, remove this + // TODO: @Himanshu-Singh-Chauhan - this should be set from inside the extension, test it later, if it works, remove this this.contextKeyService.createKey('pearAIExtensionLoaded', true); // Set a context key when the PearAI extension is loaded const enabled = this.configurationService.getValue('workbench.tips.enabled'); @@ -143,7 +148,16 @@ export class EditorGroupWatermark extends Disposable { return; } - const box = append(this.shortcuts, $('.watermark-box')); + const hasWorkspace = this.workbenchState !== WorkbenchState.EMPTY; + + if (!hasWorkspace) { + this.renderNoWorkspaceWatermark(); + return; + } + + append(this.watermark, $('.letterpress')); + const shortcuts = append(this.watermark, $('.shortcuts')); + const box = append(shortcuts, $('.watermark-box')); const folder = this.workbenchState !== WorkbenchState.EMPTY; const selected = (folder ? folderEntries : noFolderEntries) .filter(entry => !('when' in entry) || this.contextKeyService.contextMatchesRules(entry.when)) @@ -175,8 +189,110 @@ export class EditorGroupWatermark extends Disposable { this.transientDisposables.add(this.keybindingService.onDidUpdateKeybindings(update)); } + private async renderNoWorkspaceWatermark(): Promise { + // close the sidebar on new window open + this.commandService.executeCommand('workbench.action.closeAuxiliaryBar'); + const container = append(this.watermark, $('.editor-group-watermark-no-workspace')); + + // button container + const buttonContainer = append(container, $('.button-container')); + const openFolderButton = append(buttonContainer, $('button.open-folder-button')); + // folder icon and text in separate spans + append(openFolderButton, $('span.codicon.codicon-folder-opened')); + append(openFolderButton, $('span.text', {}, localize('watermark.openFolder', "Open Folder"))); + // click handler for Open Folder button + this._register(addDisposableListener(openFolderButton, EventType.CLICK, (e: MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + this.commandService.executeCommand('workbench.action.files.openFolder'); + })); + + // New File text button + const newFileItem = append(container, $('.new-file-item')); + newFileItem.textContent = localize('watermark.newFile', "New File"); + newFileItem.style.cursor = 'pointer'; + + const newFileKeybinding = this.keybindingService.lookupKeybinding('workbench.action.files.newUntitledFile')?.getLabel(); + newFileItem.title = newFileKeybinding ? + localize('watermark.newFileWithKeybinding', "New File ({0})", newFileKeybinding) : + localize('watermark.newFile', "New File"); + + this._register(addDisposableListener(newFileItem, EventType.CLICK, (e: MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + this.commandService.executeCommand('workbench.action.files.newUntitledFile'); + })); + + // recent folders and workspaces list + const recentList = append(container, $('.recent-list')); + + const recentlyOpened = await this.workspacesService.getRecentlyOpened(); + const recents = recentlyOpened.workspaces + .filter(recent => !this.contextService.isCurrentWorkspace( + isRecentFolder(recent) ? recent.folderUri : recent.workspace.configPath + )) + .slice(0, 6); + + if (recents.length === 0) { + const noRecentsElement = append(recentList, $('.recent-item')); + noRecentsElement.textContent = localize('watermark.noRecents', "No Recent Folders"); + return; + } + + recents.forEach(recent => { + const itemElement = append(recentList, $('.recent-item')); + + let fullPath: string; + let windowOpenable: IWindowOpenable; + + if (isRecentFolder(recent)) { + windowOpenable = { folderUri: recent.folderUri }; + fullPath = recent.label || this.labelService.getWorkspaceLabel(recent.folderUri, { verbose: Verbosity.LONG }); + } else { + fullPath = recent.label || this.labelService.getWorkspaceLabel(recent.workspace, { verbose: Verbosity.LONG }); + windowOpenable = { workspaceUri: recent.workspace.configPath }; + } + + const { name, parentPath } = splitRecentLabel(fullPath); + + itemElement.textContent = name; + if (parentPath) { + append(itemElement, $('span.spacer')); + const pathSpan = append(itemElement, $('span.path')); + pathSpan.textContent = parentPath; + } + + itemElement.title = fullPath; + itemElement.style.cursor = 'pointer'; + + this._register(addDisposableListener(itemElement, EventType.CLICK, async (e: MouseEvent) => { + try { + e.preventDefault(); + e.stopPropagation(); + await this.hostService.openWindow([windowOpenable], { + forceNewWindow: e.ctrlKey || e.metaKey, + remoteAuthority: recent.remoteAuthority ?? null + }); + } catch (error) { + console.error('Failed to open recent item:', error); + } + })); + }); + + // "More..." item + const moreItem = append(recentList, $('.more-item')); + moreItem.textContent = localize('watermark.more', "More..."); + moreItem.title = localize('watermark.showMoreRecents', "Show All Recent Folders"); + moreItem.style.cursor = 'pointer'; + this._register(addDisposableListener(moreItem, EventType.CLICK, (e: MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + this.commandService.executeCommand('workbench.action.openRecent'); + })); + } + private clear(): void { - clearNode(this.shortcuts); + clearNode(this.watermark); this.transientDisposables.clear(); } diff --git a/src/vs/workbench/browser/parts/editor/media/editorgroupview.css b/src/vs/workbench/browser/parts/editor/media/editorgroupview.css index 76c8a561b4e09..42860ba529aba 100644 --- a/src/vs/workbench/browser/parts/editor/media/editorgroupview.css +++ b/src/vs/workbench/browser/parts/editor/media/editorgroupview.css @@ -29,7 +29,7 @@ /* Watermark & shortcuts */ -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace { display: flex; height: 100%; max-width: 290px; @@ -39,17 +39,99 @@ justify-content: center; } -.monaco-workbench .part.editor > .content .editor-group-container:not(.empty) > .editor-group-watermark { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace { + display: flex; + height: 100%; + max-width: 700px; + margin: auto; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.monaco-workbench .part.editor > .content .editor-group-container:not(.empty) > .editor-group-watermark-workspace { display: none; } -.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty > .editor-group-watermark, -.monaco-workbench .part.editor > .content.auxiliary .editor-group-container.empty > .editor-group-watermark { - max-width: 200px; - height: calc(100% - 70px); +.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty > .editor-group-watermark-no-workspace, +.monaco-workbench .part.editor > .content.auxiliary .editor-group-container.empty > .editor-group-watermark-no-workspace { + display: flex; + height: 100%; + min-width: 500px; + max-width: 700px; + margin: auto; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 16px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .button-container { + width: 100%; + display: flex; + justify-content: center; + margin-bottom: 30px; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .open-folder-button { + padding: 8px 12px; + background-color: var(--vscode-button-background); + color: var(--vscode-button-foreground); + border: none; + border-radius: 6px; + cursor: pointer; + font-size: 13px; + display: flex; + align-items: center; + gap: 5px; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .open-folder-button .codicon { + font-size: 16px; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .open-folder-button:hover { + background-color: var(--vscode-button-hoverBackground); +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list { + width: 100%; + min-width: 260px; + max-width: 700px; + color: var(--vscode-editorWatermark-foreground); + opacity: 0.8; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .recent-item { + padding: 6px 0; + cursor: pointer; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + opacity: 0.8; + font-size: 13px; + color: var(--vscode-foreground); } -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .letterpress { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .recent-item .path { + opacity: 0.6; + color: var(--vscode-editorWatermark-foreground); +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .recent-item:hover { + opacity: 1; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .recent-item:hover .path { + color: var(--vscode-foreground); + opacity: 0.8; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .letterpress { width: 100%; max-height: 100%; aspect-ratio: 1/1; @@ -59,48 +141,48 @@ background-repeat: no-repeat; } -.monaco-workbench.vs-dark .part.editor > .content .editor-group-container .editor-group-watermark > .letterpress { +.monaco-workbench.vs-dark .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .letterpress { background-image: url('./letterpress-dark.svg'); } -.monaco-workbench.hc-light .part.editor > .content .editor-group-container .editor-group-watermark > .letterpress { +.monaco-workbench.hc-light .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .letterpress { background-image: url('./letterpress-hcLight.svg'); } -.monaco-workbench.hc-black .part.editor > .content .editor-group-container .editor-group-watermark > .letterpress { +.monaco-workbench.hc-black .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .letterpress { background-image: url('./letterpress-hcDark.svg'); } -.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container > .editor-group-watermark > .shortcuts, -.monaco-workbench .part.editor > .content.auxiliary .editor-group-container > .editor-group-watermark > .shortcuts, -.monaco-workbench .part.editor > .content .editor-group-container.max-height-478px > .editor-group-watermark > .shortcuts { +.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container > .editor-group-watermark-workspace > .shortcuts, +.monaco-workbench .part.editor > .content.auxiliary .editor-group-container > .editor-group-watermark-workspace > .shortcuts, +.monaco-workbench .part.editor > .content .editor-group-container.max-height-478px > .editor-group-watermark-workspace > .shortcuts { display: none; } -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .shortcuts > .watermark-box { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .shortcuts > .watermark-box { display: inline-table; border-collapse: separate; border-spacing: 11px 17px; } -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .shortcuts dl { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .shortcuts dl { display: table-row; opacity: .8; cursor: default; color: var(--vscode-editorWatermark-foreground); } -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .shortcuts dt { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .shortcuts dt { text-align: right; letter-spacing: 0.04em } -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .shortcuts dd { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .shortcuts dd { text-align: left; } -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .shortcuts dt, -.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .shortcuts dd { +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .shortcuts dt, +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-workspace > .shortcuts dd { display: table-cell; vertical-align: middle; } @@ -169,3 +251,46 @@ width: 100%; height: 100%; } + +/* Hide no-workspace watermark when not needed */ +.monaco-workbench .part.editor > .content .editor-group-container:not(.empty) > .editor-group-watermark-no-workspace { + display: none; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .more-item { + opacity: 0.7; + margin-top: 8px; + font-style: italic; +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .more-item:hover { + color: var(--vscode-foreground); + opacity: 1; +} + +/* When container is small, allow wrapping */ +@media (max-width: 700px) { + .monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .recent-item { + white-space: normal; + word-break: break-all; + } +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .recent-list .recent-item .spacer { + display: inline-block; + width: 10px; /* Adjust this value to increase/decrease spacing between name and path(location) of recent items */ +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .new-file-item { + opacity: 0.7; + cursor: pointer; + padding: 1px 0; + font-style: italic; + margin-bottom: 5px; + color: var(--vscode-editorWatermark-foreground); +} + +.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark-no-workspace .new-file-item:hover { + color: var(--vscode-foreground); + opacity: 1; +} diff --git a/src/vs/workbench/browser/parts/overlay/pearOverlayActions.ts b/src/vs/workbench/browser/parts/overlay/pearOverlayActions.ts new file mode 100644 index 0000000000000..8040a68cc4225 --- /dev/null +++ b/src/vs/workbench/browser/parts/overlay/pearOverlayActions.ts @@ -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); diff --git a/src/vs/workbench/browser/parts/overlay/pearOverlayPart.ts b/src/vs/workbench/browser/parts/overlay/pearOverlayPart.ts new file mode 100644 index 0000000000000..7c9553f17c74c --- /dev/null +++ b/src/vs/workbench/browser/parts/overlay/pearOverlayPart.ts @@ -0,0 +1,264 @@ +/* eslint-disable header/header */ + +import { Part } from "vs/workbench/browser/part"; +import { + IWorkbenchLayoutService, + Parts, +} from "vs/workbench/services/layout/browser/layoutService"; +import { IThemeService } from "vs/platform/theme/common/themeService"; +import { IStorageService } from "vs/platform/storage/common/storage"; +import { $, getActiveWindow } from "vs/base/browser/dom"; +import { CancellationTokenSource } from "vs/base/common/cancellation"; +import { IInstantiationService } from "vs/platform/instantiation/common/instantiation"; +import { WebviewExtensionDescription } from "vs/workbench/contrib/webview/browser/webview"; + +import { + IWebviewViewService, + WebviewView, +} from "vs/workbench/contrib/webviewView/browser/webviewViewService"; +import { WebviewService } from "vs/workbench/contrib/webview/browser/webviewService"; +import { URI } from "vs/base/common/uri"; +import { ExtensionIdentifier } from "vs/platform/extensions/common/extensions"; + +const PEAROVERLAY_ID = "pearai.pearAIChatView"; +const PEAR_OVERLAY_TITLE = "pearai.pearOverlay"; + +export class PearOverlayPart extends Part { + static readonly ID = "workbench.parts.pearoverlay"; + + readonly minimumWidth: number = 300; + readonly maximumWidth: number = 800; + readonly minimumHeight: number = 200; + readonly maximumHeight: number = 600; + + private fullScreenOverlay: HTMLElement | undefined; + private popupAreaOverlay: HTMLElement | undefined; + private webviewView: WebviewView | undefined; + private _webviewService: WebviewService | undefined; + + private state: "loading" | "open" | "closed" = "loading"; + private _isLocked: boolean = false; + + constructor( + @IThemeService themeService: IThemeService, + @IStorageService storageService: IStorageService, + @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService, + @IWebviewViewService + private readonly _webviewViewService: IWebviewViewService, + @IInstantiationService + private readonly _instantiationService: IInstantiationService, + ) { + super( + PearOverlayPart.ID, + { hasTitle: false }, + themeService, + storageService, + layoutService, + ); + + this._webviewService = + this._instantiationService.createInstance(WebviewService); + + this.initialize(); + } + + isVisible(): boolean { + return this.state === "open"; + } + + private async initialize() { + const extensionDescription: WebviewExtensionDescription = { + id: new ExtensionIdentifier(PEAROVERLAY_ID), + location: URI.parse(""), + }; + // 1. create an IOverlayWebview + const webview = this._webviewService!.createWebviewOverlay({ + title: PEAR_OVERLAY_TITLE, + options: { + enableFindWidget: false, + }, + contentOptions: { + allowScripts: true, + localResourceRoots: [], + }, + extension: extensionDescription, + }); + + webview.claim(this, getActiveWindow(), undefined); + + // 2. initialize this.webviewView by creating a WebviewView + this.webviewView = { + webview, + onDidChangeVisibility: () => { + return { dispose: () => {} }; + }, + onDispose: () => { + return { dispose: () => {} }; + }, + + get title(): string | undefined { + return PEAR_OVERLAY_TITLE; + }, + set title(value: string | undefined) {}, + + get description(): string | undefined { + return undefined; + }, + set description(value: string | undefined) {}, + + get badge() { + return undefined; + }, + set badge(badge) {}, + + dispose: () => {}, + + show: (preserveFocus) => {}, + }; + + // 3. ask the webviewViewService to connect our webviewView to the webviewViewProvider, PearInventoryPanel + const source = new CancellationTokenSource(); // todo add to disposables + await this._webviewViewService.resolve( + PEAROVERLAY_ID, + this.webviewView!, + source.token, + ); + + // if both content and webview are ready, end loading state and open + if (this.popupAreaOverlay && this.webviewView) { + this.webviewView?.webview.layoutWebviewOverElement(this.popupAreaOverlay); + // Don't open on every startup + //this.open(); + } else { + // hide stuff while we load + this.webviewView!.webview.container.style.display = "none"; + } + } + + protected override createContentArea(element: HTMLElement): HTMLElement { + // create the full screen overlay. this serves as a click target for closing pearai + this.element = element; + this.fullScreenOverlay = element; // use the pearOverlayPart root element as the fullScreenOverlay + this.fullScreenOverlay.style.zIndex = "-10"; + this.fullScreenOverlay.style.position = "absolute"; + this.fullScreenOverlay.style.top = "0"; + this.fullScreenOverlay.style.left = "0"; + this.fullScreenOverlay.style.right = "0"; + this.fullScreenOverlay.style.bottom = "0"; + this.fullScreenOverlay.style.backgroundColor = "transparent"; + this.close(); + // Remove popup area overlay creation + return this.fullScreenOverlay; + } + + override layout(width: number, height: number, top: number, left: number): void { + super.layout(width, height, top, left); + + if (this.fullScreenOverlay) { + this.fullScreenOverlay.style.width = `${width}px`; + this.fullScreenOverlay.style.height = `${height}px`; + } + + // The webview can now be positioned anywhere within the full screen overlay + if (this.state === "open") { + this.webviewView!.webview.layoutWebviewOverElement(this.fullScreenOverlay!); + } + } + + private open() { + if (this.state === "open") { + return; + } + this.state = "open"; + this.fullScreenOverlay!.style.zIndex = "95"; + + const container = this.webviewView!.webview.container; + container.style.position = "absolute"; + container.style.display = "block"; + container.style.zIndex = "1000"; + container.style.backgroundColor = "transparent"; + + const iframe = container.querySelector('iframe'); + if (iframe) { + iframe.style.backgroundColor = 'transparent'; + iframe.style.background = 'none'; + } + + this.webviewView!.webview.layoutWebviewOverElement(this.fullScreenOverlay!); + this.focus(); + } + + private close() { + if (this.isLocked) { + return; // Prevent closing when locked + } + + if (this.state === "closed") { + return; + } + this.state = "closed"; + const container = this.webviewView!.webview.container; + + // Apply fade-out animation + container.style.animation = "pearaiFadeOut 0.2s ease-out"; + + // Hide elements after animation completes + setTimeout(() => { + this.fullScreenOverlay!.style.zIndex = "-10"; + container.style.display = "none"; + }, 20); // 20ms matches the animation duration + } + + private toggleOpenClose() { + this.state === "open" ? this.close() : this.open(); + } + + focus(): void { + if (this.webviewView) { + this.webviewView.webview.focus(); + } + } + + show(): void { + if (this.state === "loading") { + console.warn("Can't open PearAI while loading"); + return; + } + + this.open(); + } + + hide(): void { + if (this.state === "loading") { + console.warn("Can't close PearAI while loading"); + return; + } + this.close(); + } + + toggle(): void { + if (this.state === "loading") { + console.warn("Can't toggle PearAI while loading"); + return; + } + this.toggleOpenClose(); + } + + public lock(): void { + this._isLocked = true; + } + + public unlock(): void { + this._isLocked = false; + } + + public get isLocked(): boolean { + return this._isLocked; + } + + toJSON(): object { + return { + type: Parts.PEAROVERLAY_PART, + }; + } +} diff --git a/src/vs/workbench/browser/parts/overlay/pearOverlayService.ts b/src/vs/workbench/browser/parts/overlay/pearOverlayService.ts new file mode 100644 index 0000000000000..f22a077a46df2 --- /dev/null +++ b/src/vs/workbench/browser/parts/overlay/pearOverlayService.ts @@ -0,0 +1,181 @@ +/* eslint-disable header/header */ + +import { + registerSingleton, + InstantiationType, +} from "vs/platform/instantiation/common/extensions"; +import { Disposable, IDisposable } from "vs/base/common/lifecycle"; +import { PearOverlayPart } from "./pearOverlayPart"; +import { + createDecorator, + IInstantiationService, +} from "vs/platform/instantiation/common/instantiation"; +import { IEditorService } from "vs/workbench/services/editor/common/editorService"; +import { ITerminalService } from "vs/workbench/contrib/terminal/browser/terminal"; +import { CommandsRegistry } from "vs/platform/commands/common/commands"; + +export const IPearOverlayService = createDecorator( + "pearaiOverlayService", +); + +export interface IPearOverlayService extends IDisposable { + readonly _serviceBrand: undefined; + + /** + * Returns the PearOverlayPart instance. + */ + readonly pearOverlayPart: PearOverlayPart; + + /** + * Shows the PearAI popup. + */ + show(): void; + + /** + * Hides the PearAI popup. + */ + hide(): void; + + /** + * Toggles the visibility of the PearAI popup. + */ + toggle(): void; + + /** + * Returns true if the PearAI popup is visible. + */ + isVisible(): boolean; + + /** + * Locks the PearAI popup. + */ + lock(): void; + + /** + * Unlocks the PearAI popup. + */ + unlock(): void; + + /** + * Returns true if the PearAI popup is locked. + */ + isLocked(): boolean; +} + +export class PearOverlayService + extends Disposable + implements IPearOverlayService +{ + declare readonly _serviceBrand: undefined; + + private readonly _pearOverlayPart: PearOverlayPart; + + constructor( + @IInstantiationService + private readonly instantiationService: IInstantiationService, + @IEditorService private readonly _editorService: IEditorService, + @ITerminalService private readonly _terminalService: ITerminalService, + // @ICommandService private readonly commandService: ICommandService, + ) { + super(); + this._pearOverlayPart = + this.instantiationService.createInstance(PearOverlayPart); + this.registerListeners(); + this.registerCommands(); + } + + private registerListeners(): void { + this._register( + this._editorService.onDidActiveEditorChange(() => { + this.hide(); + }), + ); + + this._register( + this._terminalService.onDidFocusInstance(() => { + this.hide(); + }), + ); + } + + private registerCommands(): void { + // Register commands for external use e.g. in pearai submodule + CommandsRegistry.registerCommand('pearai.isOverlayVisible', (accessor) => { + const overlayService = accessor.get(IPearOverlayService); + return overlayService.isVisible(); + }); + + CommandsRegistry.registerCommand('pearai.showOverlay', (accessor) => { + const overlayService = accessor.get(IPearOverlayService); + overlayService.show(); + }); + + CommandsRegistry.registerCommand('pearai.hideOverlay', (accessor) => { + const overlayService = accessor.get(IPearOverlayService); + overlayService.hide(); + }); + + CommandsRegistry.registerCommand('pearai.toggleOverlay', (accessor) => { + const overlayService = accessor.get(IPearOverlayService); + overlayService.toggle(); + }); + + CommandsRegistry.registerCommand("pearai.lockOverlay", (accessor) => { + const overlayService = accessor.get(IPearOverlayService); + overlayService.lock(); + }); + + CommandsRegistry.registerCommand("pearai.unlockOverlay", (accessor) => { + const overlayService = accessor.get(IPearOverlayService); + overlayService.unlock(); + }); + + CommandsRegistry.registerCommand("pearai.isOverlayLocked", (accessor) => { + const overlayService = accessor.get(IPearOverlayService); + return overlayService.isLocked(); + }); + } + + get pearOverlayPart(): PearOverlayPart { + return this._pearOverlayPart; + } + + show(): void { + this._pearOverlayPart.show(); + } + + hide(): void { + this._pearOverlayPart.hide(); + } + + toggle(): void { + this._pearOverlayPart.toggle(); + } + + lock(): void { + this._pearOverlayPart.lock(); + } + + unlock(): void { + this._pearOverlayPart.unlock(); + } + + isLocked(): boolean { + return this._pearOverlayPart.isLocked; + } + + override dispose(): void { + super.dispose(); + this._pearOverlayPart.dispose(); + } + + isVisible(): boolean { + return this._pearOverlayPart.isVisible(); + } +} + +registerSingleton( + IPearOverlayService, + PearOverlayService, + InstantiationType.Eager, +); diff --git a/src/vs/workbench/browser/workbench.ts b/src/vs/workbench/browser/workbench.ts index b0688133537d3..0885c15b572f1 100644 --- a/src/vs/workbench/browser/workbench.ts +++ b/src/vs/workbench/browser/workbench.ts @@ -50,6 +50,7 @@ import { AccessibilityProgressSignalScheduler } from 'vs/platform/accessibilityS import { setProgressAcccessibilitySignalScheduler } from 'vs/base/browser/ui/progressbar/progressAccessibilitySignal'; import { AccessibleViewRegistry } from 'vs/platform/accessibility/browser/accessibleViewRegistry'; import { NotificationAccessibleView } from 'vs/workbench/browser/parts/notifications/notificationAccessibleView'; +import { IPearOverlayService } from 'vs/workbench/browser/parts/overlay/pearOverlayService'; export interface IWorkbenchOptions { @@ -368,10 +369,17 @@ export class Workbench extends Layout { { id: Parts.EDITOR_PART, role: 'main', classes: ['editor'], options: { restorePreviousState: this.willRestoreEditors() } }, { id: Parts.PANEL_PART, role: 'none', classes: ['panel', 'basepanel', positionToString(this.getPanelPosition())] }, { id: Parts.AUXILIARYBAR_PART, role: 'none', classes: ['auxiliarybar', 'basepanel', this.getSideBarPosition() === Position.LEFT ? 'right' : 'left'] }, - { id: Parts.STATUSBAR_PART, role: 'status', classes: ['statusbar'] } + { id: Parts.STATUSBAR_PART, role: 'status', classes: ['statusbar'] }, + { id: Parts.PEAROVERLAY_PART, role: 'none', classes: [] } ]) { const partContainer = this.createPart(id, role, classes); + if (id === Parts.PEAROVERLAY_PART) { + instantiationService.invokeFunction(accessor => { + accessor.get(IPearOverlayService); + }); + } + mark(`code/willCreatePart/${id}`); this.getPart(id).create(partContainer, options); mark(`code/didCreatePart/${id}`); diff --git a/src/vs/workbench/common/contextkeys.ts b/src/vs/workbench/common/contextkeys.ts index 97937218bbb36..4bf1357225fbd 100644 --- a/src/vs/workbench/common/contextkeys.ts +++ b/src/vs/workbench/common/contextkeys.ts @@ -148,6 +148,7 @@ export const PanelPositionContext = new RawContextKey('panelPosition', ' export const PanelAlignmentContext = new RawContextKey('panelAlignment', 'center', localize('panelAlignment', "The alignment of the panel, either 'center', 'left', 'right' or 'justify'")); export const PanelVisibleContext = new RawContextKey('panelVisible', false, localize('panelVisible', "Whether the panel is visible")); export const PanelMaximizedContext = new RawContextKey('panelMaximized', false, localize('panelMaximized', "Whether the panel is maximized")); +export const PearAIVisibleContext = new RawContextKey('pearaiVisible', true, localize('pearaiVisible', "Whether the PearAI overlay is visible")); //#endregion diff --git a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts index 0ff4dca2f7189..992d508aa6742 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts @@ -141,14 +141,14 @@ Registry.as(ConfigurationExtensions.Configuration) localize('extensions.autoUpdate.selected', 'Download and install updates automatically only for selected extensions.'), localize('extensions.autoUpdate.false', 'Extensions are not automatically updated.'), ], - description: localize('extensions.autoUpdate', "Controls the automatic update behavior of extensions. The updates are fetched from a Microsoft online service."), + description: localize('extensions.autoUpdate', "Controls the automatic update behavior of extensions. The updates are fetched from PearAI servers."), default: true, scope: ConfigurationScope.APPLICATION, tags: ['usesOnlineServices'] }, 'extensions.autoCheckUpdates': { type: 'boolean', - description: localize('extensionsCheckUpdates', "When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from a Microsoft online service."), + description: localize('extensionsCheckUpdates', "When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from PearAI servers."), default: true, scope: ConfigurationScope.APPLICATION, tags: ['usesOnlineServices'] diff --git a/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts b/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts index 877d449605c32..b13f73276a4a1 100644 --- a/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts +++ b/src/vs/workbench/contrib/preferences/common/preferencesContribution.ts @@ -146,7 +146,7 @@ registry.registerConfiguration({ 'properties': { 'workbench.settings.enableNaturalLanguageSearch': { 'type': 'boolean', - 'description': nls.localize('enableNaturalLanguageSettingsSearch', "Controls whether to enable the natural language search mode for settings. The natural language search is provided by a Microsoft online service."), + 'description': nls.localize('enableNaturalLanguageSettingsSearch', "Controls whether to enable the natural language search mode for settings. The natural language search is provided by PearAI servers."), 'default': true, 'scope': ConfigurationScope.WINDOW, 'tags': ['usesOnlineServices'] diff --git a/src/vs/workbench/contrib/update/browser/update.ts b/src/vs/workbench/contrib/update/browser/update.ts index af1b3d507c244..dc4d1b7367950 100644 --- a/src/vs/workbench/contrib/update/browser/update.ts +++ b/src/vs/workbench/contrib/update/browser/update.ts @@ -6,7 +6,7 @@ import * as nls from 'vs/nls'; import severity from 'vs/base/common/severity'; import { Disposable, MutableDisposable } from 'vs/base/common/lifecycle'; -import { URI } from 'vs/base/common/uri'; +// import { URI } from 'vs/base/common/uri'; import { IActivityService, NumberBadge, IBadge, ProgressBadge } from 'vs/workbench/services/activity/common/activity'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IOpenerService } from 'vs/platform/opener/common/opener'; @@ -16,7 +16,7 @@ import { IUpdateService, State as UpdateState, StateType, IUpdate, DisablementRe import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; -import { ReleaseNotesManager } from 'vs/workbench/contrib/update/browser/releaseNotesEditor'; +// import { ReleaseNotesManager } from 'vs/workbench/contrib/update/browser/releaseNotesEditor'; import { isMacintosh, isWeb, isWindows } from 'vs/base/common/platform'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { RawContextKey, IContextKey, IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; @@ -36,39 +36,39 @@ export const MAJOR_MINOR_UPDATE_AVAILABLE = new RawContextKey('majorMin export const RELEASE_NOTES_URL = new RawContextKey('releaseNotesUrl', ''); export const DOWNLOAD_URL = new RawContextKey('downloadUrl', ''); -let releaseNotesManager: ReleaseNotesManager | undefined = undefined; +// let releaseNotesManager: ReleaseNotesManager | undefined = undefined; export function showReleaseNotesInEditor(instantiationService: IInstantiationService, version: string, useCurrentFile: boolean) { - if (!releaseNotesManager) { - releaseNotesManager = instantiationService.createInstance(ReleaseNotesManager); - } + // if (!releaseNotesManager) { + // releaseNotesManager = instantiationService.createInstance(ReleaseNotesManager); + // } - return releaseNotesManager.show(version, useCurrentFile); + // return releaseNotesManager.show(version, useCurrentFile); } -async function openLatestReleaseNotesInBrowser(accessor: ServicesAccessor) { - const openerService = accessor.get(IOpenerService); - const productService = accessor.get(IProductService); +// async function openLatestReleaseNotesInBrowser(accessor: ServicesAccessor) { +// const openerService = accessor.get(IOpenerService); +// const productService = accessor.get(IProductService); - if (productService.releaseNotesUrl) { - const uri = URI.parse(productService.releaseNotesUrl); - await openerService.open(uri); - } else { - throw new Error(nls.localize('update.noReleaseNotesOnline', "This version of {0} does not have release notes online", productService.nameLong)); - } -} +// if (productService.releaseNotesUrl) { +// const uri = URI.parse(productService.releaseNotesUrl); +// await openerService.open(uri); +// } else { +// throw new Error(nls.localize('update.noReleaseNotesOnline', "This version of {0} does not have release notes online", productService.nameLong)); +// } +// } async function showReleaseNotes(accessor: ServicesAccessor, version: string) { - const instantiationService = accessor.get(IInstantiationService); - try { - await showReleaseNotesInEditor(instantiationService, version, false); - } catch (err) { - try { - await instantiationService.invokeFunction(openLatestReleaseNotesInBrowser); - } catch (err2) { - throw new Error(`${err.message} and ${err2.message}`); - } - } + // const instantiationService = accessor.get(IInstantiationService); + // try { + // await showReleaseNotesInEditor(instantiationService, version, false); + // } catch (err) { + // try { + // await instantiationService.invokeFunction(openLatestReleaseNotesInBrowser); + // } catch (err2) { + // throw new Error(`${err.message} and ${err2.message}`); + // } + // } } interface IVersion { @@ -128,28 +128,28 @@ export class ProductContribution implements IWorkbenchContribution { return; } - const lastVersion = parseVersion(storageService.get(ProductContribution.KEY, StorageScope.APPLICATION, '')); - const currentVersion = parseVersion(productService.version); - const shouldShowReleaseNotes = configurationService.getValue('update.showReleaseNotes'); - const releaseNotesUrl = productService.releaseNotesUrl; + // const lastVersion = parseVersion(storageService.get(ProductContribution.KEY, StorageScope.APPLICATION, '')); + // const currentVersion = parseVersion(productService.version); + // const shouldShowReleaseNotes = configurationService.getValue('update.showReleaseNotes'); + // const releaseNotesUrl = productService.releaseNotesUrl; // was there a major/minor update? if so, open release notes - if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && releaseNotesUrl && lastVersion && currentVersion && isMajorMinorUpdate(lastVersion, currentVersion)) { - showReleaseNotesInEditor(instantiationService, productService.version, false) - .then(undefined, () => { - notificationService.prompt( - severity.Info, - nls.localize('read the release notes', "Welcome to {0} v{1}! Would you like to read the Release Notes?", productService.nameLong, productService.version), - [{ - label: nls.localize('releaseNotes', "Release Notes"), - run: () => { - const uri = URI.parse(releaseNotesUrl); - openerService.open(uri); - } - }] - ); - }); - } + // if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && releaseNotesUrl && lastVersion && currentVersion && isMajorMinorUpdate(lastVersion, currentVersion)) { + // showReleaseNotesInEditor(instantiationService, productService.version, false) + // .then(undefined, () => { + // notificationService.prompt( + // severity.Info, + // nls.localize('read the release notes', "Welcome to {0} v{1}! Would you like to read the Release Notes?", productService.nameLong, productService.version), + // [{ + // label: nls.localize('releaseNotes', "Release Notes"), + // run: () => { + // const uri = URI.parse(releaseNotesUrl); + // openerService.open(uri); + // } + // }] + // ); + // }); + // } storageService.store(ProductContribution.KEY, productService.version, StorageScope.APPLICATION, StorageTarget.MACHINE); }); diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts index c581ac0e4d20c..4d8271add16c1 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts @@ -329,7 +329,7 @@ configurationRegistry.registerConfiguration({ localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.welcomePageInEmptyWorkbench' }, "Open the Welcome page when opening an empty workbench."), localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'workbench.startupEditor.terminal' }, "Open a new terminal in the editor area."), ], - 'default': 'welcomePage', + 'default': 'none', 'description': localize('workbench.startupEditor', "Controls which editor is shown at startup, if none are restored from the previous session.") }, 'workbench.welcomePage.preferReducedMotion': { diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts b/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts index 1c4b7653d48f4..db092fb75262b 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts @@ -192,19 +192,19 @@ export const walkthroughs: GettingStartedWalkthroughContent = [ description: 'Type in the chat box (CMD+L, CTRL+L on Windows) to ask questions about your code. PearAI uses Retrival Augmented Generation to add context to your prompts, but you can also directly reference code by including other files in the chat by adding @filename. This also works for folders, docs, terminal content, codebase, and more!', media: { type: 'image', - path: 'pearai-explain-codebase.png', // Todo: Fill in with gif - altText: 'Empty image' + path: 'talkToCode.png', + altText: 'talkToCodebase' }, completionEvents: [] }, { id: 'change', title: 'Make Changes Inline With AI', - description: 'Directly make changes inline by pressing (CMD+I, CTRL+L on Windows), and choose what you want to keep.', + description: 'Directly make changes inline by pressing (CMD+I, CTRL+I on Windows), and choose what you want to keep.', media: { type: 'image', - path: 'pearai-explain-codebase.png', // Todo: Fill in with gif - altText: 'Empty image' + path: 'inlineEdit.png', + altText: 'inlineEdit' }, completionEvents: [] }, @@ -214,8 +214,8 @@ export const walkthroughs: GettingStartedWalkthroughContent = [ description: 'Directly bring your code to the chat by selecting it and pressing (CMD+L, CTRL+L on Windows). Prompt it right away', media: { type: 'image', - path: 'pearai-explain-codebase.png', // Todo: Fill in with gif - altText: 'Empty image' + path: 'noCopyPaste.png', + altText: 'noCopyPaste' }, completionEvents: [] } diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/inlineEdit.gif b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/inlineEdit.gif new file mode 100644 index 0000000000000..a06e5c7cdf58b Binary files /dev/null and b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/inlineEdit.gif differ diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/inlineEdit.png b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/inlineEdit.png new file mode 100644 index 0000000000000..6e95a91645151 Binary files /dev/null and b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/inlineEdit.png differ diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/noCopyPaste.gif b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/noCopyPaste.gif new file mode 100644 index 0000000000000..e0902a81799e2 Binary files /dev/null and b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/noCopyPaste.gif differ diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/noCopyPaste.png b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/noCopyPaste.png new file mode 100644 index 0000000000000..f62e59a7fb37c Binary files /dev/null and b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/noCopyPaste.png differ diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/talkToCode.gif b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/talkToCode.gif new file mode 100644 index 0000000000000..15254e87bc7ce Binary files /dev/null and b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/talkToCode.gif differ diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/talkToCode.png b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/talkToCode.png new file mode 100644 index 0000000000000..0c7ebf7f36966 Binary files /dev/null and b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/talkToCode.png differ diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.ts b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.ts index 7c204e585199c..30ade51ce1a7e 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.ts @@ -12,11 +12,11 @@ export default () => `
- ${escape(localize('dark', "Dark Modern"))} + ${escape(localize('dark', "PearAI Dark"))} - ${escape(localize('light', "Light Modern"))} + ${escape(localize('light', "PearAI Light"))}
diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts index f2cc82ab8c516..6bf7abb794930 100644 --- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts +++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts @@ -70,21 +70,23 @@ export class NativeDialogHandler extends AbstractDialogHandler { } async about(): Promise { - let version = this.productService.version; + let vscodeVersion = this.productService.version; if (this.productService.target) { - version = `${version} (${this.productService.target} setup)`; + vscodeVersion = `${vscodeVersion} (${this.productService.target} setup)`; } else if (this.productService.darwinUniversalAssetId) { - version = `${version} (Universal)`; + vscodeVersion = `${vscodeVersion} (Universal)`; } const osProps = await this.nativeHostService.getOSProperties(); const detailString = (useAgo: boolean): string => { return localize({ key: 'aboutDetail', comment: ['Electron, Chromium, Node.js and V8 are product names that need no translation'] }, - "Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nElectronBuildId: {4}\nChromium: {5}\nNode.js: {6}\nV8: {7}\nOS: {8}", - version, + "Version: {0}\nCommit: {1}\nDate: {2}\n\nVSCode Version: {3}\nVSCode Commit: {4}\nElectron: {5}\nElectronBuildId: {6}\nChromium: {7}\nNode.js: {8}\nV8: {9}\nOS: {10}", + this.productService.pearAIVersion || 'Unknown', this.productService.commit || 'Unknown', this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown', + vscodeVersion, + this.productService.VSCodeCommit || 'Unknown', process.versions['electron'], process.versions['microsoft-build'], process.versions['chrome'], diff --git a/src/vs/workbench/services/assignment/common/assignmentService.ts b/src/vs/workbench/services/assignment/common/assignmentService.ts index 50c2ddb702c27..4d74bcc81763f 100644 --- a/src/vs/workbench/services/assignment/common/assignmentService.ts +++ b/src/vs/workbench/services/assignment/common/assignmentService.ts @@ -145,7 +145,7 @@ registry.registerConfiguration({ 'properties': { 'workbench.enableExperiments': { 'type': 'boolean', - 'description': localize('workbench.enableExperiments', "Fetches experiments to run from a Microsoft online service."), + 'description': localize('workbench.enableExperiments', "Fetches experiments to run from PearAI servers."), 'default': true, 'scope': ConfigurationScope.APPLICATION, 'restricted': true, diff --git a/src/vs/workbench/services/layout/browser/layoutService.ts b/src/vs/workbench/services/layout/browser/layoutService.ts index 3357adabc8228..df674eddfe5b0 100644 --- a/src/vs/workbench/services/layout/browser/layoutService.ts +++ b/src/vs/workbench/services/layout/browser/layoutService.ts @@ -26,7 +26,8 @@ export const enum Parts { PANEL_PART = 'workbench.parts.panel', AUXILIARYBAR_PART = 'workbench.parts.auxiliarybar', EDITOR_PART = 'workbench.parts.editor', - STATUSBAR_PART = 'workbench.parts.statusbar' + STATUSBAR_PART = 'workbench.parts.statusbar', + PEAROVERLAY_PART = 'workbench.parts.pearoverlay' } export const enum ZenModeSettings { diff --git a/src/vs/workbench/services/themes/common/workbenchThemeService.ts b/src/vs/workbench/services/themes/common/workbenchThemeService.ts index aac853941a768..c3593d0a0f45e 100644 --- a/src/vs/workbench/services/themes/common/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/common/workbenchThemeService.ts @@ -44,13 +44,13 @@ export enum ThemeSettings { } export enum ThemeSettingDefaults { - COLOR_THEME_DARK = 'Default Dark Modern', - COLOR_THEME_LIGHT = 'Default Light Modern', + COLOR_THEME_DARK = 'Default PearAI Dark', + COLOR_THEME_LIGHT = 'Default PearAI Light', COLOR_THEME_HC_DARK = 'Default High Contrast', COLOR_THEME_HC_LIGHT = 'Default High Contrast Light', - COLOR_THEME_DARK_OLD = 'Default Dark+', - COLOR_THEME_LIGHT_OLD = 'Default Light+', + COLOR_THEME_DARK_OLD = 'Default PearAI Dark', + COLOR_THEME_LIGHT_OLD = 'Default PearAI Light', FILE_ICON_THEME = 'vs-seti', PRODUCT_ICON_THEME = 'Default', diff --git a/yarn.lock b/yarn.lock index ad858b025bcd8..1a4e766d8d709 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3853,10 +3853,10 @@ electron-to-chromium@^1.4.668: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.717.tgz#99db370cae8cd090d5b01f8748e9ad369924d0f8" integrity sha512-6Fmg8QkkumNOwuZ/5mIbMU9WI3H2fmn5ajcVya64I5Yr5CcNmO7vcLt0Y7c96DCiMO5/9G+4sI2r6eEvdg1F7A== -electron@29.4.0: - version "29.4.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-29.4.0.tgz#5dcd5a977414337a2518619e9166c0e86a5a3bae" - integrity sha512-4DTO8U66oiI8rShrDSu2zDPW6GWRiCebyb1MHSfQkLWCNI/PnLyGKeqYPUoVgc0FWaNN2sCBn8NKJHb++hE2LQ== +electron@31.3.1: + version "31.3.1" + resolved "https://registry.yarnpkg.com/electron/-/electron-31.3.1.tgz#de5f21f10db1ba0568e0cdd7ae76ec40a4b800c3" + integrity sha512-9fiuWlRhBfygtcT+auRd/WdBK/f8LZZcrpx0RjpXhH2DPTP/PfnkC4JB1PW55qCbGbh4wAgkYbf4ExIag8oGCA== dependencies: "@electron/get" "^2.0.0" "@types/node" "^20.9.0"