-
Notifications
You must be signed in to change notification settings - Fork 76
Docs for Chat (prev. omnibox) #905
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
Closed
Closed
Changes from 21 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
68ebc97
Docs for Omnibox
MaedahBatool 57c3d55
Add documentation for error lookups workflow in omnibox
jdorfman e40d96a
Add documentation for file search workflow in omnibox/chat
jdorfman badbeb0
Add documentation for symbol search workflow in chat
jdorfman c4c1bb5
Add documentation for string literal search workflow in Chat
jdorfman b0290fa
Merge branch 'main' into omnibox-docs
MaedahBatool 2bb8654
new nav structure
MaedahBatool 7b85aa4
Update formatting and structure of chat query types documentation
jdorfman 2cad1e1
Update Chat (main overview page) documentation with new features and …
jdorfman 72bab86
Add documentation for intent detection, smart search integration, and…
jdorfman d5f901d
Update intent detection feature documentation with new screenshots
jdorfman fbead65
Add smart search integration and context-aware responses
jdorfman 1df444a
Update query types documentation with new demos and content
jdorfman d8ea0bc
Merge branch 'main' into omnibox-docs
MaedahBatool 9d04201
Add tabs layout
MaedahBatool 3c716fa
Add edits to index.mdx
MaedahBatool 93656dd
Redo key features as bullets
MaedahBatool 3a984ee
more structure
MaedahBatool 2d9a9e4
revert to old nav
MaedahBatool 66cb14d
Restructure query types docs
MaedahBatool 09617ba
Update image URLs in install-vscode.mdx (Lunch break commit)
jdorfman 4b543b3
Stashing pnpm-lock
jdorfman a2605d6
Update image URLs in install-vscode.mdx
jdorfman b28d269
Update image URLs in install-jetbrains.mdx (commit 1/2)
jdorfman 1e9a552
Update image URLs in install-jetbrains.mdx (commit 2/2)
jdorfman d3efe38
Update screenshots in cody-with-sourcegraph.mdx
jdorfman c7edfa3
Update image URL in cody-enterprise-features.mdx
jdorfman 6c5ac06
Update image URLs in docs/cody/capabilities/chat.mdx
jdorfman f1d49c0
Update images and URLs in prompts.mdx
jdorfman 6c8e25b
Update images & URLs in docs/code-search/working/saved_searches.mdx
jdorfman 5cd18c1
Merge branch 'main' into omnibox-docs
MaedahBatool 26a48c8
Update docs/cody/capabilities/chat.mdx
jdorfman 0a6b219
Update pricing and extension links [alex suggestion]
jdorfman 8f9e318
Add note about experimental terminal command execution [Alex suggestion]
jdorfman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # Chat Query Types | ||
|
|
||
| <p className="subtitle">This page lists all the query types that will return search results with the Sourcegraph chat.</p> | ||
|
|
||
| <Callout type="note">Query types are only supported on Enterprise Starter and Enterprise plans.</Callout> | ||
|
|
||
| ## 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 | ||
|
|
||
| <video width="100%" controls> | ||
| <source src="https://storage.googleapis.com/sourcegraph-assets/Docs/chat-query-types-symbol-search-20250124.mp4" type="video/mp4" /> | ||
| </video> | ||
|
|
||
| ## 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 | ||
|
|
||
| <video width="100%" controls> | ||
| <source src="https://storage.googleapis.com/sourcegraph-assets/Docs/chat-query-types-file-search-20250124.mp4" type="video/mp4" /> | ||
| </video> | ||
|
|
||
| ## 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 | ||
|
|
||
| <video width="100%" controls> | ||
| <source src="https://storage.googleapis.com/sourcegraph-assets/Docs/chat-query-types-string-literal-search-20250124.mp4" type="video/mp4" /> | ||
| </video> | ||
|
|
||
| ## 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 | ||
|
|
||
| <video width="100%" controls> | ||
| <source src="https://storage.googleapis.com/sourcegraph-assets/Docs/chat-query-types-error-lookups-20250124.mp4" type="video/mp4" /> | ||
| </video> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Omnibox | ||
MaedahBatool marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.