🔥 remove generated types

This commit is contained in:
Nate Sesti 2023-12-11 10:49:48 -08:00
parent ffd4e6f046
commit 7e4eee58b3
61 changed files with 137 additions and 3832 deletions

View file

@ -55,6 +55,35 @@ type ModelProvider =
| "lmstudio"
| "llamafile";
export type ModelName =
// OpenAI
| "gpt-3.5-turbo"
| "gpt-3.5-turbo-16k"
| "gpt-4"
| "gpt-3.5-turbo-0613"
| "gpt-4-32k"
| "gpt-4-1106-preview"
// Open Source
| "mistral-7b"
| "llama2-7b"
| "llama2-13b"
| "codellama-7b"
| "codellama-13b"
| "codellama-34b"
| "phind-codellama-34b"
| "wizardcoder-7b"
| "wizardcoder-13b"
| "wizardcoder-34b"
| "zephyr-7b"
| "codeup-13b"
| "deepseek-1b"
| "deepseek-7b"
| "deepseek-33b"
// Anthropic
| "claude-2"
// Google PaLM
| "chat-bison-001";
interface RequestOptions {
timeout?: number;
verifySsl?: boolean;

24
core/types.d.ts vendored
View file

@ -13,3 +13,27 @@ export interface SessionInfo {
dateCreated: string;
workspaceDirectory: string;
}
export interface RangeInFile {
filepath: string;
range: Range;
}
export interface Range {
start: Position;
end: Position;
}
export interface Position {
line: number;
character: number;
}
export interface FileEdit {
filepath: string;
range: Range;
replacement: string;
}
export interface ContinueError {
title: string;
message: string;
}

View file

@ -1,45 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContextItem = ContextItem1;
export type Name = string;
export type Description = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content = string;
export type Editing = boolean;
export type Editable = boolean;
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem1 {
description: ContextItemDescription;
content: Content;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name;
description: Description;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,19 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContextItemId = ContextItemId1;
export type ProviderTitle = string;
export type ItemId = string;
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId1 {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,22 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContextProviderDescription = ContextProviderDescription1;
export type Title = string;
export type DisplayTitle = string;
export type Description = string;
export type Dynamic = boolean;
export type RequiresQuery = boolean;
export interface ContextProviderDescription1 {
title: Title;
display_title: DisplayTitle;
description: Description;
dynamic: Dynamic;
requires_query: RequiresQuery;
[k: string]: unknown;
}

View file

@ -1,451 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContinueConfig = ContinueConfig1;
export type Name = string;
export type Hide = boolean;
export type Description = string;
export type ClassName = string;
export type SystemMessage = string;
export type Role = "assistant" | "user" | "system" | "function";
export type Content = string;
export type Name1 = string;
export type Summary = string;
export type Name2 = string;
export type Arguments = string;
export type ChatContext = ChatMessage[];
export type ManageOwnChatContext = boolean;
/**
* Steps that will be automatically run at the beginning of a new session
*/
export type StepsOnStartup = Step[];
/**
* Steps that are not allowed to be run, and will be skipped if attempted
*/
export type DisallowedSteps = string[];
/**
* 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.
*/
export type AllowAnonymousTelemetry = boolean;
/**
* A title that will identify this model in the model selection dropdown
*/
export type Title = string;
/**
* The unique ID of the user.
*/
export type UniqueId = string;
/**
* The name of the model to be used (e.g. gpt-4, codellama)
*/
export type Model = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage1 = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
/**
* The API key for the LLM provider.
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
export type Models = LLM[];
/**
* Roles for models. Each entry should be the title of a model in the models array.
*/
export type ModelRoles = ModelRoles1;
/**
* The default model. If other model roles are not set, they will fall back to default.
*/
export type Default = string;
/**
* The model to use for chat. If not set, will fall back to default.
*/
export type Chat = string;
/**
* The model to use for editing. If not set, will fall back to default.
*/
export type Edit = string;
/**
* The model to use for summarization. If not set, will fall back to default.
*/
export type Summarize = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage2 = string;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions1 = BaseCompletionOptions;
export type Name3 = string;
export type Prompt = string;
export type Description1 = string;
/**
* 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.
*/
export type CustomCommands = CustomCommand[];
export type Name4 = string;
export type Description2 = string;
export type Step1 =
| unknown
| (
| "AnswerQuestionChroma"
| "GenerateShellCommandStep"
| "EditHighlightedCodeStep"
| "ShareSessionStep"
| "CommentCodeStep"
| "ClearHistoryStep"
| "StackOverflowStep"
| "OpenConfigStep"
)
| string;
/**
* An array of slash commands that let you map custom Steps to a shortcut.
*/
export type SlashCommands = SlashCommand[];
/**
* The step that will be run when a traceback is detected (when you use the shortcut cmd+shift+R)
*/
export type OnTraceback = Step;
/**
* A Policy object that can be used to override the default behavior of Continue, for example in order to build custom agents that take multiple steps at a time.
*/
export type PolicyOverride = Policy;
/**
* The title of the ContextProvider. This is what must be typed in the input to trigger the ContextProvider.
*/
export type Title1 = string;
/**
* The display title of the ContextProvider shown in the dropdown menu
*/
export type DisplayTitle = string;
/**
* A description of the ContextProvider displayed in the dropdown menu
*/
export type Description3 = string;
/**
* Indicates whether the ContextProvider is dynamic
*/
export type Dynamic = boolean;
/**
* Indicates whether the ContextProvider requires a query. For example, the SearchContextProvider requires you to type '@search <STRING_TO_SEARCH>'. This will change the behavior of the UI so that it can indicate the expectation for a query.
*/
export type RequiresQuery = boolean;
export type Name5 = string;
export type Description4 = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content1 = string;
export type Editing = boolean;
export type Editable = boolean;
/**
* List of selected items in the ContextProvider
*/
export type SelectedItems = ContextItem[];
/**
* A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.
*/
export type ContextProviders = ContextProvider[];
/**
* An optional token to identify the user.
*/
export type UserToken = string;
/**
* The URL of the server where development data is sent. No data is sent unless you have explicitly set the `user_token` property to a valid token that we have shared.
*/
export type DataServerUrl = string;
/**
* If set to `True`, Continue will not generate summaries for each Step. This can be useful if you want to save on compute.
*/
export type DisableSummaries = boolean;
/**
* If set to `True`, Continue will not index the codebase. This is mainly used for debugging purposes.
*/
export type DisableIndexing = boolean;
/**
* Settings for the retrieval system. Read more about the retrieval system in the documentation.
*/
export type RetrievalSettings = RetrievalSettings1;
/**
* Number of results to initially retrieve from vector database
*/
export type NRetrieve = number;
/**
* Final number of results to use after re-ranking
*/
export type NFinal = number;
/**
* Whether to use re-ranking, which will allow initial selection of n_retrieve results, then will use an LLM to select the top n_final results
*/
export type UseReranking = boolean;
/**
* Number of results to group together when re-ranking. Each group will be processed in parallel.
*/
export type RerankGroupSize = number;
/**
* Files to ignore when indexing the codebase. You can use glob patterns, such as ** /*.py. This is useful for directories that contain generated code, or other directories that are not relevant to the codebase.
*/
export type IgnoreFiles = string[];
/**
* OpenAI API key
*/
export type OpenaiApiKey = string;
/**
* OpenAI API base URL
*/
export type ApiBase1 = string;
/**
* OpenAI API type
*/
export type ApiType = string;
/**
* OpenAI API version
*/
export type ApiVersion = string;
/**
* OpenAI organization ID
*/
export type OrganizationId = string;
/**
* Continue can be deeply customized by editing the `ContinueConfig` object in `~/.continue/config.py` (`%userprofile%\.continue\config.py` for Windows) on your machine. This class is instantiated from the config file for every new session.
*/
export interface ContinueConfig1 {
steps_on_startup?: StepsOnStartup;
disallowed_steps?: DisallowedSteps;
allow_anonymous_telemetry?: AllowAnonymousTelemetry;
models?: Models;
model_roles?: ModelRoles;
system_message?: SystemMessage2;
completion_options?: CompletionOptions1;
custom_commands?: CustomCommands;
slash_commands?: SlashCommands;
on_traceback?: OnTraceback;
policy_override?: PolicyOverride;
context_providers?: ContextProviders;
user_token?: UserToken;
data_server_url?: DataServerUrl;
disable_summaries?: DisableSummaries;
disable_indexing?: DisableIndexing;
retrieval_settings?: RetrievalSettings;
[k: string]: unknown;
}
export interface Step {
name?: Name;
hide?: Hide;
description?: Description;
class_name?: ClassName;
system_message?: SystemMessage;
chat_context?: ChatContext;
manage_own_chat_context?: ManageOwnChatContext;
[k: string]: unknown;
}
export interface ChatMessage {
role: Role;
content?: Content;
name?: Name1;
summary?: Summary;
function_call?: FunctionCall;
[k: string]: unknown;
}
export interface FunctionCall {
name: Name2;
arguments: Arguments;
[k: string]: unknown;
}
export interface LLM {
title?: Title;
unique_id?: UniqueId;
model: Model;
system_message?: SystemMessage1;
context_length?: ContextLength;
completion_options?: CompletionOptions;
request_options?: RequestOptions;
prompt_templates?: PromptTemplates;
api_key?: ApiKey;
api_base?: ApiBase;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
/**
* A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.
*/
export interface PromptTemplates {
[k: string]: unknown;
}
export interface ModelRoles1 {
default: Default;
chat?: Chat;
edit?: Edit;
summarize?: Summarize;
[k: string]: unknown;
}
export interface CustomCommand {
name: Name3;
prompt: Prompt;
description: Description1;
[k: string]: unknown;
}
export interface SlashCommand {
name: Name4;
description: Description2;
step: Step1;
params?: Params;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
/**
* A rule that determines which step to take next
*/
export interface Policy {
[k: string]: unknown;
}
/**
* The ContextProvider class is a plugin that lets you provide new information to the LLM by typing '@'.
* When you type '@', the context provider will be asked to populate a list of options.
* These options will be updated on each keystroke.
* When you hit enter on an option, the context provider will add that item to the autopilot's list of context (which is all stored in the ContextManager object).
*/
export interface ContextProvider {
title: Title1;
ide?: Ide;
display_title: DisplayTitle;
description: Description3;
dynamic: Dynamic;
requires_query?: RequiresQuery;
selected_items?: SelectedItems;
[k: string]: unknown;
}
export interface Ide {
[k: string]: unknown;
}
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem {
description: ContextItemDescription;
content: Content1;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name5;
description: Description4;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}
export interface RetrievalSettings1 {
n_retrieve?: NRetrieve;
n_final?: NFinal;
use_reranking?: UseReranking;
rerank_group_size?: RerankGroupSize;
ignore_files?: IgnoreFiles;
openai_api_key?: OpenaiApiKey;
api_base?: ApiBase1;
api_type?: ApiType;
api_version?: ApiVersion;
organization_id?: OrganizationId;
[k: string]: unknown;
}

View file

@ -1,16 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContinueError = ContinueError1;
export type Title = string;
export type Message = string;
export interface ContinueError1 {
title: Title;
message: Message;
[k: string]: unknown;
}

View file

@ -1,32 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type FileEdit = FileEdit1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export type Replacement = string;
export interface FileEdit1 {
filepath: Filepath;
range: Range;
replacement: Replacement;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,38 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type FileEditWithFullContents = FileEditWithFullContents1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export type Replacement = string;
export type Filecontents = string;
export interface FileEditWithFullContents1 {
fileEdit: FileEdit;
fileContents: Filecontents;
[k: string]: unknown;
}
export interface FileEdit {
filepath: Filepath;
range: Range;
replacement: Replacement;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,132 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type LLM = LLM1;
/**
* A title that will identify this model in the model selection dropdown
*/
export type Title = string;
/**
* The unique ID of the user.
*/
export type UniqueId = string;
/**
* The name of the model to be used (e.g. gpt-4, codellama)
*/
export type Model = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
/**
* The API key for the LLM provider.
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
export interface LLM1 {
title?: Title;
unique_id?: UniqueId;
model: Model;
system_message?: SystemMessage;
context_length?: ContextLength;
completion_options?: CompletionOptions;
request_options?: RequestOptions;
prompt_templates?: PromptTemplates;
api_key?: ApiKey;
api_base?: ApiBase;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
/**
* A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.
*/
export interface PromptTemplates {
[k: string]: unknown;
}

View file

@ -1,144 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ModelDescription = ModelDescription1;
/**
* The title you wish to give your model.
*/
export type Title = string;
/**
* The provider of the model. This is used to determine the type of model, and how to interact with it.
*/
export type Provider =
| "openai"
| "openai-free-trial"
| "openai-aiohttp"
| "anthropic"
| "together"
| "ollama"
| "huggingface-tgi"
| "huggingface-inference-api"
| "llama.cpp"
| "replicate"
| "text-gen-webui"
| "google-palm"
| "lmstudio"
| "llamafile";
/**
* The name of the model. Used to autodetect prompt template.
*/
export type Model = string;
/**
* OpenAI, Anthropic, Together, or other API key
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
*/
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
export interface ModelDescription1 {
title: Title;
provider: Provider;
model: Model;
api_key?: ApiKey;
api_base?: ApiBase;
context_length?: ContextLength;
template?: Template;
completion_options?: CompletionOptions;
system_message?: SystemMessage;
request_options?: RequestOptions;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}

View file

@ -1,31 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ModelName =
| "gpt-3.5-turbo"
| "gpt-3.5-turbo-16k"
| "gpt-4"
| "gpt-3.5-turbo-0613"
| "gpt-4-32k"
| "gpt-4-1106-preview"
| "mistral-7b"
| "llama2-7b"
| "llama2-13b"
| "codellama-7b"
| "codellama-13b"
| "codellama-34b"
| "phind-codellama-34b"
| "wizardcoder-7b"
| "wizardcoder-13b"
| "wizardcoder-34b"
| "zephyr-7b"
| "codeup-13b"
| "deepseek-1b"
| "deepseek-7b"
| "deepseek-33b"
| "claude-2"
| "chat-bison-001";

View file

@ -1,22 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ModelProvider =
| "openai"
| "openai-free-trial"
| "openai-aiohttp"
| "anthropic"
| "together"
| "ollama"
| "huggingface-tgi"
| "huggingface-inference-api"
| "llama.cpp"
| "replicate"
| "text-gen-webui"
| "google-palm"
| "lmstudio"
| "llamafile";

View file

@ -1,148 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Models = Models1;
/**
* A title that will identify this model in the model selection dropdown
*/
export type Title = string;
/**
* The unique ID of the user.
*/
export type UniqueId = string;
/**
* The name of the model to be used (e.g. gpt-4, codellama)
*/
export type Model = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
/**
* The API key for the LLM provider.
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
export type Saved = (unknown | LLM)[];
export type Temperature1 = number;
export type SystemMessage1 = string;
/**
* Main class that holds the current model configuration
*/
export interface Models1 {
default?: unknown;
summarize?: unknown;
edit?: unknown;
chat?: unknown;
saved?: Saved;
temperature?: Temperature1;
system_message?: SystemMessage1;
[k: string]: unknown;
}
export interface LLM {
title?: Title;
unique_id?: UniqueId;
model: Model;
system_message?: SystemMessage;
context_length?: ContextLength;
completion_options?: CompletionOptions;
request_options?: RequestOptions;
prompt_templates?: PromptTemplates;
api_key?: ApiKey;
api_base?: ApiBase;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
/**
* A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.
*/
export interface PromptTemplates {
[k: string]: unknown;
}

View file

@ -1,97 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type PersistedSessionInfo = PersistedSessionInfo1;
export type StepType = string;
export type Name = string;
export type Description = string;
export type Hide = boolean;
export type Depth = number;
export type Title = string;
export type Message = string;
export type Observations = Observation[];
export type Logs = string[];
export type History = StepDescription[];
export type Name1 = string;
export type Description1 = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content = string;
export type Editing = boolean;
export type Editable = boolean;
export type ContextItems = ContextItem[];
export type Title1 = string;
export type WorkspaceDirectory = string;
export type SessionId = string;
export interface PersistedSessionInfo1 {
session_state: SessionState;
title: Title1;
workspace_directory: WorkspaceDirectory;
session_id: SessionId;
[k: string]: unknown;
}
/**
* Full session history and important state needed for autopilot to Continue
*/
export interface SessionState {
history: History;
context_items: ContextItems;
[k: string]: unknown;
}
export interface StepDescription {
step_type: StepType;
name: Name;
description: Description;
params: Params;
hide: Hide;
depth: Depth;
error?: ContinueError;
observations?: Observations;
logs?: Logs;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface ContinueError {
title: Title;
message: Message;
[k: string]: unknown;
}
export interface Observation {
[k: string]: unknown;
}
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem {
description: ContextItemDescription;
content: Content;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name1;
description: Description1;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,16 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Position = Position1;
export type Line = number;
export type Character = number;
export interface Position1 {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,3 +0,0 @@
# Schema
These are files autogenerated by `npm run typegen`. They come originally from the `continuedev` Python package's Pydantic types.

View file

@ -1,24 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Range = Range1;
export type Line = number;
export type Character = number;
/**
* A range in a file. 0-indexed.
*/
export interface Range1 {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,30 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type RangeInFile = RangeInFile1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export interface RangeInFile1 {
filepath: Filepath;
range: Range;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,35 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type RangeInFileWithContents = RangeInFileWithContents1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export type Contents = string;
/**
* A range in a file with the contents of the range.
*/
export interface RangeInFileWithContents1 {
filepath: Filepath;
range: Range;
contents: Contents;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,333 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SerializedContinueConfig = SerializedContinueConfig1;
/**
* Steps that are not allowed to be run, and will be skipped if attempted
*/
export type DisallowedSteps = string[];
/**
* 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.
*/
export type AllowAnonymousTelemetry = boolean;
/**
* The title you wish to give your model.
*/
export type Title = string;
/**
* The provider of the model. This is used to determine the type of model, and how to interact with it.
*/
export type Provider =
| "openai"
| "openai-free-trial"
| "openai-aiohttp"
| "anthropic"
| "together"
| "ollama"
| "huggingface-tgi"
| "huggingface-inference-api"
| "llama.cpp"
| "replicate"
| "text-gen-webui"
| "google-palm"
| "lmstudio"
| "llamafile";
/**
* The name of the model. Used to autodetect prompt template.
*/
export type Model = string;
/**
* OpenAI, Anthropic, Together, or other API key
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
*/
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
export type Models = ModelDescription[];
/**
* Roles for models. Each entry should be the title of a model in the models array.
*/
export type ModelRoles = ModelRoles1;
/**
* The default model. If other model roles are not set, they will fall back to default.
*/
export type Default = string;
/**
* The model to use for chat. If not set, will fall back to default.
*/
export type Chat = string;
/**
* The model to use for editing. If not set, will fall back to default.
*/
export type Edit = string;
/**
* The model to use for summarization. If not set, will fall back to default.
*/
export type Summarize = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage1 = string;
/**
* Default options for completion. These will be overriden by any options set for a specific model.
*/
export type CompletionOptions1 = BaseCompletionOptions;
export type Name = string;
export type Description = string;
export type Step =
| unknown
| (
| "AnswerQuestionChroma"
| "GenerateShellCommandStep"
| "EditHighlightedCodeStep"
| "ShareSessionStep"
| "CommentCodeStep"
| "ClearHistoryStep"
| "StackOverflowStep"
| "OpenConfigStep"
)
| string;
/**
* An array of slash commands that let you map custom Steps to a shortcut.
*/
export type SlashCommands = SlashCommand[];
export type Name1 = string;
export type Prompt = string;
export type Description1 = string;
/**
* 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.
*/
export type CustomCommands = CustomCommand[];
export type Name2 = "diff" | "github" | "terminal" | "open" | "google" | "search" | "url" | "tree";
/**
* A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.
*/
export type ContextProviders = ContextProviderWithParams[];
/**
* An optional token to identify the user.
*/
export type UserToken = string;
/**
* The URL of the server where development data is sent. No data is sent unless you have explicitly set the `user_token` property to a valid token that we have shared.
*/
export type DataServerUrl = string;
/**
* If set to `True`, Continue will not generate summaries for each Step. This can be useful if you want to save on compute.
*/
export type DisableSummaries = boolean;
/**
* If set to `True`, Continue will not index the codebase. This is mainly used for debugging purposes.
*/
export type DisableIndexing = boolean;
/**
* Settings for the retrieval system. Read more about the retrieval system in the documentation.
*/
export type RetrievalSettings = RetrievalSettings1;
/**
* Number of results to initially retrieve from vector database
*/
export type NRetrieve = number;
/**
* Final number of results to use after re-ranking
*/
export type NFinal = number;
/**
* Whether to use re-ranking, which will allow initial selection of n_retrieve results, then will use an LLM to select the top n_final results
*/
export type UseReranking = boolean;
/**
* Number of results to group together when re-ranking. Each group will be processed in parallel.
*/
export type RerankGroupSize = number;
/**
* Files to ignore when indexing the codebase. You can use glob patterns, such as ** /*.py. This is useful for directories that contain generated code, or other directories that are not relevant to the codebase.
*/
export type IgnoreFiles = string[];
/**
* OpenAI API key
*/
export type OpenaiApiKey = string;
/**
* OpenAI API base URL
*/
export type ApiBase1 = string;
/**
* OpenAI API type
*/
export type ApiType = string;
/**
* OpenAI API version
*/
export type ApiVersion = string;
/**
* OpenAI organization ID
*/
export type OrganizationId = string;
export interface SerializedContinueConfig1 {
disallowed_steps?: DisallowedSteps;
allow_anonymous_telemetry?: AllowAnonymousTelemetry;
models?: Models;
model_roles?: ModelRoles;
system_message?: SystemMessage1;
completion_options?: CompletionOptions1;
slash_commands?: SlashCommands;
custom_commands?: CustomCommands;
context_providers?: ContextProviders;
user_token?: UserToken;
data_server_url?: DataServerUrl;
disable_summaries?: DisableSummaries;
disable_indexing?: DisableIndexing;
retrieval_settings?: RetrievalSettings;
[k: string]: unknown;
}
export interface ModelDescription {
title: Title;
provider: Provider;
model: Model;
api_key?: ApiKey;
api_base?: ApiBase;
context_length?: ContextLength;
template?: Template;
completion_options?: CompletionOptions;
system_message?: SystemMessage;
request_options?: RequestOptions;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
export interface ModelRoles1 {
default: Default;
chat?: Chat;
edit?: Edit;
summarize?: Summarize;
[k: string]: unknown;
}
export interface SlashCommand {
name: Name;
description: Description;
step: Step;
params?: Params;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface CustomCommand {
name: Name1;
prompt: Prompt;
description: Description1;
[k: string]: unknown;
}
export interface ContextProviderWithParams {
name: Name2;
params?: Params1;
[k: string]: unknown;
}
export interface Params1 {
[k: string]: unknown;
}
export interface RetrievalSettings1 {
n_retrieve?: NRetrieve;
n_final?: NFinal;
use_reranking?: UseReranking;
rerank_group_size?: RerankGroupSize;
ignore_files?: IgnoreFiles;
openai_api_key?: OpenaiApiKey;
api_base?: ApiBase1;
api_type?: ApiType;
api_version?: ApiVersion;
organization_id?: OrganizationId;
[k: string]: unknown;
}

View file

@ -1,20 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SessionInfo = SessionInfo1;
export type SessionId = string;
export type Title = string;
export type DateCreated = string;
export type WorkspaceDirectory = string;
export interface SessionInfo1 {
session_id: SessionId;
title: Title;
date_created: DateCreated;
workspace_directory?: WorkspaceDirectory;
[k: string]: unknown;
}

View file

@ -1,87 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SessionState = SessionState1;
export type StepType = string;
export type Name = string;
export type Description = string;
export type Hide = boolean;
export type Depth = number;
export type Title = string;
export type Message = string;
export type Observations = Observation[];
export type Logs = string[];
export type History = StepDescription[];
export type Name1 = string;
export type Description1 = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content = string;
export type Editing = boolean;
export type Editable = boolean;
export type ContextItems = ContextItem[];
/**
* Full session history and important state needed for autopilot to Continue
*/
export interface SessionState1 {
history: History;
context_items: ContextItems;
[k: string]: unknown;
}
export interface StepDescription {
step_type: StepType;
name: Name;
description: Description;
params: Params;
hide: Hide;
depth: Depth;
error?: ContinueError;
observations?: Observations;
logs?: Logs;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface ContinueError {
title: Title;
message: Message;
[k: string]: unknown;
}
export interface Observation {
[k: string]: unknown;
}
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem {
description: ContextItemDescription;
content: Content;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name1;
description: Description1;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,61 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SessionUpdate = SessionUpdate1;
export type Index = number;
export type Update = DeltaStep | SetStep | SessionUpdate1;
export type Name = string;
export type Description = string;
export type Observations = Observation[];
export type Logs = string[];
export type StepType = string;
export type Name1 = string;
export type Description1 = string;
export type Hide = boolean;
export type Depth = number;
export type Title = string;
export type Message = string;
export type Observations1 = Observation[];
export type Logs1 = string[];
export type Stop = boolean;
export interface SessionUpdate1 {
index: Index;
update: Update;
stop?: Stop;
[k: string]: unknown;
}
export interface DeltaStep {
name?: Name;
description?: Description;
observations?: Observations;
logs?: Logs;
[k: string]: unknown;
}
export interface Observation {
[k: string]: unknown;
}
export interface SetStep {
step_type?: StepType;
name?: Name1;
description?: Description1;
params?: Params;
hide?: Hide;
depth?: Depth;
error?: ContinueError;
observations?: Observations1;
logs?: Logs1;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface ContinueError {
title: Title;
message: Message;
[k: string]: unknown;
}

View file

@ -1,16 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SlashCommandDescription = SlashCommandDescription1;
export type Name = string;
export type Description = string;
export interface SlashCommandDescription1 {
name: Name;
description: Description;
[k: string]: unknown;
}

View file

@ -1,31 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Traceback = Traceback1;
export type Filepath = string;
export type Lineno = number;
export type Function = string;
export type Code = string;
export type Frames = TracebackFrame[];
export type Message = string;
export type ErrorType = string;
export type FullTraceback = string;
export interface Traceback1 {
frames: Frames;
message: Message;
error_type: ErrorType;
full_traceback?: FullTraceback;
[k: string]: unknown;
}
export interface TracebackFrame {
filepath: Filepath;
lineno: Lineno;
function: Function;
code?: Code;
[k: string]: unknown;
}

View file

@ -1,20 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type TracebackFrame = TracebackFrame1;
export type Filepath = string;
export type Lineno = number;
export type Function = string;
export type Code = string;
export interface TracebackFrame1 {
filepath: Filepath;
lineno: Lineno;
function: Function;
code?: Code;
[k: string]: unknown;
}

View file

@ -11,80 +11,75 @@ exec("npm install", (error) => {
if (error) throw error;
console.log("npm install completed");
exec("npm run typegen", (error) => {
process.chdir("../../gui");
exec("npm install", (error) => {
if (error) throw error;
console.log("npm run typegen completed");
console.log("npm install in gui completed");
process.chdir("../../gui");
exec("npm install", (error) => {
if (error) throw error;
console.log("npm install in gui completed");
exec("npm run build", (error, stdout, stderr) => {
exec("npm run build", (error, stdout, stderr) => {
if (error) {
console.log("Error running npm run build in gui");
console.log("stdout: ", stdout);
console.log("stderr: ", stderr);
throw error;
}
// Then copy over the dist folder to the Intellij extension
const intellijExtensionWebviewPath = path.join(
"..",
"extensions",
"intellij",
"src",
"main",
"resources",
"webview"
);
const indexHtmlPath = path.join(
intellijExtensionWebviewPath,
"index.html"
);
fs.copyFileSync(indexHtmlPath, path.join("tmp_index.html"));
fs.rmSync(intellijExtensionWebviewPath, { recursive: true });
fs.mkdirSync(intellijExtensionWebviewPath, { recursive: true });
console.log(process.cwd());
ncp("dist", intellijExtensionWebviewPath, (error) => {
if (error) {
console.log("Error running npm run build in gui");
console.log("stdout: ", stdout);
console.log("stderr: ", stderr);
console.log(
"Error copying React app build to Intellij extension: ",
error
);
throw error;
}
// Then copy over the dist folder to the Intellij extension
const intellijExtensionWebviewPath = path.join(
"..",
"extensions",
"intellij",
"src",
"main",
"resources",
"webview"
);
const indexHtmlPath = path.join(
intellijExtensionWebviewPath,
"index.html"
);
fs.copyFileSync(indexHtmlPath, path.join("tmp_index.html"));
fs.rmSync(intellijExtensionWebviewPath, { recursive: true });
fs.mkdirSync(intellijExtensionWebviewPath, { recursive: true });
console.log(process.cwd());
ncp("dist", intellijExtensionWebviewPath, (error) => {
if (error) {
console.log(
"Error copying React app build to Intellij extension: ",
error
);
throw error;
}
if (fs.existsSync(indexHtmlPath)) {
fs.rmSync(indexHtmlPath, {});
}
fs.copyFileSync("tmp_index.html", indexHtmlPath);
fs.unlinkSync("tmp_index.html");
console.log("Copied gui build to Intellij extension");
});
// Then copy over the dist folder to the VSCode extension
const vscodeGuiPath = path.join("../extensions/vscode/gui");
fs.mkdirSync(vscodeGuiPath, { recursive: true });
ncp("dist", vscodeGuiPath, (error) => {
if (error) {
console.log(
"Error copying React app build to VSCode extension: ",
error
);
throw error;
}
console.log("Copied gui build to VSCode extension");
});
if (!fs.existsSync(path.join("dist", "assets", "index.js"))) {
throw new Error("gui build did not produce index.js");
if (fs.existsSync(indexHtmlPath)) {
fs.rmSync(indexHtmlPath, {});
}
if (!fs.existsSync(path.join("dist", "assets", "index.css"))) {
throw new Error("gui build did not produce index.css");
}
console.log("npm run build in gui completed");
fs.copyFileSync("tmp_index.html", indexHtmlPath);
fs.unlinkSync("tmp_index.html");
console.log("Copied gui build to Intellij extension");
});
// Then copy over the dist folder to the VSCode extension
const vscodeGuiPath = path.join("../extensions/vscode/gui");
fs.mkdirSync(vscodeGuiPath, { recursive: true });
ncp("dist", vscodeGuiPath, (error) => {
if (error) {
console.log(
"Error copying React app build to VSCode extension: ",
error
);
throw error;
}
console.log("Copied gui build to VSCode extension");
});
if (!fs.existsSync(path.join("dist", "assets", "index.js"))) {
throw new Error("gui build did not produce index.js");
}
if (!fs.existsSync(path.join("dist", "assets", "index.css"))) {
throw new Error("gui build did not produce index.css");
}
console.log("npm run build in gui completed");
});
});
});

View file

@ -1,6 +1,5 @@
import { FileEdit, RangeInFile } from "core/types";
import * as vscode from "vscode";
import { FileEdit } from "../schema/FileEdit";
import { RangeInFile } from "../schema/RangeInFile";
import { windowId } from "./activation/activate";
import { debugPanelWebview, getSidebarContent } from "./debugPanel";
import { diffManager } from "./diffs";

View file

@ -1,7 +1,7 @@
import { FileEdit } from "core/types";
import { getConfigJsonPath } from "core/util/paths";
import * as io from "socket.io-client";
import * as vscode from "vscode";
import { FileEdit } from "../schema/FileEdit";
import { ideProtocolClient, windowId } from "./activation/activate";
import { getContinueServerUrl } from "./bridge";
import historyManager from "./history";

View file

@ -1,10 +1,10 @@
import { ContextItem } from "core/llm/types";
import { useDispatch } from "react-redux";
import { Button, Input } from "..";
import {
setDialogMessage,
setShowDialog,
} from "../../redux/slices/uiStateSlice";
import { ContextItem } from "../../schema/ContextItem";
function AddContextGroupDialog({
selectedContextItems,

View file

@ -1,9 +1,8 @@
import React from "react";
import { MinusCircleIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { ContinueError } from "core/types";
import styled from "styled-components";
import { defaultBorderRadius, vscBackground } from "..";
import HeaderButtonWithText from "../HeaderButtonWithText";
import { MinusCircleIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { ContinueError } from "../../schema/ContinueError";
const Div = styled.div`
padding: 8px;

View file

@ -1,10 +1,8 @@
import React from "react";
import { lightGray, vscBackground } from "..";
import styled from "styled-components";
import { ChatBubbleOvalLeftIcon } from "@heroicons/react/24/outline";
import { getFontSize } from "../../util";
import { StepDescription } from "../../schema/SessionState";
import { ChatHistoryItem } from "core/llm/types";
import styled from "styled-components";
import { lightGray, vscBackground } from "..";
import { getFontSize } from "../../util";
const CollapseButton = styled.div`
background-color: ${vscBackground};

View file

@ -1,4 +1,5 @@
import { ArrowLeftIcon } from "@heroicons/react/24/outline";
import { ContinueConfig } from "core/config";
import { useEffect } from "react";
import { FormProvider, useForm } from "react-hook-form";
import { useDispatch, useSelector } from "react-redux";
@ -16,7 +17,6 @@ import {
import InfoHover from "../components/InfoHover";
import Loader from "../components/loaders/Loader";
import { RootStore } from "../redux/store";
import { ContinueConfig } from "../schema/ContinueConfig";
import { getFontSize, getPlatform } from "../util";
import { postToIde } from "../util/ide";
@ -129,8 +129,11 @@ function Settings() {
useEffect(() => {
if (!config) return;
formMethods.setValue("system_message", config.systemMessage);
formMethods.setValue("temperature", config.completionOptions?.temperature);
formMethods.setValue("systemMessage", config.systemMessage);
formMethods.setValue(
"completionOptions.temperature",
config.completionOptions?.temperature
);
}, [config]);
return (
@ -176,7 +179,7 @@ function Settings() {
</h3>
<TextArea
placeholder="Enter a system message (e.g. 'Always respond in German')"
{...formMethods.register("system_message")}
{...formMethods.register("systemMessage")}
/>
<Hr />
@ -195,13 +198,15 @@ function Settings() {
min="0"
max="1"
step="0.01"
{...formMethods.register("temperature")}
{...formMethods.register("completionOptions.temperature")}
/>
<p>1</p>
</div>
<div className="text-center" style={{ marginTop: "-25px" }}>
<p className="text-sm text-gray-500">
{(formMethods.watch("temperature") as number | undefined) ||
{(formMethods.watch("completionOptions.temperature") as
| number
| undefined) ||
config.completionOptions?.temperature ||
"-"}
</p>

View file

@ -1,7 +1,7 @@
import { combineReducers, configureStore } from "@reduxjs/toolkit";
import { SlashCommandDescription } from "core/config";
import { ContextProviderDescription } from "core/context";
import { ContextItem } from "core/llm/types";
import { ContextProviderDescription } from "../schema/ContextProviderDescription";
import { SlashCommandDescription } from "../schema/SlashCommandDescription";
import configReducer from "./slices/configSlice";
import miscReducer from "./slices/miscSlice";
import serverStateReducer from "./slices/serverStateReducer";

View file

@ -1,45 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContextItem = ContextItem1;
export type Name = string;
export type Description = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content = string;
export type Editing = boolean;
export type Editable = boolean;
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem1 {
description: ContextItemDescription;
content: Content;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name;
description: Description;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,19 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContextItemId = ContextItemId1;
export type ProviderTitle = string;
export type ItemId = string;
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId1 {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,22 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContextProviderDescription = ContextProviderDescription1;
export type Title = string;
export type DisplayTitle = string;
export type Description = string;
export type Dynamic = boolean;
export type RequiresQuery = boolean;
export interface ContextProviderDescription1 {
title: Title;
display_title: DisplayTitle;
description: Description;
dynamic: Dynamic;
requires_query: RequiresQuery;
[k: string]: unknown;
}

View file

@ -1,451 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContinueConfig = ContinueConfig1;
export type Name = string;
export type Hide = boolean;
export type Description = string;
export type ClassName = string;
export type SystemMessage = string;
export type Role = "assistant" | "user" | "system" | "function";
export type Content = string;
export type Name1 = string;
export type Summary = string;
export type Name2 = string;
export type Arguments = string;
export type ChatContext = ChatMessage[];
export type ManageOwnChatContext = boolean;
/**
* Steps that will be automatically run at the beginning of a new session
*/
export type StepsOnStartup = Step[];
/**
* Steps that are not allowed to be run, and will be skipped if attempted
*/
export type DisallowedSteps = string[];
/**
* 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.
*/
export type AllowAnonymousTelemetry = boolean;
/**
* A title that will identify this model in the model selection dropdown
*/
export type Title = string;
/**
* The unique ID of the user.
*/
export type UniqueId = string;
/**
* The name of the model to be used (e.g. gpt-4, codellama)
*/
export type Model = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage1 = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
/**
* The API key for the LLM provider.
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
export type Models = LLM[];
/**
* Roles for models. Each entry should be the title of a model in the models array.
*/
export type ModelRoles = ModelRoles1;
/**
* The default model. If other model roles are not set, they will fall back to default.
*/
export type Default = string;
/**
* The model to use for chat. If not set, will fall back to default.
*/
export type Chat = string;
/**
* The model to use for editing. If not set, will fall back to default.
*/
export type Edit = string;
/**
* The model to use for summarization. If not set, will fall back to default.
*/
export type Summarize = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage2 = string;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions1 = BaseCompletionOptions;
export type Name3 = string;
export type Prompt = string;
export type Description1 = string;
/**
* 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.
*/
export type CustomCommands = CustomCommand[];
export type Name4 = string;
export type Description2 = string;
export type Step1 =
| unknown
| (
| "AnswerQuestionChroma"
| "GenerateShellCommandStep"
| "EditHighlightedCodeStep"
| "ShareSessionStep"
| "CommentCodeStep"
| "ClearHistoryStep"
| "StackOverflowStep"
| "OpenConfigStep"
)
| string;
/**
* An array of slash commands that let you map custom Steps to a shortcut.
*/
export type SlashCommands = SlashCommand[];
/**
* The step that will be run when a traceback is detected (when you use the shortcut cmd+shift+R)
*/
export type OnTraceback = Step;
/**
* A Policy object that can be used to override the default behavior of Continue, for example in order to build custom agents that take multiple steps at a time.
*/
export type PolicyOverride = Policy;
/**
* The title of the ContextProvider. This is what must be typed in the input to trigger the ContextProvider.
*/
export type Title1 = string;
/**
* The display title of the ContextProvider shown in the dropdown menu
*/
export type DisplayTitle = string;
/**
* A description of the ContextProvider displayed in the dropdown menu
*/
export type Description3 = string;
/**
* Indicates whether the ContextProvider is dynamic
*/
export type Dynamic = boolean;
/**
* Indicates whether the ContextProvider requires a query. For example, the SearchContextProvider requires you to type '@search <STRING_TO_SEARCH>'. This will change the behavior of the UI so that it can indicate the expectation for a query.
*/
export type RequiresQuery = boolean;
export type Name5 = string;
export type Description4 = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content1 = string;
export type Editing = boolean;
export type Editable = boolean;
/**
* List of selected items in the ContextProvider
*/
export type SelectedItems = ContextItem[];
/**
* A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.
*/
export type ContextProviders = ContextProvider[];
/**
* An optional token to identify the user.
*/
export type UserToken = string;
/**
* The URL of the server where development data is sent. No data is sent unless you have explicitly set the `user_token` property to a valid token that we have shared.
*/
export type DataServerUrl = string;
/**
* If set to `True`, Continue will not generate summaries for each Step. This can be useful if you want to save on compute.
*/
export type DisableSummaries = boolean;
/**
* If set to `True`, Continue will not index the codebase. This is mainly used for debugging purposes.
*/
export type DisableIndexing = boolean;
/**
* Settings for the retrieval system. Read more about the retrieval system in the documentation.
*/
export type RetrievalSettings = RetrievalSettings1;
/**
* Number of results to initially retrieve from vector database
*/
export type NRetrieve = number;
/**
* Final number of results to use after re-ranking
*/
export type NFinal = number;
/**
* Whether to use re-ranking, which will allow initial selection of n_retrieve results, then will use an LLM to select the top n_final results
*/
export type UseReranking = boolean;
/**
* Number of results to group together when re-ranking. Each group will be processed in parallel.
*/
export type RerankGroupSize = number;
/**
* Files to ignore when indexing the codebase. You can use glob patterns, such as ** /*.py. This is useful for directories that contain generated code, or other directories that are not relevant to the codebase.
*/
export type IgnoreFiles = string[];
/**
* OpenAI API key
*/
export type OpenaiApiKey = string;
/**
* OpenAI API base URL
*/
export type ApiBase1 = string;
/**
* OpenAI API type
*/
export type ApiType = string;
/**
* OpenAI API version
*/
export type ApiVersion = string;
/**
* OpenAI organization ID
*/
export type OrganizationId = string;
/**
* Continue can be deeply customized by editing the `ContinueConfig` object in `~/.continue/config.py` (`%userprofile%\.continue\config.py` for Windows) on your machine. This class is instantiated from the config file for every new session.
*/
export interface ContinueConfig1 {
steps_on_startup?: StepsOnStartup;
disallowed_steps?: DisallowedSteps;
allow_anonymous_telemetry?: AllowAnonymousTelemetry;
models?: Models;
model_roles?: ModelRoles;
system_message?: SystemMessage2;
completion_options?: CompletionOptions1;
custom_commands?: CustomCommands;
slash_commands?: SlashCommands;
on_traceback?: OnTraceback;
policy_override?: PolicyOverride;
context_providers?: ContextProviders;
user_token?: UserToken;
data_server_url?: DataServerUrl;
disable_summaries?: DisableSummaries;
disable_indexing?: DisableIndexing;
retrieval_settings?: RetrievalSettings;
[k: string]: unknown;
}
export interface Step {
name?: Name;
hide?: Hide;
description?: Description;
class_name?: ClassName;
system_message?: SystemMessage;
chat_context?: ChatContext;
manage_own_chat_context?: ManageOwnChatContext;
[k: string]: unknown;
}
export interface ChatMessage {
role: Role;
content?: Content;
name?: Name1;
summary?: Summary;
function_call?: FunctionCall;
[k: string]: unknown;
}
export interface FunctionCall {
name: Name2;
arguments: Arguments;
[k: string]: unknown;
}
export interface LLM {
title?: Title;
unique_id?: UniqueId;
model: Model;
system_message?: SystemMessage1;
context_length?: ContextLength;
completion_options?: CompletionOptions;
request_options?: RequestOptions;
prompt_templates?: PromptTemplates;
api_key?: ApiKey;
api_base?: ApiBase;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
/**
* A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.
*/
export interface PromptTemplates {
[k: string]: unknown;
}
export interface ModelRoles1 {
default: Default;
chat?: Chat;
edit?: Edit;
summarize?: Summarize;
[k: string]: unknown;
}
export interface CustomCommand {
name: Name3;
prompt: Prompt;
description: Description1;
[k: string]: unknown;
}
export interface SlashCommand {
name: Name4;
description: Description2;
step: Step1;
params?: Params;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
/**
* A rule that determines which step to take next
*/
export interface Policy {
[k: string]: unknown;
}
/**
* The ContextProvider class is a plugin that lets you provide new information to the LLM by typing '@'.
* When you type '@', the context provider will be asked to populate a list of options.
* These options will be updated on each keystroke.
* When you hit enter on an option, the context provider will add that item to the autopilot's list of context (which is all stored in the ContextManager object).
*/
export interface ContextProvider {
title: Title1;
ide?: Ide;
display_title: DisplayTitle;
description: Description3;
dynamic: Dynamic;
requires_query?: RequiresQuery;
selected_items?: SelectedItems;
[k: string]: unknown;
}
export interface Ide {
[k: string]: unknown;
}
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem {
description: ContextItemDescription;
content: Content1;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name5;
description: Description4;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}
export interface RetrievalSettings1 {
n_retrieve?: NRetrieve;
n_final?: NFinal;
use_reranking?: UseReranking;
rerank_group_size?: RerankGroupSize;
ignore_files?: IgnoreFiles;
openai_api_key?: OpenaiApiKey;
api_base?: ApiBase1;
api_type?: ApiType;
api_version?: ApiVersion;
organization_id?: OrganizationId;
[k: string]: unknown;
}

View file

@ -1,16 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ContinueError = ContinueError1;
export type Title = string;
export type Message = string;
export interface ContinueError1 {
title: Title;
message: Message;
[k: string]: unknown;
}

View file

@ -1,32 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type FileEdit = FileEdit1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export type Replacement = string;
export interface FileEdit1 {
filepath: Filepath;
range: Range;
replacement: Replacement;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,38 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type FileEditWithFullContents = FileEditWithFullContents1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export type Replacement = string;
export type Filecontents = string;
export interface FileEditWithFullContents1 {
fileEdit: FileEdit;
fileContents: Filecontents;
[k: string]: unknown;
}
export interface FileEdit {
filepath: Filepath;
range: Range;
replacement: Replacement;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,132 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type LLM = LLM1;
/**
* A title that will identify this model in the model selection dropdown
*/
export type Title = string;
/**
* The unique ID of the user.
*/
export type UniqueId = string;
/**
* The name of the model to be used (e.g. gpt-4, codellama)
*/
export type Model = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
/**
* The API key for the LLM provider.
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
export interface LLM1 {
title?: Title;
unique_id?: UniqueId;
model: Model;
system_message?: SystemMessage;
context_length?: ContextLength;
completion_options?: CompletionOptions;
request_options?: RequestOptions;
prompt_templates?: PromptTemplates;
api_key?: ApiKey;
api_base?: ApiBase;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
/**
* A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.
*/
export interface PromptTemplates {
[k: string]: unknown;
}

View file

@ -1,144 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ModelDescription = ModelDescription1;
/**
* The title you wish to give your model.
*/
export type Title = string;
/**
* The provider of the model. This is used to determine the type of model, and how to interact with it.
*/
export type Provider =
| "openai"
| "openai-free-trial"
| "openai-aiohttp"
| "anthropic"
| "together"
| "ollama"
| "huggingface-tgi"
| "huggingface-inference-api"
| "llama.cpp"
| "replicate"
| "text-gen-webui"
| "google-palm"
| "lmstudio"
| "llamafile";
/**
* The name of the model. Used to autodetect prompt template.
*/
export type Model = string;
/**
* OpenAI, Anthropic, Together, or other API key
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
*/
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
export interface ModelDescription1 {
title: Title;
provider: Provider;
model: Model;
api_key?: ApiKey;
api_base?: ApiBase;
context_length?: ContextLength;
template?: Template;
completion_options?: CompletionOptions;
system_message?: SystemMessage;
request_options?: RequestOptions;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}

View file

@ -1,31 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ModelName =
| "gpt-3.5-turbo"
| "gpt-3.5-turbo-16k"
| "gpt-4"
| "gpt-3.5-turbo-0613"
| "gpt-4-32k"
| "gpt-4-1106-preview"
| "mistral-7b"
| "llama2-7b"
| "llama2-13b"
| "codellama-7b"
| "codellama-13b"
| "codellama-34b"
| "phind-codellama-34b"
| "wizardcoder-7b"
| "wizardcoder-13b"
| "wizardcoder-34b"
| "zephyr-7b"
| "codeup-13b"
| "deepseek-1b"
| "deepseek-7b"
| "deepseek-33b"
| "claude-2"
| "chat-bison-001";

View file

@ -1,22 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ModelProvider =
| "openai"
| "openai-free-trial"
| "openai-aiohttp"
| "anthropic"
| "together"
| "ollama"
| "huggingface-tgi"
| "huggingface-inference-api"
| "llama.cpp"
| "replicate"
| "text-gen-webui"
| "google-palm"
| "lmstudio"
| "llamafile";

View file

@ -1,148 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Models = Models1;
/**
* A title that will identify this model in the model selection dropdown
*/
export type Title = string;
/**
* The unique ID of the user.
*/
export type UniqueId = string;
/**
* The name of the model to be used (e.g. gpt-4, codellama)
*/
export type Model = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
/**
* The API key for the LLM provider.
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
export type Saved = (unknown | LLM)[];
export type Temperature1 = number;
export type SystemMessage1 = string;
/**
* Main class that holds the current model configuration
*/
export interface Models1 {
default?: unknown;
summarize?: unknown;
edit?: unknown;
chat?: unknown;
saved?: Saved;
temperature?: Temperature1;
system_message?: SystemMessage1;
[k: string]: unknown;
}
export interface LLM {
title?: Title;
unique_id?: UniqueId;
model: Model;
system_message?: SystemMessage;
context_length?: ContextLength;
completion_options?: CompletionOptions;
request_options?: RequestOptions;
prompt_templates?: PromptTemplates;
api_key?: ApiKey;
api_base?: ApiBase;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
/**
* A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.
*/
export interface PromptTemplates {
[k: string]: unknown;
}

View file

@ -1,97 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type PersistedSessionInfo = PersistedSessionInfo1;
export type StepType = string;
export type Name = string;
export type Description = string;
export type Hide = boolean;
export type Depth = number;
export type Title = string;
export type Message = string;
export type Observations = Observation[];
export type Logs = string[];
export type History = StepDescription[];
export type Name1 = string;
export type Description1 = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content = string;
export type Editing = boolean;
export type Editable = boolean;
export type ContextItems = ContextItem[];
export type Title1 = string;
export type WorkspaceDirectory = string;
export type SessionId = string;
export interface PersistedSessionInfo1 {
session_state: SessionState;
title: Title1;
workspace_directory: WorkspaceDirectory;
session_id: SessionId;
[k: string]: unknown;
}
/**
* Full session history and important state needed for autopilot to Continue
*/
export interface SessionState {
history: History;
context_items: ContextItems;
[k: string]: unknown;
}
export interface StepDescription {
step_type: StepType;
name: Name;
description: Description;
params: Params;
hide: Hide;
depth: Depth;
error?: ContinueError;
observations?: Observations;
logs?: Logs;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface ContinueError {
title: Title;
message: Message;
[k: string]: unknown;
}
export interface Observation {
[k: string]: unknown;
}
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem {
description: ContextItemDescription;
content: Content;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name1;
description: Description1;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,16 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Position = Position1;
export type Line = number;
export type Character = number;
export interface Position1 {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,24 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Range = Range1;
export type Line = number;
export type Character = number;
/**
* A range in a file. 0-indexed.
*/
export interface Range1 {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,30 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type RangeInFile = RangeInFile1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export interface RangeInFile1 {
filepath: Filepath;
range: Range;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,35 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type RangeInFileWithContents = RangeInFileWithContents1;
export type Filepath = string;
export type Line = number;
export type Character = number;
export type Contents = string;
/**
* A range in a file with the contents of the range.
*/
export interface RangeInFileWithContents1 {
filepath: Filepath;
range: Range;
contents: Contents;
[k: string]: unknown;
}
/**
* A range in a file. 0-indexed.
*/
export interface Range {
start: Position;
end: Position;
[k: string]: unknown;
}
export interface Position {
line: Line;
character: Character;
[k: string]: unknown;
}

View file

@ -1,333 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SerializedContinueConfig = SerializedContinueConfig1;
/**
* Steps that are not allowed to be run, and will be skipped if attempted
*/
export type DisallowedSteps = string[];
/**
* 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.
*/
export type AllowAnonymousTelemetry = boolean;
/**
* The title you wish to give your model.
*/
export type Title = string;
/**
* The provider of the model. This is used to determine the type of model, and how to interact with it.
*/
export type Provider =
| "openai"
| "openai-free-trial"
| "openai-aiohttp"
| "anthropic"
| "together"
| "ollama"
| "huggingface-tgi"
| "huggingface-inference-api"
| "llama.cpp"
| "replicate"
| "text-gen-webui"
| "google-palm"
| "lmstudio"
| "llamafile";
/**
* The name of the model. Used to autodetect prompt template.
*/
export type Model = string;
/**
* OpenAI, Anthropic, Together, or other API key
*/
export type ApiKey = string;
/**
* The base URL of the LLM API.
*/
export type ApiBase = string;
/**
* The maximum context length of the LLM in tokens, as counted by count_tokens.
*/
export type ContextLength = number;
/**
* The chat template used to format messages. This is auto-detected for most models, but can be overridden here.
*/
export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek";
/**
* Options for the completion endpoint. Read more about the completion options in the documentation.
*/
export type CompletionOptions = BaseCompletionOptions;
/**
* The temperature of the completion.
*/
export type Temperature = number;
/**
* The top_p of the completion.
*/
export type TopP = number;
/**
* The top_k of the completion.
*/
export type TopK = number;
/**
* The presence penalty Aof the completion.
*/
export type PresencePenalty = number;
/**
* The frequency penalty of the completion.
*/
export type FrequencyPenalty = number;
/**
* The stop tokens of the completion.
*/
export type Stop = string[];
/**
* The maximum number of tokens to generate.
*/
export type MaxTokens = number;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage = string;
/**
* Options for the HTTP request to the LLM.
*/
export type RequestOptions = RequestOptions1;
/**
* Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.
*/
export type Timeout = number;
/**
* Whether to verify SSL certificates for requests.
*/
export type VerifySsl = boolean;
/**
* Path to a custom CA bundle to use when making the HTTP request
*/
export type CaBundlePath = string;
/**
* Proxy URL to use when making the HTTP request
*/
export type Proxy = string;
export type Models = ModelDescription[];
/**
* Roles for models. Each entry should be the title of a model in the models array.
*/
export type ModelRoles = ModelRoles1;
/**
* The default model. If other model roles are not set, they will fall back to default.
*/
export type Default = string;
/**
* The model to use for chat. If not set, will fall back to default.
*/
export type Chat = string;
/**
* The model to use for editing. If not set, will fall back to default.
*/
export type Edit = string;
/**
* The model to use for summarization. If not set, will fall back to default.
*/
export type Summarize = string;
/**
* A system message that will always be followed by the LLM
*/
export type SystemMessage1 = string;
/**
* Default options for completion. These will be overriden by any options set for a specific model.
*/
export type CompletionOptions1 = BaseCompletionOptions;
export type Name = string;
export type Description = string;
export type Step =
| unknown
| (
| "AnswerQuestionChroma"
| "GenerateShellCommandStep"
| "EditHighlightedCodeStep"
| "ShareSessionStep"
| "CommentCodeStep"
| "ClearHistoryStep"
| "StackOverflowStep"
| "OpenConfigStep"
)
| string;
/**
* An array of slash commands that let you map custom Steps to a shortcut.
*/
export type SlashCommands = SlashCommand[];
export type Name1 = string;
export type Prompt = string;
export type Description1 = string;
/**
* 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.
*/
export type CustomCommands = CustomCommand[];
export type Name2 = "diff" | "github" | "terminal" | "open" | "google" | "search" | "url" | "tree";
/**
* A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.
*/
export type ContextProviders = ContextProviderWithParams[];
/**
* An optional token to identify the user.
*/
export type UserToken = string;
/**
* The URL of the server where development data is sent. No data is sent unless you have explicitly set the `user_token` property to a valid token that we have shared.
*/
export type DataServerUrl = string;
/**
* If set to `True`, Continue will not generate summaries for each Step. This can be useful if you want to save on compute.
*/
export type DisableSummaries = boolean;
/**
* If set to `True`, Continue will not index the codebase. This is mainly used for debugging purposes.
*/
export type DisableIndexing = boolean;
/**
* Settings for the retrieval system. Read more about the retrieval system in the documentation.
*/
export type RetrievalSettings = RetrievalSettings1;
/**
* Number of results to initially retrieve from vector database
*/
export type NRetrieve = number;
/**
* Final number of results to use after re-ranking
*/
export type NFinal = number;
/**
* Whether to use re-ranking, which will allow initial selection of n_retrieve results, then will use an LLM to select the top n_final results
*/
export type UseReranking = boolean;
/**
* Number of results to group together when re-ranking. Each group will be processed in parallel.
*/
export type RerankGroupSize = number;
/**
* Files to ignore when indexing the codebase. You can use glob patterns, such as ** /*.py. This is useful for directories that contain generated code, or other directories that are not relevant to the codebase.
*/
export type IgnoreFiles = string[];
/**
* OpenAI API key
*/
export type OpenaiApiKey = string;
/**
* OpenAI API base URL
*/
export type ApiBase1 = string;
/**
* OpenAI API type
*/
export type ApiType = string;
/**
* OpenAI API version
*/
export type ApiVersion = string;
/**
* OpenAI organization ID
*/
export type OrganizationId = string;
export interface SerializedContinueConfig1 {
disallowed_steps?: DisallowedSteps;
allow_anonymous_telemetry?: AllowAnonymousTelemetry;
models?: Models;
model_roles?: ModelRoles;
system_message?: SystemMessage1;
completion_options?: CompletionOptions1;
slash_commands?: SlashCommands;
custom_commands?: CustomCommands;
context_providers?: ContextProviders;
user_token?: UserToken;
data_server_url?: DataServerUrl;
disable_summaries?: DisableSummaries;
disable_indexing?: DisableIndexing;
retrieval_settings?: RetrievalSettings;
[k: string]: unknown;
}
export interface ModelDescription {
title: Title;
provider: Provider;
model: Model;
api_key?: ApiKey;
api_base?: ApiBase;
context_length?: ContextLength;
template?: Template;
completion_options?: CompletionOptions;
system_message?: SystemMessage;
request_options?: RequestOptions;
[k: string]: unknown;
}
export interface BaseCompletionOptions {
temperature?: Temperature;
top_p?: TopP;
top_k?: TopK;
presence_penalty?: PresencePenalty;
frequency_penalty?: FrequencyPenalty;
stop?: Stop;
max_tokens?: MaxTokens;
[k: string]: unknown;
}
export interface RequestOptions1 {
timeout?: Timeout;
verify_ssl?: VerifySsl;
ca_bundle_path?: CaBundlePath;
proxy?: Proxy;
headers?: Headers;
[k: string]: unknown;
}
/**
* Headers to use when making the HTTP request
*/
export interface Headers {
[k: string]: string;
}
export interface ModelRoles1 {
default: Default;
chat?: Chat;
edit?: Edit;
summarize?: Summarize;
[k: string]: unknown;
}
export interface SlashCommand {
name: Name;
description: Description;
step: Step;
params?: Params;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface CustomCommand {
name: Name1;
prompt: Prompt;
description: Description1;
[k: string]: unknown;
}
export interface ContextProviderWithParams {
name: Name2;
params?: Params1;
[k: string]: unknown;
}
export interface Params1 {
[k: string]: unknown;
}
export interface RetrievalSettings1 {
n_retrieve?: NRetrieve;
n_final?: NFinal;
use_reranking?: UseReranking;
rerank_group_size?: RerankGroupSize;
ignore_files?: IgnoreFiles;
openai_api_key?: OpenaiApiKey;
api_base?: ApiBase1;
api_type?: ApiType;
api_version?: ApiVersion;
organization_id?: OrganizationId;
[k: string]: unknown;
}

View file

@ -1,20 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SessionInfo = SessionInfo1;
export type SessionId = string;
export type Title = string;
export type DateCreated = string;
export type WorkspaceDirectory = string;
export interface SessionInfo1 {
session_id: SessionId;
title: Title;
date_created: DateCreated;
workspace_directory?: WorkspaceDirectory;
[k: string]: unknown;
}

View file

@ -1,87 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SessionState = SessionState1;
export type StepType = string;
export type Name = string;
export type Description = string;
export type Hide = boolean;
export type Depth = number;
export type Title = string;
export type Message = string;
export type Observations = Observation[];
export type Logs = string[];
export type History = StepDescription[];
export type Name1 = string;
export type Description1 = string;
export type ProviderTitle = string;
export type ItemId = string;
export type Content = string;
export type Editing = boolean;
export type Editable = boolean;
export type ContextItems = ContextItem[];
/**
* Full session history and important state needed for autopilot to Continue
*/
export interface SessionState1 {
history: History;
context_items: ContextItems;
[k: string]: unknown;
}
export interface StepDescription {
step_type: StepType;
name: Name;
description: Description;
params: Params;
hide: Hide;
depth: Depth;
error?: ContinueError;
observations?: Observations;
logs?: Logs;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface ContinueError {
title: Title;
message: Message;
[k: string]: unknown;
}
export interface Observation {
[k: string]: unknown;
}
/**
* A ContextItem is a single item that is stored in the ContextManager.
*/
export interface ContextItem {
description: ContextItemDescription;
content: Content;
editing?: Editing;
editable?: Editable;
[k: string]: unknown;
}
/**
* A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.
*
* The id can be used to retrieve the ContextItem from the ContextManager.
*/
export interface ContextItemDescription {
name: Name1;
description: Description1;
id: ContextItemId;
[k: string]: unknown;
}
/**
* A ContextItemId is a unique identifier for a ContextItem.
*/
export interface ContextItemId {
provider_title: ProviderTitle;
item_id: ItemId;
[k: string]: unknown;
}

View file

@ -1,61 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SessionUpdate = SessionUpdate1;
export type Index = number;
export type Update = DeltaStep | SetStep | SessionUpdate1;
export type Name = string;
export type Description = string;
export type Observations = Observation[];
export type Logs = string[];
export type StepType = string;
export type Name1 = string;
export type Description1 = string;
export type Hide = boolean;
export type Depth = number;
export type Title = string;
export type Message = string;
export type Observations1 = Observation[];
export type Logs1 = string[];
export type Stop = boolean;
export interface SessionUpdate1 {
index: Index;
update: Update;
stop?: Stop;
[k: string]: unknown;
}
export interface DeltaStep {
name?: Name;
description?: Description;
observations?: Observations;
logs?: Logs;
[k: string]: unknown;
}
export interface Observation {
[k: string]: unknown;
}
export interface SetStep {
step_type?: StepType;
name?: Name1;
description?: Description1;
params?: Params;
hide?: Hide;
depth?: Depth;
error?: ContinueError;
observations?: Observations1;
logs?: Logs1;
[k: string]: unknown;
}
export interface Params {
[k: string]: unknown;
}
export interface ContinueError {
title: Title;
message: Message;
[k: string]: unknown;
}

View file

@ -1,16 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type SlashCommandDescription = SlashCommandDescription1;
export type Name = string;
export type Description = string;
export interface SlashCommandDescription1 {
name: Name;
description: Description;
[k: string]: unknown;
}

View file

@ -1,31 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Traceback = Traceback1;
export type Filepath = string;
export type Lineno = number;
export type Function = string;
export type Code = string;
export type Frames = TracebackFrame[];
export type Message = string;
export type ErrorType = string;
export type FullTraceback = string;
export interface Traceback1 {
frames: Frames;
message: Message;
error_type: ErrorType;
full_traceback?: FullTraceback;
[k: string]: unknown;
}
export interface TracebackFrame {
filepath: Filepath;
lineno: Lineno;
function: Function;
code?: Code;
[k: string]: unknown;
}

View file

@ -1,20 +0,0 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type TracebackFrame = TracebackFrame1;
export type Filepath = string;
export type Lineno = number;
export type Function = string;
export type Code = string;
export interface TracebackFrame1 {
filepath: Filepath;
lineno: Lineno;
function: Function;
code?: Code;
[k: string]: unknown;
}

View file

@ -2,9 +2,8 @@
This is the data that populates the model selection page.
*/
import { ModelName, ModelProvider } from "core/config";
import _ from "lodash";
import { ModelProvider } from "../schema/ModelProvider";
import { ModelName } from "../schema/ModelName";
export function updatedObj(old: any, pathToValue: { [key: string]: any }) {
const newObject = _.cloneDeep(old);

View file

@ -1,3 +1,3 @@
# JSON Schema Definitions
These definitions are generated from the Pydantic models that live in `package/libs/models/main.py`, by entering a `poetry shell` and running from the root of the `continue` repository the command `python3 -m package.libs.models.generate_json_schema.py`. You can then generate matching Typescript types to the `extensions/vscode/schema` directory using `npm run typegen` from the `extension` directory.
These definitions are generated from the Pydantic models that live in `package/libs/models/main.py`, by entering a `poetry shell` and running from the root of the `continue` repository the command `python3 -m package.libs.models.generate_json_schema.py`. Previously you could generate matching Typescript types to the `extensions/vscode/schema` directory using `npm run typegen` from the `extension` directory.