update slash commands

This commit is contained in:
Test 2024-09-17 12:19:27 -07:00
parent a9a5faa598
commit e9debd5a70
5 changed files with 99 additions and 63 deletions

View file

@ -25,7 +25,7 @@ You can also set up tab-autocomplete with a local LM Studio instance by followin
Example:
```json title=config.json
```json title="config.json"
{
"tabAutocompleteModel": {
"title": "Starcoder2 3b",
@ -40,7 +40,7 @@ Example:
All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote vLLM instance you would edit your `config.json` like this (note that it is not inside the models array), filling in the correct model name and vLLM endpoint:
```json title=config.json
```json title="config.json"
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
@ -54,7 +54,7 @@ All of the configuration options available for chat models are available to use
As another example, say you want to use a different model, `deepseek-coder:6.7b-base`, with Ollama:
```json title=config.json
```json title="config.json"
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
@ -100,7 +100,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa
### Full example
```json title=config.json
```json title="config.json"
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",

View file

@ -18,7 +18,7 @@ To use any of the built-in context providers, open `config.json` and add it to t
Type '@file' to reference any file in your current workspace.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -32,7 +32,7 @@ Type '@file' to reference any file in your current workspace.
Type '@code' to reference specific functions or classes from throughout your project.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -46,7 +46,7 @@ Type '@code' to reference specific functions or classes from throughout your pro
Type '@diff' to reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -60,7 +60,7 @@ Type '@diff' to reference all of the changes you've made to your current branch.
Type '@terminal' to reference the contents of your IDE's terminal.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -74,7 +74,7 @@ Type '@terminal' to reference the contents of your IDE's terminal.
Type `@docs` to index and retrieve snippets from any documentation site.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -90,7 +90,7 @@ To learn more, visit `[@docs](../customize/deep-dives/docs.md)`.
Type '@open' to reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -107,7 +107,7 @@ Type '@open' to reference the contents of all of your open files. Set `onlyPinne
Type '@codebase' to automatically retrieve the most relevant snippets from your codebase. Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md).
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -121,7 +121,7 @@ Type '@codebase' to automatically retrieve the most relevant snippets from your
Type '@folder' to use the same retrieval mechanism as '@codebase', but only on a single folder.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -135,7 +135,7 @@ Type '@folder' to use the same retrieval mechanism as '@codebase', but only on a
Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search. This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -149,7 +149,7 @@ Type '@search' to reference the results of codebase search, just like the result
Type '@url' and input a URL, then Continue will convert it to a markdown document to pass to the model.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -163,7 +163,7 @@ Type '@url' and input a URL, then Continue will convert it to a markdown documen
Type '@tree' to reference the structure of your current workspace. The LLM will be able to see the nested directory structure of your project.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -177,7 +177,7 @@ Type '@tree' to reference the structure of your current workspace. The LLM will
Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -196,7 +196,7 @@ Note: You can get an API key for free at [serper.dev](https://serper.dev).
Type '@issue' to reference the conversation in a GitHub issue. Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited:
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -223,7 +223,7 @@ Type `@gitlab-mr` to reference an open MR for this branch on GitLab.
You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope. then add the following to your configuration:
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -240,7 +240,7 @@ You will need to create a [personal access token](https://docs.gitlab.com/ee/use
You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -262,7 +262,7 @@ If you select some code to be edited, you can have the context provider filter o
Type '@jira' to reference the conversation in a Jira issue. Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -282,7 +282,7 @@ This context provider supports both Jira API version 2 and 3. It will use versio
that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need
to set the API Version to 2 using the `apiVersion` property.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -316,7 +316,7 @@ You can override this query by setting the `issueQuery` parameter.
Type '@outline' to reference the outline of all currently open files. The outline of a files consists of only the function and class definitions in the file. Supported file extensions are '.js', '.mjs', '.go', '.c', '.cc', '.cs', '.cpp', '.el', '.ex', '.elm', '.java', '.ml', '.php', '.ql', '.rb', '.rs', '.ts'
```json title=config.json
```json title="config.json"
{ "name": "outline" }
```
@ -324,7 +324,7 @@ Type '@outline' to reference the outline of all currently open files. The outlin
Type '@highlights' to reference the 'highlights' from all currently open files. The highlights are computed using Paul Gauthier's so-called ['repomap'](https://aider.chat/docs/repomap.html) technique in [Aider Chat](https://github.com/paul-gauthier/aider). Supported file extensions are the same as for '@Outline' (behind the scenes, we use the corresponding tree-sitter grammars for language parsing).
```json title=config.json
```json title="config.json"
{ "name": "highlights" }
``` -->
@ -338,7 +338,7 @@ By default, the `schema` filter is set to `public`, and the `sampleRows` is set
[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -361,7 +361,7 @@ By default, the `schema` filter is set to `public`, and the `sampleRows` is set
Type `@database` to reference table schemas you can use the drop-down or start typeing table names based off of your configuration. Configuration supports multiple databases, allowing you to specify various connection details for PostgreSQL, MySQL, SQLite. Each connection should include a unique name, the connection_type (e.g., postgres, sqlite), and the necessary connection parameters specific to each database type.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -397,7 +397,7 @@ Type `@database` to reference table schemas you can use the drop-down or start t
Type `@locals` to reference the contents of the local variables with top n level (defaulting to 3) of call stack for that thread. A dropdown will appear, allowing you to select a specific thread to see the local variables in that thread.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -416,7 +416,7 @@ Provides an overview of all files and the call signatures of top-level classes,
This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{
@ -430,7 +430,7 @@ This context provider is inpsired by [Aider's repository map](https://aider.chat
Type `@os` to reference the architecture and platform of your current operating system.
```json title=config.json
```json title="config.json"
{
"contextProviders": [
{

View file

@ -32,7 +32,7 @@ Once it has been downloaded, you should begin to see completions in VS Code.
All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this (note that it is not inside the models array):
```json title=config.json
```json title="config.json"
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
@ -73,7 +73,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa
### Full example
```json title=config.json
```json title="config.json"
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",

View file

@ -74,7 +74,7 @@ By default, we use a lighter weight tool to crawl documentation sites that canno
If you want to crawl a site that is dynamically generated, or you get an error while attempting to crawl a site, you can enable the experimental `useChromiumForDocsCrawling` feature in your `config.json`. This will download and install Chromium to `~/.continue/.utils`.
```json title=config.json
```json title="config.json"
"experimental": {
"useChromiumForDocsCrawling": true
}

View file

@ -10,16 +10,20 @@ Slash commands are shortcuts that can be activated by typing '/' and selecting f
## Built-in Slash Commands
To use any of the built-in slash commands, open `~/.continue/config.json` and add it to the `slashCommands` list.
To use any of the built-in slash commands, open `config.json` and add it to the `slashCommands` list.
### `/edit`
Select code with ctrl/cmd + L (VS Code) or ctrl/cmd + J (JetBrains), and then type "/edit", followed by instructions for the edit. Continue will stream the changes into a side-by-side diff editor.
Select code with `ctrl/cmd + L` (VS Code) or `ctrl/cmd + J` (JetBrains), and then type "/edit", followed by instructions for the edit. Continue will stream the changes into a side-by-side diff editor.
```json
```json title="config.json"
{
"name": "edit",
"description": "Edit highlighted code"
"slashCommands": [
{
"name": "edit",
"description": "Edit highlighted code"
}
]
}
```
@ -27,10 +31,14 @@ Select code with ctrl/cmd + L (VS Code) or ctrl/cmd + J (JetBrains), and then ty
Comment works just like /edit, except it will automatically prompt the LLM to comment the code.
```json
```json title="config.json"
{
"name": "comment",
"description": "Write comments for the highlighted code"
"slashCommands": [
{
"name": "comment",
"description": "Write comments for the highlighted code"
}
]
}
```
@ -38,11 +46,15 @@ Comment works just like /edit, except it will automatically prompt the LLM to co
Type "/share" to generate a shareable markdown transcript of your current chat history.
```json
```json title="config.json"
{
"name": "share",
"description": "Export the current chat session to markdown",
"params": { "outputDir": "~/.continue/session-transcripts" }
"slashCommands": [
{
"name": "share",
"description": "Export the current chat session to markdown",
"params": { "outputDir": "~/.continue/session-transcripts" }
}
]
}
```
@ -52,10 +64,14 @@ Use the `outputDir` parameter to specify where you want to the markdown file to
Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal.
```json
```json title="config.json"
{
"name": "cmd",
"description": "Generate a shell command"
"slashCommands": [
{
"name": "cmd",
"description": "Generate a shell command"
}
]
}
```
@ -63,10 +79,14 @@ Generate a shell command from natural language and (only in VS Code) automatical
Shows the LLM your current git diff and asks it to generate a commit message.
```json
```json title="config.json"
{
"name": "commit",
"description": "Generate a commit message for the current changes"
"slashCommands": [
{
"name": "commit",
"description": "Generate a commit message for the current changes"
}
]
}
```
@ -74,11 +94,15 @@ Shows the LLM your current git diff and asks it to generate a commit message.
Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference.
```json
```json title="config.json"
{
"name": "http",
"description": "Does something custom",
"params": { "url": "<my server endpoint>" }
"slashCommands": [
{
"name": "http",
"description": "Does something custom",
"params": { "url": "<my server endpoint>" }
}
]
}
```
@ -86,11 +110,15 @@ Write a custom slash command at your own HTTP endpoint. Set 'url' in the params
Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for.
```json
```json title="config.json"
{
"name": "issue",
"description": "Generate a link to a drafted GitHub issue",
"params": { "repositoryUrl": "https://github.com/continuedev/continue" }
"slashCommands": [
{
"name": "issue",
"description": "Generate a link to a drafted GitHub issue",
"params": { "repositoryUrl": "https://github.com/continuedev/continue" }
}
]
}
```
@ -98,10 +126,14 @@ Describe the issue you'd like to generate, and Continue will turn into a well-fo
The StackOverflow slash command will automatically pull results from StackOverflow to answer your question, quoting links along with its answer.
```json
```json title="config.json"
{
"name": "so",
"description": "Reference StackOverflow to answer the question"
"slashCommands": [
{
"name": "so",
"description": "Reference StackOverflow to answer the question"
}
]
}
```
@ -109,9 +141,13 @@ The StackOverflow slash command will automatically pull results from StackOverfl
The Onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture.
```json
```json title="config.json"
{
"name": "onboard",
"description": "Familiarize yourself with the codebase"
"slashCommands": [
{
"name": "onboard",
"description": "Familiarize yourself with the codebase"
}
]
}
```