Merge branch 'dev' of https://github.com/continuedev/continue into dallin/config-md

This commit is contained in:
Dallin Romney 2024-10-29 15:39:37 -07:00
commit e94912462d
53 changed files with 734 additions and 234 deletions

View file

@ -4,8 +4,8 @@
## Checklist
- [ ] The base branch of this PR is `dev`, rather than `main`
- [ ] The relevant docs, if any, have been updated or created
- [] The base branch of this PR is `dev`, rather than `main`
- [] The relevant docs, if any, have been updated or created
## Screenshots

3
.gitignore vendored
View file

@ -166,3 +166,6 @@ extensions/intellij/.idea/**
**/.idea/workspace.xml
**/.idea/usage.statistics.xml
**/.idea/shelf/
extensions/intellij/bin
extensions/.continue-debug/

2
.idea/.name generated
View file

@ -1 +1 @@
Continue IntelliJ Extension
continue-intellij-extension

1
.idea/gradle.xml generated
View file

@ -5,6 +5,7 @@
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$/extensions/intellij" />
<option name="gradleJvm" value="17" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$/extensions/intellij" />

2
.idea/misc.xml generated
View file

@ -4,7 +4,7 @@
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$/extensions/intellij" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="19" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK" />
<component name="SuppressKotlinCodeStyleNotification">
<option name="disableForAll" value="true" />
</component>

8
.idea/modules.xml generated
View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/continue-intellij-extension.iml" filepath="$PROJECT_DIR$/.idea/modules/continue-intellij-extension.iml" />
</modules>
</component>
</project>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="AdditionalModuleElements">
<content url="file://$MODULE_DIR$/../..">
<sourceFolder url="file://$MODULE_DIR$/../../extensions/intellij/.gradle/8.3/dependencies-accessors/5ff144de810dd952e050983bda2040fa7aa351f8/sources" isTestSource="false" />
</content>
</component>
</module>

5
.vscode/launch.json vendored
View file

@ -20,7 +20,8 @@
"outFiles": ["${workspaceFolder}/extensions/vscode/out/extension.js"],
"preLaunchTask": "vscode-extension:build",
"env": {
// "staging" for the preview deployment
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"
// "staging" for the preview deployment "CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"
// "local" for entirely local development of control plane/proxy
// "CONTROL_PLANE_ENV": "staging"
}
@ -38,7 +39,7 @@
"cwd": "${workspaceFolder}/binary",
"env": {
"CONTINUE_DEVELOPMENT": "true",
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/binary/.continue"
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"
}
},
{

View file

@ -17,7 +17,8 @@
"**/core/vendor/**": true,
"**/gui/dist": true,
"**/extensions/vscode/gui/**": true,
"**/extensions/vscode/out/**": true
"**/extensions/vscode/out/**": true,
"**/extensions/intellij/build/**": true
},
"eslint.workingDirectories": ["./core"]
}

7
.vscode/tasks.json vendored
View file

@ -5,7 +5,7 @@
{
"label": "vscode-extension:build",
"dependsOn": [
// To detect compile errors
// To detect compile errors and output extensions.js
"vscode-extension:tsc",
// To build the React app that is used in the extension
"vscode-extension:continue-ui:build",
@ -21,7 +21,10 @@
},
{
"label": "vscode-extension:esbuild",
"dependsOn": ["vscode-extension:continue-ui:build"],
"dependsOn": [
"vscode-extension:continue-ui:build",
"vscode-extension:tsc"
],
"type": "npm",
"script": "esbuild-watch",
"path": "extensions/vscode",

View file

@ -6,9 +6,9 @@ import {
IdeSettings,
SerializedContinueConfig,
} from "../../index.js";
import { ConfigResult } from "../load.js";
import { IProfileLoader } from "./IProfileLoader.js";
import doLoadConfig from "./doLoadConfig.js";
import { ConfigResult } from "../load.js";
export default class ControlPlaneProfileLoader implements IProfileLoader {
private static RELOAD_INTERVAL = 1000 * 60 * 15; // every 15 minutes
@ -45,7 +45,7 @@ export default class ControlPlaneProfileLoader implements IProfileLoader {
)) as any);
const serializedConfig: SerializedContinueConfig = settings;
return doLoadConfig(
const results = await doLoadConfig(
this.ide,
this.ideSettingsPromise,
this.controlPlaneClient,
@ -53,6 +53,11 @@ export default class ControlPlaneProfileLoader implements IProfileLoader {
serializedConfig,
this.workspaceId,
);
return {
...results,
errors: [], // Don't do config validation here, it happens in admin panel
};
}
setIsActive(isActive: boolean): void {}

View file

@ -15,10 +15,10 @@ export function validateConfig(config: SerializedContinueConfig) {
const errors: ConfigValidationError[] = [];
// Validate chat models
if (!Array.isArray(config.models) || config.models.length === 0) {
if (!Array.isArray(config.models)) {
errors.push({
fatal: true,
message: "The 'models' field should be a non-empty array.",
message: "The 'models' field should be an array.",
});
} else {
config.models.forEach((model, index) => {

View file

@ -14,13 +14,13 @@ export interface RetrievalPipelineOptions {
llm: ILLM;
config: ContinueConfig;
ide: IDE;
input: string;
nRetrieve: number;
nFinal: number;
tags: BranchAndDir[];
pathSep: string;
filterDirectory?: string;
includeEmbeddings?: boolean; // Used to handle JB w/o an embeddings model
}
export interface IRetrievalPipeline {
@ -29,6 +29,7 @@ export interface IRetrievalPipeline {
export default class BaseRetrievalPipeline implements IRetrievalPipeline {
private lanceDbIndex: LanceDbIndex;
constructor(protected readonly options: RetrievalPipelineOptions) {
this.lanceDbIndex = new LanceDbIndex(
options.config.embeddingsProvider,

View file

@ -5,7 +5,7 @@ import BaseRetrievalPipeline from "./BaseRetrievalPipeline.js";
export default class NoRerankerRetrievalPipeline extends BaseRetrievalPipeline {
async run(): Promise<Chunk[]> {
const { input, nFinal, filterDirectory } = this.options;
const { input, nFinal, filterDirectory, includeEmbeddings } = this.options;
// We give 1/4 weight to recently edited files, 1/4 to full text search,
// and the remaining 1/2 to embeddings
@ -17,10 +17,9 @@ export default class NoRerankerRetrievalPipeline extends BaseRetrievalPipeline {
const ftsChunks = await this.retrieveFts(input, ftsNFinal);
const embeddingsChunks = await this.retrieveEmbeddings(
input,
embeddingsNFinal,
);
const embeddingsChunks = includeEmbeddings
? await this.retrieveEmbeddings(input, embeddingsNFinal)
: [];
const recentlyEditedFilesChunks =
await this.retrieveAndChunkRecentlyEditedFiles(recentlyEditedNFinal);

View file

@ -6,12 +6,15 @@ import BaseRetrievalPipeline from "./BaseRetrievalPipeline.js";
export default class RerankerRetrievalPipeline extends BaseRetrievalPipeline {
private async _retrieveInitial(): Promise<Chunk[]> {
const { input, nRetrieve, filterDirectory } = this.options;
const { input, nRetrieve, filterDirectory, includeEmbeddings } =
this.options;
let retrievalResults: Chunk[] = [];
const ftsChunks = await this.retrieveFts(input, nRetrieve);
const embeddingsChunks = await this.retrieveEmbeddings(input, nRetrieve);
const embeddingsChunks = includeEmbeddings
? await this.retrieveEmbeddings(input, nRetrieve)
: [];
const recentlyEditedFilesChunks =
await this.retrieveAndChunkRecentlyEditedFiles(nRetrieve);

View file

@ -1,8 +1,10 @@
import path from "path";
import { BranchAndDir, ContextItem, ContextProviderExtras } from "../../";
import TransformersJsEmbeddingsProvider from "../../indexing/embeddings/TransformersJsEmbeddingsProvider";
import { resolveRelativePathInWorkspace } from "../../util/ideUtils";
import { INSTRUCTIONS_BASE_ITEM } from "../providers/utils";
import { RetrievalPipelineOptions } from "./pipelines/BaseRetrievalPipeline";
import NoRerankerRetrievalPipeline from "./pipelines/NoRerankerRetrievalPipeline";
import RerankerRetrievalPipeline from "./pipelines/RerankerRetrievalPipeline";
@ -21,15 +23,17 @@ export async function retrieveContextItemsFromEmbeddings(
// transformers.js not supported in JetBrains IDEs right now
const isJetBrainsAndTransformersJs =
extras.embeddingsProvider.id === TransformersJsEmbeddingsProvider.model &&
extras.embeddingsProvider.providerName ===
TransformersJsEmbeddingsProvider.providerName &&
(await extras.ide.getIdeInfo()).ideType === "jetbrains";
if (isJetBrainsAndTransformersJs) {
throw new Error(
"The 'transformers.js' context provider is not currently supported in JetBrains. " +
"For now, you can use Ollama to set up local embeddings, or use our 'free-trial' " +
"embeddings provider. See here to learn more: " +
"https://docs.continue.dev/walkthroughs/codebase-embeddings#embeddings-providers",
void extras.ide.showToast(
"warning",
"Codebase retrieval is limited when `embeddingsProvider` is empty or set to `transformers.js` in JetBrains. " +
"You can use Ollama to set up local embeddings, use our 'free-trial', " +
"or configure your own. See here to learn more: " +
"https://docs.continue.dev/customize/model-types/embeddings",
);
}
@ -85,6 +89,7 @@ export async function retrieveContextItemsFromEmbeddings(
input: extras.fullInput,
llm: extras.llm,
config: extras.config,
includeEmbeddings: !isJetBrainsAndTransformersJs,
};
const pipeline = new pipelineType(pipelineOptions);

View file

@ -20,15 +20,15 @@ import DocsService from "./indexing/docs/DocsService";
import Ollama from "./llm/llms/Ollama";
import type { FromCoreProtocol, ToCoreProtocol } from "./protocol";
import { GlobalContext } from "./util/GlobalContext";
import { ChatDescriber } from "./util/chatDescriber";
import { logDevData } from "./util/devdata";
import { DevDataSqliteDb } from "./util/devdataSqlite";
import { fetchwithRequestOptions } from "./util/fetchWithOptions";
import historyManager from "./util/history";
import type { IMessenger, Message } from "./util/messenger";
import { editConfigJson } from "./util/paths";
import { editConfigJson, setupInitialDotContinueDirectory } from "./util/paths";
import { Telemetry } from "./util/posthog";
import { TTS } from "./util/tts";
import { ChatDescriber } from "./util/chatDescriber";
export class Core {
// implements IMessenger<ToCoreProtocol, FromCoreProtocol>
@ -79,6 +79,9 @@ export class Core {
private readonly ide: IDE,
private readonly onWrite: (text: string) => Promise<void> = async () => {},
) {
// Ensure .continue directory is created
setupInitialDotContinueDirectory();
this.indexingState = { status: "loading", desc: "loading", progress: 0 };
const ideSettingsPromise = messenger.request("getIdeSettings", undefined);
@ -483,7 +486,7 @@ export class Core {
on("tts/kill", async () => {
void TTS.kill();
});
on("chatDescriber/describe", async (msg) => {
const currentModel = await this.getSelectedModel();
return await ChatDescriber.describe(currentModel, {}, msg.data);

3
core/index.d.ts vendored
View file

@ -646,7 +646,8 @@ type ModelProvider =
| "nvidia"
| "vllm"
| "mock"
| "cerebras";
| "cerebras"
| "askSage";
export type ModelName =

View file

@ -1,114 +1,114 @@
import {
InvokeEndpointCommand,
SageMakerRuntimeClient,
} from "@aws-sdk/client-sagemaker-runtime";
import { fromIni } from "@aws-sdk/credential-providers";
import {
EmbeddingsProviderName,
EmbedOptions,
FetchFunction,
} from "../../index.js";
import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider.js";
class SageMakerEmbeddingsProvider extends BaseEmbeddingsProvider {
static providerName: EmbeddingsProviderName = "sagemaker";
static defaultOptions: Partial<EmbedOptions> | undefined = {
region: "us-west-2",
maxBatchSize: 1,
};
profile?: string | undefined;
constructor(options: EmbedOptions, fetch: FetchFunction) {
super(options, fetch);
if (!options.apiBase) {
options.apiBase = `https://runtime.sagemaker.${options.region}.amazonaws.com`;
}
if (options.profile) {
this.profile = options.profile;
} else {
this.profile = "sagemaker";
}
InvokeEndpointCommand,
SageMakerRuntimeClient,
} from "@aws-sdk/client-sagemaker-runtime";
import { fromIni } from "@aws-sdk/credential-providers";
import {
EmbeddingsProviderName,
EmbedOptions,
FetchFunction,
} from "../../index.js";
import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider.js";
class SageMakerEmbeddingsProvider extends BaseEmbeddingsProvider {
static providerName: EmbeddingsProviderName = "sagemaker";
static defaultOptions: Partial<EmbedOptions> | undefined = {
region: "us-west-2",
maxBatchSize: 1,
};
profile?: string | undefined;
constructor(options: EmbedOptions, fetch: FetchFunction) {
super(options, fetch);
if (!options.apiBase) {
options.apiBase = `https://runtime.sagemaker.${options.region}.amazonaws.com`;
}
async embed(chunks: string[]) {
const credentials = await this._getCredentials();
const client = new SageMakerRuntimeClient({
region: this.options.region,
credentials: {
accessKeyId: credentials.accessKeyId,
secretAccessKey: credentials.secretAccessKey,
sessionToken: credentials.sessionToken || "",
},
});
const batchedChunks = this.getBatchedChunks(chunks);
return (
await Promise.all(
batchedChunks.map(async (batch) => {
const input = this._generateInvokeModelCommandInput(
batch,
this.options,
);
const command = new InvokeEndpointCommand(input);
const response = await client.send(command);
if (response.Body) {
const responseBody = JSON.parse(
new TextDecoder().decode(response.Body),
);
// If the body contains a key called "embedding" or "embeddings", return the value, otherwise return the whole body
if (responseBody.embedding) {
return responseBody.embedding;
} else if (responseBody.embeddings) {
return responseBody.embeddings;
} else {
return responseBody;
}
}
}),
)
).flat();
}
private _generateInvokeModelCommandInput(
prompts: string | string[],
options: EmbedOptions,
): any {
const payload = {
inputs: prompts,
normalize: true,
// ...(options.requestOptions?.extraBodyProperties || {}),
};
if (options.requestOptions?.extraBodyProperties) {
Object.assign(payload, options.requestOptions.extraBodyProperties);
}
return {
EndpointName: this.options.model,
Body: JSON.stringify(payload),
ContentType: "application/json",
CustomAttributes: "accept_eula=false",
};
}
private async _getCredentials() {
try {
return await fromIni({
profile: this.profile,
ignoreCache: true,
})();
} catch (e) {
console.warn(
`AWS profile with name ${this.profile} not found in ~/.aws/credentials, using default profile`,
);
return await fromIni()();
}
if (options.profile) {
this.profile = options.profile;
} else {
this.profile = "sagemaker";
}
}
export default SageMakerEmbeddingsProvider;
async embed(chunks: string[]) {
const credentials = await this._getCredentials();
const client = new SageMakerRuntimeClient({
region: this.options.region,
credentials: {
accessKeyId: credentials.accessKeyId,
secretAccessKey: credentials.secretAccessKey,
sessionToken: credentials.sessionToken || "",
},
});
const batchedChunks = this.getBatchedChunks(chunks);
return (
await Promise.all(
batchedChunks.map(async (batch) => {
const input = this._generateInvokeModelCommandInput(
batch,
this.options,
);
const command = new InvokeEndpointCommand(input);
const response = await client.send(command);
if (response.Body) {
const responseBody = JSON.parse(
new TextDecoder().decode(response.Body),
);
// If the body contains a key called "embedding" or "embeddings", return the value, otherwise return the whole body
if (responseBody.embedding) {
return responseBody.embedding;
} else if (responseBody.embeddings) {
return responseBody.embeddings;
} else {
return responseBody;
}
}
}),
)
).flat();
}
private _generateInvokeModelCommandInput(
prompts: string | string[],
options: EmbedOptions,
): any {
const payload = {
inputs: prompts,
normalize: true,
// ...(options.requestOptions?.extraBodyProperties || {}),
};
if (options.requestOptions?.extraBodyProperties) {
Object.assign(payload, options.requestOptions.extraBodyProperties);
}
return {
EndpointName: this.options.model,
Body: JSON.stringify(payload),
ContentType: "application/json",
CustomAttributes: "accept_eula=false",
};
}
private async _getCredentials() {
try {
return await fromIni({
profile: this.profile,
ignoreCache: true,
})();
} catch (e) {
console.warn(
`AWS profile with name ${this.profile} not found in ~/.aws/credentials, using default profile`,
);
return await fromIni()();
}
}
}
export default SageMakerEmbeddingsProvider;

168
core/llm/llms/Asksage.ts Normal file
View file

@ -0,0 +1,168 @@
import {
ChatMessage,
CompletionOptions,
LLMOptions,
ModelProvider,
} from "../../index.js";
import { BaseLLM } from "../index.js";
class Asksage extends BaseLLM {
static providerName: ModelProvider = "askSage";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.asksage.ai/server/",
model: "gpt-4o",
};
private static modelConversion: { [key: string]: string } = {
"gpt-4o": "gpt-4o",
"gpt-4o-mini": "gpt-4o-mini",
"gpt4-gov": "gpt4-gov",
"gpt-4o-gov": "gpt-4o-gov",
"gpt-3.5-turbo": "gpt35-16k",
"mistral-large-latest": "mistral-large",
"llama3-70b": "llma3",
"gemini-1.5-pro-latest": "google-gemini-pro",
"claude-3-5-sonnet-20240620": "claude-35-sonnet",
"claude-3-opus-20240229": "claude-3-opus",
"claude-3-sonnet-20240229": "claude-3-sonnet",
};
constructor(options: LLMOptions) {
super(options);
this.apiVersion = options.apiVersion ?? "v1.2.4";
}
protected _convertModelName(model: string): string {
return Asksage.modelConversion[model] ?? model;
}
protected _convertMessage(message: ChatMessage) {
return {
user: message.role === "assistant" ? "gpt" : "me",
message:
typeof message.content === "string"
? message.content
: message.content.map((part) => part.text).join(""),
};
}
protected _convertArgs(options: any, messages: ChatMessage[]) {
let formattedMessage: any;
if (messages.length === 1) {
formattedMessage = messages[0].content;
} else {
formattedMessage = messages.map(this._convertMessage);
}
const args: any = {
message: formattedMessage,
persona: options.persona ?? "default",
dataset: options.dataset ?? "none",
limit_references: options.limitReferences ?? 0,
temperature: options.temperature ?? 0.0,
live: options.live ?? 0,
model: this._convertModelName(options.model),
system_prompt: options.systemPrompt ?? "You are an expert software developer. You give helpful and concise responses.",
tools: options.tools,
tool_choice: options.toolChoice,
};
Object.keys(args).forEach(
(key) => args[key] === undefined && delete args[key]
);
return args;
}
protected _getHeaders() {
const headers: Record<string, string> = {
"Content-Type": "application/json",
};
if (this.apiKey) {
headers["x-access-tokens"] = this.apiKey;
}
return headers;
}
protected _getEndpoint(endpoint: string) {
if (!this.apiBase) {
throw new Error(
"No API base URL provided. Please set the 'apiBase' option."
);
}
return new URL(endpoint, this.apiBase);
}
protected async _complete(
prompt: string,
options: CompletionOptions
): Promise<string> {
if (typeof prompt !== "string" || prompt.trim() === "") {
throw new Error("Prompt must be a non-empty string.");
}
const messages: ChatMessage[] = [{ role: "user", content: prompt }];
const args = this._convertArgs(options, messages);
const response = await this.fetch(this._getEndpoint("query"), {
method: "POST",
headers: this._getHeaders(),
body: JSON.stringify(args),
});
if (!response.ok) {
throw new Error(
`API request failed with status ${response.status}: ${response.statusText}`
);
}
const data = await response.json();
return data.message;
}
protected async *_streamComplete(
prompt: string,
options: CompletionOptions
): AsyncGenerator<string> {
const completion = await this._complete(prompt, options);
yield completion;
}
protected async *_streamChat(
messages: ChatMessage[],
options: CompletionOptions
): AsyncGenerator<ChatMessage> {
const args = this._convertArgs(options, messages);
const response = await this.fetch(this._getEndpoint("query"), {
method: "POST",
headers: this._getHeaders(),
body: JSON.stringify(args),
});
if (!response.ok) {
throw new Error(
`API request failed with status ${response.status}: ${response.statusText}`
);
}
const data = await response.json();
const assistantMessage: ChatMessage = {
role: "assistant",
content: data.message,
};
yield assistantMessage;
}
async listModels(): Promise<string[]> {
return Object.keys(Asksage.modelConversion);
}
}
export default Asksage;

View file

@ -59,10 +59,10 @@ class SageMaker extends BaseLLM {
const data = JSON.parse(line.replace(/^data:/, ''));
let text = undefined;
if ("choices" in data) {
if ("delta" in data.choices[0]){
if ("delta" in data.choices[0]) {
text = data.choices[0].delta.content;
}
else{
else {
text = data.choices[0].text;
}
}
@ -110,10 +110,10 @@ class SageMaker extends BaseLLM {
const data = JSON.parse(line.replace(/^data:/, ''));
let text = undefined;
if ("choices" in data) {
if ("delta" in data.choices[0]){
if ("delta" in data.choices[0]) {
text = data.choices[0].delta.content;
}
else{
else {
text = data.choices[0].text;
}
}

View file

@ -45,6 +45,7 @@ import Together from "./Together";
import Vllm from "./Vllm";
import WatsonX from "./WatsonX";
import ContinueProxy from "./stubs/ContinueProxy";
import Asksage from "./Asksage";
const LLMs = [
Anthropic,
@ -85,6 +86,7 @@ const LLMs = [
SambaNova,
Mock,
Cerebras,
Asksage,
];
export async function llmFromDescription(

View file

@ -3,9 +3,9 @@ import dotenv from "dotenv";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import { IdeType, SerializedContinueConfig } from "../";
import { defaultConfig, defaultConfigJetBrains } from "../config/default";
import Types from "../config/types";
import { IdeType, SerializedContinueConfig } from "../";
dotenv.config();
@ -348,3 +348,18 @@ export function getRepoMapFilePath(): string {
export function getEsbuildBinaryPath(): string {
return path.join(getContinueUtilsPath(), "esbuild");
}
export function setupInitialDotContinueDirectory() {
const devDataTypes = [
"chat",
"autocomplete",
"quickEdit",
"tokens_generated",
];
devDataTypes.forEach((p) => {
const devDataPath = getDevDataFilePath(p);
if (!fs.existsSync(devDataPath)) {
fs.writeFileSync(devDataPath, "");
}
});
}

View file

@ -5,7 +5,11 @@ keywords: [talk, embeddings, reranker, codebase, experimental]
# @Codebase
Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally with `all-MiniLM-L6-v2` and stored locally in `~/.continue/index`.
Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`.
:::info[`transformers.js cannot be used in JetBrains`]
Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-types/embeddings.md).
:::
Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files.

View file

@ -0,0 +1,61 @@
# Ask Sage
:::info
To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs:[Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html)
:::
## Configuration
To use the Ask Sage models, the following configuration is required to the `config.json` file:
```json
{
"models": [
{
"apiKey": "YOUR_API_KEY",
"apiBase": "https://api.asksage.ai/server/", // apiBase will be the same for all models, but will vary based on tenant.
"model": "gpt4-gov",
"title": "GPT-4 gov",
"provider": "askSage"
}
]
}
```
The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below:
> Server API for query/training etc.:
> - Documentation: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0
> - URL for this API is: https://api.asksage.ai/server/
## Usage
Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev:
- `Chat` to understand and iterate on code in the sidebar
- `Edit` to modify code without leaving your current file
More models, functionalities and documentation will be added in the future for Ask Sage Integration.
> We recommend to utilize the`OpenAI` or `Anthropic` models for the best performance and results for the `Chat` and `Edit` functionalities.
## Current Models From Ask Sage Supported
The current Models available provided by Ask Sage are:
| Model | Added |
|--------------------|-------|
| Gov GPT-4.0 | Yes |
| Gov GPT-4o | Yes |
| GPT-4o | Yes |
| GPT-4o-mini | Yes |
| GPT-3.5-16K | Yes |
| Calude 3 Opus | Yes |
| Calude 3 Sonet | Yes |
| Calude 3.5 Sonnet | Yes |
| Gemini Pro | Yes |
| llama 3 | Yes |
| Mistral Large | Yes |

View file

@ -9,6 +9,10 @@ An "embeddings model" is trained to convert a piece of text into a vector, which
In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.md) to perform similarity search over your codebase.
:::info[Default model (VS Code only)]
`transformers.js` is used as a default embeddings model in VS Code. In JetBrains, there currently is no default.
:::
## Recommended embedding models
If you have the ability to use any model, we recommend `voyage-code-2`, which is listed below along with the rest of the options for embeddings models.
@ -35,7 +39,7 @@ See [here](../model-providers/top-level/ollama.md#embeddings-model) for instruct
### Transformers.js (currently VS Code only)
[Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension and used as the default when you have not explicitly configured an embeddings provider.
[Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension.
```json title="config.json"
{
@ -72,4 +76,4 @@ See [here](../model-providers/top-level/gemini.md#embeddings-model) for instruct
### Vertex
See [here](../model-providers/more/vertex.md#embeddings-model) for instructions on how to use Vertex for embeddings.
See [here](../model-providers/more/vertex.md#embeddings-model) for instructions on how to use Vertex for embeddings.

View file

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Prompt Logs" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="tail -f ./binary/.continue/logs/prompt.log" />
<option name="SCRIPT_TEXT" value="mkdir -p ./binary/.continue/logs &amp;&amp; touch ./binary/.continue/logs/prompt.log &amp;&amp; tail -f ./binary/.continue/logs/prompt.log" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />

View file

@ -0,0 +1,9 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Continue (CE)" type="CompoundRunConfigurationType">
<toRun name="Run Extension" type="GradleRunConfiguration" />
<toRun name="Prompt Logs" type="ShConfigurationType" />
<toRun name="Start Core Dev Server (CE)" type="ShConfigurationType" />
<toRun name="Start GUI Dev Server" type="ShConfigurationType" />
<method v="2" />
</configuration>
</component>

View file

@ -1,9 +1,9 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Continue" type="CompoundRunConfigurationType">
<toRun name="Run Extension" type="GradleRunConfiguration" />
<toRun name="Start Dev Server (core)" type="NodeJSConfigurationType" />
<toRun name="Start Dev Server (gui)" type="js.build_tools.npm" />
<toRun name="Prompt Logs" type="ShConfigurationType" />
<toRun name="Start Core Dev Server" type="Unknown" />
<toRun name="Start GUI Dev Server" type="ShConfigurationType" />
<method v="2" />
</configuration>
</component>

View file

@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Start Core Dev Server (CE)" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="export CONTINUE_DEVELOPMENT=true &amp;&amp; export CONTINUE_GLOBAL_DIR=$PROJECT_DIR$/binary/.continue &amp;&amp; node out/index.js" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$/binary" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="false" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<method v="2" />
</configuration>
</component>

View file

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Start Dev Server (core)" type="NodeJSConfigurationType" path-to-js-file="out/index.js" working-dir="$PROJECT_DIR$/binary">
<configuration default="false" name="Start Core Dev Server" type="NodeJSConfigurationType" path-to-js-file="out/index.js" working-dir="$PROJECT_DIR$/binary">
<envs>
<env name="CONTINUE_DEVELOPMENT" value="true" />
<env name="CONTINUE_GLOBAL_DIR" value="$PROJECT_DIR$/binary/.continue" />

View file

@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Start GUI Dev Server" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="npm run dev" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$/gui" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/bin/zsh" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="false" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>

View file

@ -30,11 +30,11 @@ packaging it in a binary in the `binary` directory. Communication occurs over st
### IDE Installation
We recommend using IntelliJ IDEA, which you can download from
the [JetBrains website](https://www.jetbrains.com/idea/download).
Continue is built with JDK version 17 (as specified in [`./build.gradle.kts`](./build.gradle.kts)), which can be downloaded from [Oracle](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html).
Both Ultimate and Community (free) editions are suitable for this project. Continue is built with JDK version 17, as
specified in [`./build.gradle.kts`](./build.gradle.kts).
We recommend using IntelliJ IDEA, which you can download from the [JetBrains website](https://www.jetbrains.com/idea/download).
Both Ultimate and Community (free) editions are suitable for this project, although Ultimate has better debugging (see notes below).
### IDE configuration
@ -63,13 +63,15 @@ This project requires Node.js version 20.11.0 (LTS) or higher. You have two opti
Select the `Run Continue` task in the top right corner of the IDE and then select the "Debug" option.
> In community edition, use `Run Continue (CE)` instead, which uses shell scripts instead of Ultimate-only node configs. If you want to debug the core in CE, you'll need to quit the `Start Core Dev Server (CE)` process and run the core in a different environment that supports debugging, such as VS Code (Launch "Core Binary").
![run-extension-screenshot](../../media/run-continue-intellij.png)
This should open a new instance on IntelliJ with the extension installed.
### Accessing files in the `.continue` directory
When running the `Start Dev Server (core)` task, we set the location of your Continue directory to `./binary/.continue`. This is to
When running the `Start Core Dev Server` task, we set the location of your Continue directory to `./binary/.continue`. This is to
allow for changes to your `config.json` and other files during development, without affecting your actual configuration.
### Reloading changes
@ -78,13 +80,13 @@ allow for changes to your `config.json` and other files during development, with
_Run | Debugging Actions | Reload Changed Classes`_
- This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension
- `gui`: Changes will be reloaded automatically
- `core`: Run `npm run build` from the `binary` directory (requires restarting the `Start Dev Server (core)` task)
- `core`: Run `npm run build` from the `binary` directory (requires restarting the `Start Core Dev Server` task)
### Setting breakpoints
- `extensions/intellij`: Breakpoints can be set in Intellij
- `gui`: You'll need to set explicit `debugger` statements in the source code, or through the browser dev tools
- `core`: Breakpoints can be set in Intellij (requires restarting the `Start Dev Server (core)` task)
- `core`: Breakpoints can be set in Intellij (requires restarting the `Start Core Dev Server` task)
### Available Gradle tasks

View file

@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension
pluginName=continue-intellij-extension
pluginRepositoryUrl=https://github.com/continuedev/continue
# SemVer format -> https://semver.org
pluginVersion=0.0.77
pluginVersion=0.0.78
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=223
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension

View file

@ -198,7 +198,8 @@
"sambanova",
"nvidia",
"vllm",
"cerebras"
"cerebras",
"askSage"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
@ -232,7 +233,8 @@
"### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).",
"### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)",
"### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.",
"### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/)."
"### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/).",
"### Ask Sage\nAsk Sage is an agnostic hosted service that provides language models. To get started with Ask Sage:\n1. Obtain an API key from your account. For more information, visit [Ask Sage](https://docs.asksage.ai/).\n2. Paste the API key below.\n3. Select a model preset.\n> [Reference](https://docs.asksage.ai/)"
],
"type": "string"
},
@ -1521,6 +1523,41 @@
}
}
}
},
{
"if": {
"properties": {
"provider": {
"enum": ["ask-sage"]
}
},
"required": ["provider"]
},
"then": {
"properties": {
"model": {
"anyOf": [
{
"enum": [
"gpt-4o",
"gpt-4o-mini",
"gpt-4gov",
"gpt-4ogov",
"claude-3.5-sonnet",
"claude-3-opus",
"mistral-large",
"llama-3-chat",
"gemini-pro",
"AUTODETECT"
]
},
{
"type": "string"
}
]
}
}
}
}
]
},
@ -2425,8 +2462,8 @@
},
"embeddingsProvider": {
"title": "Embeddings Provider",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options [here](https://docs.continue.dev/features/codebase-embeddings#embeddings-providers).",
"x-intellij-html-description": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options <a href='https://docs.continue.dev/features/codebase-embeddings#embeddings-providers'>here</a>.",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is `transformers.js`, which will run locally in the browser. Learn about the other options [here](https://docs.continue.dev/features/codebase-embeddings#embeddings-providers).",
"x-intellij-html-description": "The method that will be used to generate codebase embeddings. The default is <code>transformers.js</code>, which will run locally in the browser. Learn about the other options <a href='https://docs.continue.dev/features/codebase-embeddings#embeddings-providers'>here</a>.<br><br><strong>Note</strong>: <code>transformers.js</code> currently cannot be used in JetBrains.",
"type": "object",
"properties": {
"provider": {

View file

@ -1,18 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/play_button.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Continue</title>
<script type="module" crossorigin src="/assets/index.js"></script>
<link rel="stylesheet" href="/assets/index.css" />
</head>
<body>
<div id="root"></div>
<script>
localStorage.setItem("ide", '"jetbrains"');
</script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 KiB

View file

@ -198,7 +198,8 @@
"sambanova",
"nvidia",
"vllm",
"cerebras"
"cerebras",
"askSage"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
@ -232,7 +233,8 @@
"### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).",
"### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)",
"### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.",
"### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/)."
"### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/).",
"### Ask Sage\nAsk Sage is an agnostic hosted service that provides language models. To get started with Ask Sage:\n1. Obtain an API key from your account. For more information, visit [Ask Sage](https://docs.asksage.ai/).\n2. Paste the API key below.\n3. Select a model preset.\n> [Reference](https://docs.asksage.ai/)"
],
"type": "string"
},
@ -1521,6 +1523,41 @@
}
}
}
},
{
"if": {
"properties": {
"provider": {
"enum": ["ask-sage"]
}
},
"required": ["provider"]
},
"then": {
"properties": {
"model": {
"anyOf": [
{
"enum": [
"gpt-4o",
"gpt-4o-mini",
"gpt-4gov",
"gpt-4ogov",
"claude-3.5-sonnet",
"claude-3-opus",
"mistral-large",
"llama-3-chat",
"gemini-pro",
"AUTODETECT"
]
},
{
"type": "string"
}
]
}
}
}
}
]
},
@ -2425,8 +2462,8 @@
},
"embeddingsProvider": {
"title": "Embeddings Provider",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options [here](https://docs.continue.dev/features/codebase-embeddings#embeddings-providers).",
"x-intellij-html-description": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options <a href='https://docs.continue.dev/features/codebase-embeddings#embeddings-providers'>here</a>.",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is `transformers.js`, which will run locally in the browser. Learn about the other options [here](https://docs.continue.dev/features/codebase-embeddings#embeddings-providers).",
"x-intellij-html-description": "The method that will be used to generate codebase embeddings. The default is <code>transformers.js</code>, which will run locally in the browser. Learn about the other options <a href='https://docs.continue.dev/features/codebase-embeddings#embeddings-providers'>here</a>.<br><br><strong>Note</strong>: <code>transformers.js</code> currently cannot be used in JetBrains.",
"type": "object",
"properties": {
"provider": {

View file

@ -201,7 +201,8 @@
"sambanova",
"nvidia",
"vllm",
"cerebras"
"cerebras",
"askSage"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
@ -235,7 +236,8 @@
"### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).",
"### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)",
"### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.",
"### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/)."
"### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/).",
"### Ask Sage\nAsk Sage is an agnostic hosted service that provides language models. To get started with Ask Sage:\n1. Obtain an API key from your account. For more information, visit [Ask Sage](https://docs.asksage.ai/).\n2. Paste the API key below.\n3. Select a model preset.\n> [Reference](https://docs.asksage.ai/)"
],
"type": "string"
},
@ -353,6 +355,7 @@
"promptTemplates": {
"title": "Prompt Templates",
"markdownDescription": "A mapping of prompt template name ('edit' is currently the only one used in Continue) to a string giving the prompt template. See [here](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt) for an example.",
"x-intellij-html-description": "A mapping of prompt template name ('edit' is currently the only one used in Continue) to a string giving the prompt template. See <a href='https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt'>here</a> for an example.",
"type": "object",
"additionalProperties": {
"type": "string"
@ -401,6 +404,7 @@
"apiType": {
"title": "Api Type",
"markdownDescription": "OpenAI API type, either `openai` or `azure`",
"x-intellij-html-description": "OpenAI API type, either <code>openai</code> or <code>azure</code>",
"enum": [
"openai",
"azure"
@ -687,7 +691,8 @@
}
]
},
"markdownDescription": "Select a pre-defined option, or find an exact model ID from Replicate [here](https://replicate.com/collections/streaming-language-models)."
"markdownDescription": "Select a pre-defined option, or find an exact model ID from Replicate [here](https://replicate.com/collections/streaming-language-models).",
"x-intellij-html-description": "Select a pre-defined option, or find an exact model ID from Replicate <a href='https://replicate.com/collections/streaming-language-models'>here</a>."
}
}
},
@ -963,7 +968,7 @@
"then": {
"properties": {
"model": {
"markdownDescription": "SageMaker endpoint name"
"description": "SageMaker endpoint name"
}
}
}
@ -1082,7 +1087,8 @@
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option, or find an exact model string from Together AI [here](https://docs.together.ai/docs/inference-models)."
"markdownDescription": "Select a pre-defined option, or find an exact model string from Together AI [here](https://docs.together.ai/docs/inference-models).",
"x-intellij-html-description": "Select a pre-defined option, or find an exact model string from Together AI <a href='https://docs.together.ai/docs/inference-models'>here</a>."
}
}
}
@ -1103,7 +1109,8 @@
"then": {
"properties": {
"model": {
"markdownDescription": "Find the model name you want to use from DeepInfra [here](https://deepinfra.com/models?type=text-generation)."
"markdownDescription": "Find the model name you want to use from DeepInfra [here](https://deepinfra.com/models?type=text-generation).",
"x-intellij-html-description": "Find the model name you want to use from DeepInfra <a href='https://deepinfra.com/models?type=text-generation'>here</a>."
}
}
}
@ -1221,7 +1228,8 @@
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option, or find the exact model tag for an Ollama model [here](https://ollama.ai/library)."
"markdownDescription": "Select a pre-defined option, or find the exact model tag for an Ollama model [here](https://ollama.ai/library).",
"x-intellij-html-description": "Select a pre-defined option, or find the exact model tag for an Ollama model <a href='https://ollama.ai/library'>here</a>."
}
}
}
@ -1696,7 +1704,46 @@
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option."
"description": "Select a pre-defined option."
}
}
}
},
{
"if": {
"properties": {
"provider": {
"enum": [
"ask-sage"
]
}
},
"required": [
"provider"
]
},
"then": {
"properties": {
"model": {
"anyOf": [
{
"enum": [
"gpt-4o",
"gpt-4o-mini",
"gpt-4gov",
"gpt-4ogov",
"claude-3.5-sonnet",
"claude-3-opus",
"mistral-large",
"llama-3-chat",
"gemini-pro",
"AUTODETECT"
]
},
{
"type": "string"
}
]
}
}
}
@ -1828,11 +1875,12 @@
"properties": {
"recap": {
"type": "boolean",
"markdownDescription": "If recap is set to `true`, Continue will generate a summary of the changes after making the edit."
"markdownDescription": "If recap is set to `true`, Continue will generate a summary of the changes after making the edit.",
"x-intellij-html-description": "If recap is set to <code>true</code>, Continue will generate a summary of the changes after making the edit."
},
"tokenLimit": {
"type": "integer",
"markdownDescription": "By default, Continue doesn't let you edit extremely large ranges (beyond 1,200 tokens), because the LLM is unlikely to succeed. But if you would like to override this limit with the understanding of possible failure you may do so here."
"description": "By default, Continue doesn't let you edit extremely large ranges (beyond 1,200 tokens), because the LLM is unlikely to succeed. But if you would like to override this limit with the understanding of possible failure you may do so here."
}
}
}
@ -1855,7 +1903,8 @@
"properties": {
"outputDir": {
"type": "string",
"markdownDescription": "If outputDir is set to `.` or begins with `./` or `.\\`, file will be saved to the current workspace or a subdirectory thereof, respectively. `~` can similarly be used to specify the user's home directory."
"markdownDescription": "If outputDir is set to `.` or begins with `./` or `.\\`, file will be saved to the current workspace or a subdirectory thereof, respectively. `~` can similarly be used to specify the user's home directory.",
"x-intellij-html-description": "If outputDir is set to <code>.</code> or begins with <code>./</code> or <code>.\\</code>, file will be saved to the current workspace or a subdirectory thereof, respectively. <code>~</code> can similarly be used to specify the user's home directory."
}
}
}
@ -1878,7 +1927,8 @@
"properties": {
"includeUnstaged": {
"type": "boolean",
"markdownDescription": "If includeUnstaged is set to true, then unstaged changes are also included in the prompt, otherwise only staged changes are included. Default is false."
"markdownDescription": "If set to `true`, then unstaged changes are also included in the prompt, otherwise only staged changes are included. Default is `false`.",
"x-intellij-html-description": "If set to <code>true</code>, then unstaged changes are also included in the prompt, otherwise only staged changes are included. Default is <code>false</code>."
}
}
}
@ -2355,7 +2405,8 @@
},
"apiVersion": {
"type": "integer",
"markdownDescription": "This context provider supports both Jira API version 2 and 3. It will use version 3 by default since 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."
"markdownDescription": "This context provider supports both Jira API version 2 and 3. It will use version 3 by default since 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.",
"x-intellij-html-description": "This context provider supports both Jira API version 2 and 3. It will use version 3 by default since 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 <code>apiVersion</code> property."
},
"requestOptions": {
"title": "Request Options",
@ -2605,13 +2656,15 @@
},
"allowAnonymousTelemetry": {
"title": "Allow Anonymous Telemetry",
"markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data. Learn more in [the docs](https://docs.continue.dev/telemetry).",
"markdownDescription": "If this field is set to `true`, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data. Learn more in [the docs](https://docs.continue.dev/telemetry).",
"x-intellij-html-description": "If this field is set to `true`, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data. Learn more in <a href='https://docs.continue.dev/telemetry'>the docs</a>.",
"default": true,
"type": "boolean"
},
"models": {
"title": "Models",
"markdownDescription": "Learn about setting up models in [the documentation](https://docs.continue.dev/model-setup/overview).",
"x-intellij-html-description": "Learn about setting up models in <a href='https://docs.continue.dev/model-setup/overview'>the documentation</a>.",
"default": [
{
"title": "GPT-4 (trial)",
@ -2660,6 +2713,7 @@
"slashCommands": {
"title": "Slash Commands",
"markdownDescription": "An array of slash commands that let you take custom actions from the sidebar. Learn more in the [documentation](https://docs.continue.dev/customization/slash-commands).",
"x-intellij-html-description": "An array of slash commands that let you take custom actions from the sidebar. Learn more in the <a href='https://docs.continue.dev/customization/slash-commands'>documentation</a>.",
"default": [],
"type": "array",
"items": {
@ -2668,7 +2722,8 @@
},
"customCommands": {
"title": "Custom Commands",
"markdownDescription": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt. Learn more in the [documentation](https://docs.continue.dev/customization/slash-commands#custom-commands-use-natural-language).",
"markdownDescription": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter `/<name>` in the text input, it will act as a shortcut to the prompt. Learn more in the [documentation](https://docs.continue.dev/customization/slash-commands#custom-commands-use-natural-language).",
"x-intellij-html-description": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter <code>/<name></code> in the text input, it will act as a shortcut to the prompt. Learn more in the <a href='https://docs.continue.dev/customization/slash-commands#custom-commands-use-natural-language'>documentation</a>.",
"default": [
{
"name": "test",
@ -2684,6 +2739,7 @@
"contextProviders": {
"title": "Context Providers",
"markdownDescription": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in [the documentation](https://docs.continue.dev/customization/context-providers).",
"x-intellij-html-description": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in <a href='https://docs.continue.dev/customization/context-providers'>the documentation</a>.",
"default": [],
"type": "array",
"items": {
@ -2698,18 +2754,21 @@
"disableIndexing": {
"title": "Disable Indexing",
"markdownDescription": "If set to `true`, Continue will not index the codebase. This is mainly used for debugging purposes.",
"x-intellij-html-description": "If set to <code>true</code>, Continue will not index the codebase. This is mainly used for debugging purposes.",
"default": false,
"type": "boolean"
},
"disableSessionTitles": {
"title": "Disable Session Titles",
"markdownDescription": "If set to `true`, Continue will not make extra requests to the LLM to generate a summary title of each session.",
"x-intellij-html-description": "If set to <code>true</code>, Continue will not make extra requests to the LLM to generate a summary title of each session.",
"default": false,
"type": "boolean"
},
"embeddingsProvider": {
"title": "Embeddings Provider",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options [here](https://docs.continue.dev/features/codebase-embeddings#embeddings-providers).",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is `transformers.js`, which will run locally in the browser. Learn about the other options [here](https://docs.continue.dev/features/codebase-embeddings#embeddings-providers).",
"x-intellij-html-description": "The method that will be used to generate codebase embeddings. The default is <code>transformers.js</code>, which will run locally in the browser. Learn about the other options <a href='https://docs.continue.dev/features/codebase-embeddings#embeddings-providers'>here</a>.<br><br><strong>Note</strong>: <code>transformers.js</code> currently cannot be used in JetBrains.",
"type": "object",
"properties": {
"provider": {
@ -2809,7 +2868,7 @@
"then": {
"properties": {
"model": {
"markdownDescription": "SageMaker endpoint name"
"description": "SageMaker endpoint name"
}
},
"required": [
@ -2833,10 +2892,10 @@
"then": {
"properties": {
"projectId": {
"markdownDescription": "The name of your vertexAI project"
"description": "The name of your VertexAI project"
},
"region": {
"markdownDescription": "The region your vertexAI model is hosted in - typically central1",
"description": "The region your VertexAI model is hosted in - typically central1",
"default": "central1"
},
"model": {
@ -2854,7 +2913,7 @@
},
"reranker": {
"title": "Reranker",
"markdownDescription": "The reranker is responsible for selecting the final results when retrieving snippets from your codebase.",
"description": "The reranker is responsible for selecting the final results when retrieving snippets from your codebase.",
"type": "object",
"properties": {
"name": {
@ -3004,7 +3063,7 @@
},
"truncate": {
"type": "boolean",
"description": "Wether to truncate long sequences to the maximum allowed context length.",
"description": "Whether to truncate long sequences to the maximum allowed context length.",
"default": false
},
"truncation_direction": {
@ -3012,7 +3071,7 @@
"Right",
"Left"
],
"markdownDescription": "Wether to truncate sequences from the `left` or `right`.",
"description": "Whether to truncate sequences from the left or right.",
"default": "Right"
}
},
@ -3040,6 +3099,7 @@
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder2:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"x-intellij-html-description": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder2:3b on a local Ollama instance.<br><br><i>IMPORTANT</i>:<br><br>If you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"default": {
"title": "Tab Autocomplete Model",
"provider": "ollama",
@ -3061,6 +3121,7 @@
"title": "TabAutocompleteOptions",
"type": "object",
"markdownDescription": "These options let you customize your tab-autocomplete experience. Read about all options in [the docs](https://docs.continue.dev/features/tab-autocomplete#configuration-options).",
"x-intellij-html-description": "These options let you customize your tab-autocomplete experience. Read about all options in <a href='https://docs.continue.dev/features/tab-autocomplete#configuration-options'>the docs</a>.",
"properties": {
"disable": {
"type": "boolean",
@ -3147,6 +3208,7 @@
"showChatScrollbar": {
"title": "Show Chat Scrollbar",
"markdownDescription": "If set to `true`, a scrollbar will be displayed in the chat window to navigate through messages.",
"x-intellij-html-description": "If set to <code>true</code>, a scrollbar will be displayed in the chat window to navigate through messages.",
"default": false,
"type": "boolean"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -311,7 +311,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["groq"],
providerOptions: ["groq", "askSage"],
isOpenSource: false,
},
llama318bChat: {
@ -618,7 +618,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 32000,
},
icon: "mistral.png",
providerOptions: ["mistral"],
providerOptions: ["mistral", "askSage"],
isOpenSource: false,
},
geminiPro: {
@ -644,7 +644,7 @@ export const models: { [key: string]: ModelPackage } = {
apiKey: "<API_KEY>",
},
icon: "gemini.png",
providerOptions: ["gemini", "free-trial"],
providerOptions: ["gemini", "free-trial", "askSage"],
isOpenSource: false,
},
gemini15Flash: {
@ -713,7 +713,7 @@ export const models: { [key: string]: ModelPackage } = {
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
providerOptions: ["openai", "free-trial"],
providerOptions: ["openai", "free-trial", "askSage"],
icon: "openai.png",
isOpenSource: false,
},
@ -728,7 +728,7 @@ export const models: { [key: string]: ModelPackage } = {
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
providerOptions: ["openai"],
providerOptions: ["openai", "askSage"],
icon: "openai.png",
isOpenSource: false,
},
@ -741,7 +741,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 8096,
title: "GPT-3.5-Turbo",
},
providerOptions: ["openai", "free-trial"],
providerOptions: ["openai", "free-trial", "askSage"],
icon: "openai.png",
isOpenSource: false,
},
@ -755,7 +755,7 @@ export const models: { [key: string]: ModelPackage } = {
title: "Claude 3.5 Sonnet",
apiKey: "",
},
providerOptions: ["anthropic", "free-trial"],
providerOptions: ["anthropic", "free-trial", "askSage"],
icon: "anthropic.png",
isOpenSource: false,
},
@ -769,7 +769,7 @@ export const models: { [key: string]: ModelPackage } = {
title: "Claude 3 Opus",
apiKey: "",
},
providerOptions: ["anthropic"],
providerOptions: ["anthropic", "askSage"],
icon: "anthropic.png",
isOpenSource: false,
},
@ -783,7 +783,7 @@ export const models: { [key: string]: ModelPackage } = {
title: "Claude 3 Sonnet",
apiKey: "",
},
providerOptions: ["anthropic", "free-trial"],
providerOptions: ["anthropic", "free-trial", "askSage"],
icon: "anthropic.png",
isOpenSource: false,
},
@ -908,6 +908,36 @@ export const models: { [key: string]: ModelPackage } = {
providerOptions: ["watsonx"],
isOpenSource: false,
},
gpt4gov: {
title: "GPT-4 gov",
description:
"U.S. Government. Most capable model today - which is similar to GPT-4o but approved for use by the U.S. Government.",
params: {
model: "gpt4-gov",
contextLength: 128_000,
title: "GPT-4 gov",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.", // Need to set this on the Ask Sage side or just configure it in here to be discussed
},
providerOptions: ["askSage"],
icon: "openai.png",
isOpenSource: false,
},
gpt4ogov: {
title: "GPT-4o gov",
description:
"U.S. Government. Most capable model today - which is similar to GPT-4o but approved for use by the U.S. Government.",
params: {
model: "gpt-4o-gov",
contextLength: 128_000,
title: "GPT-4o",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.", // Need to set this on the Ask Sage side or just configure it in here to be discussed
},
providerOptions: ["askSage"],
icon: "openai.png",
isOpenSource: false,
},
AUTODETECT: {
title: "Autodetect",
description:

View file

@ -622,4 +622,48 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo
],
apiKeyUrl: "https://cloud.cerebras.ai/",
},
askSage: {
title: "Ask Sage",
provider: "askSage",
icon: "ask-Sage.png",
description:
"The Ask Sage API provides seamless access to LLMs including OpenAI, Anthropic, Meta, Mistral, and more.",
longDescription: `To get access to the Ask Sage API, obtain your API key from the [Ask Sage platform](https://chat.asksage.ai/) for all other models.`,
tags: [ModelProviderTags.RequiresApiKey],
params: {
apiKey: "",
apiBase: "https://api.asksage.ai/server/", // Default base URL
},
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your Ask Sage API key",
required: true,
},
{
inputType: "text",
key: "apiBase",
label: "API Base URL",
placeholder: "Enter the API Base URL",
required: true,
},
...completionParamsInputsConfigs,
],
packages: [
models.gpt4gov,
models.gpt4ogov,
models.gpt4o,
models.gpt4omini,
models.gpt35turbo,
models.claude35Sonnet,
models.claude3Opus,
models.claude3Sonnet,
models.mistralLarge,
models.llama370bChat,
models.gemini15Pro,
],
apiKeyUrl: "https://chat.asksage.ai/",
},
};