* docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com> Co-authored-by: Jonah Wagner <jonahwagner231@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];
|
|
"context/removeDocs": [{ baseUrl: string }, 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"
|
|
| "localAfterFreeTrial"
|
|
| "bestExperience";
|
|
},
|
|
void,
|
|
];
|
|
addAutocompleteModel: [{ model: ModelDescription }, void];
|
|
};
|