chore(search) VSCode Search extension: Update README and CHANGELOG (#63562)

Update the README and CHANGELOG after recent changes.

## Test plan

Read the README and CHANGELOG
This commit is contained in:
Peter Guy 2024-07-01 05:37:37 -07:00 committed by GitHub
parent 02686b74f0
commit 0a3e340efb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 45 additions and 49 deletions

View File

@ -8,20 +8,23 @@ The Sourcegraph extension uses major.EVEN_NUMBER.patch (eg. 2.0.1) for release v
### Changes
- Change the extension name from "Sourcegraph" to "Search by
Sourcegraph" [pull/51790](https://github.com/sourcegraph/sourcegraph/pull/51790)
Sourcegraph" [#51790](https://github.com/sourcegraph/sourcegraph/pull/51790)
- Remove the URL and Access Token settings because authentication is managed in the extension now. [#63559](https://github.com/sourcegraph/sourcegraph/pull/63559)
- Remove the signup link for sourcegraph.com because sourcegraph.com no longer hosts private code. [#63558](https://github.com/sourcegraph/sourcegraph/pull/63558)
### Fixes
- Various UI fixes for dark and light themes [pull/50598](https://github.com/sourcegraph/sourcegraph/pull/50598)
- Fix authentication so it works through the UI instead of requiring manual modification of `settings.json` [pull/63175](https://github.com/sourcegraph/sourcegraph/pull/63175)
- Various UI fixes for dark and light themes [#50598](https://github.com/sourcegraph/sourcegraph/pull/50598)
- Fix authentication so it works through the UI instead of requiring manual modification of `settings.json` [#63175](https://github.com/sourcegraph/sourcegraph/pull/63175)
- Fix repo and file browsing not loading/taking a long time to load (no specific PR, just natural progression of the code)
## 2.2.15
### Fixes
- Prefer `upstream` and `origin` remotes when no remote is
selected [issues/2761](https://github.com/sourcegraph/sourcegraph/issues/2761) [pull/48369](https://github.com/sourcegraph/sourcegraph/pull/48369)
- Fixes content security policy configuration: [pull/47263](https://github.com/sourcegraph/sourcegraph/pull/47263)
selected [issues/2761](https://github.com/sourcegraph/sourcegraph/issues/2761) [#48369](https://github.com/sourcegraph/sourcegraph/pull/48369)
- Fixes content security policy configuration: [#47263](https://github.com/sourcegraph/sourcegraph/pull/47263)
## 2.2.14
@ -35,7 +38,7 @@ The Sourcegraph extension uses major.EVEN_NUMBER.patch (eg. 2.0.1) for release v
### Changes
- Support for logical multiline matches in the UI for Sourcegraph instance versions >=
3.42.0 [pull/43007](https://github.com/sourcegraph/sourcegraph/pull/43007)
3.42.0 [#43007](https://github.com/sourcegraph/sourcegraph/pull/43007)
- Tokens will now be stored in secret storage and removed from user
settings [issues/36731](https://github.com/sourcegraph/sourcegraph/issues/36731)
- Users can now log in through the
@ -46,32 +49,32 @@ The Sourcegraph extension uses major.EVEN_NUMBER.patch (eg. 2.0.1) for release v
### Fixes
- Fix issue where pattern type was always set to `literal` for Sourcegraph instance versions earlier than v3.43.0, which
was overriding regex/structural toggles [pull/43005](https://github.com/sourcegraph/sourcegraph/pull/43005)
was overriding regex/structural toggles [#43005](https://github.com/sourcegraph/sourcegraph/pull/43005)
## 2.2.12
### Fixes
- Vary search pattern type depending on Sourcegraph instance
version: [issues/41236](https://github.com/sourcegraph/sourcegraph/issues/41236), [pull/42178](https://github.com/sourcegraph/sourcegraph/pull/42178)
version: [issues/41236](https://github.com/sourcegraph/sourcegraph/issues/41236), [#42178](https://github.com/sourcegraph/sourcegraph/pull/42178)
## 2.2.10
### Changes
- Remove tracking parameters from all shareable URLs [pull/42022](https://github.com/sourcegraph/sourcegraph/pull/42022)
- Remove tracking parameters from all shareable URLs [#42022](https://github.com/sourcegraph/sourcegraph/pull/42022)
### Fixes
- Fix Sourcegraph blob link
generation: [issues/42060](https://github.com/sourcegraph/sourcegraph/issues/42060), [pull/42065](https://github.com/sourcegraph/sourcegraph/pull/42065)
generation: [issues/42060](https://github.com/sourcegraph/sourcegraph/issues/42060), [#42065](https://github.com/sourcegraph/sourcegraph/pull/42065)
## 2.2.9
### Fixes
- Fix an issue that prevented search results on some older Sourcegraph instance versions to not render
properly [pull/40621](https://github.com/sourcegraph/sourcegraph/pull/40621)
properly [#40621](https://github.com/sourcegraph/sourcegraph/pull/40621)
## 2.2.8
@ -80,7 +83,7 @@ The Sourcegraph extension uses major.EVEN_NUMBER.patch (eg. 2.0.1) for release v
- `Internal:` Automate release step for Open-VSX
registry: [issues/37704](https://github.com/sourcegraph/sourcegraph/issues/37704)
- Remove integrations banners and corresponding
pings: [issues/38625](https://github.com/sourcegraph/sourcegraph/issues/38625), [pull/38715](https://github.com/sourcegraph/sourcegraph/pull/38715), [pull/38862](https://github.com/sourcegraph/sourcegraph/pull/38862)
pings: [issues/38625](https://github.com/sourcegraph/sourcegraph/issues/38625), [#38715](https://github.com/sourcegraph/sourcegraph/pull/38715), [#38862](https://github.com/sourcegraph/sourcegraph/pull/38862)
### Fixes
@ -89,7 +92,7 @@ The Sourcegraph extension uses major.EVEN_NUMBER.patch (eg. 2.0.1) for release v
### Changes
- Remove references to creating an account on cloud, or configuring a cloud
account [pull/38071](https://github.com/sourcegraph/sourcegraph/pull/38071)
account [#38071](https://github.com/sourcegraph/sourcegraph/pull/38071)
### Fixes

View File

@ -4,9 +4,9 @@
![Search Gif](https://storage.googleapis.com/sourcegraph-assets/VS%20Marketplace/tableContainer2.gif)
Sourcegraphs code search allows you to find & fix things fast across all your code.
Sourcegraphs Code Search allows you to find & fix things fast across all your code.
Sourcegraph for VS Code allows you to search millions of open source repositories right from your VS Code IDE—for free.
Sourcegraph Search for VS Code allows you to search millions of open source repositories right from your VS Code IDE for free.
You can learn from helpful code examples, search best practices, and re-use code from millions of repositories across
the open source universe.
@ -14,20 +14,20 @@ Sourcegraphs Code Intelligence feature provides fast, cross-repository naviga
references” features, allowing you to understand new code quickly and find answers in your code across codebases of any
size.
You can read more about Sourcegraph on our [website](https://about.sourcegraph.com/).
You can read more about Sourcegraph on our [website](https://sourcegraph.com/).
Not the extension you're looking for? Download
the [Cody extension](https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai) for code AI assistance.
the [Sourcegraph Cody extension](https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai) for code AI assistance.
## Installation
### From the Visual Studio Marketplace:
1. Install Sourcegraph from
1. Install Search by Sourcegraph from
the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sourcegraph.sourcegraph).
2. Launch VS Code, and click on the Sourcegraph (Wildcard) icon in the VS Code Activity Bar to open the Sourcegraph
extension. Alternatively, you can launch the extension by pressing <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>
or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> and searching for “Sourcegraph: Open search tab.”
or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> and searching for “Sourcegraph: Focus on Sourcegraph Search View.”
### From within VS Code:
@ -44,41 +44,36 @@ the [Cody extension](https://marketplace.visualstudio.com/items?itemName=sourceg
## Using the Sourcegraph extension
To get started and open the Sourcegraph extension, simply click the Sourcegraph (Wildcard) icon in the VS Code Activity
Bar.
To get started, click the Sourcegraph (Wildcard) icon in the VS Code Activity Bar.
Sourcegraph functions like any search engine; simply type in your search query, and Sourcegraph will populate search
You can search many open source repositories indexed on https://sourcegraph.com immediately!
Sourcegraph Search functions like any search engine: type in your search query, and Sourcegraph will populate search
results.
Learn more about Sourcegraph search in our [docs](https://docs.sourcegraph.com/code_search).
Learn more about Sourcegraph Code Search usage in our [docs](https://sourcegraph.com/docs/code_search).
For example, you can search for "auth provider" in a Go repository with a search like this one:
```
repo:sourcegraph/sourcegraph lang:go auth provider
repo:sourcegraph/sourcegraph lang:go "auth provider"
```
![Lang search gif](https://storage.googleapis.com/sourcegraph-assets/VS%20Marketplace/sourcegraph_search.gif)
## Adding and searching your own code
### Creating an account
If you are part of an organization that has installed a Sourcegraph instance, you can authenticate to it using a Personal Access Token, and then your searches will use that instance.
In addition to searching open source code, you can create a Sourcegraph account to search your own private and public
repositories. You can create an account and sync your repositories with the following steps:
If you need help creating a Personal Access Token, [the documentation](https://sourcegraph.com/docs/cli/how-tos/creating_an_access_token) has a helpful video.
1. Click the `Create an account` button in the sidebar of the Sourcegraph extension. You will be directed to
sourcegraph.com in your browser.
2. Follow the instructions to create and configure your Sourcegraph instance
Once you have generated a token, copy it and paste it into the Sourcegraph extension along with the URL to your Sourcegraph instance.
### Connecting to your Sourcegraph instance
Click `Authenticate account` to login and start searching your own code!
1. In Sourcegraph, in your account settings, navigate to `Access tokens`, then click `Generate new token`.
2. Once you have generated a token, navigate to your VS Code Settings, then navigate to "Extension settings".
3. Navigate to `Code preferences`, then click `Settings`.
4. Search for `Sourcegraph`, and enter the newly generated access token as well as your Sourcegraph instance URL.
5. Add custom headers using the `sourcegraph.requestHeaders` setting (added in v2.0.9) if a specific header is required
to make connection to your private instance.
If specific headers are required to connect to your Sourcegraph instance, you can configure them in the VSCode settings using the `sourcegraph.requestHeaders` setting.
There are other settings such as proxy details that you can set also. Search for "sourcegraph" in Settings to find them.
### Adding it to your workspace's recommended extensions
@ -110,18 +105,16 @@ Code.
This extension contributes the following settings:
| Setting | Description | Example |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| sourcegraph.url | Specify your on-premises Sourcegraph instance here, if applicable. The extension is connected to Sourcegraph Cloud by default. | "https://your-sourcegraph.com" |
| sourcegraph.accessToken | [Depreciated after 2.2.12] The access token to query the Sourcegraph API. Required to use this extension with private instances. Create a new access token at `${SOURCEGRAPH_URL}/users/<sourcegraph-username>/settings/tokens` | null |
| sourcegraph.remoteUrlReplacements | Object, where each `key` is replaced by `value` in the remote url. | {"github": "gitlab", "master": "main"} |
| sourcegraph.defaultBranch | String to set the name of the default branch. Always open files in the default branch. | "master" |
| sourcegraph.requestHeaders | Takes object, where each value pair will be added to the request headers made to your instance. | {"Cache-Control": "no-cache", "Proxy-Authenticate": "Basic"} |
| sourcegraph.basePath | The file path on the machine to the folder that is expected to contain all repositories. We will try to open search results using the basePath. | "/Users/USERNAME/Documents/" |
| sourcegraph.proxyProtocol | The protocol to use when proxying requests to the Sourcegraph instance. | "http", "https" |
| sourcegraph.proxyHost | The host to use when proxying requests to the Sourcegraph instance. It shouldn't include a protocol (like "http://") or a port (like ":7080"). When this is set, port must be set as well. | "localhost" |
| sourcegraph.proxyPort | The port to use when proxying requests to the Sourcegraph instance. When this is set, host must be set as well. | 80, 443, 7080, 9090 |
| sourcegraph.proxyPath | The full path to a file when proxying requests to the Sourcegraph instance via a UNIX socket. | "/home/user/path/unix.socket" |
| Setting | Description | Example |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ |
| sourcegraph.remoteUrlReplacements | Object, where each `key` is replaced by `value` in the remote url. | {"github": "gitlab", "master": "main"} |
| sourcegraph.defaultBranch | String to set the name of the default branch. Always open files in the default branch. | "master" |
| sourcegraph.requestHeaders | Takes object, where each value pair will be added to the request headers made to your instance. | {"Cache-Control": "no-cache", "Proxy-Authenticate": "Basic"} |
| sourcegraph.basePath | The file path on the machine to the folder that is expected to contain all repositories. We will try to open search results using the basePath. | "/Users/USERNAME/Documents/" |
| sourcegraph.proxyProtocol | The protocol to use when proxying requests to the Sourcegraph instance. | "http", "https" |
| sourcegraph.proxyHost | The host to use when proxying requests to the Sourcegraph instance. It shouldn't include a protocol (like "http://") or a port (like ":7080"). When this is set, port must be set as well. | "localhost" |
| sourcegraph.proxyPort | The port to use when proxying requests to the Sourcegraph instance. When this is set, host must be set as well. | 80, 443, 7080, 9090 |
| sourcegraph.proxyPath | The full path to a file when proxying requests to the Sourcegraph instance via a UNIX socket. | "/home/user/path/unix.socket" |
## Questions & Feedback