Skip to content

Docs working branch for Sourcegraph 6.5 release #1201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Sourcegraph Docs

<!-- Working branch for Sourcegraph 6.4 Release -->
<!-- Working branch for Sourcegraph 6.5 Release -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const config = {
DOCS_LATEST_VERSION: '6.4'
DOCS_LATEST_VERSION: '6.5'
};

module.exports = config;
10 changes: 9 additions & 1 deletion docs/admin/access_control/service_accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ Service accounts are created like regular user accounts, but with a few key diff
- Check the **Service account** checkbox
- Click **Create service account**

![create-service-account](https://storage.googleapis.com/sourcegraph-assets/Docs/create-service-accounts-0625.png)

You'll be presented with some next steps you might want to take, like creating an access token, managing and assigning roles, and managing repository permissions.

- Service accounts are automatically assigned the "Service Account" system role
- They appear in the user list with "Service account" type designation
- By default, service accounts can only access public and unrestricted repositories

![next-steps-service-account](https://storage.googleapis.com/sourcegraph-assets/Docs/service-accounts-next-steps-0625.png)

## Managing Access Tokens

Service accounts authenticate using access tokens rather than passwords. For detailed information about creating, managing, and using access tokens, see:
Expand All @@ -44,8 +48,12 @@ Administrators can assign additional roles to service accounts through the user
- [Managing user roles](/admin/access_control#managing-user-roles)
- [Creating custom roles](/admin/access_control#creating-a-new-role-and-assigning-it-permissions)

![service-account-roles](https://storage.googleapis.com/sourcegraph-assets/Docs/service-accounts-manage-roles-0625.png)

## Repository Permissions

Service accounts respect repository permissions and access controls. For comprehensive information about repository permissions, see the [Repository permissions](/admin/permissions) documentation.

Service accounts by default can only access public and unrestricted repositories in Sourcegraph. You may explicitly grant fine-grained access to private repositories from the service account's user settings page, under the **Repo permissions** tab, or via [the GraphQL API](/admin/permissions/api#explicit-permissions-api). In the **Repo permissions** tab, you can also grant service accounts access to all current and future repositories on Sourcegraph, regardless of their visibility, which is useful for service accounts that need to do things like perform search jobs, but admins should take care to ensure that the access tokens for these accounts are not shared with unauthorized users.
Service accounts by default can only access public and unrestricted repositories in Sourcegraph. You may explicitly grant fine-grained access to private repositories from the service account's user settings page, under the **Repo permissions** tab, or via [the GraphQL API](/admin/permissions/api#explicit-permissions-api). In the **Repo permissions** tab, you can also grant service accounts access to all current and future repositories on Sourcegraph, regardless of their visibility, which is useful for service accounts that need to do things like perform search jobs, but admins should take care to ensure that the access tokens for these accounts are not shared with unauthorized users.

![service-account-repo-permissions](https://storage.googleapis.com/sourcegraph-assets/Docs/service-accounts-repo-permissions-0625.png)
1 change: 1 addition & 0 deletions docs/batch-changes/bulk-operations-on-changesets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Below is a list of supported bulk operations for changesets and the conditions w
| **Merge** | Merge the selected changesets on code hosts. Some changesets may be unmergeable due to their states, which does not impact the overall bulk operation. Failed merges are listed under the bulk operations tab. In the confirmation modal, you can opt for a squash merge strategy, available on GitHub, GitLab, and Bitbucket Cloud. For Bitbucket Server/Data Center, only regular merges are performed |
| **Close** | Close the selected changesets on the code hosts |
| **Publish** | Publishes the selected changesets, provided they don't have a [`published` field](/batch-changes/batch-spec-yaml-reference#changesettemplatepublished) in the batch spec. You can choose between draft and normal changesets in the confirmation modal |
| **Push-only** | Pushes code changes to a new branch on a code host without making a merge request. Available on GitHub and GitLab only. |
| **Export** | Export selected changesets that you can use for later use |
| **Re-execute** | Users can re-execute individual changeset creation logic for selected workspaces. This allows for creating new changesets for users who are using non-deterministic run steps (for example,LLMs) |
| **Enable auto-merge for GitHub (experimental)** | Enable auto-merge on selected GitHub changesets. When enabled, changesets will be automatically merged once all required status checks pass and any blocking reviews are resolved. This feature is GitHub-specific and requires [appropriate setup](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) on the target repositories. Failed actions are listed under the bulk operations tab. |
Expand Down
30 changes: 30 additions & 0 deletions docs/batch-changes/push-only-changesets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Pushing code to a code host

<p className="subtitle">Learn how to push code changes to a code host without making a merge request.</p>

<Callout type="note">Pushed-only changesets work on GitHub and GitLab only. They do not yet work with forked repositories.</Callout>

After you've [created a batch change](/batch-changes/create-a-batch-change), you will be redirected to a page displaying a list of the changesets the Batch Change created. From this page, you can apply any bulk operation to more than one changesets.

To push code to a new branch on a code host without also creating a merge request, simply select **Push to code host only** from the dropdown menu:

![push-only-dropdown](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-dropdown-0625.png)

## Few important considerations

- With pushed-only changesets, you are still able see CI feedback, as long as it triggers on code pushes
- The `review` status of a pushed-only changeset is always "N/A"
- The `status` of a pushed-only changeset is always "Open"
- To publish a pushed-only changeset, simply select the changeset in the Batch Changes UI and select **Publish**

![push-only-changesets-executed](https://storage.googleapis.com/sourcegraph-assets/Docs/push-only-executed-0625.png)

## Requirements

To push code to a new branch on a code host, you will need:

- [Admin permissions for the batch change](/batch-changes/permissions-in-batch-changes#permission-levels-for-batch-changes)
- Write access to the changeset's repository on the code host
- [Credentials](/batch-changes/configuring-credentials) configured for the code host

<Callout type="note">For more information, see [Code host interactions in Batch Changes](/batch-changes/permissions-in-batch-changes#code-host-interactions-in-batch-changes).</Callout>
5 changes: 3 additions & 2 deletions docs/batch-changes/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ The batch change's **changesets** still need to be published, which means they e

## Publish a changeset

So far, nothing has been created on your code hosts. To do so, you must tell Sourcegraph to **publish a changeset**.
So far, nothing has been created on your code hosts. To do so, you can tell Sourcegraph to either **publish** or **push** a changeset.

Publishing causes commits, branches, and pull/merge requests to be written to your code host.
- **[Publishing](/batch-changes/publishing-changesets)** a changeset results in the creation of a merge request on your code host (e.g. a Pull Request on GitHub).
- **[Pushing](/batch-changes/push-only-changesets)** a changeset (available on GitHub and GitLab only) results in pushing your code changes to a new branch on your code host without also creating a merge request. You are able to see any CI feedback set to trigger upon code-pushes in the Batch Changs UI.

### Configure code host credentials

Expand Down
62 changes: 48 additions & 14 deletions docs/code-search/types/deep-search.mdx
Original file line number Diff line number Diff line change
@@ -1,44 +1,75 @@
# Deep Search

<p className="subtitle">Learn more about Sourcegraph's agentic Code Search tool Deep Search.</p>
<p className= "subtitle">Learn more about Sourcegraph's agentic Code Search tool Deep Search.</p>

<Callout type="note"> New in version 6.4. Deep Search is currently in research preview for Enterprise customers with access to Cody and Code Search. Because Deep Search is in research preview, it might change significantly in the future as we make improvements and adjust to user feedback. Please reach out to your Sourcegraph account team to request access. </Callout>
<Callout type="note"> New in version 6.5. Deep Search is currently in research preview for Enterprise and Enterprise Starter customers. Because Deep Search is in research preview, it might change significantly as we improve and adjust to user feedback. Please reach out to your Sourcegraph account team to request access. </Callout>

Deep Search is an agentic code search tool. It receives a natural language question about a codebase, performs an in-depth search, and returns a detailed answer. The user can also ask follow-up questions to improve the answer further.
Deep Search is an agentic code search tool that understands natural language questions about your codebase. When a question is submitted, Deep Search performs an in-depth search and returns a detailed answer. The conversation can be continued with follow-up questions to dive deeper into relevant code.

Under the hood, Deep Search is an AI agent that uses various tools to generate its answer. These tools include multiple modes of Sourcegraph's Code Search and Code Navigation tools. Using tools in an agentic loop enables Deep Search to iteratively refine its understanding of the question and codebase, searching until it is confident in its answer.
Under the hood, Deep Search is an AI agent that uses various tools to generate its answer. The tools are functionalities available in Sourcegraph. They include multiple modes of Sourcegraph's Code Search and Code Navigation features. All processing happens within your Sourcegraph instance. Only external calls are made to the configured LLM.

Deep Search displays a list of sources used to generate the answer. The sources are the various types of searches it performs and the files it reads. The answer is formatted in markdown. If prompted to do so, Deep Search can also generate diagrams as part of its answer.
The core of Deep Search is an agentic loop. The AI agent can intelligently use tools to explore the codebase. In each loop iteration, the agent gradually refines its understanding of the question and codebase, searching until it is confident in its answer.

Every Deep Search response includes a detailed list of sources contributing to the answer. These sources show exactly which searches were performed and which files were read. The list of sources is extremely useful for understanding where the answer came from and for further explorations of the codebase.

The answer is formatted in Markdown and can include links to relevant files, directories, or repositories. If prompted to do so, Deep Search can also generate diagrams as part of its answer.

## Best practices

- Give the agent a starting point for the search: Mention relevant repositories, files, directories, or symbol names. The more specific you are, the faster the search will be.
- Give the agent a starting point for the search: use @-mentions to mention relevant repositories, files, directories, or symbol names. The more specific you are, the faster the search will be.
- Provide reasonably scoped questions. The agent will perform much better if it does not have to read the entire codebase at once.
- Check the list of sources. This is extremely useful for debugging and understanding where the answer came from. If something is missing, ask a follow-up question and mention the missing source.
- Check the list of sources. This is extremely useful for debugging and understanding where the answer came from. Ask a follow-up question and mention the missing source if something is missing.

For use cases where you're looking for exhaustive answers (for example, "Find all files with the `.XYZ` file extension in `foo' repo that contain the word`bar`), Code Search still excels, while Deep Search will only utilize a sample of the results. Deep Search will perform a Code Search query as a source, which you can use to continue an exhaustive search within the Code Search product.

### Examples of prompts

- Find examples of logger usage and show examples of the different types of logging we use.
- I want to know when the indexing queue functionality was last changed in `sourcegraph/zoekt`. Show me the last few commit diffs touching this code and explain the changes.
- Look at the GraphQL APIs available in `sourcegraph/sourcegraph`. Are any of them unused? The client code is in `sourcegraph/cody`.
- I want to know when the indexing queue functionality was last changed in `@zoekt`. Show me the last few commit diffs touching this code and explain the changes.
- Look at the GraphQL APIs available in `@sourcegraph/sourcegraph`. Are any of them unused? The client code is in the `@cody` repository.
- Which tools do we use in our build processes defined in `BUILD.bazel` files?
- Generate a request flow diagram for `src/backend`. Mark the auth and rate limit points.

## Conversation sharing

<Callout type= "note">Conversation sharing is disabled by default - see below for instructions on enabling it. </Callout>

You can share Deep Search conversations with other users in your Sourcegraph instance. To share a conversation, click the "Share" button in the top left, then copy the link. Once you share a conversation, any user on your instance can view it with the link. You can also reset the share link and generate a new one, invalidating the previous link.

We do not enforce [repository permissions](/admin/permissions) for viewing shared Deep Search conversations. This means that a user can view a conversation shared with them, regardless of which repositories they can access. We plan to revisit this in the future.

## Enabling Deep Search

Deep Search can only be used on Sourcegraph instances with Code Search and Cody licenses.
If Deep Search is disabled, ask your site administrator to enable the following setting in your site configuration:
```json
"experimentalFeatures": {
"deepSearch.enabled": true,
},
```

For optimal performance, Deep Search is specialized only to use one model. Currently, Deep Search only supports Claude Sonnet 4.

If you are not using [Cody Gateway](/cody/core-concepts/cody-gateway), you must also configure the model through Amazon Bedrock or GCP Vertex.

### Enabling conversation sharing

Deep Search is disabled by default. To enable it, ask your site administrator to set `experimentalFeatures.deepSearch.enabled = "true"` in your site configuration.
Conversation sharing is disabled by default. To enable conversation sharing, ask your site administrator to enable the following setting in your site configuration:

For optimal performance, Deep Search is specialized to only use one model. Currently, Deep Search only supports Claude Sonnet 4.
```json
"experimentalFeatures": {
"deepSearch.enabled": true,
"deepSearch.sharing.enabled ": true,
},
```

### Configuring Deep Search on Amazon Bedrock or GCP Vertex

Include configuration for Claude Sonnet 4 in [modelOverrides](/cody/enterprise/model-configuration#model-overrides) in your site configuration. For more information on configuring models, refer to [Model Configuration](/cody/enterprise/model-configuration).
In your site configuration, include the configuration for Claude Sonnet 4 in [modelOverrides](/cody/enterprise/model-configuration#model-overrides). For more information on configuring models, refer to [Model Configuration](/cody/enterprise/model-configuration).

Examples for Sonnet 4 configuration inside `modelOverrides`:
Examples of Sonnet 4 configuration inside `modelOverrides`:

Amazon Bedrock:

```json
{
"modelRef": "aws-bedrock::v1::claude-sonnet-4",
Expand All @@ -58,6 +89,7 @@ Amazon Bedrock:
```

GCP Vertex:

```json
{
"modelRef": "google-anthropic::v2::claude-sonnet-4",
Expand All @@ -79,6 +111,7 @@ GCP Vertex:
Then, configure Deep Search to use this model in `experimentalFeatures`:

Amazon Bedrock:

```json
"experimentalFeatures": {
"deepSearch.enabled": true,
Expand All @@ -87,6 +120,7 @@ Amazon Bedrock:
```

GCP Vertex:

```json
"experimentalFeatures": {
"deepSearch.enabled": true,
Expand Down
Loading