From 0fa1cd19ea2184426995fd33d7b5328c07fa0ee7 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Mon, 26 Aug 2024 15:00:12 -0700 Subject: [PATCH 1/7] Docs working branch for the September 4th release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8f2830be..d7f2d4012 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sourcegraph Docs - + Welcome to the Sourcegraph documentation! We're excited to have you contribute to our docs. We've recently rearchitectured our docs tech stack — powered by Next.js, TailwindCSS and deployed on Vercel. This guide will walk you through the process of contributing to our documentation using the new tech stack. From 383a044188ff87030660635e399dcdf22d038679 Mon Sep 17 00:00:00 2001 From: Stefan Hengl Date: Tue, 27 Aug 2024 00:15:50 +0200 Subject: [PATCH 2/7] search-jobs: update docs for GA (#594) - remove beta callout - new screenshots - update section "Disable Search Jobs" - several other minor fixes --------- Co-authored-by: Maedah Batool --- docs/code-search/types/search-jobs.mdx | 49 ++++++++++++-------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/docs/code-search/types/search-jobs.mdx b/docs/code-search/types/search-jobs.mdx index 5bcc05c06..f8323cd2a 100644 --- a/docs/code-search/types/search-jobs.mdx +++ b/docs/code-search/types/search-jobs.mdx @@ -1,13 +1,25 @@ # Search Jobs -

Use Search Jobs to search code at scale for large-scale organizations.

- - Search Jobs feature is in Beta stage and only available for Enterprise accounts. It is enabled by default since 5.3.0. +Use Search Jobs to search code at scale for large-scale organizations. Search Jobs allows you to run search queries across your organization's codebase (all repositories, branches, and revisions) at scale. It enhances the existing Sourcegraph's search capabilities, enabling you to run searches without query timeouts or incomplete results. With Search Jobs, you can start a search, let it run in the background, and then download the results from the Search Jobs UI when it's done. Site administrators can **enable** or **disable** the Search Jobs feature, making it accessible to all users on the Sourcegraph instance. +## Using Search Jobs + +To use Search Jobs, you need to: + +- Run a search query from your Sourcegraph instance +- Click the result menu below the search bar to see if your query is supported by Search Jobs + +![run-query-for-search-jobs](https://storage.googleapis.com/sourcegraph-assets/Docs/search-jobs/search-jobs-create.png) + +- If your query is valid, click **Create a search job** to initiate the search job +- You will be redirected to the "Search Jobs UI" page at `/search-jobs`, where you can view all your created search jobs. If you're a site admin, you can also view search jobs from other users on the instance + +![view-search-jobs](https://storage.googleapis.com/sourcegraph-assets/Docs/search-jobs/search-jobs-manage.png) + ## Search results format The downloaded results are formatted as [JSON lines](https://jsonlines.org). @@ -67,21 +79,6 @@ If you would like to allow your Sourcegraph instance to control the creation and - `SEARCH_JOBS_UPLOAD_MANAGE_BUCKET=true` -## Using Search Jobs - -To use Search Jobs, you need to: - -- Run a search query from your Sourcegraph instance -- Click the result menu below the search bar to see if your query is valid for the long search - -![run-query-for-search-jobs](https://storage.googleapis.com/sourcegraph-assets/Docs/query-serach-jobs.png) - -- If your query is valid, click **Run search job** to initiate the search job -- You will be redirected to the "Search Jobs UI" page at `/search-jobs`, where you can view all your created search jobs. If you're a site admin, you can also view search jobs from other users on the instance - -![view-search-jobs](https://storage.googleapis.com/sourcegraph-assets/Docs/view-search-jobs.png) - - ## Supported result types Search jobs supports the following result types: @@ -99,20 +96,20 @@ The following result types are not supported: The following elements of our query language are not supported: - file predicates, such as `file:has.content`, `file:has.owner`, `file:has.contributor`, `file:contains.content` -- `.*` regexp search +- catch-all `.*` regexp search - Multiple `rev` filters - Queries with `index: filter` -The search bar already supports exhaustive searches with the `count:all` operator. However, these searches are subject to lower timeouts, making them harder to use in large codebases. -## Disable Search Jobs + + Alternatively, the search bar supports the `count:all` operator which increases result limits and timeouts. + This works well if the search completes within a few minutes and the number of results is less than the configured display limit. + For longer running searches and searches with huge result sets, Search Jobs is the better choice. + -Follow these steps to disable Search Jobs and to hide the feature in the Sourcegraph UI: +## Disable Search Jobs -- Login to your Sourcegraph instance and go to the site admin -- Next, click the site configuration -- From here, you'll see `experimentalFeatures` -- Set `searchJobs` to `false` and then refresh the page +To disable Search Jobs, set `DISABLE_SEARCH_JOBS=true` in your frontend and worker services. ## FAQ From b451a118a1d91d21617fb44f7ea5c0e56a6aa597 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Thu, 29 Aug 2024 12:18:41 -0700 Subject: [PATCH 3/7] Docs changes for Cody featuring Sourcegraph v5.7 release (#606) This PR tackles all the docs changes in the Sourcegraph 5.7 release that are related to Cody. It caters the following projects: - Cody Web GA - Removes the Beta label from everywhere we mention - Add mentions of LLM selector to only ENT users using the new model configuration - JetBrains Unified Chat UI - Replace all media with old UI - Reorder of information based on a similar structure of VS Code docs - Smart Apply in JetBrains - Mentions about Prompts in docs --------- Co-authored-by: Michael Bahr <1830132+bahrmichael@users.noreply.github.com> --- .../batch-changes/configuring-credentials.mdx | 8 + docs/cody/clients/cody-with-sourcegraph.mdx | 10 +- docs/cody/clients/feature-reference.mdx | 2 +- docs/cody/clients/install-jetbrains.mdx | 202 +++++++++++------- docs/cody/clients/install-vscode.mdx | 4 +- docs/cody/usage-and-pricing.mdx | 2 +- 6 files changed, 142 insertions(+), 86 deletions(-) diff --git a/docs/batch-changes/configuring-credentials.mdx b/docs/batch-changes/configuring-credentials.mdx index 05c001b9e..e455ce5bc 100644 --- a/docs/batch-changes/configuring-credentials.mdx +++ b/docs/batch-changes/configuring-credentials.mdx @@ -201,6 +201,14 @@ GitHub apps follow the same concepts as [personal and global access tokens](#typ - GitHub apps can only be used with GitHub code hosts. - The forking mechanism (`fork:true`) is only supported if the GitHub app has access to all repositories of the installation, and if the origin repository and the fork are in the same organization that the GitHub app is installed to ([GitHub Docs](https://docs.github.com/en/rest/repos/forks?apiVersion=2022-11-28#create-a-fork)). +### Migrating from PATs to GitHub Apps + +You can migrate your credentials from PATs to GitHub Apps by deleting the PAT credential and creating a GitHub app credential. + +Batch Changes will look at the available credentials, and pick one that matches the targeted namespace (e.g. organization). + +You can continue to use existing batch changes without modifications. + ### Adding a GitHub app Adding a GitHub app is done through the Batch Changes section of your user settings: diff --git a/docs/cody/clients/cody-with-sourcegraph.mdx b/docs/cody/clients/cody-with-sourcegraph.mdx index 11bc54870..17b46f521 100644 --- a/docs/cody/clients/cody-with-sourcegraph.mdx +++ b/docs/cody/clients/cody-with-sourcegraph.mdx @@ -2,12 +2,10 @@

Learn how to use Cody in the web interface with your Sourcegraph.com instance.

- The new chat UI for Cody for web is currently in Beta and is available to users on Sourcegraph versions >=5.5. - In addition to the Cody extensions for [VS Code](/cody/clients/install-vscode), [JetBrains](/cody/clients/install-jetbrains) IDEs, and [Neovim](/cody/clients/install-neovim), Cody is also available in the Sourcegraph web app. Community users can use Cody for free by logging into their accounts on Sourcegraph.com, and enterprise users can use Cody within their Sourcegraph instance. - + ## Initial setup @@ -27,13 +25,15 @@ The chat interface for Cody on the web is similar to the one you get with the [V The chat interface with your Code Search queries is operated per chat. You cannot run multiple chats and store them in parallel. A new chat window opens whenever you click the Cody button from the query editor or the top header. + The new and improved chat UI for Cody for web is currently available to users on Sourcegraph versions >=5.5. It's recommeded to update your Sourcegraph instance to the latest version to use this new chat interface. + ## LLM Selection -Sourcegraph.com users with Cody **Free** and **Pro** can choose from a list of supported LLM models for a chat. Claude Sonnet 3 is the default LLM model, but users can select the LLM of their choice from the drop-down menu. +Sourcegraph.com users with Cody **Free** and **Pro** can choose from a list of supported LLM models for a chat. Claude Sonnet 3.5 is the default LLM model, but users can select the LLM of their choice from the drop-down menu. ![llm-select-web](https://storage.googleapis.com/sourcegraph-assets/Docs/llm-select-web-0724.jpg) -Users on an Enterprise Sourcegraph instance do not have the option to choose an LLM model. Their site admin will configure the default LLM model for chat. +Users on an Enterprise Sourcegraph instance do not have the option to choose an LLM model. Their site admin will configure the default LLM model for chat. However, Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. ## Selecting Context with @-mentions diff --git a/docs/cody/clients/feature-reference.mdx b/docs/cody/clients/feature-reference.mdx index 4b2855ea4..ad7206622 100644 --- a/docs/cody/clients/feature-reference.mdx +++ b/docs/cody/clients/feature-reference.mdx @@ -21,7 +21,7 @@ | Local context | ✅ | ✅ | ❌ | | OpenCtx context providers (experimental) | ✅ | ❌ | ❌ | | **Prompts and Commands** | | | | -| Access to prompts and Prompt library | ✅ | ❌ | ✅ | +| Access to prompts and Prompt library | ✅ | ✅ | ✅ | | Custom commands | ✅ | ❌ | ❌ | | Edit code | ✅ | ✅ | ❌ | | Generate unit test | ✅ | ✅ | ❌ | diff --git a/docs/cody/clients/install-jetbrains.mdx b/docs/cody/clients/install-jetbrains.mdx index 72c3452f5..5dc584737 100644 --- a/docs/cody/clients/install-jetbrains.mdx +++ b/docs/cody/clients/install-jetbrains.mdx @@ -66,122 +66,105 @@ Once Cody is successfully connected, you'll see that the sign-in panel has been Cody provides intelligent code suggestions and context-aware autocompletions for numerous programming languages like JavaScript, Python, TypeScript, Go, etc. - Create a new file in IntelliJ, for example, `code.js` -- Next, type the following algorithm function to sort an array of numbers - -```js -function bubbleSort(array) -``` - - As you start typing, Cody will automatically provide suggestions and context-aware completions based on your coding patterns and the code context - These autocomplete suggestions appear as grayed text. To accept the suggestion, press the `Tab` key -## Autocomplete +## Chat -Cody provides multi-line autocomplete as you type. Autocomplete suggestions appear as inlay suggestions and are enabled by default in your JetBrains IntelliJ editor. With this setting, there is a list of programming languages supported and enabled by default. +Cody chat in JetBrains is available in a unified interface opened right next to your code. Once connected to Sourcegraph, a new chat input field is opened with a default `@-mention` [context chips](#context-retrieval). -To manually configure the Autocomplete feature, +All your previous and existing chats are stored for later use and can be accessed via the **History** icon from the top menu. You can download them to share or use later in a `.json` file or delete them altogether. -- Go to the **Cody Settings...** from the Cody icon in the sidebar -- Next, click the **Sourcegraph & Cody** dropdown and select **Cody** -- The **Autocomplete** settings will appear with the list of **Enabled Languages** +### Chat interface -Autocomplete suggestions use the same color as inline parameter hints according to your configured editor theme. However, you can optionally enable the **Custom color for completions** checkbox to customize the color of your choice. - -In addition, you can use the following keyboard shortcuts to interact with Cody's autocomplete suggestions: +The chat interface is designed intuitively. Your very first chat input lives at the top of the panel, and the first message in any chat log will stay pinned to the top of the chat. After your first message, the chat input window moves to the bottom of the sidebar. -- `Tab` to accept a suggestion -- `Alt + [` (Windows) or `Opt + [` (macOS) to cycle suggestions -- `Alt + \` (Windows) or `Opt + \` (macOS) to manually trigger autocomplete if no suggestions have been returned +Since your first message to Cody anchors the conversation, you can return to the top chat box anytime, edit your prompt, or re-run it using a different LLM model. -