mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:51:43 +00:00
cody app doc updates (#54295)
Updated the docs for the Cody app to include the latest release, updated installation/upgrading/uninstallation information, instructions for adding your own LLM key, and known troubleshooting (this will need to be updated routinely, of course). I've also replaced mentions of Sourcegraph app with Cody app and updated telemetry information. I suspect some of the release pipeline docs needs to be updated since we renamed the app, but I'll let @burmudar take a look at that separately. I'll push another PR if we do, in fact, end up launching with the experimental IntelliJ extension. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> n/a docs update --------- Co-authored-by: Chris Warwick <christopher.warwick@sourcegraph.com>
This commit is contained in:
parent
e35271170d
commit
25df5bfbb0
@ -84,7 +84,6 @@ We highly recommend deploying Sourcegraph on Kubernetes with Kustomize due to th
|
||||
|
||||
**For setting up non-production environments on local machines.**
|
||||
|
||||
- <span class="badge badge-experimental">Experimental</span> [Sourcegraph App](../../app/index.md) - A standalone Desktop application
|
||||
- [Docker Compose](docker-compose/index.md) - Install Sourcegraph on Docker Compose
|
||||
- [Docker Single Container](docker-single-container/index.md) - Install Sourcegraph using a single Docker container
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Pings
|
||||
|
||||
Sourcegraph periodically sends a ping to Sourcegraph.com to help our product and customer teams. It sends only the high-level data below. It never sends code, repository names, usernames, or any other specific data. To learn more, go to the **Site admin > Pings** page on your instance (the URL is `https://sourcegraph.example.com/site-admin/pings`) or, for users of the Sourcegraph app, see [Sourcegraph app telemetry](#sourcegraph-app-telemetry).
|
||||
Sourcegraph periodically sends a ping to Sourcegraph.com to help our product and customer teams. It sends only the high-level data below. It never sends code, repository names, usernames, or any other specific data. To learn more, go to the **Site admin > Pings** page on your instance (the URL is `https://sourcegraph.example.com/site-admin/pings`).
|
||||
|
||||
Sourcegraph will also periodically perform a license verification check, to verify the validity of the configured Sourcegraph license. Tampering with these checks, or preventing them from occuring, will cause Sourcegraph to disable many features until a successful check is completed. Certain Enterprise licenses can request to be exempt from these license verification checks.
|
||||
|
||||
@ -201,17 +201,6 @@ Sourcegraph aggregates usage and performance metrics for some product features i
|
||||
- Aggregate daily, weekly, monthly repository metadata usage statistics
|
||||
</details>
|
||||
|
||||
## Sourcegraph app telemetry
|
||||
|
||||
We collect extremely limited telemetry from the Sourcegraph app to infer value to our users and send update notifications:
|
||||
|
||||
- Randomly generated site identifier
|
||||
- Deployment type (the Sourcegraph app)
|
||||
- Release version
|
||||
- Operating system
|
||||
- Total number of repositories added
|
||||
- Whether a user was active today (boolean)
|
||||
|
||||
## CIDR Range for Sourcegraph
|
||||
|
||||
Sourcegraph currently uses Cloudflare to provide web application security. You should allow access to all [Cloudflare IP ranges](https://www.cloudflare.com/ips/)
|
||||
@ -232,6 +221,17 @@ Sourcegraph only connects to Sourcegraph.com for three purposes:
|
||||
|
||||
There are no other automatic external connections to Sourcegraph.com (or any other site on the internet).
|
||||
|
||||
## Connections to Sourcegraph.com via Cody app
|
||||
|
||||
The Cody app connects to Sourcegraph.com to send a limited selection of the pings described above in order to infer value to our users and send update notifications. They include:
|
||||
|
||||
- Randomly generated site identifier
|
||||
- Deployment type (the Cody app)
|
||||
- Release version
|
||||
- Operating system
|
||||
- Total number of repositories added
|
||||
- Whether a user was active today (boolean)
|
||||
|
||||
## Troubleshooting Pings
|
||||
|
||||
It may happen that Sourcegraph will stop sending critical telemetry to Sourcegraph.com, if this happens it may indicate a problem with Sourcegraphs frontend database, or a site settings misconfiguration. Below are some debugging steps.
|
||||
|
||||
@ -36,7 +36,7 @@ Sourcegraph has two upgrade types. **Standard** upgrades and **Multiversion** up
|
||||
- Moves Sourcegraph multiple versions forward (`v5.0.0` to `v5.2.0`).
|
||||
- Requires downtime while the database schemas are rewritten and unfinished out-of-band migrations are applied
|
||||
- We currently support jumping from version `v3.20` or later to any future version.
|
||||
- **Sourcegraph App and AMIs do not yet support multiversion upgrades. We hope to improve this soon.**
|
||||
- **AMIs do not yet support multiversion upgrades. We hope to improve this soon.**
|
||||
|
||||
> *Note: Patch versions don't determine upgrade type -- you should always upgrade to the latest patch.*
|
||||
|
||||
|
||||
26
doc/app/app_configuration.md
Normal file
26
doc/app/app_configuration.md
Normal file
@ -0,0 +1,26 @@
|
||||
# Cody App Configuration
|
||||
|
||||
## Using a third-party LLM provider
|
||||
|
||||
Instead of using Sourcegraph Cody Gateway, you can configure the Cody app to use a third-party provide directly. Currently this can only be Anthropic or OpenAI.
|
||||
|
||||
You must create your own key with Anthropic [here](https://console.anthropic.com/account/keys) or with OpenAI [here](https://beta.openai.com/account/api-keys). Once you have the key, go to Settings > Advanced settings and update your site configuration:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
// [...]
|
||||
"cody.enabled": true,
|
||||
"completions": {
|
||||
"enabled": true,
|
||||
"provider": "anthropic", // or "openai" if you use OpenAI
|
||||
"accessToken": "<key>",
|
||||
"endpoint": "https://api.anthropic.com/v1/complete" // or "https://api.openai.com/v1/chat/completions"
|
||||
},
|
||||
"embeddings": {
|
||||
"enabled": true,
|
||||
"provider": "openai",
|
||||
"accessToken": "<key>",
|
||||
"endpoint": "https://api.openai.com/v1/embeddings"
|
||||
},
|
||||
}
|
||||
```
|
||||
@ -34,32 +34,25 @@ The Cody app is a free, lightweight, native desktop application that connects yo
|
||||
|
||||
## Installation
|
||||
|
||||
Check the [latest release](https://github.com/sourcegraph/sourcegraph/releases/tag/app-v2023.6.21%2B1321.8c3a4999f2) to find the right download link for your operating system. The app is currently supported on MacOS (use _aarch64.dmg for Apple Silicon or _x64.dmg for Mac Intel) and Linux (_amd64.deb), and we're working on Windows support.
|
||||
Check the [latest release](https://github.com/sourcegraph/sourcegraph/releases/tag/app-v2023.6.26%2B1328.bca7d2c3ed) to find the right download link for your operating system. The app is currently supported on MacOS (use _aarch64.dmg for Apple Silicon or _x64.dmg for Mac Intel) and Linux (_amd64.deb), and we're working on Windows support.
|
||||
|
||||
## Setup
|
||||
|
||||
Follow the setup instructions to connect the app to your Sourcegraph.com account (or create one for free if you don't have an account yet), add your local projects, and select up to 10 of those projects to build your code graph. The code graph helps Cody generate more accurate answers about your code by sending your code to Sourcegraph to create [embeddings](../cody/explanations/code_graph_context.md#embeddings). (This may take a few minutes, depending on the size of your repos.) We are working on making it so that *all* the projects you connect to your app get embeddings and bumping the cap up from 10.
|
||||
|
||||
If you use VS Code, we recommend you follow the steps to download the VS Code extension, which enables Cody within your editor. If you already have the extension, use the settings gear in the Cody chat window in the editor to log out and log back in through the app. Cody in VS Code will then talk to your Sourcegraph app to answer questions.
|
||||
If you use VS Code, we recommend you follow the steps to download the VS Code extension, which enables Cody within your editor. (If you installed the extension before you downloaded the app, you'll see a prompt in your editor to download the app.) Cody in VS Code will then talk to your Sourcegraph app to answer questions.
|
||||
|
||||
Note: We're only supporting VS Code right now, but a Jetbrains extension is coming soon!
|
||||
|
||||
## Get help & give feedback
|
||||
|
||||
Cody app is early stages. If you run into any trouble or have ideas/feedback, we'd love to hear from you!
|
||||
|
||||
* [Join our community Discord](https://discord.com/invite/s2qDtYGnAE) for live help/discussion
|
||||
* [Create a GitHub issue](https://github.com/sourcegraph/app/issues/new)
|
||||
|
||||
## Upgrading
|
||||
|
||||
We're shipping new releases of the app quickly, and you should get prompts to upgrade automatically. Let us know if you have any issues and we'll be happy to help.
|
||||
You'll get prompts to upgrade automatically. Let us know if you have any issues and we'll be happy to help.
|
||||
|
||||
If you're on a version that's 2023.6.13 or older, we recommend you uninstall the app (see below) and download the most recent version in order to add your projects to your code graph during setup. Also note that these older versions of the app were called "Sourcegraph" and included Sourcegraph code search. Going forward, the app will be a Cody-only experience (and branded accordingly) so that we can focus on making Cody as useful and intuitive as possible.
|
||||
If you're on a version that's 2023.6.13 or older, we recommend you uninstall the app (see [Uninstallation](#uninstallation) below) and download the most recent version in order to add your projects to your code graph during setup. Also note that these older versions of the app were called "Sourcegraph" and included Sourcegraph code search. Going forward, the app will be a Cody-only experience (and branded accordingly) so that we can focus on making Cody as useful and intuitive as possible.
|
||||
|
||||
## Rate limiting
|
||||
|
||||
There are several forms of rate limiting that help us control costs for free versions of Cody. We expect to relax these limits as we continue development on [Cody Gateway](../cody/explanations/cody_gateway.md).
|
||||
There are several forms of rate limiting that help us control costs for free versions of Cody. We expect to relax these limits as we continue development on [Cody Gateway](../cody/explanations/cody_gateway.md). If you'd like to use your own third-party LLM provider instead of Cody Gateway, you must create your own key with Anthropic or OpenAI and [update your app configuration](app_configuration.md).
|
||||
|
||||
### Cody Chat
|
||||
Interactions with Cody Chat (whether in the app UI or in the editor extension) are capped at 100 requests per day.
|
||||
@ -72,22 +65,24 @@ The setup experience allows users to select up to 10 repos for embeddings. Addit
|
||||
|
||||
## Uninstallation
|
||||
|
||||
We're working on a better way to clear all data including webkit storage, but for now you can run the following command to uninstall the app:
|
||||
Select Troubleshooting > Clear data from the system tray and delete the app from your applications folder. If you're on an older version of the app and don't see a "Clear data" option, run:
|
||||
|
||||
```bash
|
||||
rm -rf ~/.sourcegraph-psql ~/Library/Application\ Support/com.sourcegraph.cody ~/Library/Caches/com.sourcegraph.cody ~/Library/WebKit/com.sourcegraph.cody
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Known issues:
|
||||
- The app is slow to load on initial install, due to Postgres issues we're working to tighten up.
|
||||
- In the app's Cody Chat UI, Cody will read N files to provide an answer. Those files are listed as hyperlinks, but they should not be.
|
||||
- In the settings dropdown in the app, there's an option for "Teams" that should not be there as the app is a single-player experience.
|
||||
- The cloud icon in the app UI always says "indexing" and refers to Sourcegraph code search, not projects that are being added to the app's code graph.
|
||||
|
||||
See [App troubleshooting](troubleshooting.md)
|
||||
|
||||
## Release pipeline
|
||||
|
||||
See [App release pipeline](release-pipeline.md)
|
||||
|
||||
## Get help & give feedback
|
||||
|
||||
Cody app is new and we're iterating on it quickly. If you run into any trouble or have ideas/feedback, we'd love to hear from you!
|
||||
|
||||
* [Join our community Discord](https://discord.com/invite/s2qDtYGnAE) for live help/discussion
|
||||
* [Create a GitHub issue](https://github.com/sourcegraph/app/issues/new)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Sourcegraph App release pipeline
|
||||
# Cody App release pipeline
|
||||
|
||||
The Sourcegraph App release pipeline utilizes buildkite to build and bundle Sourcegraph App for all current [supported platforms](#supported-platforms). The primary definition of the buildkite pipeline can be found at `.buildkite/pipeline.app.yml` in the Sourcegraph mono repo.
|
||||
The Cody App release pipeline utilizes buildkite to build and bundle Cody App for all current [supported platforms](#supported-platforms). The primary definition of the buildkite pipeline can be found at `.buildkite/pipeline.app.yml` in the Sourcegraph mono repo.
|
||||
|
||||
## Branches that trigger the release pipeline
|
||||
|
||||
@ -16,7 +16,7 @@ For now the only difference between the two branches is how the release will be
|
||||
|
||||
## Supported platforms
|
||||
|
||||
Sourcegraph App currently supports the following platforms:
|
||||
Cody App currently supports the following platforms:
|
||||
|
||||
- `x86_64-linux`
|
||||
- `x86_64-darwin` (also known as Intel Mac)
|
||||
@ -33,12 +33,12 @@ The pipeline is broken up into 3 stages:
|
||||
The above stages are accomplished by utilizing hosts across two cloud providers namely GCP and AWS.
|
||||
|
||||
- For GCP we execute any step that doesn't require tooling specific APIs or tooling.
|
||||
- Compiling and bundling of Sourcegraph App for Linux platform.
|
||||
- Compiling and bundling of Cody App for Linux platform.
|
||||
- We **only** utilize Bazel to compile the Sourcegraph Backend.
|
||||
- Performing the GitHub release.
|
||||
- We use AWS to host a MacOS host, which we utilize for all Apple specific tooling and processes.
|
||||
- Code Signing.
|
||||
- Compiling and bundling of Sourcegraph App for Intel Mac and Apple Silicon.
|
||||
- Compiling and bundling of Cody App for Intel Mac and Apple Silicon.
|
||||
- We use Bazel to compile the Sourcegraph Backend for `aarch64-darwin`.
|
||||
- We use Go to compile the Sourcegraph Backend for `x86_64-darwin`.
|
||||
|
||||
@ -100,7 +100,7 @@ Finally, once the release has been created the script will generate an `app.upda
|
||||
}
|
||||
```
|
||||
|
||||
The manifest will be available as an artefact on the `Create GitHub release` step of the pipeline. The manifest is used by Sourcegraph.com to tell Sourcegraph App clients checking in whether an update is available. Therefore, this manifest has to be uploaded to the following buckets depending on the use case:
|
||||
The manifest will be available as an artefact on the `Create GitHub release` step of the pipeline. The manifest is used by Sourcegraph.com to tell Cody App clients checking in whether an update is available. Therefore, this manifest has to be uploaded to the following buckets depending on the use case:
|
||||
|
||||
- Production
|
||||
- Bucket [`sourcegraph-app`](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/frontend/internal/app/updatecheck/app_update_checker.go?L25): This bucket is available in the `sourcegraph-dev` project, and the manifest should have to following name [`app.update.prod.manifest.json`](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/frontend/internal/app/updatecheck/app_update_checker.go?L31).
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
# App troubleshooting guide
|
||||
# Cody App troubleshooting guide
|
||||
|
||||
This page is in progress. If you're having trouble, please file an issue on the [issue tracker](https://github.com/sourcegraph/sourcegraph/issues) or ask in our [Discord](https://discord.gg/s2qDtYGnAE).
|
||||
### VS Code extension isn't indexing repositories correctly
|
||||
If you've confirmed that your repositories have been added to your app and embeddings have been generated successfully (check Settings > Advanced settings > Embedding jobs), the issue may be that your repositories don't have a git remote. If that's the case, try updating your extension settings (Settings > Settings > Extensions > Cody) to set `Cody: Codebase` to your path. For example, if the path on your local repositories pages is `User/myname/projects/my-repo`, you'd set `Cody: Codebase` to `my-repo`.
|
||||
|
||||
If you're having trouble, please file an issue on the [issue tracker](https://github.com/sourcegraph/app/issues) or ask in our [Discord](https://discord.gg/s2qDtYGnAE).
|
||||
@ -1,6 +1,6 @@
|
||||
# Enabling Cody with Sourcegraph.com
|
||||
|
||||
Cody uses Sourcegraph to fetch relevant context to generate answers and code. These instructions walk through installing Cody and connecting it to Sourcegraph.com. For private instances of Sourcegraph, see [this page about enabling Cody for Enterprise](enabling_cody_enterprise.md).
|
||||
Cody uses Sourcegraph to fetch relevant context to generate answers and code. These instructions walk through installing Cody in your editor and connecting it to Sourcegraph.com and is the best option if you're interested in using Cody on public code. To use Cody on your local code, download the [Cody App](../../app/index.md) or see [this page about enabling Cody for Enterprise](enabling_cody_enterprise.md).
|
||||
|
||||
## Initial setup
|
||||
|
||||
@ -15,7 +15,7 @@ You're now ready to use Cody in VS Code!
|
||||
|
||||
After installing, you can optionally use [code graph context](code_graph_context.md) to improve Cody's context of existing code. Note that code graph context is only available for public repositories on sourcegraph.com which have embeddings. [See the list](../embedded-repos.md) of repositories with embeddings and request any that you'd like to add by pinging a Sourcegraph team member in [Discord](https://discord.gg/8wJF5EdAyA).
|
||||
|
||||
If you want to use Cody with code graph context on private code, consider moving to a Sourcegraph Enterprise instance.
|
||||
If you want to use Cody with code graph context on private code, consider downloading the [Cody App](../../app/index.md) or moving to a Sourcegraph Enterprise instance.
|
||||
|
||||
### Enable code graph context
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
# Explanations
|
||||
|
||||
- [Enabling Cody for Sourcegraph Enterprise](enabling_cody_enterprise.md)
|
||||
- [Installing the Cody App](../../app/index.md)
|
||||
- [Enabling Cody with Sourcegraph.com](enabling_cody.md)
|
||||
- [Installing the Cody VS Code Extension](installing_vs_code.md)
|
||||
- [Configuring code graph context](code_graph_context.md)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Sourcegraph App
|
||||
# Cody App
|
||||
|
||||
## Code signing
|
||||
|
||||
- [Notes about code signing the Sourcegraph App](./codesigning.md)
|
||||
- [Notes about code signing the Cody App](./codesigning.md)
|
||||
- [Troubleshooting App not loading](./troubleshooting.md)
|
||||
- [Building App on Windows](./windows.md)
|
||||
|
||||
@ -73,9 +73,9 @@ Clarification and discussion about key concepts, architecture, and development s
|
||||
- [Overview](background-information/architecture/index.md)
|
||||
- [Introducing a new service](background-information/architecture/introducing_a_new_service.md)
|
||||
|
||||
## Sourcegraph App
|
||||
## Cody App
|
||||
|
||||
- [Notes about signing the Sourcegraph App with Apple code signing](background-information/app/codesigning.md)
|
||||
- [Notes about signing the Cody App with Apple code signing](background-information/app/codesigning.md)
|
||||
- [Troubleshooting App not loading](background-information/app/troubleshooting.md)
|
||||
|
||||
### Development
|
||||
|
||||
@ -19,6 +19,7 @@ Keep it as a single list with at most 2 levels. (Anything else may not render co
|
||||
- [FAQ](cody/faq.md)
|
||||
- [Troubleshooting](cody/troubleshooting.md)
|
||||
- [Code Autocomplete](cody/autocomplete.md)
|
||||
- [Cody App (beta)](app/index.md)
|
||||
- [Code search](code_search/index.md)
|
||||
- [Tutorials](code_search/tutorials/index.md)
|
||||
- [How-to guides](code_search/how-to/index.md)
|
||||
@ -78,7 +79,6 @@ Keep it as a single list with at most 2 levels. (Anything else may not render co
|
||||
- [Background information](dev/background-information/index.md)
|
||||
- [Contributing](dev/contributing.md)
|
||||
- [Dotcom](dotcom/index.md)
|
||||
- [Cody App (experimental)](app/index.md)
|
||||
- [Own (beta)](own/index.md)
|
||||
- [The CODEOWNERS format](own/codeowners_format.md)
|
||||
- [CODEOWNERS ingestion](own/codeowners_ingestion.md)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user