* allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
141 lines
3.7 KiB
TypeScript
141 lines
3.7 KiB
TypeScript
import type {
|
|
BrowserSerializedContinueConfig,
|
|
ChatMessage,
|
|
ContextItemWithId,
|
|
ContextSubmenuItem,
|
|
DiffLine,
|
|
IdeSettings,
|
|
LLMFullCompletionOptions,
|
|
MessageContent,
|
|
ModelDescription,
|
|
PersistedSessionInfo,
|
|
RangeInFile,
|
|
SerializedContinueConfig,
|
|
SessionInfo,
|
|
SiteIndexingConfig,
|
|
} from "..";
|
|
import type { AutocompleteInput } from "../autocomplete/completionProvider";
|
|
|
|
export type ProtocolGeneratorType<T> = AsyncGenerator<{
|
|
done?: boolean;
|
|
content: T;
|
|
}>;
|
|
|
|
export interface ListHistoryOptions {
|
|
offset?: number;
|
|
limit?: number;
|
|
}
|
|
|
|
export type ToCoreFromIdeOrWebviewProtocol = {
|
|
"update/modelChange": [string, void];
|
|
"update/selectTabAutocompleteModel": [string, void];
|
|
|
|
// Special
|
|
ping: [string, string];
|
|
abort: [undefined, void];
|
|
|
|
// History
|
|
"history/list": [ListHistoryOptions, SessionInfo[]];
|
|
"history/delete": [{ id: string }, void];
|
|
"history/load": [{ id: string }, PersistedSessionInfo];
|
|
"history/save": [PersistedSessionInfo, void];
|
|
"devdata/log": [{ tableName: string; data: any }, void];
|
|
"config/addOpenAiKey": [string, void];
|
|
"config/addModel": [
|
|
{ model: SerializedContinueConfig["models"][number] },
|
|
void,
|
|
];
|
|
"config/newPromptFile": [undefined, void];
|
|
"config/ideSettingsUpdate": [IdeSettings, void];
|
|
"config/getBrowserSerialized": [undefined, BrowserSerializedContinueConfig];
|
|
"config/deleteModel": [{ title: string }, void];
|
|
"config/reload": [undefined, BrowserSerializedContinueConfig];
|
|
"context/getContextItems": [
|
|
{
|
|
name: string;
|
|
query: string;
|
|
fullInput: string;
|
|
selectedCode: RangeInFile[];
|
|
},
|
|
ContextItemWithId[],
|
|
];
|
|
"context/loadSubmenuItems": [{ title: string }, ContextSubmenuItem[]];
|
|
"autocomplete/complete": [AutocompleteInput, string[]];
|
|
"context/addDocs": [SiteIndexingConfig, void];
|
|
"autocomplete/cancel": [undefined, void];
|
|
"autocomplete/accept": [{ completionId: string }, void];
|
|
"command/run": [
|
|
{
|
|
input: string;
|
|
history: ChatMessage[];
|
|
modelTitle: string;
|
|
slashCommandName: string;
|
|
contextItems: ContextItemWithId[];
|
|
params: any;
|
|
historyIndex: number;
|
|
selectedCode: RangeInFile[];
|
|
},
|
|
ProtocolGeneratorType<string>,
|
|
];
|
|
"llm/complete": [
|
|
{
|
|
prompt: string;
|
|
completionOptions: LLMFullCompletionOptions;
|
|
title: string;
|
|
},
|
|
string,
|
|
];
|
|
"llm/listModels": [{ title: string }, string[] | undefined];
|
|
"llm/streamComplete": [
|
|
{
|
|
prompt: string;
|
|
completionOptions: LLMFullCompletionOptions;
|
|
title: string;
|
|
},
|
|
ProtocolGeneratorType<string>,
|
|
];
|
|
"llm/streamChat": [
|
|
{
|
|
messages: ChatMessage[];
|
|
completionOptions: LLMFullCompletionOptions;
|
|
title: string;
|
|
},
|
|
ProtocolGeneratorType<MessageContent>,
|
|
];
|
|
streamDiffLines: [
|
|
{
|
|
prefix: string;
|
|
highlighted: string;
|
|
suffix: string;
|
|
input: string;
|
|
language: string | undefined;
|
|
modelTitle: string | undefined;
|
|
},
|
|
ProtocolGeneratorType<DiffLine>,
|
|
];
|
|
"stats/getTokensPerDay": [
|
|
undefined,
|
|
{ day: string; promptTokens: number; generatedTokens: number }[],
|
|
];
|
|
"stats/getTokensPerModel": [
|
|
undefined,
|
|
{ model: string; promptTokens: number; generatedTokens: number }[],
|
|
];
|
|
"index/setPaused": [boolean, void];
|
|
"index/forceReIndex": [undefined | string, void];
|
|
"index/indexingProgressBarInitialized": [undefined, void];
|
|
completeOnboarding: [
|
|
{
|
|
mode:
|
|
| "local"
|
|
| "apiKeys"
|
|
| "custom"
|
|
| "freeTrial"
|
|
| "localExistingUser"
|
|
| "optimizedExistingUser"
|
|
| "localAfterFreeTrial";
|
|
},
|
|
void,
|
|
];
|
|
addAutocompleteModel: [{ model: ModelDescription }, void];
|
|
};
|