Skip to content

Commit eca8377

Browse files
Docs working branch for Sourcegraph 6.3 release (#1106)
This is the docs working branch for SG version 6.3 release. --------- Co-authored-by: Peter Guy <peter.guy@sourcegraph.com>
1 parent ef5aded commit eca8377

File tree

9 files changed

+187
-25
lines changed

9 files changed

+187
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sourcegraph Docs
22

3-
<!-- Working branch for April 2025 Release -->
3+
<!-- Working branch for SG 6.3 Release -->
44

55
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.
66

docs.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const config = {
2-
DOCS_LATEST_VERSION: '6.2'
2+
DOCS_LATEST_VERSION: '6.3'
33
};
44

55
module.exports = config;
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# File Filtering in the Repository Comparison Page
2+
3+
The repository comparison page provides powerful file filtering capabilities that allow you to focus on specific files in a comparison. The system supports multiple ways to specify which files you want to view when comparing branches, tags, or commits.
4+
5+
## Query parameter-based file filtering
6+
7+
The comparison page supports three different query parameters to specify which files to include in the comparison:
8+
9+
### 1. Individual file paths
10+
11+
You can specify individual files using either of these parameters:
12+
13+
- `filePath=path/to/file.js` - Primary parameter for specifying files
14+
- `f=path/to/file.js` - Shorthand alternative
15+
16+
Multiple files can be included by repeating the parameter:
17+
18+
```shell
19+
?filePath=src/index.ts&filePath=src/components/Button.tsx
20+
```
21+
22+
### 2. Compressed file lists
23+
24+
For comparisons with a large number of files, the system supports compressed file lists (newline-separated):
25+
26+
- `compressedFileList=base64EncodedCompressedData` - Efficiently packs many file paths
27+
28+
This parameter efficiently transmits large file paths using base64-encoded, gzip-compressed data. The compression allows hundreds or thousands of files to be included in a URL without exceeding length limits, which vary depending on the browser, HTTP server, and other services involved, like Cloudflare.
29+
30+
```typescript
31+
// Behind the scenes, the code decompresses file lists using:
32+
const decodedData = atoburl(compressedFileList)
33+
const compressedData = Uint8Array.from([...decodedData].map(char => char.charCodeAt(0)))
34+
const decompressedData = pako.inflate(compressedData, { to: 'string' })
35+
```
36+
37+
One way to create a list of files for the `compressedFileList` parameter is to use Python's built-in libraries to compress and encode using url-safe base64 encoding (smaller than base64-encoding, then url-encoding).
38+
39+
```shell
40+
python3 -c "import sys, zlib, base64; sys.stdout.write(base64.urlsafe_b64encode(zlib.compress(sys.stdin.buffer.read())).decode().rstrip('='))" < list.of.files > list.of.files.deflated.b64url
41+
```
42+
43+
### 3. Special focus mode
44+
45+
You can focus on a single file using:
46+
47+
- `focus=true&filePath=path/to/specific/file.js` - Show only this file in detail view
48+
49+
## File filtering UI components
50+
51+
The comparison view provides several UI components to help you filter and navigate files:
52+
53+
### FileDiffPicker
54+
55+
The FileDiffPicker component allows you to:
56+
57+
- Search for files by name or path
58+
- Filter files by type/extension
59+
- Toggle between showing all files or only modified files
60+
- Sort files by different criteria (path, size of change, etc.)
61+
62+
This component uses a dedicated file metadata query optimized for quick filtering. Results are displayed as you type. Through client-side filtering, the component can efficiently handle repositories with thousands of files.
63+
64+
### File navigation
65+
66+
When viewing diffs, you can:
67+
68+
- Click on any file in the sidebar to switch to that file
69+
- Use keyboard shortcuts to navigate between files
70+
- Toggle between expanded and collapsed views of files
71+
- Show or hide specific changes (additions, deletions, etc.)
72+
73+
### URL-based filtering
74+
75+
Any filters you apply through the UI will update the URL with the appropriate query parameters. This means you can:
76+
77+
1. Share specific filtered views with others
78+
2. Bookmark comparisons with specific file filters
79+
3. Navigate back and forth between different filter states using browser history
80+
81+
## Implementation details
82+
83+
The system makes strategic performance trade-offs to provide a smooth user experience:
84+
85+
```typescript
86+
/*
87+
* For customers with extremely large PRs with thousands of files,
88+
* we fetch all file paths in a single API call to enable client-side filtering.
89+
*
90+
* This eliminates numerous smaller API calls for server-side filtering
91+
* when users search in the FileDiffPicker. While requiring one large
92+
* initial API call, it significantly improves subsequent search performance.
93+
*/
94+
```
95+
96+
The file filtering system uses a specialized file metadata query that is faster and lighter than the comprehensive file diffs query used to display actual code changes.
97+
98+
## Usage examples
99+
100+
1. View only JavaScript files:
101+
102+
```bash
103+
?filePath=src/utils.js&filePath=src/components/App.js
104+
```
105+
106+
2. Focus on a single file:
107+
108+
```bash
109+
?focus=true&filePath=src/components/Button.tsx
110+
```
111+
112+
3. Use a compressed file list for many files:
113+
114+
```bash
115+
?compressedFileList=H4sIAAAAAAAAA2NgYGBg...
116+
```
117+
118+
This flexible filtering system allows you to create customized views of repository comparisons, making reviewing changes in large projects easier.

docs/code-search/features.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ Here is an example of search results with personalized search ranking enabled:
120120

121121
As you can see, the results are now ranked based on their relevance to the query, and the results from repositories you've recently contributed to are boosted.
122122

123+
## Compare changes across revisions
124+
125+
When you run a search, you can compare the results from two different revisions of the codebase. From your search query results page, click the three-dot **...** icon next to the **Contributors** tab. Then select the **Compare** option.
126+
127+
From here, you can execute file and directory filtering and compare large diffs, making it easier to navigate and manage.
128+
129+
This file picker is useful when comparing branches with thousands of changed files and allows you to select specific files or directories to focus on. You can [filter files directly](/code-search/compare-file-filtering) by constructing a URL with multiple file paths or use a compressed file list for even larger selections.
130+
131+
![file-and-directory-filtering](https://storage.googleapis.com/sourcegraph-assets/Docs/filter-by-file-dir-on-compare.png)
123132

124133
## Other search tips
125134

docs/code-search/working/search_contexts.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,35 @@ You can also search across multiple contexts at once using the `OR` [boolean ope
3737

3838
To organize your search contexts better, you can use a specific context as your default and star any number of contexts. This affects what context is selected when loading Sourcegraph and how the list of contexts is sorted.
3939

40-
### Default context
40+
### Default search context
41+
42+
#### For users
4143

4244
Any authenticated user can use a search context as their default. To set a default, go to the search context management page, open the "..." menu for a context, and click on "Use as default". If the user doesn't have a default, `global` will be used.
4345

4446
If a user ever loses access to their default search context (eg. the search context is made private), they will see a warning at the top of the search contexts dropdown menu list and `global` will be used. If a user's default search context is deleted, `global` will immediately be set as their default.
4547

4648
The default search context is always selected when loading the Sourcegraph webapp. The one exception is when opening a link to a search query that does not contain a `context:` filter, in which case the `global` context will be used.
4749

50+
#### For site admins
51+
52+
Site admins can set a default search context for all users on the Sourcegraph instance. This helps teams improve onboarding and search quality by focusing searches on the most relevant parts of the codebase rather than the entire indexed set of repositories.
53+
54+
An admin can set a default search context via:
55+
56+
- Click the **More** button from the top menu of the Sourcegraph web app
57+
- Next, go to **Search Contexts**
58+
- For the existing context list, click on the **...** menu and select **[Site admin only] Set as default for all users**
59+
- Alternatively, you can create a new context and then set it for all users via the same option
60+
61+
![admin-level-default-context](https://storage.googleapis.com/sourcegraph-assets/Docs/admin-default-context.png)
62+
63+
Here are a few considerations:
64+
65+
- If a user already has a personal default search context set, it will not be overridden
66+
- The admin-set default will apply automatically if a user only uses the global context
67+
- Individual users can see the instance-wide default and override it with their own default if they choose
68+
4869
### Starred contexts
4970

5071
Any authenticated user can star a search context. To star a context, click on the star icon in the search context management page. This will cause the context to appear near the top of their search contexts list. The `global` context cannot be starred.

docs/cody/capabilities/chat.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ Smart Apply also supports the executing of commands in the terminal. When you as
7474

7575
![smart-apply](https://storage.googleapis.com/sourcegraph-assets/Docs/smart-apply-2025.png)
7676

77+
### Model used for Smart Apply
78+
79+
To ensure low latency, Cody uses a more targeted Qwen 2.5 Coder model for Smart Apply. This model improves the responsiveness of the Smart Apply feature in both VS Code and JetBrains while preserving edit quality. Users on Cody Free, Pro, Enterprise Starter, and Enterprise plans get this default Qwen 2.5 Coder model for Smart Apply suggestions.
80+
81+
Enterprise users not using Cody Gateway get a Claude Sonnet-based model for Smart Apply.
82+
7783
## Chat history
7884

7985
Cody keeps a history of your chat sessions. You can view it by clicking the **History** button in the chat panel. You can **Export** it to a JSON file for later use or click the **Delete all** button to clear the chat history.

docs/cody/capabilities/supported-models.mdx

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ Cody supports a variety of cutting-edge large language models for use in chat an
66

77
<Callout type="note">Newer versions of Sourcegraph Enterprise, starting from v5.6, it will be even easier to add support for new models and providers, see [Model Configuration](/cody/enterprise/model-configuration) for more information.</Callout>
88

9-
| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | |
10-
| :------------ | :-------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :----------- | :------------- | --- | --- | --- | --- |
11-
| OpenAI | [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo#:~:text=TRAINING%20DATA-,gpt%2D4%2D0125%2Dpreview,-New%20GPT%2D4) | - | || | | | |
12-
| OpenAI | [GPT-4o](https://platform.openai.com/docs/models#gpt-4o) | - | || | | | |
13-
| OpenAI | [GPT-4o-mini](https://platform.openai.com/docs/models#gpt-4o-mini) | ||| | | | |
14-
| OpenAI | [o3-mini-medium](https://openai.com/index/openai-o3-mini/) (experimental) | | || | | | |
15-
| OpenAI | [o3-mini-high](https://openai.com/index/openai-o3-mini/) (experimental) | - | - || | | | |
16-
| OpenAI | [o1](https://platform.openai.com/docs/models#o1) | - | || | | | |
17-
| Anthropic | [Claude 3.5 Haiku](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | | || | | | |
18-
| Anthropic | [Claude 3.5 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | | || | | | |
19-
| Anthropic | [Claude 3.7 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | - | || | | | |
20-
| Google | [Gemini 1.5 Pro](https://deepmind.google/technologies/gemini/pro/) | | | ✅ (beta) | | | | |
21-
| Google | [Gemini 2.0 Flash](https://deepmind.google/technologies/gemini/flash/) | | | | | | | |
22-
| Google | [Gemini 2.0 Flash-Lite Preview](https://deepmind.google/technologies/gemini/flash/) (experimental) | | | | | | | |
9+
| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | |
10+
| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :------ | :------------- | --- | --- | --- | --- |
11+
| OpenAI | [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo#:~:text=TRAINING%20DATA-,gpt%2D4%2D0125%2Dpreview,-New%20GPT%2D4) | - ||| | | | |
12+
| OpenAI | [GPT-4o](https://platform.openai.com/docs/models#gpt-4o) | - | || | | | |
13+
| OpenAI | [GPT-4o-mini](https://platform.openai.com/docs/models#gpt-4o-mini) | | || | | | |
14+
| OpenAI | [o3-mini-medium](https://openai.com/index/openai-o3-mini/) (experimental) |||| | | | |
15+
| OpenAI | [o3-mini-high](https://openai.com/index/openai-o3-mini/) (experimental) | - | - || | | | |
16+
| OpenAI | [o1](https://platform.openai.com/docs/models#o1) | - | || | | | |
17+
| Anthropic | [Claude 3.5 Haiku](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) |||| | | | |
18+
| Anthropic | [Claude 3.5 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) |||| | | | |
19+
| Anthropic | [Claude 3.7 Sonnet](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | - ||| | | | |
20+
| Google | [Gemini 1.5 Pro](https://deepmind.google/technologies/gemini/pro/) ||| ✅ (beta) | | | | |
21+
| Google | [Gemini 2.0 Flash](https://deepmind.google/technologies/gemini/flash/) ||| | | | | |
22+
| Google | [Gemini 2.0 Flash-Lite Preview](https://deepmind.google/technologies/gemini/flash/) (experimental) | ||| | | | |
2323

2424
<Callout type="note">To use Claude 3 Sonnet models with Cody Enterprise, make sure you've upgraded your Sourcegraph instance to the latest version. </Callout>
2525

@@ -39,13 +39,20 @@ In addition, Sourcegraph Enterprise customers using GCP Vertex (Google Cloud Pla
3939

4040
Cody uses a set of models for autocomplete which are suited for the low latency use case.
4141

42-
| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | |
43-
| :-------------------- | :---------------------------------------------------------------------------------------- | :------- | :------ | :------------- | --- | --- | --- | --- |
44-
| Fireworks.ai | [DeepSeek-Coder-V2](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct) |||| | | | |
45-
| Fireworks.ai | [StarCoder](https://arxiv.org/abs/2305.06161) | - | - || | | | |
46-
| Anthropic | [claude Instant](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | - | - || | | | |
47-
| | | | | | | | | |
42+
| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | |
43+
| :----------- | :---------------------------------------------------------------------------------------- | :------- | :------ | :------------- | --- | --- | --- | --- |
44+
| Fireworks.ai | [DeepSeek-Coder-V2](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct) |||| | | | |
45+
| Anthropic | [claude Instant](https://docs.anthropic.com/claude/docs/models-overview#model-comparison) | - | - || | | | |
46+
| | | | | | | | | |
4847

4948
<Callout type="note">The default autocomplete model for Cody Free, Pro and Enterprise users is DeepSeek-Coder-V2.</Callout>
5049

5150
<Callout type="note">The DeepSeek model used by Sourcegraph is hosted by Fireworks.ai, and is hosted as a single-tenant service in a US-based data center. For more information see our [Cody FAQ](https://sourcegraph.com/docs/cody/faq#is-any-of-my-data-sent-to-deepseek).</Callout>
51+
52+
## Smart Apply
53+
54+
| **Provider** | **Model** | **Free** | **Pro** | **Enterprise** | | | | | | |
55+
| :----------- | :------------- | :------- | :------ | :------------- | --- | --- | --- | --- | --- | --- |
56+
| Fireworks.ai | Qwen 2.5 Coder |||| | | | | | |
57+
58+
<Callout type="note">Enterprise users not using Cody Gateway get a Claude Sonnet-based model for Smart Apply.</Callout>

docs/legacy.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<Accordion title="Sourcegraph 6.X">
66

7+
- [6.2](https://6.2.sourcegraph.com)
78
- [6.1](https://6.1.sourcegraph.com)
89
- [6.0](https://6.0.sourcegraph.com)
910

src/data/versions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export const versions: VersionI[] = [
1515
url: '/docs',
1616
},
1717
{
18-
name: 'v6.1',
19-
url: 'https://6.1.sourcegraph.com/'
18+
name: 'v6.2',
19+
url: 'https://6.2.sourcegraph.com/'
2020
},
2121
];
2222

0 commit comments

Comments
 (0)