Skip to content

Commit 1610ab9

Browse files
authored
Merge pull request #7027 from continuedev/bdougie/con-3312
docs: updates docs for Slash Commands
2 parents e1d39bb + b8057dc commit 1610ab9

File tree

3 files changed

+33
-9
lines changed

3 files changed

+33
-9
lines changed

docs/customize/deep-dives/configuration.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ Example
6060

6161
`config.ts` must export a `modifyConfig` function, like:
6262

63+
<Warning>
64+
The `slashCommands` array shown below is deprecated. For creating custom slash
65+
commands, use [prompt files](./slash-commands) instead.
66+
</Warning>
67+
6368
```ts title="config.ts"
6469
export function modifyConfig(config: Config): Config {
6570
config.slashCommands?.push({
@@ -82,4 +87,4 @@ export function modifyConfig(config: Config): Config {
8287
});
8388
return config;
8489
}
85-
```
90+
```

docs/customize/deep-dives/slash-commands.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ keywords: [slash command, custom commands, step]
99
Slash commands are shortcuts that can be activated by typing '/' in a chat session (press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains)), and selecting from the dropdown.
1010
![slash-commands](/images/slash-commands.png)
1111

12-
Slash commands can be combined with additional instructions, including [context providers](../custom-providers.mdx) or highlighted code.
12+
Slash commands can be combined with additional instructions, including [context providers](../custom-providers) or highlighted code.
13+
14+
<Note>
15+
**Recommended approach**: Use prompt files to create slash commands instead of
16+
the deprecated `config.json` approach. The methods described below provide
17+
better flexibility and are the actively maintained ways to add custom
18+
commands.
19+
</Note>
1320

1421
## Prompts
1522

@@ -21,7 +28,7 @@ The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/
2128

2229
It is also possible to write your own slash command by defining a “.prompt file.” Prompt files can be as simple as a text file, but also include templating so that you can refer to files, URLs, highlighted code, and more.
2330

24-
Learn more about prompt files [here](./prompts.md)
31+
Learn more about prompt files [here](./prompts).
2532

2633
### MCP Server prompts
2734

docs/reference/json-reference.mdx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
---
2-
title: "config.json Reference"
2+
title: "config.json Reference (Deprecated)"
3+
description: "Legacy configuration reference for config.json - use config.yaml instead"
4+
noindex: true
35
---
46

5-
<Info>
6-
We recently introduced a new configuration format, `config.yaml`, to replace
7-
`config.json`. See the `config.yaml` reference and migration guide
8-
[here](/reference).
9-
</Info>
7+
<Warning>
8+
**This page documents deprecated functionality.** For creating slash commands and customizing Continue, please use:
9+
- [Prompt blocks and prompt files](/customize/deep-dives/slash-commands) for slash commands
10+
- [config.yaml](/reference) for configuration
11+
12+
See the `config.yaml` reference and migration guide
13+
[here](/reference).
14+
15+
</Warning>
1016

1117
Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json).
1218

@@ -468,16 +474,19 @@ Several experimental config parameters are available, as described below:
468474
- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.=
469475

470476
- `modelRoles`:
477+
471478
- `inlineEdit`: Model title for inline edits.
472479
- `applyCodeBlock`: Model title for applying code blocks.
473480
- `repoMapFileSelection`: Model title for repo map selections.
474481

475482
- `quickActions`: Array of custom quick actions
483+
476484
- `title` (**required**): Display title for the quick action.
477485
- `prompt` (**required**): Prompt for quick action.
478486
- `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`.
479487

480488
- `contextMenuPrompts`:
489+
481490
- `comment`: Prompt for commenting code.
482491
- `docstring`: Prompt for adding docstrings.
483492
- `fix`: Prompt for fixing code.
@@ -529,15 +538,18 @@ Some deprecated `config.json` settings are no longer stored in config and have b
529538
- `disableSessionTitles`/`ui.getChatTitles`: This value will be migrated to the safest merged value (`true` if either are `true`). `getChatTitles` takes precedence if set to false
530539

531540
- `tabAutocompleteOptions`
541+
532542
- `useCache`: This value will override during migration.
533543
- `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated)
534544
- `multilineCompletions`: This value will override during migration.
535545

536546
- `experimental`
547+
537548
- `useChromiumForDocsCrawling`: This value will override during migration.
538549
- `readResponseTTS`: This value will override during migration.
539550

540551
- `ui` - all will override during migration
552+
541553
- `codeBlockToolbarPosition`
542554
- `fontSize`
543555
- `codeWrap`

0 commit comments

Comments
 (0)