diff --git a/README.md b/README.md index abdbab038..3f0d59778 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. diff --git a/dev/rss.js b/dev/rss.js index 74fcb421f..660cdc716 100644 --- a/dev/rss.js +++ b/dev/rss.js @@ -30,8 +30,8 @@ const generateRssFeed = () => { id: siteURL, link: baseURL, language: 'en', - image: `${siteURL}/favicon.png`, - favicon: `${siteURL}/favicon.ico`, + image: `${siteURL}/sourcegraph-mark.png`, + favicon: `${siteURL}/sourcegraph-mark.png`, copyright: `All rights reserved ${date.getFullYear()}, Sourcegraph`, updated: date, generator: 'Sourcegraph RSS Feed', diff --git a/docs.config.js b/docs.config.js index 2ef577205..1924e8202 100644 --- a/docs.config.js +++ b/docs.config.js @@ -1,5 +1,5 @@ const config = { - DOCS_LATEST_VERSION: '5.11' + DOCS_LATEST_VERSION: '6.0' }; module.exports = config; diff --git a/docs/admin/pricing.mdx b/docs/admin/pricing.mdx index 1f91442b5..5d539c874 100644 --- a/docs/admin/pricing.mdx +++ b/docs/admin/pricing.mdx @@ -48,4 +48,4 @@ A billable active Code Search or Code Intelligence Platform user is one who is s A user who has accessed a Sourcegraph product is counted as active once they complete an action that represents usage reflected above. -User counts can be found in the **Site admin** section of the Sourcegraph web application, and Cody-specific usage metrics can be found in the [Cody Analytics service](../cody/clients/enable-cody-enterprise#analytics). +User counts and more usage metrics can be found in [Sourcegraph Analytics](../analytics). diff --git a/docs/analytics/cloud.mdx b/docs/analytics/cloud.mdx new file mode 100644 index 000000000..aba096ad8 --- /dev/null +++ b/docs/analytics/cloud.mdx @@ -0,0 +1,18 @@ +# Sourcegraph Cloud Analytics + +The following instructions are for all Sourcegraph Cloud and self-hosted customers who have upgraded to a sufficient version of Sourcegraph (5.9+) and fully enabled usage telemetry. Customers that self-host can also view our [self-hosted analytics enablement](/self-hosted). + +![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/cloud-analytics.png) + +## Enablement instructions + +To enable Sourcegraph Analytics: + +- Create an account on [Sourcegraph Accounts](https://accounts.sourcegraph.com/), or find the email address associated with your existing account. +- Contact your Sourcegraph Technical Advisor or point of contact (or email us at support@sourcegraph.com if you don't know your contact), provide them with the email address you used to register above and ask for access to Sourcegraph Analytics. +- They will validate your account and link it to your Sourcegraph Enterprise instance's usage metrics. +- Sign in to [Sourcegraph Analytics](https://cody-analytics.sourcegraph.com). + +## Data export + +Sourcegraph Cloud Analytics also includes a CSV export option with key metrics like the number of searches, chats, autocomplete suggestions, completion acceptance rate (CAR %), and more. The data is split by user, day, client/editor, and programming language, perfect for automating retrieval and analyzing data in ways that make the most sense to your organization. diff --git a/docs/analytics/index.mdx b/docs/analytics/index.mdx new file mode 100644 index 000000000..246590dd4 --- /dev/null +++ b/docs/analytics/index.mdx @@ -0,0 +1,101 @@ +# Sourcegraph Analytics + +Enterprise customers can use Sourcegraph Analytics to get a clear view of usage, engagement, performance, and impact. + +## Sourcegraph Cloud Analytics + +[Sourcegraph Cloud](/cloud) customers can use our managed [cloud analytics service](https://cody-analytics.sourcegraph.com) for Cody and Code Search usage data. +Self-hosted customers can also use this service, but they must + +Upgrade to a supported version of Sourcegraph (5.9+) +Have fully enabled usage telemetry. +- [Enablement instructions](/analytics/cloud#enablement) + +![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/Sourcegraph-Analytics-2025-01-28.png) + +## Self-Hosted Analytics + +Self-hosted customers will soon be able to use our self-hosted and locally deployed analytics service, built on Grafana, to see Sourcegraph usage data. + +This product is in development now. If you would like to learn more, please contact your Sourcegraph representative. + +## Metrics + +We provide a set of metrics that can be used to monitor Sourcegraph usage, engagement, performance, and impact within your enterprise. + +Learn more about how we think about [the ROI of Sourcegraph in our blog](https://sourcegraph.com/blog/measuring-the-impact-of-ai-coding-tools). + +### User metrics available + +| Metric | Description | +| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| Total active users | Total number of unique users who have used any Sourcegraph product during the selected time | +| Average daily users | The average number of unique users who use Sourcegraph per day during the selected time | +| Average days of activity per user | The average number of days each user actively uses Sourcegraph during the selected time | +| Daily active users | Number of unique users who used Sourcegraph by day | +| Weekly active users | Number of unique users who used Sourcegraph by week | +| Daily users by product | Count of daily users across different Sourcegraph products (Cody, Code Search, Code Insights, etc.) | +| Product usage distribution (by percentage of users) | Percentage breakdown of users across different Sourcegraph product groupings during the selected time | +| Detailed user activity (top 20 users) | List of the 20 most active users during the selected time and their usage patterns | +| Frequency of usage | Count of users who used Sourcegraph _n_ times over the past 30 days | + +Cody-only user metrics + +Many of the metrics above are also available for Cody only. However, some user definitions are slightly different: + +| User category | Description | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Authenticated users | All users signed in to Cody in an editor or interacted with Cody on the web during the selected period. [Read more](/admin/pricing#authenticated-users). | +| Active users | All users who sign in to Cody in an editor or interact with Cody on the web during the period selected. [Read more](/admin/pricing#billable-active-users). | + +### Code Search & navigation metrics + +| Metric | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| Total in-product searchers | Number of unique users who performed searches using the Sourcegraph search interface during the selected time | +| Total result clicks | Count of times users clicked on search results to view files or other resources during the selected time | +| Total file views | Number of times users viewed individual files through Sourcegraph during the selected time | +| Daily in-product search activity | Count of search operations performed each day through the Sourcegraph interface | +| Daily search users (in-product and API) | Number of unique users performing searches each day, including both UI and API usage | +| All searches (in-product and API) by type | Breakdown of searches by category (e.g., literal, regex), including both UI and API usage | +| Total code navigation actions | Count of all code navigation operations performed (e.g., go-to-definition, find references) during the selected time period | +| Precise code navigation % | Percentage of code navigation actions that used precise intelligence rather than search-based results during the selected time | +| Daily code navigation activity | Count of code navigation operations performed each day | +| Daily code navigation users | Number of unique users utilizing code navigation features each day | +| Precise vs. search-based code navigation actions by language | Comparison of precise vs. search-based navigation success rates broken down by programming language | + +### Autocompletion metrics + +| Metric | Description | +| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Total accepted completions | Count of completions accepted by users during the selected time | +| Hours saved | The number of hours saved by Cody users, assuming 2 minutes saved per completion | +| Completions by day | The number of completions suggested by day and by editor. | +| Completion acceptance rate (CAR) | The percent of completions presented to a user for at least 750ms accepted by day, the editor, day, and month. | +| Weighted completion acceptance rate (wCAR) | Similar to CAR, but weighted by the number of characters presented in the completion, and only counting those fully retained by the user for X minutes after accepting the completion, by the editor, day, and month. | +| Average completion latency (ms) | The average milliseconds of latency before a user is presented with a completion suggestion by an editor. | +| Acceptance rate by language | CAR and total completion suggestions broken down by editor during the selected time | + +### Chat and prompt metrics + +| Metric | Description | +| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| Total chat events | Total number of chat interactions with Cody during the selected time | +| Minutes saved per chat | Average time saved per chat interaction with Cody during the selected time | +| Hours saved by chats | Total hours saved through Cody chat interactions during the selected time , assuming 5 minutes saved per chat | +| Cody chats by day | Daily count of chat interactions | +| Cody chat users | Daily count of chat users | +| Prompts created, edited, and deleted by day | Daily count of prompt management activities, including creation, modification, and removal | +| Users creating, editing, and deleting prompts by day | Number of unique users performing prompt management activities each day | + +### Command metrics (deprecated) + +_As of Sourcegraph version 5.10, commands are being deprecated in favor of our new feature, chat prompts. As a result, if your Sourcegraph instance is running version 5.10 or later, you may see decreased command usage. In the coming weeks, these command metrics will be deprecated and replaced with new prompt metrics on the Chats tab._ + +| Metric | Description | +| ----------------------- | ----------------------------------------------------------------------------------------------------------- | +| Total command events | Total number of command executions during the selected time | +| Hours saved by commands | Total hours saved through command executions during the selected time, assuming 5 minutes saved per command | +| Cody commands by day | Daily count of command executions | +| Cody command users | Daily count of command users | +| Most used commands | Ranking of most frequently used Cody commands during the selected time | diff --git a/docs/analytics/self-hosted.mdx b/docs/analytics/self-hosted.mdx new file mode 100644 index 000000000..d067ead0c --- /dev/null +++ b/docs/analytics/self-hosted.mdx @@ -0,0 +1,19 @@ +# Sourcegraph Self-Hosted Analytics + +This feature is not yet available. Coming soon. + +Sourcegraph Self-Hosted Analytics is coming soon! Self-hosted customers can view usage metrics in a locally deployed analytics service built on Grafana. + +This product is in development now. If you would like to learn more, please contact your Sourcegraph representative. + +## Set-up instructions + +Coming soon. + +## Updates + +Coming soon. + +## Custom metrics + +Coming soon. diff --git a/docs/batch-changes/index.mdx b/docs/batch-changes/index.mdx index ec6d02a1f..77302c1c0 100644 --- a/docs/batch-changes/index.mdx +++ b/docs/batch-changes/index.mdx @@ -1,5 +1,12 @@ # Batch Changes + + Supported on [Enterprise](/pricing/enterprise) plans. + + Currently available via the Web app. + + +

This section is about Batch Changes, which helps you automate and ship large-scale code changes across many repositories and code hosts.

Batch Changes helps you ship large-scale code changes across many repositories and code hosts. You can create pull requests on all affected repositories, and it tracks their progress until they're all merged. You can also preview the changes and update them at any time. diff --git a/docs/code-search/code-navigation/auto_indexing.mdx b/docs/code-search/code-navigation/auto_indexing.mdx index a73dd252f..6a0dc5e6e 100644 --- a/docs/code-search/code-navigation/auto_indexing.mdx +++ b/docs/code-search/code-navigation/auto_indexing.mdx @@ -1,8 +1,13 @@ # Auto-indexing -

Learn and understand how auto-indexing works.

+ + Supported on [Enterprise](/pricing/enterprise) plans. + + Currently in Beta and available via Web app. + + -Auto-indexing is currently in Beta stage. +

Learn and understand how auto-indexing works.

With Sourcegraph deployments supporting [executors](/admin/executors/), your repository contents can be automatically analyzed to produce a code graph index file. Once [auto-indexing is enabled](/code-search/code-navigation/auto_indexing#enable-auto-indexing) and [auto-indexing policies are configured](/code-search/code-navigation/auto_indexing#configure-auto-indexing), repositories will be periodically cloned into an executor sandbox, analyzed, and the resulting index file will be uploaded back to the Sourcegraph instance. diff --git a/docs/code-search/code-navigation/precise_code_navigation.mdx b/docs/code-search/code-navigation/precise_code_navigation.mdx index 3513a3908..7f7e2ea2b 100644 --- a/docs/code-search/code-navigation/precise_code_navigation.mdx +++ b/docs/code-search/code-navigation/precise_code_navigation.mdx @@ -1,5 +1,12 @@ # Precise Code Navigation + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + +

Learn and understand about Precise Code Navigation.

Precise Code Navigation is an opt-in feature that is enabled from your admin settings and requires you to upload indexes for each repository to your Sourcegraph instance. Once setup is complete on Sourcegraph, precise code navigation is available for use across popular development tools: diff --git a/docs/code-search/code-navigation/search_based_code_navigation.mdx b/docs/code-search/code-navigation/search_based_code_navigation.mdx index 2dce640ca..e4ffafe58 100644 --- a/docs/code-search/code-navigation/search_based_code_navigation.mdx +++ b/docs/code-search/code-navigation/search_based_code_navigation.mdx @@ -1,5 +1,12 @@ # Search-based Code Navigation + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via VS Code and JetBrains editor extensions and the Web. + + +

Learn and understand about Search-based Code Navigation.

Sourcegraph comes with a default built-in code navigation provided by search-based heuristics. It works out of the box with all of the most popular programming languages. @@ -42,5 +49,5 @@ The default values for these environment variables come from [`config.go`](https ## More resources - + diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index 69a311dc0..843e6e7c8 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -3,7 +3,7 @@

Learn and understand more about Sourcegraph's Code Search features and core functionality.

- + ## Powerful, flexible queries diff --git a/docs/code-search/index.mdx b/docs/code-search/index.mdx index 2b7de35c2..515b24742 100644 --- a/docs/code-search/index.mdx +++ b/docs/code-search/index.mdx @@ -1,5 +1,12 @@ # Code Search + + Supported on [Enterprise Starter](/pricing/enterprise-starter) and [Enterprise](/pricing/enterprise) plans. + + Available via VS Code and JetBrains editor extensions and the Web. + + +

Learn how to search code across all your repositories and code hosts.

**Code Search** allows you to find, fix, and navigate code with any code host or language across multiple repositories with real-time updates. It deeply understands your code, prioritizing the most relevant results for an enhanced search experience. @@ -18,7 +25,7 @@ Sourcegraph's Code Search empowers you to: - + diff --git a/docs/code-search/types/search-jobs.mdx b/docs/code-search/types/search-jobs.mdx index 020e9458c..e024958be 100644 --- a/docs/code-search/types/search-jobs.mdx +++ b/docs/code-search/types/search-jobs.mdx @@ -1,5 +1,12 @@ # Search Jobs + + Supported on [Enterprise](/pricing/enterprise) plans. + + Currently available via the Web app. + + + 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. diff --git a/docs/code-search/types/symbol.mdx b/docs/code-search/types/symbol.mdx index b472ad492..8a3e07388 100644 --- a/docs/code-search/types/symbol.mdx +++ b/docs/code-search/types/symbol.mdx @@ -1,5 +1,12 @@ # Symbol search + + Supported on [Enterprise Starter](/pricing/enterprise-starter) and [Enterprise](/pricing/enterprise) plans. + + Available via VS Code and JetBrains editor extensions and the Web. + + + We use [Ctags](https://github.com/universal-ctags/ctags) to index the symbols of a repository on demand. These symbols are used to implement symbol search, matching declarations instead of plain text. ![symbol-search](https://storage.googleapis.com/sourcegraph-assets/Docs/Symbols.png) diff --git a/docs/code-search/working/saved_searches.mdx b/docs/code-search/working/saved_searches.mdx index 05db8b073..13d3cd976 100644 --- a/docs/code-search/working/saved_searches.mdx +++ b/docs/code-search/working/saved_searches.mdx @@ -6,7 +6,7 @@ Saved Searches lets you reuse and share search queries. You can create a saved s Saved Searches functionality is available to both Free and Enterprise Code Search users. To access or create new Saved Searches in the Sourcegraph web app, click the **Tools > Saved Searches** in the top navigation bar. -![saved-searhces](https://storage.googleapis.com/sourcegraph-assets/Docs/saved-searches-0824.png) +![saved-searhces](https://storage.googleapis.com/sourcegraph-assets/Docs/saved-searches-2025.png) ## Creating saved searches @@ -18,7 +18,7 @@ To create a new saved search: A `patternType:` filter is required in the query for all saved searches. `patternType` can be `keyword`, `standard`, `literal`, or `regexp`. You cannot create a saved search without defining the `patternType:` field. -![create-new-saved-search](https://storage.googleapis.com/sourcegraph-assets/Docs/create-new-saved-search-0824.png) +![create-new-saved-search](https://storage.googleapis.com/sourcegraph-assets/Docs/create-new-saved-search-2025.png) Enable the checkbox for **Draft** if you don't want other users to use your saved search. This is useful for testing the query before sharing it with others. Once done, click the **Create saved search** button to be redirected to the Saved Searches page. @@ -32,7 +32,7 @@ In addition, you can also search within your saved searches and sort your saved To transfer ownership of a saved search, click the **Edit** button next to it, click the **Transfer ownership** button, and select the organization to which you want to transfer the saved search. -![transfer-ownership](https://storage.googleapis.com/sourcegraph-assets/Docs/transfer-ownership-saved-search-0824.png) +![transfer-ownership](https://storage.googleapis.com/sourcegraph-assets/Docs/transfer-ownership-saved-search-2025.png) ## Example saved searches diff --git a/docs/code_insights/index.mdx b/docs/code_insights/index.mdx index 345d05535..e88e13413 100644 --- a/docs/code_insights/index.mdx +++ b/docs/code_insights/index.mdx @@ -1,5 +1,12 @@ # Code Insights + + Supported on [Enterprise](/pricing/enterprise) plans. + + Currently available via the Web app. + + +

Anything you can search, you can track and analyze

diff --git a/docs/code_monitoring/index.mdx b/docs/code_monitoring/index.mdx index 5f89d4a27..829e05826 100644 --- a/docs/code_monitoring/index.mdx +++ b/docs/code_monitoring/index.mdx @@ -1,5 +1,12 @@ # Code monitoring + + Supported on [Enterprise](/pricing/enterprise) plans. + + Currently available via the Web app. + + +

Keep on top of events in your codebase

Watch your code with code monitors and trigger actions to run automatically in response to events. diff --git a/docs/cody/capabilities/agentic-chat.mdx b/docs/cody/capabilities/agentic-chat.mdx new file mode 100644 index 000000000..76186f975 --- /dev/null +++ b/docs/cody/capabilities/agentic-chat.mdx @@ -0,0 +1,76 @@ +# Agentic chat + +

Learn about the agentic chat experience, an exclusive chat-based AI agent with enhanced capabilities.

+ +Agentic chat is currently in the Experimental stage for Cody Pro and Enterprise and is supported on VS Code, JetBrains, Visual Studio editor extensions and Web. Usage may be limited at this stage. + +Cody's agentic chat experience is an AI agent that can evaluate context and fetch any additional context (OpenCtx, terminal, etc.) by providing enhanced, context-aware chat capabilities. It extends Cody's functionality by proactively understanding your coding environment and gathering relevant information based on your requests before responding. These features help you get noticeably higher-quality responses. + +This agentic chat experience aims to reduce the learning curve associated with traditional coding assistants by minimizing users' need to provide context manually. It achieves this through agentic context retrieval, where the AI autonomously gathers and analyzes context before generating a response. + +## Capabilities of agentic chat + +The agentic chat experience leverages several key capabilities, including: + +- **Proactive context gathering**: Automatically gathers relevant context from your codebase, project structure, and current task +- **Agentic context reflection**: Review the gathered context to ensure it is comprehensive and relevant to your query +- **Iterative context improvement**: Performs multiple review loops to refine the context and ensure a thorough understanding +- **Enhanced response accuracy**: Leverages comprehensive context to provide more accurate and relevant responses, reducing the risk of hallucinations + +## Enable agentic chat + +Pro users can find the agentic chat option in the LLM selector drop-down. Enterprise customers must opt-in to access this agentic chat feature. + +![agentic chat interface](https://storage.googleapis.com/sourcegraph-assets/Docs/agenti%20-chat.jpg) + +### Getting agentic chat access for Enterprise customers + +For the experimental release, agentic chat is specifically limited to using Claude 3.5 Haiku for the reflection steps and Claude 3.5 Sonnet for the final response to provide a good balance between quality and latency. Therefore, your enterprise instance must have access to both Claude 3.5 Sonnet and Claude 3.5 Haiku to use agentic chat. These models may be changed during the experimental phase to optimize for quality and/or latency. + +Additionally, enterprise users need to upgrade their supported client (VS Code, JetBrains, and Visual Studio) to the latest version of the plugin by enabling the following feature flags on their Sourcegraph Instance: + +- `agentic-chat-experimental` to get access to the feature +- `agentic-chat-cli-tool-experimental` to allow [terminal access](#terminal-commands) + +## What can agentic chat do? + +Agentic chat can help you with the following: + +### Tool Usage + +It has access to a suite of tools for retrieving relevant context. These tools include: + +- **Code Search**: Performs code searches +- **Codebase File**: Retrieves the full content from a file in your codebase +- **Terminal**: Executes shell commands in your terminal +- **Web Browser*: Searches the web for live context +- **OpenCtx**: Any OpenCtx providers could be used by the agent + +It integrates seamlessly with external services, such as web content retrieval and issue tracking systems, using OpenCtx providers. To learn more, [read the OpenCtx docs](/cody/capabilities/openctx). + + +Terminal access is not supported on the Web. It currently only works with VS Code, JetBrains, and Visual Studio editor extensions. + +## Terminal access + +Agentic chat can use the CLI Tool to request the execution of shell commands to gather context from your terminal. Its ability to execute terminal commands enhances its context-gathering capabilities. However, it’s essential to understand that any information accessible via your terminal could potentially be shared with the LLM. It's recommended not to request information that you don't want to share. Here's what you should consider: + +- **Requires user consent**: Agentic chat will pause and ask for permission each time before executing any shell command. +- **Trusted workspaces only**: Commands can only be executed within trusted workspaces with a valid shell +- **Potential data sharing**: Any terminal-accessible information may be shared with the LLM + +Commands are generated by the agent/LLM based on your request. Avoid asking it to execute destructive commands. + +## Use cases + +Agentic chat can be helpful to assist you with a wide range of tasks, including: + +- **Improved response quality**: Helps you get better and more accurate responses than other LLMs, making up for the additional processing time for context gathering a non-issue +- **Error resolution**: It can automatically identify error sources and suggest fixes by analyzing error logs +- **Better unit tests**: Automatically includes imports and other missing contexts to generate better unit tests + +## Known limitations + +### Enterprise deployments + +All customers are required to have Claude 3.5 Sonnet and Claude 3.5 Haiku enabled on their Sourcegraph instance (this requires Sourcegraph v5.9 and new [model configuration](/cody/enterprise/model-configuration)). diff --git a/docs/cody/capabilities/auto-edit.mdx b/docs/cody/capabilities/auto-edit.mdx new file mode 100644 index 000000000..41da863e1 --- /dev/null +++ b/docs/cody/capabilities/auto-edit.mdx @@ -0,0 +1,83 @@ +# Auto-edit + +

Auto-edit suggests code changes by analyzing cursor movements and typing. After you've made at least one character edit in your codebase, it begins proposing contextual modifications based on your cursor position and recent changes.

+ +Auto-edit is currently available in VS Code extension in the Experimental stage for all Cody Pro users and Enterprise users on Cody Gateway. + +## Capabilities of auto-edit + +- Can automatically insert and delete text +- Can modify code before and after the cursor position +- Works with repetitive tasks, especially in test files +- Can propose similar changes across multiple locations based on recent edits +- Can handle complex refactoring operations like adding parameters and unpacking functions + +## Enabling auto-edit + +Eligible Cody Pro users will gradually be given access to the auto-edit feature. Once you have it, you will receive an in-editor notification. + + + +### Auto-edit access for Enterprise customers + +Auto-edit is available for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. Enabling the feature requires two steps: + +1. Site administrators must: + - Enable the feature flag `cody-autoedit-experiment-enabled-flag` + - Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) (see below) +2. Once enabled, developers will receive a notification in their editor to turn it on + +The following example demonstrates how to add Fireworks as an allowed LLM provider: + +```json + +"cody.enabled": true, +"modelConfiguration": { + "sourcegraph": { + "modelFilters": { + // Only allow "beta" and "stable" models. + // Not "experimental" or "deprecated". + "statusFilter": ["beta", "stable"], + + // Allow any models provided by Anthropic, OpenAI, Google and Fireworks. + "allow": [ + "anthropic::*", // Anthropic models + "openai::*", // OpenAI models + "google::*", // Google Gemini models + "fireworks::*", // Open source models hosted by Sourcegraph + ], + } + } +} +``` + +## How does auto-edit work? + +The system detects potential changes based on the following: + +- Cursor placement in the code +- Recent changes made in similar contexts +- Function usage patterns +- Common refactoring patterns + +## Auto-edit vs. Autocomplete + +In terms of feature-set and functionality, auto-edit and autocomplete have some key differences: + +| **Feature** | **Autocomplete** | **Auto-edit** | +| ---------------------- | -------------------------------------- | -------------------------------------------------- | +| **Text modification** | Can only insert text, not delete | Can both insert and delete text | +| **Cursor position** | Only proposes content after the cursor | Can modify code before and after the cursor | +| **Suggestion trigger** | Suggests on every character typed | Proposes changes based on context and recent edits | + +## Use cases + +The auto-edit feature can help you with various repetitive tasks in your code: + +- **Function signature refactoring**: Automatically suggests adding error returns, new parameters, or changing return types across function definitions. For example, when you modify a function to return both a value and an error, auto-edit helps update the function signature. +- **Call site updates**: When you change a function's signature, auto-edit detects all locations where the function is called and suggests necessary modifications to match the new signature. This includes updating parameter orders, adding error handling, and adjusting return value usage. +- **Test file maintenance**: Helps with repetitive updates in test files, such as modifying test assertions, updating mock objects, or changing test data structures. Auto-edit recognizes patterns from your recent changes and suggests similar modifications across related tests. +- **Parameter refactoring**: Assists in adding, removing, or reorganizing function parameters. When you unpack a function to handle more cases, auto-edit helps restructure the parameter list and suggests corresponding changes at call sites. +- **Type system modifications**: When updating type definitions or interfaces, auto-edit identifies and suggests consistent changes across your codebase. This includes updating variable declarations, function parameters, and return types to maintain type consistency. diff --git a/docs/cody/capabilities/chat.mdx b/docs/cody/capabilities/chat.mdx index 24d2a0e36..b0e3b6ab0 100644 --- a/docs/cody/capabilities/chat.mdx +++ b/docs/cody/capabilities/chat.mdx @@ -1,8 +1,10 @@ # Chat -

Use Cody's chat to get contextually-aware answers to your questions.

+

Chat with the AI assistant in your code editor or via the Sourcegraph web app to get intelligent suggestions, code autocompletions, and contextually aware answers.

-You can **chat** with Cody to ask questions about your code, generate code, and edit code. By default, Cody has the context of your open file and entire repository, and you can use `@` to add context for specific files, symbols, remote repositories, or other non-code artifacts. + + + You can **chat** with Cody to ask questions about your code, generate code, and edit code. By default, Cody has the context of your open file and entire repository, and you can use `@` to add context for specific files, symbols, remote repositories, or other non-code artifacts. You can do it from the **chat** panel of the supported editor extensions ([VS Code](/cody/clients/install-vscode), [JetBrains](/cody/clients/install-jetbrains), [Visual Studio](/cody/clients/install-visual-studio), [Eclispe](/cody/clients/install-eclipse)) or in the [web](/cody/clients/cody-with-sourcegraph) app. @@ -10,8 +12,8 @@ You can do it from the **chat** panel of the supported editor extensions ([VS Co To use Cody's chat, you'll need the following: -- A Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account -- A supported editor extension (VS Code, JetBrains, Visual Studio) installed +- [Sourcegraph Enterprise Starter](https://sourcegraph.com/pricing) or [Enterprise account](https://sourcegraph.com/pricing) +- A supported editor extension [VS Code](https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai), [JetBrains](https://plugins.jetbrains.com/plugin/9682-cody-ai-coding-assistant-with-autocomplete--chat) installed or use via Web app ## How does chat work? @@ -31,7 +33,7 @@ There are several features that you can use to make your chat experience better. When you start a new Cody chat, the input window opens with a default `@-mention` context chips for the opened file and the current repository. -![context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/context-retrieval-102024.png) +![context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/context-retrieval-repo-file-2025.png) At any point in time, you can edit these context chips or remove them entirely if you do not want to use these as context. Any chat without a context chip will instruct Cody to use no codebase context. However, you can always provide an alternate `@-mention` file or symbols to let Cody use it as a new context source. @@ -43,7 +45,7 @@ You can add new custom context by adding `@-mention` context chips to the chat. ## OpenCtx context providers -OpenCtx context providers are in the Experimental stage for all Cody VS Code users. Enterprise users can also use this, but with limited support. If you have feedback or questions, please visit our [support forum](https://community.sourcegraph.com/c/openctx/10). +OpenCtx context providers are in the Experimental stage for all Cody VS Code users. Enterprise users can also use this but with limited support. If you have feedback or questions, please visit our [support forum](https://community.sourcegraph.com/c/openctx/10). [OpenCtx](https://openctx.org/) is an open standard for bringing contextual info about code into your dev tools. Cody Free and Pro users can use OpenCtx providers to fetch and use context from the following sources: @@ -68,11 +70,11 @@ You can still switch to your Sourcegraph account whenever you want to use Claude ## LLM selection -Cody allows you to select the LLM you want to use for your chat, optimized for speed versus accuracy. Cody Free and Pro users can select multiple models. Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. +Cody allows you to select the LLM you want to use for your chat, which is optimized for speed versus accuracy. Cody Free and Pro users can select multiple models. Enterprise users with the new [model configuration](/cody/clients/model-configuration) can use the LLM selection dropdown to choose a chat model. You can read about these supported LLM models [here](/cody/capabilities/supported-models#chat-and-commands). -![LLM-models-for-cody-free](https://storage.googleapis.com/sourcegraph-assets/Docs/llm-dropdown-options-102024.png) +![LLM-models-for-cody-free](https://storage.googleapis.com/sourcegraph-assets/Docs/llm-dropdown-options-free-pro-2025.png) ## Smart Apply and Execute code suggestions @@ -80,7 +82,7 @@ Cody lets you dynamically insert code from chat into your files with **Smart App Smart Apply also supports the executing of commands in the terminal. When you ask Cody a question related to terminal commands, you can now execute the suggestion in your terminal by clicking the `Execute` button in the chat window. -![smart-apply](https://storage.googleapis.com/sourcegraph-assets/Docs/smart-apply-102024.png) +![smart-apply](https://storage.googleapis.com/sourcegraph-assets/Docs/smart-apply-2025.png) ## Chat history @@ -103,5 +105,95 @@ You are provided with code suggestions in the chat window and the following opti If Cody's answer isn't helpful, you can try asking again with a different context: - **Public knowledge only**: Cody will not use your own code files as context; it’ll only use knowledge trained into the base model. -- **Current file only**: Re-run the prompt again using just the current file as context. +- **Current file only**: Re-run the prompt again using the current file as context. - **Add context**: Provides @-mention context options to improve the response by explicitly including files, symbols, remote repositories, or even web pages (by URL). + + + +The enhanced chat experience input can be accessed from the chat panel of the supported editor extensions (VS Code and JetBrains) and the web app. It combines light code search, AI-powered chat, and agentic capabilities into a unified developer interface. It's designed to accelerate the entire developer workflow by providing a more intuitive and powerful way to interact with code. + +## Prerequisites + +To use Cody's chat, you'll need the following: + +- [Sourcegraph Enterprise Starter](https://sourcegraph.com/pricing) or [Enterprise account](https://sourcegraph.com/pricing) +- A supported editor extension [VS Code](https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai), [JetBrains](https://plugins.jetbrains.com/plugin/9682-cody-ai-coding-assistant-with-autocomplete--chat) installed or use via Web app + +## Key features + +The enhanced chat experience includes everything in the Free plan, plus the following: + +## Intent detection + +Intent detection automatically analyzes user queries and determines whether to provide an AI chat or code search response. This functionality helps simplify developer workflows by providing the most appropriate type of response without requiring explicit mode switching. + +### How it works + +When a user submits a query in the chat panel, the intent detection component: + +- Analyzes the query content and structure +- Determines the most appropriate response type (search or chat) +- Returns results in the optimal format +- Provides the ability to toggle between response types manually + +Let's look at an example of how this might work: + +#### Search-based response + +![Intent detection code search response](https://storage.googleapis.com/sourcegraph-assets/Docs/intent-detection-code-search-response-01242025.jpg) + +#### Chat-based response + +![Intent detection chat response](https://storage.googleapis.com/sourcegraph-assets/Docs/intent-detection-chat-response-01242025.jpg) + +## Smart search integration + +The smart search integration enhances Sourcegraph's chat experience by providing lightweight code search capabilities directly within the chat interface. This feature simplifies developer workflows by offering quick access to code search without leaving the chat environment. + +The integration delivers personalized search results ranked by your contribution history, with frequently accessed repositories appearing higher in results. Users can view code snippets with relevant context and open files directly in their editor. + +Search results automatically become available as context for follow-up queries, with flexible controls for selecting which results to include. While optimized for keyword-style queries and searching across a few repositories, this integration complements rather than replaces the full [Code Search](/code-search) product, which remains the recommended tool for comprehensive enterprise-wide code search. + +## Context-aware responses + +Search results generated through smart search integration can be automatically used as context for follow-up queries. Here's what happens with each scenario: + +### Search responses + +* Search results can be used directly as context for follow-up queries +* Users can select which search results to include as context using checkboxes +* By default, all search results are added as context +* A context chip shows the number of search results being used (e.g., "10 code search results") +* Users can remove the context chip if they don't want to use it for follow-ups + +### Chat responses + +Executing terminal commands for additional context is an experimental feature. + +* Performs background searches for context +* Retrieves full context from files, symbols, remote repos, and web pages +* Can execute terminal commands (with permission) for additional context +* Creates personal notes usable across chat sessions +* Pulls in [OpenCtx](/cody/capabilities/openctx) providers for additional context + +## How does chat work? + +The following is a general walkthrough of the chat experience: + +1. The user enters a query in the chat interface +2. The system analyzes the query through intent detection +3. If it's a search query: + - Displays ranked results with code snippets + - Shows personalized repository ordering + - Provides checkboxes to select context for follow-ups +4. If it's a chat query: + - Delivers AI-powered responses + - Can incorporate previous search results as context +5. Users can: + - Switch between search and chat modes + - Click on results to open files in their editor + - Ask follow-up questions using selected context + - Use `@` to add context for specific files, symbols, remote repositories, or other non-code artifacts + + + diff --git a/docs/cody/capabilities/prompts.mdx b/docs/cody/capabilities/prompts.mdx index 171b5258d..48faf64c4 100644 --- a/docs/cody/capabilities/prompts.mdx +++ b/docs/cody/capabilities/prompts.mdx @@ -17,7 +17,7 @@ Go to **Tools > Prompt Library** from the top navigation bar in the Sourcegraph. Here, you can view all prompts (shared with you in an organization or created by you) and some core (built-in) prompts to help you get started. -![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-1124.png) +![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-2025.png) ### Core (built-in) prompts @@ -45,7 +45,7 @@ Click the **New prompt** button from the **Prompt Library** page. There are also a few advanced options that you can configure. -![create-prompt](https://storage.googleapis.com/sourcegraph-assets/Docs/create-prompt-1124-2.png) +![create-prompt](https://storage.googleapis.com/sourcegraph-assets/Docs/create-prompt-2025-01.png) ### Draft prompts @@ -61,7 +61,7 @@ Once the prompt is visible, it's ready to be used by: - **All members of the organization** if the prompt's owner is an organization - **Everyone** if the prompt is marked **Public** (which only site admins can do) -![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-in-vscode-1124.png) +![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-in-vscode-2025.jpg) ## Edit prompts @@ -78,7 +78,7 @@ Site admins can categorize prompts and create **tags**. This helps you keep your - All the new and existing tags are listed here. You can also search for a specific tag by typing its name in the search box - Click **New tag**, type the **Tag name** and hit the **Create** button -![prompt-tags](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-tags.png) +![prompt-tags](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-tags-2025.png) Once created, it will appear in the **Tags** list and in the sidebar of the Prompt Library. To manage your prompt tags, you can **edit**, **delete**, or **copy link to prompts with this tag**. @@ -86,7 +86,7 @@ Once created, it will appear in the **Tags** list and in the sidebar of the Prom Once site admins create tags, other users in your organization can assign tags to their prompts. While creating or editing a prompt, there is a drop-down selector **Add prompt to...** to assign tags to the prompt. -![assign-prompt-tags](https://storage.googleapis.com/sourcegraph-assets/Docs/assign-prompt-tags.png) +![assign-prompt-tags](https://storage.googleapis.com/sourcegraph-assets/Docs/assign-prompt-tags-2025.png) You can assign multiple tags to a prompt and group them based on their functionality, category, or any other criteria for your organization. In addition, with tags assigned to prompts, you can filter prompts by tags in the Prompt Library. @@ -99,13 +99,15 @@ You can run prompts via: However, prompts marked with the **Edit code** mode can only run from the IDE editor. You cannot run these prompts from the Prompt Library in the web UI. For example, the **document-code** built-in prompt can only run the IDE editor. +![run-prompt-web](https://storage.googleapis.com/sourcegraph-assets/Docs/run-prompt-web-2025.png) + ## Promoted prompts Promoted prompts are supported in VS Code and Cody Web. **Site admins** can promote a prompt by enabling the **Promote prompt** checkbox. This setting allows admins to highlight prompts they want users to use. Promoted prompts are marked with an icon next to their name and appear at the top of the prompt list in the Cody chat. -![icon-recommended-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/recommended-prompts-icon-1124.png) +![icon-recommended-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/recommended-prompts-icon-2025.png) diff --git a/docs/cody/capabilities/query-types.mdx b/docs/cody/capabilities/query-types.mdx new file mode 100644 index 000000000..c6d1de2e0 --- /dev/null +++ b/docs/cody/capabilities/query-types.mdx @@ -0,0 +1,94 @@ +# Chat Query Types + +

This page lists all the query types that will return search results with the Sourcegraph chat.

+ +Query types are only supported on Enterprise Starter and Enterprise plans. + +## Symbol Search + +Symbol Search is a query type or workflow that helps developers understand how specific symbols (like functions, variables, or hooks) are used across a codebase by combining search results with contextual analysis through chat. + +It enables developers to explore and understand symbol usage patterns through a two-step process. First, developers search for a specific symbol (like `useCallback`) using Sourcegraph Chat, which returns relevant code snippets from across the codebase. + +These search results are automatically preserved as context for follow-up chat interactions. Developers can refine their understanding by selecting specific search results and asking natural language questions about the symbol's usage patterns. The chat will analyze the selected code context and provide a comprehensive summary of how the symbol is implemented and used throughout the codebase. + +### Try it + +1. Query for `= useCallback` +2. Select a subset of the search results which include usage for `useCallback` +3. Follow up and ask Sourcegraph chat `Summarize how useCallback is used` + +### Example + + + +## File Search + +Search is a query type or workflow that enables users to locate specific files across repositories and perform targeted analysis on the selected files through natural language follow-up queries. + +File Search simplifies finding and analyzing specific file types across your codebase. Unlike traditional code search, this workflow allows you to identify relevant files (for example, all `package.json` files), select the specific files you want to analyze, and then ask follow-up questions about the selected files. + +This two-step approach is particularly powerful when analyzing patterns or extracting information from similar files spread across multiple repositories. For instance, you could identify all configuration files, select the ones from relevant services, and then analyze their contents for inconsistencies or gather specific information through natural language queries. + +### Try it + +1. Type `package.json` +2. Check the checkbox next to the results you want to analyze +3. Follow up with `List all the dependencies used across these package.json files` + +### Example + + + +## String Literal Search + +String literal search is a query type or workflow that allows you to find exact text matches by enclosing your search term in quotes. This ensures precise matching instead of keyword-based results. + +When you enclose the text in quotes like `" authInfo: async provider =>"",` Sourcegraph performs an exact match search rather than keyword matching. After finding relevant files, you can select specific ones to analyze and ask follow-up questions about their contents - creating an interactive workflow combining precise search and contextual code analysis. + +### Try it + +1. Start a new chat with `"authInfo: async provider =>"` +2. Select a subset of the search results which include usage for the string +3. Follow up with `Summarize the contents` + +### Example + + + +## Error Lookups + +Error Lookups is a conversational workflow for Sourcegraph chat that helps developers understand error messages by providing plain-English explanations of when and why specific errors occur in their codebase and external service calls. + +Developers can use Error Lookups to understand error messages occurring in their codebase. When encountering an error, especially from external services or dependencies, developers can use chat to: + +1. Search for specific error messages across their codebase +2. Select relevant files where the error is thrown or handled +3. Request a natural language explanation of the error's context, triggers, and implications + +The workflow combines Sourcegraph's code search capabilities with AI-powered analysis to provide developers with a clear, contextual understanding of error scenarios. Instead of having to dig through docs or source code manually, developers can quickly grasp the following: + +* The specific conditions that trigger the error +* The underlying reasons for the error occurrence +* Common scenarios where this error might appear +* Potential approaches to handling or preventing the error + +This approach helps developers make more informed decisions about error handling and debugging, reducing the time spent deciphering cryptic error messages or searching through external docs. + +### Try it + +* Query for `"unsupported platform"` +* Select the file(s) where the error is thrown +* Follow up with "Explain when and why this error is thrown" + +### Demo + + diff --git a/docs/cody/clients/cody-with-sourcegraph.mdx b/docs/cody/clients/cody-with-sourcegraph.mdx index a769fd14b..318d8c036 100644 --- a/docs/cody/clients/cody-with-sourcegraph.mdx +++ b/docs/cody/clients/cody-with-sourcegraph.mdx @@ -5,7 +5,7 @@ In addition to the Cody extensions for [VS Code](/cody/clients/install-vscode), [JetBrains](/cody/clients/install-jetbrains), [Visual Studio](/cody/clients/install-visual-studio ), and [Eclispe](/cody/clients/install-eclipse) IDEs, 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 @@ -13,9 +13,9 @@ In addition to the Cody extensions for [VS Code](/cody/clients/install-vscode), Create a [Sourcegraph.com account](https://sourcegraph.com/sign-up) by logging in through codehosts like GitHub and GitLab or via traditional Google sign-in. This takes you to Sourcegraph’s web interface. From here, there are two ways to access the Cody chat: 1. Run any search query via **Code Search** and click the **Cody** button on the left to open the chat window -2. Directly click the **Cody** tab from the top header to open the chat interface +2. Directly click the **Chat** tab from the top header to open the chat interface -![cody-web](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-0724.jpg) +![cody-web](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-2025.png) Enterprise users can also log in to their Sourcegraph.com Enterprise instance and use Cody in the web interface. @@ -37,13 +37,13 @@ To help you automate your key tasks in your development workflow, you get **[Pro If you use Cody with your search results, the chat input will, by default, have the context of your searched codebase. This context is based on your current repository and file. -![cody-web-with-search](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-search-results-1124.png) +![cody-web-with-search](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-search-results-2025.png) You can add or delete any new or existing context by `@-mentioning` files, symbols, directories, repositories, and web URLs. Enterprise users can `@-mention` remote directories as well. When you have both a repository and files as context, Cody will search the repository for context while prioritizing the mentioned files. If you use Cody directly from the top header, the chat input will have no pre-filled context chips by default. You can chat without context or add or delete any new or existing context by `@-mentioning` context chips. -![cody-web-no-search](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-top-header-1124.png) +![cody-web-no-search](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-top-header-2025.png) ### Rerun prompts with different context @@ -52,7 +52,7 @@ If Cody's answer isn't helpful, you can try asking again with a different contex - **Public knowledge only**: Cody will not use your code files as context; it’ll only use knowledge trained into the base model - **Add context**: Provides @-mention context options to improve the response by explicitly including files, symbols, and remote repositories -![re-run-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/rerun-prompt-web-0724.jpg) +![re-run-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/rerun-prompt-web-2025.png) For a detailed breakdown of Cody's capabilities across different clients [read these feature parity docs](/cody/clients/feature-reference). @@ -60,4 +60,4 @@ If Cody's answer isn't helpful, you can try asking again with a different contex Cody allows you create quick, ready-to-use [prompts](/cody/capabilities/commands) to automate key tasks in your workflow. Prompts are created and saved in the Prompt Library and can be accessed from the **Tools > Prompt Library** in the top navigation bar in your Sourcegraph instance. -![cody-web-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-prompts-1124.png) +![cody-web-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-prompts-2025.png) diff --git a/docs/cody/clients/enable-cody-enterprise.mdx b/docs/cody/clients/enable-cody-enterprise.mdx index 245bdfb62..73933eb45 100644 --- a/docs/cody/clients/enable-cody-enterprise.mdx +++ b/docs/cody/clients/enable-cody-enterprise.mdx @@ -3,7 +3,7 @@

Cody enhances your coding experience by providing intelligent code suggestions, context-aware completions, and advanced code analysis. These docs will help you use Cody on your Sourcegraph Enterprise instance.

- + ## Setting up Cody Enterprise diff --git a/docs/cody/clients/feature-reference.mdx b/docs/cody/clients/feature-reference.mdx index f4e373058..a98eccf63 100644 --- a/docs/cody/clients/feature-reference.mdx +++ b/docs/cody/clients/feature-reference.mdx @@ -1,12 +1,12 @@ -# Feature Parity Reference for Cody Clients +# Feature Parity Reference for Sourcegraph Clients -

This document compares Cody's features and capabilities across different clients and platforms like VS Code, JetBrains, and Sourcegraph.com (Web UI).

+

This document compares features and capabilities across different clients and platforms like VS Code, JetBrains, and Sourcegraph.com (Web UI).

## Chat | **Feature** | **VS Code** | **JetBrains** | **Visual Studio** | **Eclipse** | **Web** | **CLI** | | ---------------------------------------- | ----------- | ------------- | ----------------- | ----------- | -------------------- | ------- | -| Chat with Cody | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| Chat | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Chat history | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | Clear chat history | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | Edit sent messages | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | diff --git a/docs/cody/clients/index.mdx b/docs/cody/clients/index.mdx index a4d87a5ef..9d2b3cc2e 100644 --- a/docs/cody/clients/index.mdx +++ b/docs/cody/clients/index.mdx @@ -7,7 +7,7 @@ - + - + diff --git a/docs/cody/clients/install-jetbrains.mdx b/docs/cody/clients/install-jetbrains.mdx index ab3670a5b..36c226806 100644 --- a/docs/cody/clients/install-jetbrains.mdx +++ b/docs/cody/clients/install-jetbrains.mdx @@ -45,7 +45,7 @@ After a successful installation, the Cody icon appears in the Tool Windows Bar. Cody Free and Pro users can sign in to their Sourcegraph.com accounts using SSO through GitHub, GitLab, or Google. -![cody-for-intellij-login](https://storage.googleapis.com/sourcegraph-assets/Docs/Media/sign-in-cody-jb.png) +![cody-for-intellij-login](https://storage.googleapis.com/sourcegraph-assets/Docs/sign-in-cody-jb-2025.jpg) ### Sourcegraph Enterprise Cody Users @@ -74,6 +74,7 @@ Cody provides intelligent code suggestions and context-aware autocompletion for 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 @@ -89,7 +90,7 @@ The chat interface is designed intuitively. Your very first chat input lives at Since your first message to Cody anchors the conversation, you can return to the top chat box anytime, edit your prompt, or rerun it using a different LLM model. -![chat-interface](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-chat-interface-102024.png) +![chat-interface](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-chat-interface-2025.png) Users must be on JetBrains v2023.2 and Cody plugin v7.0.0 or above to get the new and improved chat UI. @@ -132,7 +133,7 @@ You can read more about context limits when selecting context [here](/cody/core- When you start a new Cody chat, the input window opens with default `@-mention` context chips for all the context it intends to use. This context is based on your current repository and current file (or a file selection if you have code highlighted). -![jb-context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-context-retrieval-102024.png) +![jb-context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-context-retrieval-2025.png) At any point in time, you can edit these context chips, add additional context chips, or remove them completely if you do not want to use these as context. Any chat without a context chip will instruct Cody to use no codebase context. However, you can always provide an alternate `@-mention` file to let Cody use it as a new context source. @@ -146,7 +147,7 @@ If Cody's answer isn't helpful, you can try asking again with a different contex - **Current file only**: Rerun the prompt using just the current file as context. - **Add context**: Provides @-mention context options to improve the response by explicitly including files, remote repositories, or web pages (URL). -![jb-rerun-context](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-rerun-context-0824.jpg) +![jb-rerun-context](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-rerun-context-2025.png) ## Context fetching mechanism @@ -203,7 +204,7 @@ To help you get started, there are a few prompts that are available by default. - Detect code smells - Generate unit tests -![jb-default-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-default-prompts-1124.png) +![jb-default-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-default-prompts-2025.png) ### Inline code edits @@ -217,7 +218,7 @@ Here, you can describe the change you want to make and select the LLM model you Once you enter your prompt, Cody will perform inline edits that you can **Accept**, **Undo**, or **Show diff** for the change. Click **Edit & Retry** to iterate your prompt and get alternate suggestions. -![jb-inline-code-edit](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-inline-edits-1124.png) +![jb-inline-code-edit](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-inline-edits-2025.png) ### Inline code fix @@ -242,7 +243,7 @@ To update your update channel, you can do the following: Cody Free and Pro users can choose from a list of supported LLM models for chat. -![llm-selection-cody](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-llm-select-0824.jpg) +![llm-selection-cody](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-llm-select-2025.png) Enterprise users who have [model configuration](/Cody/clients/model-configuration#model-configuration) configured can also select from the available models for their instance. On instances with the ["completions" configuration](/Cody/clients/model-configuration#completions-configuration), a site admin determines the LLM, which cannot be changed within the editor. diff --git a/docs/cody/clients/install-vscode.mdx b/docs/cody/clients/install-vscode.mdx index da4fa9d02..e959beba6 100644 --- a/docs/cody/clients/install-vscode.mdx +++ b/docs/cody/clients/install-vscode.mdx @@ -22,7 +22,7 @@ You can install VS Code directly from the [VS Code extension marketplace listing - Type **Cody AI** in the search bar and click the **Install** button - After installing, you may be prompted to reload VS Code to activate the extension -![install-cody-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/install-cody-vscode.png) +![install-cody-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/install-cody-vscode-2025.png) Alternatively, you can also [download and install the extension from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai) directly. @@ -34,7 +34,7 @@ After a successful installation, the Cody icon appears in the [Activity sidebar] Cody Free and Cody Pro users can sign in to their Sourcegraph.com accounts through GitHub, GitLab, or Google. -![](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-new-ui-0724.jpg) +![](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-new-ui-2025.jpg) ### Sourcegraph Enterprise Cody Users @@ -42,25 +42,13 @@ Cody Free and Cody Pro users can sign in to their Sourcegraph.com accounts throu Sourcegraph Enterprise users should connect Cody to their Enterprise instance by clicking **Sign In to Your Enterprise Instance**. -You'll be prompted to choose how to sign-in, select **Sign In to Sourcegraph Instances v5.1 and above**. +You'll be prompted to choose how to sign-in, Enter the URL of your Enterprise instance. If you are unsure, please contact your administrator. -![](https://storage.googleapis.com/sourcegraph-assets/Docs/927fb401aa80af47f4384a854309b0ed5ac58da34507ed4c0dfd72da61e1edfb.png) - -Enter the URL of your Enterprise instance. If you are unsure, please contact your administrator. - -Instance URL +![](https://storage.googleapis.com/sourcegraph-assets/Docs/vscode-cody-enterprise-login.png) A pop-up will ask if you want to Open the URL in a new window. Click **Open** to open the URL in a new window. Next, sign in to your instance. If you do not yet have a login, please contact your administrator. -Sign in +![](https://storage.googleapis.com/sourcegraph-assets/Docs/sign-in-to-sourcegraph-2025.jpg) Create an access token from Account Settings - Access Tokens. Click **+ Generate new token** @@ -127,7 +115,7 @@ The chat interface is designed intuitively. Your very first chat input lives at 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. ### Chat History @@ -170,7 +158,7 @@ Cody defaults to showing @-mention context chips for all the context it intends When you start a new Cody chat, the chat input window opens with a default `@-mention` context chips for all the context it intends to use. This context is based on your current repository and current file (or a file selection if you have code highlighted). -![context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/context-retrieval-102024.png) +![context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/context-retrieval-2025.png) At any point in time, you can edit these context chips or remove them completely if you do not want to use these as context. Any chat without a context chip will instruct Cody to use no codebase context. However, you can always provide an alternate `@-mention` file or symbols to let Cody use it as a new source of context. @@ -206,10 +194,9 @@ To try it out, add context providers to your VS Code settings. For example, to u If Cody's answer isn't helpful, you can try asking again with different context: - Public knowledge only: Cody will not use your own code files as context; it’ll only use knowledge trained into the base model. -- Current file only: Re-run the prompt again using just the current file as context. - Add context: Provides @-mention context options to improve the response by explicitly including files, symbols, remote repositories, or even web pages (by URL). -![re-run-with-context](https://storage.googleapis.com/sourcegraph-assets/Docs/re-run-with-context.png) +![re-run-with-context](https://storage.googleapis.com/sourcegraph-assets/Docs/re-run-with-context-2025.png) ## Context fetching mechanism @@ -246,17 +233,15 @@ To help you get started, there are a few prompts that are available by default. - Detect code smells - Generate unit tests -![default-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/default-prompts-1124.png) +![default-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/default-prompts-2025.png) ## Smart Apply code suggestions Cody lets you dynamically insert code from chat into your files with **Smart Apply**. Every time Cody provides you with a code suggestion, you can click the **Apply** button. Cody will then analyze your open code file, find where that relevant code should live, and add a diff. For chat messages where Cody provides multiple code suggestions, you can apply each in sequence to go from chat suggestions to written code. -![smart-apply-code](https://storage.googleapis.com/sourcegraph-assets/Docs/smart-apply-102024.png) - Smart Apply also supports executing commands in the terminal. When you ask Cody a question related to terminal commands, you can execute the suggestion in your terminal by clicking the `Execute` button in the chat window. -![smart-apply-execute](https://storage.googleapis.com/sourcegraph-assets/Docs/smart-apply-102024.png) +![smart-apply-execute](https://storage.googleapis.com/sourcegraph-assets/Docs/smart-apply-2025.png) ## Keyboard shortcuts @@ -286,7 +271,7 @@ Claude 3.5 Sonnet is the default LLM model for inline edits and prompts. If you' Users on Cody **Free** and **Pro** can choose from a list of [supported LLM models](/cody/capabilities/supported-models) for chat. -![LLM-models-for-cody-free](https://storage.googleapis.com/sourcegraph-assets/Docs/llm-dropdown-options-102024.png) +![LLM-models-for-cody-free](https://storage.googleapis.com/sourcegraph-assets/Docs/llm-dropdown-options-2025.png) Enterprise users get Claude 3 (Opus and Sonnet) as the default LLM models without extra cost. Moreover, Enterprise users can use Claude 3.5 models through Cody Gateway, Anthropic BYOK, Amazon Bedrock (limited availability), and GCP Vertex. @@ -324,9 +309,9 @@ To get autocomplete suggestions from Ollama locally, follow these steps: ### Cody chat with Ollama Chat model selector To generate chat with Ollama locally, follow these steps: @@ -366,7 +351,7 @@ Once configured, and VS Code has been restarted, you can select the configured m Example VS Code user settings JSON configuration: ```json -{ +{ "cody.dev.models": [ { "provider": "google", diff --git a/docs/cody/enterprise/features.mdx b/docs/cody/enterprise/features.mdx index 76b842b6c..27a04b4cf 100644 --- a/docs/cody/enterprise/features.mdx +++ b/docs/cody/enterprise/features.mdx @@ -58,7 +58,7 @@ To better support teams working with large monorepos, Enterprise users can `@-me To do this, type `@` in the chat, and then select **Directories** to search other repositories for context in your codebase. -![@-mention-directory](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-ent-at-mention-dir-1124.png) +![@-mention-directory](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-ent-at-mention-dir-2025.png) Please note that you can only `@-mention` remote directories (i.e., directories in your Sourcegraph instance) but not local directories. This means any recent changes to your directories can't be utilized as context until your Sourcegraph instance re-indexes any changes. diff --git a/docs/cody/index.mdx b/docs/cody/index.mdx index 7aa1a1840..311a41825 100644 --- a/docs/cody/index.mdx +++ b/docs/cody/index.mdx @@ -1,5 +1,12 @@ # Cody + + Supported on all [Sourcegraph plans](https://about.sourcegraph.com/pricing). + + Available on VS Code, JetBrains, Visual Studio, Eclipse and the Web. + + + Cody is an AI coding assistant that uses all the latest LLMs and your development context to help you understand, write, and fix code faster. It uses the powerful Sourcegraph's advanced Search API to pull context from both local and remote codebases so that you can use context about APIs, symbols, and usage patterns from across your entire codebase.