Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SALINew to Visual Studio Code? Get it now.

SALI

royru

|
30 installs
| (0) | Free
a code context website recommender based on your past browser activity
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SALI

SALI helps you find, remember, and share relevant web pages with your team.

Getting Started

Open the "Run and Debug" side-panel. Start (and debug) the extension by clicking "Run Extension". The entry point to a vsc extension is src/extension.ts.

Notice

  • does not work standalone (uses context-electron as backend).
  • only works with .git projects.

Packaging the Extension

Run vsce package. It creates a .vsix file (e.g. sali-0.2.6.vsix) in the repository root.

Installing the Extension

Run code --install-extension <path-to-extension>.vsix to install the extension locally.

For more infos, see the docs.

Components

  • fileLineContext.ts maintains a map of all code curations and is in charge of updating curations based on TextDocumentChangeEvent. If the curated code changes, those changes are continuously synced with the backend app via ipc.
  • ipc.ts connects to the context-electron backend.
  • currentFeatureState.ts is the entry point to enable or disable curation features. This was useful for a two-tier curation/consumption study where we disabled curation features during the latter part.
  • gitApi.ts git api wrapper to get current "diff blobs" and git username. Git diffs can be parsed and processed in the backend (for semantic/lexical analysis of modified parts of code).

How are curations stored and updated?

If you create a new curation (e.g. through the context menu), the code found on the selected line is stored in a YAML file. Multi-line curations are supported as well. The extension regularly checks where the code is located within a file and marks the respective lines with a star on the left-hand side. Therefore, even if the code is moved around, the correct location is marked. When a curated code snippet is updated in the file, also the code stored in the YAML file is updated. When the code snippet is removed entirely, the extension asks the user if she/he wants to delete the curation as well.

If a colleague who doesn't use SALI changes a file, a curated code snippet might not be found anymore. In this case, the extensions moves the curation to the "Curations Assigned to File" section in the SALI view. There, the user can also reassign the curation to another code snippet.

Development

  • Types that are shared between context-vscode and context-electron are included in context-vscode-types. To work on all projects simultaneously, run npm link in your local context-vscode-types repo and then npm link context-vscode-types in the other two repos.
  • Note that after making or pulling changes to context-vscode-types, you have to re-compile the context-vscode-types code (e.g. by running npm i)
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft