diff --git a/.changes/extensions/intellij/0.0.42.md b/.changes/extensions/intellij/0.0.42.md
new file mode 100644
index 000000000..dbcdd3fab
--- /dev/null
+++ b/.changes/extensions/intellij/0.0.42.md
@@ -0,0 +1,7 @@
+## 0.0.42 - 2024-04-12
+### Added
+* Inline cmd/ctrl+I in JetBrains
+### Fixed
+* Fixed character encoding error causing display issues
+* Fixed error causing input to constantly demand focus
+* Fixed automatic reloading of config.json
diff --git a/.changes/extensions/vscode/0.8.24.md b/.changes/extensions/vscode/0.8.24.md
new file mode 100644
index 000000000..62c32d5e5
--- /dev/null
+++ b/.changes/extensions/vscode/0.8.24.md
@@ -0,0 +1,5 @@
+## 0.8.24 - 2024-04-12
+### Added
+* Support for improved retrieval models (Voyage embeddings/reranking)
+* New @code context provider
+* Personal usage analytics
diff --git a/.changes/unreleased/Added-20240412-160513.yaml b/.changes/unreleased/Added-20240412-160513.yaml
new file mode 100644
index 000000000..a2cd94570
--- /dev/null
+++ b/.changes/unreleased/Added-20240412-160513.yaml
@@ -0,0 +1,4 @@
+project: extensions/vscode
+kind: Added
+body: Support for Gemini 1.5 Pro
+time: 2024-04-12T16:05:13.251485-07:00
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 459ca71ab..010e9d1e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,6 @@
# Changelog
-Separate changelogs are kept for each part of the Continue repository:
+Separate changelogs are kept for each extension:
- [VS Code Extension](./extensions/vscode/CHANGELOG.md)
- [Intellij Extension](./extensions/intellij/CHANGELOG.md)
-- [Continue Server](./server/CHANGELOG.md)
diff --git a/README.md b/README.md
index 0e785357c..17b2b953d 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,14 @@
-
+
+
+
+
+
Continue
-**[Continue](https://continue.dev/docs) is an open-source autopilot for [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)—the easiest way to code with any LLM**
+**[Continue](https://continue.dev/docs) keeps developers in flow. Our open-source [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions enable you to easily create your own modular AI software development system that you can improve.**
diff --git a/core/llm/index.ts b/core/llm/index.ts
index 0e3208ffc..820079463 100644
--- a/core/llm/index.ts
+++ b/core/llm/index.ts
@@ -66,6 +66,23 @@ export abstract class BaseLLM implements ILLM {
return ["ollama", "anthropic"].includes(this.providerName);
}
+ supportsCompletions(): boolean {
+ if (this.providerName === "openai") {
+ if (
+ this.apiBase?.includes("api.groq.com") ||
+ this.apiBase?.includes(":1337")
+ ) {
+ // Jan + Groq don't support completions : (
+ return false;
+ }
+ }
+ return true;
+ }
+
+ supportsPrefill(): boolean {
+ return ["ollama", "anthropic"].includes(this.providerName);
+ }
+
uniqueId: string;
model: string;
diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts
index d8f4214ac..55bcfbd6d 100644
--- a/core/llm/llms/OpenAI.ts
+++ b/core/llm/llms/OpenAI.ts
@@ -45,6 +45,12 @@ class OpenAI extends BaseLLM {
this.useLegacyCompletionsEndpoint = options.useLegacyCompletionsEndpoint;
}
+ constructor(options: LLMOptions) {
+ super(options);
+ this.useLegacyCompletionsEndpoint =
+ options.useLegacyCompletionsEndpoint ?? false;
+ }
+
static providerName: ModelProvider = "openai";
static defaultOptions: Partial = {
apiBase: "https://api.openai.com/v1/",
diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts
index d1d28253b..2e789ea05 100644
--- a/core/llm/llms/index.ts
+++ b/core/llm/llms/index.ts
@@ -1,15 +1,15 @@
import Handlebars from "handlebars";
import { BaseLLM } from "..";
import {
- BaseCompletionOptions,
- ILLM,
- LLMOptions,
- ModelDescription,
+ BaseCompletionOptions,
+ ILLM,
+ LLMOptions,
+ ModelDescription,
} from "../..";
import { DEFAULT_MAX_TOKENS } from "../constants";
import Anthropic from "./Anthropic";
-import Cohere from "./Cohere";
import Bedrock from "./Bedrock";
+import Cohere from "./Cohere";
import DeepInfra from "./DeepInfra";
import Flowise from "./Flowise";
import FreeTrial from "./FreeTrial";
@@ -29,122 +29,122 @@ import TextGenWebUI from "./TextGenWebUI";
import Together from "./Together";
function convertToLetter(num: number): string {
- let result = "";
- while (num > 0) {
- const remainder = (num - 1) % 26;
- result = String.fromCharCode(97 + remainder) + result;
- num = Math.floor((num - 1) / 26);
- }
- return result;
+ let result = "";
+ while (num > 0) {
+ const remainder = (num - 1) % 26;
+ result = String.fromCharCode(97 + remainder) + result;
+ num = Math.floor((num - 1) / 26);
+ }
+ return result;
}
const getHandlebarsVars = (
- value: string,
+ value: string,
): [string, { [key: string]: string }] => {
- const ast = Handlebars.parse(value);
+ const ast = Handlebars.parse(value);
- let keysToFilepath: { [key: string]: string } = {};
- let keyIndex = 1;
- for (let i in ast.body) {
- if (ast.body[i].type === "MustacheStatement") {
- const letter = convertToLetter(keyIndex);
- keysToFilepath[letter] = (ast.body[i] as any).path.original;
- value = value.replace(
- new RegExp("{{\\s*" + (ast.body[i] as any).path.original + "\\s*}}"),
- `{{${letter}}}`,
- );
- keyIndex++;
- }
- }
- return [value, keysToFilepath];
+ let keysToFilepath: { [key: string]: string } = {};
+ let keyIndex = 1;
+ for (let i in ast.body) {
+ if (ast.body[i].type === "MustacheStatement") {
+ const letter = convertToLetter(keyIndex);
+ keysToFilepath[letter] = (ast.body[i] as any).path.original;
+ value = value.replace(
+ new RegExp("{{\\s*" + (ast.body[i] as any).path.original + "\\s*}}"),
+ `{{${letter}}}`,
+ );
+ keyIndex++;
+ }
+ }
+ return [value, keysToFilepath];
};
export async function renderTemplatedString(
- template: string,
- readFile: (filepath: string) => Promise,
- inputData: any,
+ template: string,
+ readFile: (filepath: string) => Promise,
+ inputData: any,
): Promise {
- const [newTemplate, vars] = getHandlebarsVars(template);
- const data: any = { ...inputData };
- for (const key in vars) {
- const fileContents = await readFile(vars[key]);
- data[key] = fileContents || (inputData[vars[key]] ?? vars[key]);
- }
- const templateFn = Handlebars.compile(newTemplate);
- const final = templateFn(data);
- return final;
+ const [newTemplate, vars] = getHandlebarsVars(template);
+ const data: any = { ...inputData };
+ for (const key in vars) {
+ const fileContents = await readFile(vars[key]);
+ data[key] = fileContents || (inputData[vars[key]] ?? vars[key]);
+ }
+ const templateFn = Handlebars.compile(newTemplate);
+ const final = templateFn(data);
+ return final;
}
const LLMs = [
- Anthropic,
- Cohere,
- FreeTrial,
- Gemini,
- Llamafile,
- Ollama,
- Replicate,
- TextGenWebUI,
- Together,
- HuggingFaceTGI,
- HuggingFaceInferenceAPI,
- LlamaCpp,
- OpenAI,
- LMStudio,
- Mistral,
- Bedrock,
- DeepInfra,
- OpenAIFreeTrial,
- Flowise,
- Groq,
+ Anthropic,
+ Cohere,
+ FreeTrial,
+ Gemini,
+ Llamafile,
+ Ollama,
+ Replicate,
+ TextGenWebUI,
+ Together,
+ HuggingFaceTGI,
+ HuggingFaceInferenceAPI,
+ LlamaCpp,
+ OpenAI,
+ LMStudio,
+ Mistral,
+ Bedrock,
+ DeepInfra,
+ OpenAIFreeTrial,
+ Flowise,
+ Groq,
];
export async function llmFromDescription(
- desc: ModelDescription,
- readFile: (filepath: string) => Promise,
- completionOptions?: BaseCompletionOptions,
- systemMessage?: string,
+ desc: ModelDescription,
+ readFile: (filepath: string) => Promise,
+ completionOptions?: BaseCompletionOptions,
+ systemMessage?: string,
): Promise {
- const cls = LLMs.find((llm) => llm.providerName === desc.provider);
+ const cls = LLMs.find((llm) => llm.providerName === desc.provider);
- if (!cls) {
- return undefined;
- }
+ if (!cls) {
+ return undefined;
+ }
- const finalCompletionOptions = {
- ...completionOptions,
- ...desc.completionOptions,
- };
+ const finalCompletionOptions = {
+ ...completionOptions,
+ ...desc.completionOptions,
+ };
- systemMessage = desc.systemMessage ?? systemMessage;
- if (systemMessage !== undefined) {
- systemMessage = await renderTemplatedString(systemMessage, readFile, {});
- }
+ systemMessage = desc.systemMessage ?? systemMessage;
+ if (systemMessage !== undefined) {
+ systemMessage = await renderTemplatedString(systemMessage, readFile, {});
+ }
- const options: LLMOptions = {
- ...desc,
- completionOptions: {
- ...finalCompletionOptions,
- model: (desc.model || cls.defaultOptions?.model) ?? "codellama-7b",
- maxTokens:
- finalCompletionOptions.maxTokens ??
- cls.defaultOptions?.completionOptions?.maxTokens ??
- DEFAULT_MAX_TOKENS,
- },
- systemMessage,
- };
+ const options: LLMOptions = {
+ ...desc,
+ completionOptions: {
+ ...finalCompletionOptions,
+ model: (desc.model || cls.defaultOptions?.model) ?? "codellama-7b",
+ maxTokens:
+ finalCompletionOptions.maxTokens ??
+ cls.defaultOptions?.completionOptions?.maxTokens ??
+ DEFAULT_MAX_TOKENS,
+ },
+ systemMessage,
+ };
- return new cls(options);
+ return new cls(options);
}
export function llmFromProviderAndOptions(
- providerName: string,
- llmOptions: LLMOptions,
+ providerName: string,
+ llmOptions: LLMOptions,
): ILLM {
- const cls = LLMs.find((llm) => llm.providerName === providerName);
+ const cls = LLMs.find((llm) => llm.providerName === providerName);
- if (!cls) {
- throw new Error(`Unknown LLM provider type "${providerName}"`);
- }
+ if (!cls) {
+ throw new Error(`Unknown LLM provider type "${providerName}"`);
+ }
- return new cls(llmOptions);
+ return new cls(llmOptions);
}
diff --git a/docs/docs/customization/slash-commands.md b/docs/docs/customization/slash-commands.md
index da8ac0d43..70d522de8 100644
--- a/docs/docs/customization/slash-commands.md
+++ b/docs/docs/customization/slash-commands.md
@@ -16,7 +16,7 @@ To use any of the built-in slash commands, open `~/.continue/config.json` and ad
### `/edit`
-Select code with ctrl/cmd + M (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
{
@@ -117,7 +117,7 @@ You can add custom slash commands by adding to the `customCommands` property in
- `name`: the name of the command, which will be invoked with `/name`
- `description`: a short description of the command, which will appear in the dropdown
-- `prompt`: a set of instructions to the LLM, which will be shown in the prompt
+- `prompt`: a templated prompt to send to the LLM
Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this:
@@ -125,10 +125,17 @@ Custom commands are great when you are frequently reusing a prompt. For example,
customCommands=[{
"name": "check",
"description": "Check for mistakes in my code",
- "prompt": "Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
+ "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
}]
```
+#### Templating
+
+The `prompt` property supports templating with Handlebars syntax. You can use the following variables:
+
+- `input` (used in the example above): any additional input entered with the slash command. For example, if you type `/test only write one test`, `input` will be `only write one test`. This will also include highlighted code blocks.
+- File names: You can reference any file by providing an absolute path or a path relative to the current working directory.
+
### Custom Slash Commands
If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`.
@@ -146,7 +153,7 @@ export function modifyConfig(config: Config): Config {
`${diff}\n\nWrite a commit message for the above changes. Use no more than 20 tokens to give a brief description in the imperative mood (e.g. 'Add feature' not 'Added feature'):`,
{
maxTokens: 20,
- }
+ },
)) {
yield message;
}
diff --git a/docs/docs/walkthroughs/codebase-embeddings.md b/docs/docs/walkthroughs/codebase-embeddings.md
index 701100a4d..7d7dd8ca5 100644
--- a/docs/docs/walkthroughs/codebase-embeddings.md
+++ b/docs/docs/walkthroughs/codebase-embeddings.md
@@ -94,11 +94,27 @@ We also support other methods of generating embeddings, which can be configured
}
```
+### Voyage AI
+
+Voyage AI offers the best embeddings for code with their voyage-code-2 model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
+
+```json title="~/.continue/config.json"
+{
+ "embeddingsProvider": {
+ "provider": "openai",
+ "model": "voyage-code-2",
+ "apiBase": "
+ https://api.voyageai.com/v1/",
+ "apiKey": ""
+ }
+}
+```
+
### OpenAI
OpenAI's [embeddings](https://platform.openai.com/docs/guides/embeddings) are high dimensional embeddings that give great performance on both text and code.
-Configuration for text-embedding-3-small Model. This is default.
+Configuration for text-embedding-3-small Model. This is default.
The text-embedding-3-small model offers an outstanding balance between performance and efficiency, suitable for a versatile range of applications.
```json title="~/.continue/config.json"
@@ -106,7 +122,8 @@ The text-embedding-3-small model offers an outstanding balance between performan
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-small",
- "apiBase": "" // optional, defaults to OpenAI's API
+ "apiBase": "", // optional, defaults to OpenAI's API
+ "apiKey": ""
}
}
```
@@ -119,7 +136,8 @@ For those requiring the highest level of embedding detail and precision, the tex
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-large",
- "apiBase": "" // optional, defaults to OpenAI's API
+ "apiBase": "", // optional, defaults to OpenAI's API
+ "apiKey": ""
}
}
```
@@ -132,7 +150,8 @@ For certain scenarios, you may still find the text-embedding-ada-002 model relev
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-ada-002",
- "apiBase": "" // optional, defaults to OpenAI's API
+ "apiBase": "", // optional, defaults to OpenAI's API
+ "apiKey": ""
}
}
```
@@ -153,7 +172,7 @@ export function modifyConfig(config: Config): Config {
});
const data = await response.json();
return data.embedding;
- })
+ }),
);
},
};
diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md
index 52a2f65c8..f82ed42ea 100644
--- a/docs/docs/walkthroughs/tab-autocomplete.md
+++ b/docs/docs/walkthroughs/tab-autocomplete.md
@@ -112,9 +112,8 @@ Follow these steps to ensure that everything is set up correctly:
2. Make sure you have downloaded Ollama.
3. Run `ollama run starcoder2:3b` to verify that the model is downloaded.
4. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere.
-5. Make sure that you aren't also using another Ollama model for chat. This will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both.
-6. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/core.log in JetBrains).
-7. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible.
+5. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/core.log in JetBrains).
+6. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible.
### Completions are slow
diff --git a/docs/netlify.toml b/docs/netlify.toml
index 490ac92ed..048a32e81 100644
--- a/docs/netlify.toml
+++ b/docs/netlify.toml
@@ -1,4 +1,9 @@
[[redirects]]
from = "/"
to = "/docs/intro"
+ force = true
+
+[[redirects]]
+ from = "/docs"
+ to = "/docs/intro"
force = true
\ No newline at end of file
diff --git a/extensions/intellij/CHANGELOG.md b/extensions/intellij/CHANGELOG.md
index 2d2facf21..e014cbbc4 100644
--- a/extensions/intellij/CHANGELOG.md
+++ b/extensions/intellij/CHANGELOG.md
@@ -6,7 +6,15 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
-Pre-release Changes
+## 0.0.42 - 2024-04-12
+### Added
+* Inline cmd/ctrl+I in JetBrains
+### Fixed
+* Fixed character encoding error causing display issues
+* Fixed error causing input to constantly demand focus
+* Fixed automatic reloading of config.json
+
+## 0.0.38 - 2024-03-15
### Added
* Remote config server support
* Autocomplete support in JetBrains
diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md
index 1ca13d740..4597028ab 100644
--- a/extensions/vscode/CHANGELOG.md
+++ b/extensions/vscode/CHANGELOG.md
@@ -6,6 +6,16 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
+Pre-release Changes
+### Added
+* Support for Gemini 1.5 Pro
+
+## 0.8.24 - 2024-04-12
+### Added
+* Support for improved retrieval models (Voyage embeddings/reranking)
+* New @code context provider
+* Personal usage analytics
+
## 0.8.15 - 2024-03-05
### Added
* Tab-autocomplete in beta
diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json
index 2ea5de9a1..1861ae0d9 100644
--- a/extensions/vscode/package-lock.json
+++ b/extensions/vscode/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "continue",
- "version": "0.9.92",
+ "version": "0.8.22",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
- "version": "0.9.92",
+ "version": "0.8.22",
"license": "Apache-2.0",
"dependencies": {
"@electron/rebuild": "^3.2.10",
diff --git a/media/c_d.png b/media/c_d.png
deleted file mode 100644
index 2aae4003a..000000000
Binary files a/media/c_d.png and /dev/null differ
diff --git a/media/readme.png b/media/readme.png
new file mode 100644
index 000000000..64f65b845
Binary files /dev/null and b/media/readme.png differ