### Initial Project Setup Source: https://github.com/trypear/pearai-app/blob/main/cli/CONTRIBUTING.md Steps to clone the project repository and initialize submodules. This is essential for obtaining all necessary project components. ```git git submodule update --init --recursive ``` -------------------------------- ### Windows CLI Build with OpenSSL Source: https://github.com/trypear/pearai-app/blob/main/cli/CONTRIBUTING.md Instructions for building the CLI on Windows, which requires OpenSSL. This involves setting up vcpkg, installing OpenSSL, and then performing the cargo build. ```powershell vcpkg install openssl:x64-windows-static-md ``` ```rust cargo build ``` -------------------------------- ### Setup and Bundle Monaco Editor Source: https://github.com/trypear/pearai-app/blob/main/test/monaco/README.md Installs dependencies and bundles the Monaco Editor distribution using npm. ```bash npm i npm run bundle ``` -------------------------------- ### Debugging Launcher Source: https://github.com/trypear/pearai-app/blob/main/cli/CONTRIBUTING.md Information on how to run the launcher for debugging purposes. It mentions that pre-configured Debug tasks are available within the workspace. ```general Use the Debug tasks already configured to run the launcher. ``` -------------------------------- ### PearAI Submodule Development Setup Source: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md Steps to configure and run the PearAI submodule extension for development. This involves updating VSCode launch configurations, installing dependencies, and running build tasks. ```shell Cmd/Ctrl+Shift+P Tasks: Run Task install-and-build ``` ```shell Cmd/Ctrl+Shift+P Developer: Open Webview Developer Tools ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/trypear/pearai-app/blob/main/extensions/json-language-features/CONTRIBUTING.md Installs all necessary project dependencies, including those for the JSON language features client and server, as well as development dependencies like gulp. This command should be executed in the root directory of the project. ```bash npm i ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/trypear/pearai-app/blob/main/extensions/css-language-features/CONTRIBUTING.md Installs all necessary dependencies for the VS Code CSS language features extension and its sub-modules. This includes client, server, and development dependencies like gulp. ```shell npm i ``` -------------------------------- ### Setup PearAI Environment (macOS/Linux) Source: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md Shell script to set up the development environment for PearAI on macOS and Linux systems. It handles necessary configurations and installations required for development. ```bash ./scripts/pearai/setup-environment.sh ``` -------------------------------- ### Install Dependencies Source: https://github.com/trypear/pearai-app/blob/main/extensions/html-language-features/CONTRIBUTING.md Installs project dependencies, including those for the HTML language features client and server, and development tools like gulp. This command should be run from the root directory of the VS Code project. ```shell npm i ``` -------------------------------- ### Load Example Source Code Source: https://github.com/trypear/pearai-app/blob/main/src/vs/platform/files/test/node/fixtures/resolver/index.html Loads selected example Strada source code into the editor and triggers recompilation. It fetches example files via AJAX and handles potential errors during the fetch. ```JavaScript function exampleSelectionChanged() { var examples = document.getElementById('examples'); var selectedExample = examples.options[examples.selectedIndex].value; if (selectedExample != "") { $.get('examples/' + selectedExample, function (srcText) { $('#stradaSrc').val(srcText); setTimeout(srcUpdated, 100); }, function (err) { console.log(err); }); } } ``` -------------------------------- ### Setup and Run vscode-wasm-typescript Source: https://github.com/trypear/pearai-app/blob/main/extensions/typescript-language-features/web/README.md Instructions to set up and run the language server host for TypeScript in the browser. This involves initiating three separate shell processes for dependency installation, continuous web compilation, and launching the Node.js server script with specific browser flags. ```bash npm i ``` ```bash npm run watch-web ``` ```bash node /scripts/code-web.js --coi ``` ```bash http://localhost:8080/?vscode-coi= ``` -------------------------------- ### Load Example Source Code Source: https://github.com/trypear/pearai-app/blob/main/src/vs/base/test/node/pfs/fixtures/index.html Loads selected example Strada source code into the editor and triggers recompilation. It fetches example files via AJAX and handles potential errors during the fetch. ```JavaScript function exampleSelectionChanged() { var examples = document.getElementById('examples'); var selectedExample = examples.options[examples.selectedIndex].value; if (selectedExample != "") { $.get('examples/' + selectedExample, function (srcText) { $('#stradaSrc').val(srcText); setTimeout(srcUpdated, 100); }, function (err) { console.log(err); }); } } ``` -------------------------------- ### Launch VS Code Extension Debugging Source: https://github.com/trypear/pearai-app/blob/main/extensions/css-language-features/CONTRIBUTING.md Launches a new VS Code instance with the CSS language features extension loaded, enabling debugging. Open a .css file to activate the extension and its language server. ```shell Launch Extension ``` -------------------------------- ### Load Example Source Code Source: https://github.com/trypear/pearai-app/blob/main/src/vs/platform/files/test/node/fixtures/service/index.html Loads selected example Strada source code into the editor and triggers recompilation. It fetches example files via AJAX and handles potential errors during the fetch. ```JavaScript function exampleSelectionChanged() { var examples = document.getElementById('examples'); var selectedExample = examples.options[examples.selectedIndex].value; if (selectedExample != "") { $.get('examples/' + selectedExample, function (srcText) { $('#stradaSrc').val(srcText); setTimeout(srcUpdated, 100); }, function (err) { console.log(err); }); } } ``` -------------------------------- ### Load Example Source Code Source: https://github.com/trypear/pearai-app/blob/main/src/vs/workbench/services/search/test/node/fixtures/index.html Loads selected example Strada source code into the editor and triggers recompilation. It fetches example files via AJAX and handles potential errors during the fetch. ```JavaScript function exampleSelectionChanged() { var examples = document.getElementById('examples'); var selectedExample = examples.options[examples.selectedIndex].value; if (selectedExample != "") { $.get('examples/' + selectedExample, function (srcText) { $('#stradaSrc').val(srcText); setTimeout(srcUpdated, 100); }, function (err) { console.log(err); }); } } ``` -------------------------------- ### Checkout Release Branch for VS Code Smoke Tests (Bash) Source: https://github.com/trypear/pearai-app/blob/main/test/smoke/README.md Steps to fetch, checkout a specific release branch, and install dependencies to run smoke tests for a particular VS Code release version. This ensures compatibility between tests and the build being tested. ```bash git fetch git checkout release/1.22 npm i && npm run compile cd test/smoke npm i ``` -------------------------------- ### PearAI Application Packaging Steps Source: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md This section outlines the process for packaging the PearAI application for various platforms. It involves setting up the environment, installing dependencies, building the application using Gulp, and packaging the extension. ```bash # Step 1: Setup Environment (if not already done) ./scripts/pearai/setup-environment.sh # Step 2: Install Dependencies (if not already done) ./scripts/pearai/install-dependencies.sh # Step 3: Build PearAI App for a specific platform (e.g., Linux x64) yarn gulp vscode-linux-x64 # Step 4: Navigate to the pearai-submodule extension directory cd extensions/pearai-submodule # Step 5: Install and build the extension ./scripts/install-and-build.sh # Step 6: Navigate to the VSCode directory within the extension cd extensions/vscode # Step 7: Package the extension npm run package # The .vsix extension will be created in extensions/pearai-submodule/extensions/vscode/build ``` ```powershell # Step 1: Setup Environment (if not already done) .\scripts\pearai\setup-environment.ps1 # Step 2: Install Dependencies (if not already done) .\scripts\pearai\install-dependencies.ps1 # Step 3: Build PearAI App for a specific platform (e.g., Windows x64) yarn gulp vscode-win32-x64 # Step 4: Navigate to the pearai-submodule extension directory cd extensions\pearai-submodule # Step 5: Install and build the extension .\scripts\install-and-build.sh # Step 6: Navigate to the VSCode directory within the extension cd extensions\vscode # Step 7: Package the extension npm run package # The .vsix extension will be created in extensions\pearai-submodule\extensions\vscode\build ``` -------------------------------- ### Install PearAI Dependencies (Windows) Source: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md Yarn command to install project dependencies for PearAI on Windows. This is typically used after the initial setup or when dependencies need to be refreshed. ```bash yarn ``` -------------------------------- ### Preview Icons with a Web Server Source: https://github.com/trypear/pearai-app/blob/main/extensions/theme-seti/README.md This describes the process of previewing icons using the `./icons/preview.html` file. The HTML file must be served by a web server to render correctly, allowing developers to visually verify the icons included in the theme. ```bash # Example using Python's simple HTTP server (run from theme-seti directory) python -m http.server # Then open your browser to http://localhost:8000/icons/preview.html ``` -------------------------------- ### Install PearAI Dependencies (macOS/Linux) Source: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md Shell script to install project dependencies for PearAI on macOS and Linux after the initial setup. This command ensures all required packages are downloaded and linked. ```bash ./scripts/pearai/install-dependencies.sh ``` -------------------------------- ### Initialize Recording Module with RequireJS Source: https://github.com/trypear/pearai-app/blob/main/src/vs/editor/test/browser/controller/imeRecorder.html Configures the RequireJS loader by setting the base URL to 'out' and then asynchronously loads the 'imeRecorder' module. This is a common pattern for initializing specific editor functionalities or testing components. ```javascript require.config({ baseUrl: '../../../../../../out' }); require(['vs/editor/test/browser/controller/imeRecorder'], function() { }); ``` -------------------------------- ### Example Client Initialization Options Source: https://github.com/trypear/pearai-app/blob/main/extensions/json-language-features/server/README.md A TypeScript code snippet showing how to set client options for a language client, specifically configuring handled schema protocols. ```typescript let clientOptions: LanguageClientOptions = { initializationOptions: { handledSchemaProtocols: ['file'] // language server should only try to load file URLs } // ... other client options } ``` -------------------------------- ### Install and Launch JSON Language Server Source: https://github.com/trypear/pearai-app/blob/main/extensions/json-language-features/server/README.md Provides instructions on how to install the `vscode-json-languageserver` npm module globally and launch the server using different communication protocols like Node-IPC, stdio, or socket. ```bash npm install -g vscode-json-languageserver ``` ```bash vscode-json-languageserver --node-ipc ``` ```bash vscode-json-languageserver --stdio ``` ```bash vscode-json-languageserver --socket= ``` -------------------------------- ### Watch vscode-css-languageservice for Changes Source: https://github.com/trypear/pearai-app/blob/main/extensions/css-language-features/CONTRIBUTING.md Continuously recompiles the vscode-css-languageservice library whenever changes are detected. This ensures the linked version is always up-to-date. ```shell npm run watch ``` -------------------------------- ### Remove Quarantine Attribute on macOS (Bash) Source: https://github.com/trypear/pearai-app/blob/main/test/smoke/README.md Command to remove the quarantine attribute from a downloaded server with web bits on macOS. This is necessary to avoid security issues when the application starts. ```bash xattr -d com.apple.quarantine ``` -------------------------------- ### Reload VS Code Window Source: https://github.com/trypear/pearai-app/blob/main/extensions/css-language-features/CONTRIBUTING.md Reloads the VS Code window to apply changes or restart the extension without closing the entire VS Code application. ```shell Reload Window ``` -------------------------------- ### Run PearAI Application (Windows First Run) Source: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md Batch script to perform the first-time installation and launch of the PearAI application on Windows. It creates necessary symlinks before running the application. ```batch .\scripts\code.bat ``` -------------------------------- ### Enable Server Trace Logging Source: https://github.com/trypear/pearai-app/blob/main/extensions/css-language-features/CONTRIBUTING.md Configures VS Code settings to enable verbose tracing of communication between the client and the CSS language server. This is useful for debugging. ```javascript "css.trace.server": "verbose" ``` -------------------------------- ### Prepare local seti-ui for Icon Updates Source: https://github.com/trypear/pearai-app/blob/main/extensions/theme-seti/README.md Instructions for preparing a local copy of the seti-ui repository to be used by the theme-seti update script. This involves cloning seti-ui to a specific location, installing its dependencies, and running a preparation script to generate updated icons. ```bash # Clone seti-ui to the directory next to your vscode repo # From the theme-seti directory, this would be: git clone https://github.com/jesseweed/seti-ui.git ../seti-ui # Navigate into the cloned seti-ui directory cd ../seti-ui # Install dependencies npm install # Run the prepublish script to generate icons npm run prepublishOnly ``` -------------------------------- ### Link Local vscode-json-languageservice Source: https://github.com/trypear/pearai-app/blob/main/extensions/json-language-features/CONTRIBUTING.md Links a locally cloned and installed version of the 'vscode-json-languageservice' library into the 'json-language-features/server' directory. This allows for interactive testing of changes made to the language service. ```bash cd ../vscode-json-languageservice npm link cd ../pearai-app/extensions/json-language-features/server npm link vscode-json-languageservice ``` -------------------------------- ### Setup PearAI Environment (Windows) Source: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md PowerShell script to set up the development environment for PearAI on Windows systems. It ensures all necessary dependencies and configurations are in place for Windows users. ```powershell .\scripts\pearai/setup-environment.ps1 ``` -------------------------------- ### Link Development vscode-css-languageservice Source: https://github.com/trypear/pearai-app/blob/main/extensions/css-language-features/CONTRIBUTING.md Links a local development version of the vscode-css-languageservice library into the css-language-features server project. This allows testing changes made directly in the language service. ```shell npm link ``` ```shell npm link vscode-css-languageservice ```