Elffuss BraidHub

kikocis/continue public

86b69ad8aae4 · 40.5 KiBRawPermalink
1import {
2 DataDestination,
3 ModelRole,
4 PromptTemplates,
5} from "@continuedev/config-yaml";
6import Parser from "web-tree-sitter";
7import { CodebaseIndexer } from "./indexing/CodebaseIndexer";
8import { LLMConfigurationStatuses } from "./llm/constants";
9
10declare global {
11 interface Window {
12 ide?: "vscode";
13 windowId: string;
14 serverUrl: string;
15 vscMachineId: string;
16 vscMediaUrl: string;
17 fullColorTheme?: {
18 rules?: {
19 token?: string;
20 foreground?: string;
21 }[];
22 };
23 colorThemeName?: string;
24 workspacePaths?: string[];
25 postIntellijMessage?: (
26 messageType: string,
27 data: any,
28 messageIde: string,
29 ) => void;
30 }
31}
32
33export interface ChunkWithoutID {
34 content: string;
35 startLine: number;
36 endLine: number;
37 signature?: string;
38 otherMetadata?: { [key: string]: any };
39}
40
41export interface Chunk extends ChunkWithoutID {
42 digest: string;
43 filepath: string;
44 index: number; // Index of the chunk in the document at filepath
45}
46
47export interface IndexingProgressUpdate {
48 progress: number;
49 desc: string;
50 shouldClearIndexes?: boolean;
51 status:
52 | "loading"
53 | "waiting"
54 | "indexing"
55 | "done"
56 | "failed"
57 | "paused"
58 | "disabled"
59 | "cancelled";
60 debugInfo?: string;
61 warnings?: string[];
62}
63
64// This is more or less a V2 of IndexingProgressUpdate for docs etc.
65export interface IndexingStatus {
66 id: string;
67 type: "docs";
68 progress: number;
69 description: string;
70 status: "indexing" | "complete" | "paused" | "failed" | "aborted" | "pending";
71 embeddingsProviderId?: string;
72 isReindexing?: boolean;
73 debugInfo?: string;
74 title: string;
75 icon?: string;
76 url?: string;
77}
78
79export type PromptTemplateFunction = (
80 history: ChatMessage[],
81 otherData: Record<string, string>,
82) => string | ChatMessage[];
83
84export type PromptTemplate = string | PromptTemplateFunction;
85
86type RequiredLLMOptions =
87 | "uniqueId"
88 | "contextLength"
89 | "embeddingId"
90 | "maxEmbeddingChunkSize"
91 | "maxEmbeddingBatchSize"
92 | "completionOptions";
93
94export interface ILLM
95 extends Omit<LLMOptions, RequiredLLMOptions>,
96 Required<Pick<LLMOptions, RequiredLLMOptions>> {
97 get providerName(): string;
98 get underlyingProviderName(): string;
99
100 autocompleteOptions?: Partial<TabAutocompleteOptions>;
101
102 complete(
103 prompt: string,
104 signal: AbortSignal,
105 options?: LLMFullCompletionOptions,
106 ): Promise<string>;
107
108 streamComplete(
109 prompt: string,
110 signal: AbortSignal,
111 options?: LLMFullCompletionOptions,
112 ): AsyncGenerator<string, PromptLog>;
113
114 streamFim(
115 prefix: string,
116 suffix: string,
117 signal: AbortSignal,
118 options?: LLMFullCompletionOptions,
119 ): AsyncGenerator<string, PromptLog>;
120
121 streamChat(
122 messages: ChatMessage[],
123 signal: AbortSignal,
124 options?: LLMFullCompletionOptions,
125 messageOptions?: MessageOption,
126 ): AsyncGenerator<ChatMessage, PromptLog>;
127
128 chat(
129 messages: ChatMessage[],
130 signal: AbortSignal,
131 options?: LLMFullCompletionOptions,
132 ): Promise<ChatMessage>;
133
134 compileChatMessages(
135 messages: ChatMessage[],
136 options: LLMFullCompletionOpeions,
137 ): CompiledChatMessagesReport;
138
139 embed(chunks: string[]): Promise<number[][]>;
140
141 rerank(query: string, chunks: Chunk[]): Promise<number[]>;
142
143 countTokens(text: string): number;
144
145 supportsImages(): boolean;
146
147 supportsCompletions(): boolean;
148
149 supportsPrefill(): boolean;
150
151 supportsFim(): boolean;
152
153 listModels(): Promise<string[]>;
154
155 renderPromptTemplate(
156 template: PromptTemplate,
157 history: ChatMessage[],
158 otherData: Record<string, string>,
159 canPutWordsInModelsMouth?: boolean,
160 ): string | ChatMessage[];
161
162 getConfigurationStatus(): LLMConfigurationStatuses;
163}
164
165export interface ModelInstaller {
166 installModel(
167 modelName: string,
168 signal: AbortSignal,
169 progressReporter?: (task: string, increment: number, total: number) => void,
170 ): Promise<any>;
171
172 isInstallingModel(modelName: string): Promise<boolean>;
173}
174
175export type ContextProviderType = "normal" | "query" | "submenu";
176
177export interface ContextProviderDescription {
178 title: ContextProviderName;
179 displayTitle: string;
180 description: string;
181 renderInlineAs?: string;
182 type: ContextProviderType;
183 dependsOnIndexing?: boolean;
184}
185
186export type FetchFunction = (url: string | URL, init?: any) => Promise<any>;
187
188export interface ContextProviderExtras {
189 config: ContinueConfig;
190 fullInput: string;
191 embeddingsProvider: ILLM | null;
192 reranker: ILLM | null;
193 llm: ILLM;
194 ide: IDE;
195 selectedCode: RangeInFile[];
196 fetch: FetchFunction;
197 isInAgentMode: boolean;
198}
199
200export interface LoadSubmenuItemsArgs {
201 config: ContinueConfig;
202 ide: IDE;
203 fetch: FetchFunction;
204}
205
206export interface CustomContextProvider {
207 title: string;
208 displayTitle?: string;
209 description?: string;
210 renderInlineAs?: string;
211 type?: ContextProviderType;
212 loadSubmenuItems?: (
213 args: LoadSubmenuItemsArgs,
214 ) => Promise<ContextSubmenuItem[]>;
215
216 getContextItems(
217 query: string,
218 extras: ContextProviderExtras,
219 ): Promise<ContextItem[]>;
220}
221
222export interface ContextSubmenuItem {
223 id: string;
224 title: string;
225 description: string;
226 icon?: string;
227 metadata?: any;
228}
229
230export interface ContextSubmenuItemWithProvider extends ContextSubmenuItem {
231 providerTitle: string;
232}
233
234export interface SiteIndexingConfig {
235 title: string;
236 startUrl: string;
237 maxDepth?: number;
238 faviconUrl?: string;
239 useLocalCrawling?: boolean;
240}
241
242export interface DocsIndexingDetails {
243 startUrl: string;
244 config: SiteIndexingConfig;
245 indexingStatus: IndexingStatus | undefined;
246 chunks: Chunk[];
247}
248
249export interface IContextProvider {
250 get description(): ContextProviderDescription;
251
252 getContextItems(
253 query: string,
254 extras: ContextProviderExtras,
255 ): Promise<ContextItem[]>;
256
257 loadSubmenuItems(args: LoadSubmenuItemsArgs): Promise<ContextSubmenuItem[]>;
258}
259
260export interface Session {
261 sessionId: string;
262 title: string;
263 workspaceDirectory: string;
264 history: ChatHistoryItem[];
265}
266
267export interface SessionMetadata {
268 sessionId: string;
269 title: string;
270 dateCreated: string;
271 workspaceDirectory: string;
272}
273
274export interface RangeInFile {
275 filepath: string;
276 range: Range;
277}
278
279export interface Location {
280 filepath: string;
281 position: Position;
282}
283
284export interface FileWithContents {
285 filepath: string;
286 contents: string;
287}
288
289export interface Range {
290 start: Position;
291 end: Position;
292}
293
294export interface Position {
295 line: number;
296 character: number;
297}
298
299export interface FileEdit {
300 filepath: string;
301 range: Range;
302 replacement: string;
303}
304
305export interface ContinueError {
306 title: string;
307 message: string;
308}
309
310export interface CompletionOptions extends BaseCompletionOptions {
311 model: string;
312}
313
314export type ChatMessageRole =
315 | "user"
316 | "assistant"
317 | "thinking"
318 | "system"
319 | "tool";
320
321export type TextMessagePart = {
322 type: "text";
323 text: string;
324};
325
326export type ImageMessagePart = {
327 type: "imageUrl";
328 imageUrl: { url: string };
329};
330
331export type MessagePart = TextMessagePart | ImageMessagePart;
332
333export type MessageContent = string | MessagePart[];
334
335export interface ToolCall {
336 id: string;
337 type: "function";
338 function: {
339 name: string;
340 arguments: string;
341 };
342}
343
344export interface ToolCallDelta {
345 id?: string;
346 type?: "function";
347 function?: {
348 name?: string;
349 arguments?: string;
350 };
351}
352
353export interface ToolResultChatMessage {
354 role: "tool";
355 content: string;
356 toolCallId: string;
357}
358
359export interface UserChatMessage {
360 role: "user";
361 content: MessageContent;
362}
363
364export interface ThinkingChatMessage {
365 role: "thinking";
366 content: MessageContent;
367 signature?: string;
368 redactedThinking?: string;
369 toolCalls?: ToolCallDelta[];
370}
371
372/**
373 * This is meant to be equivalent to the OpenAI [usage object](https://platform.openai.com/docs/api-reference/chat/object#chat/object-usage)
374 * but potentially with additional information that is needed for other providers.
375 */
376export interface Usage {
377 completionTokens: number;
378 promptTokens: number;
379 promptTokensDetails?: {
380 cachedTokens?: number;
381 /** This an Anthropic-specific property */
382 cacheWriteTokens?: number;
383 audioTokens?: number;
384 };
385 completionTokensDetails?: {
386 acceptedPredictionTokens?: number;
387 reasoningTokens?: number;
388 rejectedPredictionTokens?: number;
389 audioTokens?: number;
390 };
391}
392
393export interface AssistantChatMessage {
394 role: "assistant";
395 content: MessageContent;
396 toolCalls?: ToolCallDelta[];
397 usage?: Usage;
398}
399
400export interface SystemChatMessage {
401 role: "system";
402 content: string;
403}
404
405export type ChatMessage =
406 | UserChatMessage
407 | AssistantChatMessage
408 | ThinkingChatMessage
409 | SystemChatMessage
410 | ToolResultChatMessage;
411
412export interface ContextItemId {
413 providerTitle: string;
414 itemId: string;
415}
416
417export type ContextItemUriTypes = "file" | "url";
418
419export interface ContextItemUri {
420 type: ContextItemUriTypes;
421 value: string;
422}
423
424export interface ContextItem {
425 content: string;
426 name: string;
427 description: string;
428 editing?: boolean;
429 editable?: boolean;
430 icon?: string;
431 uri?: ContextItemUri;
432 hidden?: boolean;
433 status?: string;
434}
435
436export interface ContextItemWithId extends ContextItem {
437 id: ContextItemId;
438}
439
440export interface InputModifiers {
441 useCodebase: boolean;
442 noContext: boolean;
443}
444
445export interface SymbolWithRange extends RangeInFile {
446 name: string;
447 type: Parser.SyntaxNode["type"];
448 content: string;
449}
450
451export type FileSymbolMap = Record<string, SymbolWithRange[]>;
452
453export interface PromptLog {
454 modelTitle: string;
455 completionOptions: CompletionOptions;
456 prompt: string;
457 completion: string;
458}
459
460export type MessageModes = "chat" | "agent" | "plan";
461
462export type ToolStatus =
463 | "generating" // Tool call arguments are being streamed from the LLM
464 | "generated" // Tool call is complete and ready for execution (awaiting approval)
465 | "calling" // Tool is actively being executed
466 | "errored" // Tool execution failed with an error
467 | "done" // Tool execution completed successfully
468 | "canceled"; // Tool call was canceled by user or system
469
470// Will exist only on "assistant" messages with tool calls
471interface ToolCallState {
472 toolCallId: string;
473 toolCall: ToolCall;
474 status: ToolStatus;
475 parsedArgs: any;
476 output?: ContextItem[];
477 tool?: Tool;
478}
479
480interface Reasoning {
481 active: boolean;
482 text: string;
483 startAt: number;
484 endAt?: number;
485}
486
487export interface ChatHistoryItem {
488 message: ChatMessage;
489 contextItems: ContextItemWithId[];
490 editorState?: any;
491 modifiers?: InputModifiers;
492 promptLogs?: PromptLog[];
493 toolCallStates?: ToolCallState[];
494 isGatheringContext?: boolean;
495 reasoning?: Reasoning;
496 appliedRules?: RuleWithSource[];
497 conversationSummary?: string;
498}
499
500export interface LLMFullCompletionOptions extends BaseCompletionOptions {
501 log?: boolean;
502 model?: string;
503}
504
505export type ToastType = "info" | "error" | "warning";
506
507export interface LLMInteractionBase {
508 interactionId: string;
509 timestamp: number;
510}
511
512export interface LLMInteractionStartChat extends LLMInteractionBase {
513 kind: "startChat";
514 messages: ChatMessage[];
515 options: CompletionOptions;
516 provider: string;
517}
518
519export interface LLMInteractionStartComplete extends LLMInteractionBase {
520 kind: "startComplete";
521 prompt: string;
522 options: CompletionOptions;
523 provider: string;
524}
525
526export interface LLMInteractionStartFim extends LLMInteractionBase {
527 kind: "startFim";
528 prefix: string;
529 suffix: string;
530 options: CompletionOptions;
531 provider: string;
532}
533
534export interface LLMInteractionChunk extends LLMInteractionBase {
535 kind: "chunk";
536 chunk: string;
537}
538
539export interface LLMInteractionMessage extends LLMInteractionBase {
540 kind: "message";
541 message: ChatMessage;
542}
543
544export interface LLMInteractionEnd extends LLMInteractionBase {
545 promptTokens: number;
546 generatedTokens: number;
547 thinkingTokens: number;
548 usage: Usage | undefined;
549}
550
551export interface LLMInteractionSuccess extends LLMInteractionEnd {
552 kind: "success";
553}
554
555export interface LLMInteractionCancel extends LLMInteractionEnd {
556 kind: "cancel";
557}
558
559export interface LLMInteractionError extends LLMInteractionEnd {
560 kind: "error";
561 name: string;
562 message: string;
563}
564
565export type LLMInteractionItem =
566 | LLMInteractionStartChat
567 | LLMInteractionStartComplete
568 | LLMInteractionStartFim
569 | LLMInteractionChunk
570 | LLMInteractionMessage
571 | LLMInteractionSuccess
572 | LLMInteractionCancel
573 | LLMInteractionError;
574
575// When we log a LLM interaction, we want to add the interactionId and timestamp
576// in the logger code, so we need a type that omits these members from *each*
577// member of the union. This can be done by using the distributive behavior of
578// conditional types in Typescript.
579//
580// www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
581// https://stackoverflow.com/questions/57103834/typescript-omit-a-property-from-all-interfaces-in-a-union-but-keep-the-union-s
582type DistributiveOmit<T, K extends PropertyKey> = T extends unknown
583 ? Omit<T, K>
584 : never;
585
586export type LLMInteractionItemDetails = DistributiveOmit<
587 LLMInteractionItem,
588 "interactionId" | "timestamp"
589>;
590
591export interface ILLMInteractionLog {
592 logItem(item: LLMInteractionItemDetails): void;
593}
594
595export interface ILLMLogger {
596 createInteractionLog(): ILLMInteractionLog;
597}
598
599export interface LLMOptions {
600 model: string;
601
602 title?: string;
603 uniqueId?: string;
604 baseAgentSystemMessage?: string;
605 basePlanSystemMessage?: string;
606 baseChatSystemMessage?: string;
607 autocompleteOptions?: Partial<TabAutocompleteOptions>;
608 contextLength?: number;
609 maxStopWords?: number;
610 completionOptions?: CompletionOptions;
611 requestOptions?: RequestOptions;
612 template?: TemplateType;
613 promptTemplates?: Partial<Record<keyof PromptTemplates, PromptTemplate>>;
614 templateMessages?: (messages: ChatMessage[]) => string;
615 logger?: ILLMLogger;
616 llmRequestHook?: (model: string, prompt: string) => any;
617 apiKey?: string;
618
619 // continueProperties
620 apiKeyLocation?: string;
621 envSecretLocations?: Record<string, string>;
622 apiBase?: string;
623 orgScopeId?: string | null;
624
625 onPremProxyUrl?: string | null;
626
627 aiGatewaySlug?: string;
628 cacheBehavior?: CacheBehavior;
629 capabilities?: ModelCapability;
630 roles?: ModelRole[];
631
632 useLegacyCompletionsEndpoint?: boolean;
633
634 // Embedding options
635 embeddingId?: string;
636 maxEmbeddingChunkSize?: number;
637 maxEmbeddingBatchSize?: number;
638
639 // Cloudflare options
640 accountId?: string;
641
642 // Azure options
643 deployment?: string;
644 apiVersion?: string;
645 apiType?: string;
646
647 // AWS options
648 profile?: string;
649 modelArn?: string;
650 accessKeyId?: string;
651 secretAccessKey?: string;
652
653 // AWS and VertexAI Options
654 region?: string;
655
656 // VertexAI and Watsonx Options
657 projectId?: string;
658
659 // IBM watsonx Options
660 deploymentId?: string;
661
662 env?: Record<string, string | number | boolean>;
663}
664
665type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<
666 T,
667 Exclude<keyof T, Keys>
668> &
669 {
670 [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
671 }[Keys];
672
673export interface CustomLLMWithOptionals {
674 options: LLMOptions;
675 streamCompletion?: (
676 prompt: string,
677 signal: AbortSignal,
678 options: CompletionOptions,
679 fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>,
680 ) => AsyncGenerator<string>;
681 streamChat?: (
682 messages: ChatMessage[],
683 signal: AbortSignal,
684 options: CompletionOptions,
685 fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>,
686 ) => AsyncGenerator<ChatMessage | string>;
687 listModels?: (
688 fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>,
689 ) => Promise<string[]>;
690}
691
692/**
693 * The LLM interface requires you to specify either `streamCompletion` or `streamChat` (or both).
694 */
695export type CustomLLM = RequireAtLeastOne<
696 CustomLLMWithOptionals,
697 "streamCompletion" | "streamChat"
698>;
699
700// IDE
701
702export type DiffType = "new" | "old" | "same";
703
704export interface DiffObject {
705 type: DiffType;
706}
707
708export interface DiffLine extends DiffObject {
709 line: string;
710}
711
712interface DiffChar extends DiffObject {
713 char: string;
714 oldIndex?: number; // Character index assuming a flattened line string.
715 newIndex?: number;
716 oldCharIndexInLine?: number; // Character index assuming new lines reset the character index to 0.
717 newCharIndexInLine?: number;
718 oldLineIndex?: number;
719 newLineIndex?: number;
720}
721
722export interface Problem {
723 filepath: string;
724 range: Range;
725 message: string;
726}
727
728export interface Thread {
729 name: string;
730 id: number;
731}
732
733export type IdeType = "vscode" | "jetbrains";
734
735export interface IdeInfo {
736 ideType: IdeType;
737 name: string;
738 version: string;
739 remoteName: string;
740 extensionVersion: string;
741 isPrerelease: boolean;
742}
743
744export interface BranchAndDir {
745 branch: string;
746 directory: string;
747}
748
749export interface IndexTag extends BranchAndDir {
750 artifactId: string;
751}
752
753export enum FileType {
754 Unkown = 0,
755 File = 1,
756 Directory = 2,
757 SymbolicLink = 64,
758}
759
760export interface IdeSettings {
761 remoteConfigServerUrl: string | undefined;
762 remoteConfigSyncPeriod: number;
763 userToken: string;
764 continueTestEnvironment: "none" | "production" | "staging" | "local";
765 pauseCodebaseIndexOnStart: boolean;
766}
767
768export interface FileStats {
769 size: number;
770 lastModified: number;
771}
772
773/** Map of file name to stats */
774export type FileStatsMap = {
775 [path: string]: FileStats;
776};
777
778export interface IDE {
779 getIdeInfo(): Promise<IdeInfo>;
780
781 getIdeSettings(): Promise<IdeSettings>;
782
783 getDiff(includeUnstaged: boolean): Promise<string[]>;
784
785 getClipboardContent(): Promise<{ text: string; copiedAt: string }>;
786
787 isTelemetryEnabled(): Promise<boolean>;
788
789 isWorkspaceRemote(): Promise<boolean>;
790
791 getUniqueId(): Promise<string>;
792
793 getTerminalContents(): Promise<string>;
794
795 getDebugLocals(threadIndex: number): Promise<string>;
796
797 getTopLevelCallStackSources(
798 threadIndex: number,
799 stackDepth: number,
800 ): Promise<string[]>;
801
802 getAvailableThreads(): Promise<Thread[]>;
803
804 getWorkspaceDirs(): Promise<string[]>;
805
806 getWorkspaceConfigs(): Promise<ContinueRcJson[]>;
807
808 fileExists(fileUri: string): Promise<boolean>;
809
810 writeFile(path: string, contents: string): Promise<void>;
811
812 showVirtualFile(title: string, contents: string): Promise<void>;
813
814 openFile(path: string): Promise<void>;
815
816 openUrl(url: string): Promise<void>;
817
818 runCommand(command: string, options?: TerminalOptions): Promise<void>;
819
820 saveFile(fileUri: string): Promise<void>;
821
822 readFile(fileUri: string): Promise<string>;
823
824 readRangeInFile(fileUri: string, range: Range): Promise<string>;
825
826 showLines(fileUri: string, startLine: number, endLine: number): Promise<void>;
827
828 getOpenFiles(): Promise<string[]>;
829
830 getCurrentFile(): Promise<
831 | undefined
832 | {
833 isUntitled: boolean;
834 path: string;
835 contents: string;
836 }
837 >;
838
839 getPinnedFiles(): Promise<string[]>;
840
841 getSearchResults(query: string, maxResults?: number): Promise<string>;
842
843 getFileResults(pattern: string, maxResults?: number): Promise<string[]>;
844
845 subprocess(command: string, cwd?: string): Promise<[string, string]>;
846
847 getProblems(fileUri?: string | undefined): Promise<Problem[]>;
848
849 getBranch(dir: string): Promise<string>;
850
851 getTags(artifactId: string): Promise<IndexTag[]>;
852
853 getRepoName(dir: string): Promise<string | undefined>;
854
855 showToast(
856 type: ToastType,
857 message: string,
858 ...otherParams: any[]
859 ): Promise<any>;
860
861 getGitRootPath(dir: string): Promise<string | undefined>;
862
863 listDir(dir: string): Promise<[string, FileType][]>;
864
865 getFileStats(files: string[]): Promise<FileStatsMap>;
866
867 // Secret Storage
868 readSecrets(keys: string[]): Promise<Record<string, string>>;
869
870 writeSecrets(secrets: { [key: string]: string }): Promise<void>;
871
872 // LSP
873 gotoDefinition(location: Location): Promise<RangeInFile[]>;
874
875 // Callbacks
876 onDidChangeActiveTextEditor(callback: (fileUri: string) => void): void;
877}
878
879// Slash Commands
880
881export interface ContinueSDK {
882 ide: IDE;
883 llm: ILLM;
884 addContextItem: (item: ContextItemWithId) => void;
885 history: ChatMessage[];
886 input: string;
887 params?: { [key: string]: any } | undefined;
888 contextItems: ContextItemWithId[];
889 selectedCode: RangeInFile[];
890 config: ContinueConfig;
891 fetch: FetchFunction;
892 completionOptions?: LLMFullCompletionOptions;
893 abortController: AbortController;
894}
895
896/* Be careful changing SlashCommand or SlashCommandDescription, config.ts can break */
897export interface SlashCommandDescription {
898 name: string;
899 description: string;
900 prompt?: string;
901 params?: { [key: string]: any };
902}
903
904export interface SlashCommand extends SlashCommandDescription {
905 run: (sdk: ContinueSDK) => AsyncGenerator<string | undefined>;
906}
907
908export interface SlashCommandWithSource extends SlashCommandDescription {
909 run?: (sdk: ContinueSDK) => AsyncGenerator<string | undefined>; // Optional - only needed for legacy
910 source: SlashCommandSource;
911 promptFile?: string;
912 overrideSystemMessage?: string;
913}
914
915export type SlashCommandSource =
916 | "built-in-legacy"
917 | "built-in"
918 | "json-custom-command"
919 | "config-ts-slash-command"
920 | "yaml-prompt-block"
921 | "mcp-prompt"
922 | "prompt-file-v1"
923 | "prompt-file-v2"
924 | "invokable-rule";
925
926export interface SlashCommandDescWithSource extends SlashCommandDescription {
927 isLegacy: boolean; // Maps to if slashcommand.run exists
928 source: SlashCommandSource;
929 promptFile?: string;
930 mcpServerName?: string;
931 mcpArgs?: MCPPromptArgs;
932}
933
934// Config
935
936export type StepName =
937 | "AnswerQuestionChroma"
938 | "GenerateShellCommandStep"
939 | "EditHighlightedCodeStep"
940 | "ShareSessionStep"
941 | "CommentCodeStep"
942 | "ClearHistoryStep"
943 | "StackOverflowStep"
944 | "OpenConfigStep"
945 | "GenerateShellCommandStep"
946 | "DraftIssueStep";
947
948export type ContextProviderName =
949 | "diff"
950 | "terminal"
951 | "debugger"
952 | "open"
953 | "google"
954 | "search"
955 | "tree"
956 | "http"
957 | "codebase"
958 | "problems"
959 | "folder"
960 | "jira"
961 | "postgres"
962 | "database"
963 | "code"
964 | "docs"
965 | "gitlab-mr"
966 | "os"
967 | "currentFile"
968 | "greptile"
969 | "outline"
970 | "continue-proxy"
971 | "highlights"
972 | "file"
973 | "issue"
974 | "repo-map"
975 | "url"
976 | "commit"
977 | "web"
978 | "discord"
979 | "clipboard"
980 | string;
981
982export type TemplateType =
983 | "llama2"
984 | "alpaca"
985 | "zephyr"
986 | "phi2"
987 | "phind"
988 | "anthropic"
989 | "chatml"
990 | "none"
991 | "openchat"
992 | "deepseek"
993 | "xwin-coder"
994 | "neural-chat"
995 | "codellama-70b"
996 | "llava"
997 | "gemma"
998 | "granite"
999 | "llama3"
1000 | "codestral";
1001
1002export interface RequestOptions {
1003 timeout?: number;
1004 verifySsl?: boolean;
1005 caBundlePath?: string | string[];
1006 proxy?: string;
1007 headers?: { [key: string]: string };
1008 extraBodyProperties?: { [key: string]: any };
1009 noProxy?: string[];
1010 clientCertificate?: ClientCertificateOptions;
1011}
1012
1013export interface CacheBehavior {
1014 cacheSystemMessage?: boolean;
1015 cacheConversation?: boolean;
1016}
1017
1018export interface ClientCertificateOptions {
1019 cert: string;
1020 key: string;
1021 passphrase?: string;
1022}
1023
1024export interface StepWithParams {
1025 name: StepName;
1026 params: { [key: string]: any };
1027}
1028
1029export interface ContextProviderWithParams {
1030 name: ContextProviderName;
1031 params: { [key: string]: any };
1032}
1033
1034export interface CustomCommand {
1035 name: string;
1036 prompt: string;
1037 description?: string;
1038}
1039
1040export interface Prediction {
1041 type: "content";
1042 content:
1043 | string
1044 | {
1045 type: "text";
1046 text: string;
1047 }[];
1048}
1049
1050export interface ToolExtras {
1051 ide: IDE;
1052 llm: ILLM;
1053 fetch: FetchFunction;
1054 tool: Tool;
1055 toolCallId?: string;
1056 onPartialOutput?: (params: {
1057 toolCallId: string;
1058 contextItems: ContextItem[];
1059 }) => void;
1060 config: ContinueConfig;
1061 codeBaseIndexer?: CodebaseIndexer;
1062}
1063
1064export interface Tool {
1065 type: "function";
1066 function: {
1067 name: string;
1068 description?: string;
1069 parameters?: Record<string, any>;
1070 strict?: boolean | null;
1071 };
1072
1073 displayTitle: string;
1074 wouldLikeTo?: string;
1075 isCurrently?: string;
1076 hasAlready?: string;
1077 readonly: boolean;
1078 isInstant?: boolean;
1079 uri?: string;
1080 faviconUrl?: string;
1081 group: string;
1082 originalFunctionName?: string;
1083}
1084
1085interface ToolChoice {
1086 type: "function";
1087 function: {
1088 name: string;
1089 };
1090}
1091
1092export interface ConfigDependentToolParams {
1093 rules: RuleWithSource[];
1094 enableExperimentalTools: boolean;
1095}
1096
1097export type GetTool = (params: ConfigDependentToolParams) => Tool;
1098
1099export interface BaseCompletionOptions {
1100 temperature?: number;
1101 topP?: number;
1102 topK?: number;
1103 minP?: number;
1104 presencePenalty?: number;
1105 frequencyPenalty?: number;
1106 mirostat?: number;
1107 stop?: string[];
1108 maxTokens?: number;
1109 numThreads?: number;
1110 useMmap?: boolean;
1111 keepAlive?: number;
1112 numGpu?: number;
1113 raw?: boolean;
1114 stream?: boolean;
1115 prediction?: Prediction;
1116 tools?: Tool[];
1117 toolChoice?: ToolChoice;
1118 reasoning?: boolean;
1119 reasoningBudgetTokens?: number;
1120 promptCaching?: boolean;
1121}
1122
1123export interface ModelCapability {
1124 uploadImage?: boolean;
1125 tools?: boolean;
1126}
1127
1128export interface ModelDescription {
1129 title: string;
1130 provider: string;
1131 underlyingProviderName: string;
1132 model: string;
1133 apiKey?: string;
1134
1135 apiBase?: string;
1136 apiKeyLocation?: string;
1137 envSecretLocations?: Record<string, string>;
1138 orgScopeId?: string | null;
1139
1140 onPremProxyUrl?: string | null;
1141
1142 contextLength?: number;
1143 maxStopWords?: number;
1144 template?: TemplateType;
1145 completionOptions?: BaseCompletionOptions;
1146 baseAgentSystemMessage?: string;
1147 basePlanSystemMessage?: string;
1148 baseChatSystemMessage?: string;
1149 requestOptions?: RequestOptions;
1150 promptTemplates?: { [key: string]: string };
1151 cacheBehavior?: CacheBehavior;
1152 capabilities?: ModelCapability;
1153 roles?: ModelRole[];
1154 configurationStatus?: LLMConfigurationStatuses;
1155}
1156
1157export interface JSONEmbedOptions {
1158 apiBase?: string;
1159 apiKey?: string;
1160 model?: string;
1161 deployment?: string;
1162 apiType?: string;
1163 apiVersion?: string;
1164 requestOptions?: RequestOptions;
1165 maxEmbeddingChunkSize?: number;
1166 maxEmbeddingBatchSize?: number;
1167
1168 // AWS options
1169 profile?: string;
1170
1171 // AWS and VertexAI Options
1172 region?: string;
1173
1174 // VertexAI and Watsonx Options
1175 projectId?: string;
1176}
1177
1178export interface EmbeddingsProviderDescription extends JSONEmbedOptions {
1179 provider: string;
1180}
1181
1182export interface RerankerDescription {
1183 name: string;
1184 params?: { [key: string]: any };
1185}
1186
1187// TODO: We should consider renaming this to AutocompleteOptions.
1188export interface TabAutocompleteOptions {
1189 disable: boolean;
1190 maxPromptTokens: number;
1191 debounceDelay: number;
1192 modelTimeout: number;
1193 maxSuffixPercentage: number;
1194 prefixPercentage: number;
1195 transform?: boolean;
1196 template?: string;
1197 multilineCompletions: "always" | "never" | "auto";
1198 slidingWindowPrefixPercentage: number;
1199 slidingWindowSize: number;
1200 useCache: boolean;
1201 onlyMyCode: boolean;
1202 useRecentlyEdited: boolean;
1203 useRecentlyOpened: boolean;
1204 disableInFiles?: string[];
1205 useImports?: boolean;
1206 showWhateverWeHaveAtXMs?: number;
1207 // true = enabled, false = disabled, number = enabled with priority
1208 experimental_includeClipboard: boolean | number;
1209 experimental_includeRecentlyVisitedRanges: boolean | number;
1210 experimental_includeRecentlyEditedRanges: boolean | number;
1211 experimental_includeDiff: boolean | number;
1212}
1213
1214export interface StdioOptions {
1215 type: "stdio";
1216 command: string;
1217 args: string[];
1218 env?: Record<string, string>;
1219 cwd?: string;
1220 requestOptions?: RequestOptions;
1221}
1222
1223export interface WebSocketOptions {
1224 type: "websocket";
1225 url: string;
1226 requestOptions?: RequestOptions;
1227}
1228
1229export interface SSEOptions {
1230 type: "sse";
1231 url: string;
1232 requestOptions?: RequestOptions;
1233}
1234
1235export interface StreamableHTTPOptions {
1236 type: "streamable-http";
1237 url: string;
1238 requestOptions?: RequestOptions;
1239}
1240
1241export type TransportOptions =
1242 | StdioOptions
1243 | WebSocketOptions
1244 | SSEOptions
1245 | StreamableHTTPOptions;
1246
1247export interface MCPOptions {
1248 name: string;
1249 id: string;
1250 transport: TransportOptions;
1251 faviconUrl?: string;
1252 timeout?: number;
1253}
1254
1255export type MCPConnectionStatus =
1256 | "connecting"
1257 | "connected"
1258 | "error"
1259 | "not-connected";
1260
1261export type MCPPromptArgs = {
1262 name: string;
1263 description?: string;
1264 required?: boolean;
1265}[];
1266
1267export interface MCPPrompt {
1268 name: string;
1269 description?: string;
1270 arguments?: MCPPromptArgs;
1271}
1272
1273// Leaving here to ideate on
1274// export type ContinueConfigSource = "local-yaml" | "local-json" | "hub-assistant" | "hub"
1275
1276// https://modelcontextprotocol.io/docs/concepts/resources#direct-resources
1277export interface MCPResource {
1278 name: string;
1279 uri: string;
1280 description?: string;
1281 mimeType?: string;
1282}
1283
1284// https://modelcontextprotocol.io/docs/concepts/resources#resource-templates
1285export interface MCPResourceTemplate {
1286 uriTemplate: string;
1287 name: string;
1288 description?: string;
1289 mimeType?: string;
1290}
1291
1292export interface MCPTool {
1293 name: string;
1294 description?: string;
1295 inputSchema: {
1296 type: "object";
1297 properties?: Record<string, any>;
1298 };
1299}
1300
1301export interface MCPServerStatus extends MCPOptions {
1302 status: MCPConnectionStatus;
1303 errors: string[];
1304
1305 prompts: MCPPrompt[];
1306 tools: MCPTool[];
1307 resources: MCPResource[];
1308 resourceTemplates: MCPResourceTemplate[];
1309}
1310
1311export interface ContinueUIConfig {
1312 codeBlockToolbarPosition?: "top" | "bottom";
1313 fontSize?: number;
1314 displayRawMarkdown?: boolean;
1315 showChatScrollbar?: boolean;
1316 codeWrap?: boolean;
1317 showSessionTabs?: boolean;
1318 autoAcceptEditToolDiffs?: boolean;
1319}
1320
1321export interface ContextMenuConfig {
1322 comment?: string;
1323 docstring?: string;
1324 fix?: string;
1325 optimize?: string;
1326 fixGrammar?: string;
1327}
1328
1329export interface ExperimentalModelRoles {
1330 repoMapFileSelection?: string;
1331 inlineEdit?: string;
1332 applyCodeBlock?: string;
1333}
1334
1335export interface ExperimentalMCPOptions {
1336 transport: TransportOptions;
1337 faviconUrl?: string;
1338 timeout?: number;
1339}
1340
1341export type ApplyStateStatus =
1342 | "not-started" // Apply state created but not necessarily streaming
1343 | "streaming" // Changes are being applied to the file
1344 | "done" // All changes have been applied, awaiting user to accept/reject
1345 | "closed"; // All changes have been applied. Note that for new files, we immediately set the status to "closed"
1346
1347export interface ApplyState {
1348 streamId: string;
1349 status?: ApplyStateStatus;
1350 numDiffs?: number;
1351 filepath?: string;
1352 fileContent?: string;
1353 toolCallId?: string;
1354}
1355
1356export interface StreamDiffLinesPayload {
1357 prefix: string;
1358 highlighted: string;
1359 suffix: string;
1360 input: string;
1361 language: string | undefined;
1362 modelTitle: string | undefined;
1363 includeRulesInSystemMessage: boolean;
1364 fileUri?: string;
1365}
1366
1367export interface HighlightedCodePayload {
1368 rangeInFileWithContents: RangeInFileWithContents;
1369 prompt?: string;
1370 shouldRun?: boolean;
1371}
1372
1373export interface AcceptOrRejectDiffPayload {
1374 filepath?: string;
1375 streamId?: string;
1376}
1377
1378export interface ShowFilePayload {
1379 filepath: string;
1380}
1381
1382export interface ApplyToFilePayload {
1383 streamId: string;
1384 filepath?: string;
1385 text: string;
1386 toolCallId?: string;
1387 isSearchAndReplace?: boolean;
1388}
1389
1390export interface RangeInFileWithContents {
1391 filepath: string;
1392 range: {
1393 start: { line: number; character: number };
1394 end: { line: number; character: number };
1395 };
1396 contents: string;
1397}
1398
1399export interface RangeInFileWithNextEditInfo {
1400 filepath: string;
1401 range: Range;
1402 fileContents: string;
1403 editText: string;
1404 afterCursorPos: Position;
1405 beforeCursorPos: Position;
1406 workspaceDir: string;
1407}
1408
1409export type SetCodeToEditPayload = RangeInFileWithContents | FileWithContents;
1410
1411/**
1412 * Represents the configuration for a quick action in the Code Lens.
1413 * Quick actions are custom commands that can be added to function and class declarations.
1414 */
1415export interface QuickActionConfig {
1416 /**
1417 * The title of the quick action that will display in the Code Lens.
1418 */
1419 title: string;
1420
1421 /**
1422 * The prompt that will be sent to the model when the quick action is invoked,
1423 * with the function or class body concatenated.
1424 */
1425 prompt: string;
1426
1427 /**
1428 * If `true`, the result of the quick action will be sent to the chat panel.
1429 * If `false`, the streamed result will be inserted into the document.
1430 *
1431 * Defaults to `false`.
1432 */
1433 sendToChat: boolean;
1434}
1435
1436export type DefaultContextProvider = ContextProviderWithParams & {
1437 query?: string;
1438};
1439
1440export interface ExperimentalConfig {
1441 contextMenuPrompts?: ContextMenuConfig;
1442 modelRoles?: ExperimentalModelRoles;
1443 defaultContext?: DefaultContextProvider[];
1444 promptPath?: string;
1445 enableExperimentalTools?: boolean;
1446
1447 /**
1448 * Quick actions are a way to add custom commands to the Code Lens of
1449 * function and class declarations.
1450 */
1451 quickActions?: QuickActionConfig[];
1452
1453 /**
1454 * Automatically read LLM chat responses aloud using system TTS models
1455 */
1456 readResponseTTS?: boolean;
1457
1458 /**
1459 * If set to true, we will attempt to pull down and install an instance of Chromium
1460 * that is compatible with the current version of Puppeteer.
1461 * This is needed to crawl a large number of documentation sites that are dynamically rendered.
1462 */
1463 useChromiumForDocsCrawling?: boolean;
1464 modelContextProtocolServers?: ExperimentalMCPOptions[];
1465
1466 /**
1467 * If enabled, will add the current file as context.
1468 */
1469 useCurrentFileAsContext?: boolean;
1470
1471 /**
1472 * If enabled, will enable next edit in place of autocomplete
1473 */
1474 optInNextEditFeature?: boolean;
1475
1476 /**
1477 * If enabled, @codebase will only use tool calling
1478 * instead of embeddings, FTS, recently edited files, etc.
1479 */
1480 codebaseToolCallingOnly?: boolean;
1481}
1482
1483export interface AnalyticsConfig {
1484 provider: string;
1485 url?: string;
1486 clientKey?: string;
1487}
1488
1489export interface JSONModelDescription {
1490 title: string;
1491 provider: string;
1492 underlyingProviderName: string;
1493 model: string;
1494 apiKey?: string;
1495 apiBase?: string;
1496
1497 contextLength?: number;
1498 maxStopWords?: number;
1499 template?: TemplateType;
1500 completionOptions?: BaseCompletionOptions;
1501 systemMessage?: string;
1502 requestOptions?: RequestOptions;
1503 cacheBehavior?: CacheBehavior;
1504
1505 region?: string;
1506 profile?: string;
1507 modelArn?: string;
1508 apiType?: "openai" | "azure";
1509 apiVersion?: string;
1510 deployment?: string;
1511 projectId?: string;
1512 accountId?: string;
1513 aiGatewaySlug?: string;
1514 useLegacyCompletionsEndpoint?: boolean;
1515 deploymentId?: string;
1516}
1517
1518// config.json
1519export interface SerializedContinueConfig {
1520 env?: string[];
1521 allowAnonymousTelemetry?: boolean;
1522 models: JSONModelDescription[];
1523 systemMessage?: string;
1524 completionOptions?: BaseCompletionOptions;
1525 requestOptions?: RequestOptions;
1526 slashCommands?: SlashCommandDescription[];
1527 customCommands?: CustomCommand[];
1528 contextProviders?: ContextProviderWithParams[];
1529 disableIndexing?: boolean;
1530 disableSessionTitles?: boolean;
1531 userToken?: string;
1532 embeddingsProvider?: EmbeddingsProviderDescription;
1533 tabAutocompleteModel?: JSONModelDescription | JSONModelDescription[];
1534 tabAutocompleteOptions?: Partial<TabAutocompleteOptions>;
1535 ui?: ContinueUIConfig;
1536 reranker?: RerankerDescription;
1537 experimental?: ExperimentalConfig;
1538 analytics?: AnalyticsConfig;
1539 docs?: SiteIndexingConfig[];
1540 data?: DataDestination[];
1541}
1542
1543export type ConfigMergeType = "merge" | "overwrite";
1544
1545export type ContinueRcJson = Partial<SerializedContinueConfig> & {
1546 mergeBehavior: ConfigMergeType;
1547};
1548
1549// config.ts - give users simplified interfaces
1550export interface Config {
1551 /** If set to true, Continue will collect anonymous usage data to improve the product. If set to false, we will collect nothing. Read here to learn more: https://docs.continue.dev/telemetry */
1552 allowAnonymousTelemetry?: boolean;
1553 /** Each entry in this array will originally be a JSONModelDescription, the same object from your config.json, but you may add CustomLLMs.
1554 * A CustomLLM requires you only to define an AsyncGenerator that calls the LLM and yields string updates. You can choose to define either `streamCompletion` or `streamChat` (or both).
1555 * Continue will do the rest of the work to construct prompt templates, handle context items, prune context, etc.
1556 */
1557 models: (CustomLLM | JSONModelDescription)[];
1558 /** A system message to be followed by all of your models */
1559 systemMessage?: string;
1560 /** The default completion options for all models */
1561 completionOptions?: BaseCompletionOptions;
1562 /** Request options that will be applied to all models and context providers */
1563 requestOptions?: RequestOptions;
1564 /** The list of slash commands that will be available in the sidebar */
1565 slashCommands?: (SlashCommand | SlashCommandWithSource)[];
1566 /** Each entry in this array will originally be a ContextProviderWithParams, the same object from your config.json, but you may add CustomContextProviders.
1567 * A CustomContextProvider requires you only to define a title and getContextItems function. When you type '@title <query>', Continue will call `getContextItems(query)`.
1568 */
1569 contextProviders?: (CustomContextProvider | ContextProviderWithParams)[];
1570 /** If set to true, Continue will not index your codebase for retrieval */
1571 disableIndexing?: boolean;
1572 /** If set to true, Continue will not make extra requests to the LLM to generate a summary title of each session. */
1573 disableSessionTitles?: boolean;
1574 /** An optional token to identify a user. Not used by Continue unless you write custom coniguration that requires such a token */
1575 userToken?: string;
1576 /** The provider used to calculate embeddings. If left empty, Continue will use transformers.js to calculate the embeddings with all-MiniLM-L6-v2 */
1577 embeddingsProvider?: EmbeddingsProviderDescription | ILLM;
1578 /** The model that Continue will use for tab autocompletions. */
1579 tabAutocompleteModel?:
1580 | CustomLLM
1581 | JSONModelDescription
1582 | (CustomLLM | JSONModelDescription)[];
1583 /** Options for tab autocomplete */
1584 tabAutocompleteOptions?: Partial<TabAutocompleteOptions>;
1585 /** UI styles customization */
1586 ui?: ContinueUIConfig;
1587 /** Options for the reranker */
1588 reranker?: RerankerDescription | ILLM;
1589 /** Experimental configuration */
1590 experimental?: ExperimentalConfig;
1591 /** Analytics configuration */
1592 analytics?: AnalyticsConfig;
1593 data?: DataDestination[];
1594}
1595
1596// in the actual Continue source code
1597export interface ContinueConfig {
1598 allowAnonymousTelemetry?: boolean;
1599 // systemMessage?: string;
1600 completionOptions?: BaseCompletionOptions;
1601 requestOptions?: RequestOptions;
1602 slashCommands: SlashCommandWithSource[];
1603 contextProviders: IContextProvider[];
1604 disableSessionTitles?: boolean;
1605 disableIndexing?: boolean;
1606 userToken?: string;
1607 tabAutocompleteOptions?: Partial<TabAutocompleteOptions>;
1608 ui?: ContinueUIConfig;
1609 experimental?: ExperimentalConfig;
1610 analytics?: AnalyticsConfig;
1611 docs?: SiteIndexingConfig[];
1612 tools: Tool[];
1613 mcpServerStatuses: MCPServerStatus[];
1614 rules: RuleWithSource[];
1615 modelsByRole: Record<ModelRole, ILLM[]>;
1616 selectedModelByRole: Record<ModelRole, ILLM | null>;
1617 data?: DataDestination[];
1618}
1619
1620export interface BrowserSerializedContinueConfig {
1621 allowAnonymousTelemetry?: boolean;
1622 // systemMessage?: string;
1623 completionOptions?: BaseCompletionOptions;
1624 requestOptions?: RequestOptions;
1625 slashCommands: SlashCommandDescWithSource[];
1626 contextProviders: ContextProviderDescription[];
1627 disableIndexing?: boolean;
1628 disableSessionTitles?: boolean;
1629 userToken?: string;
1630 ui?: ContinueUIConfig;
1631 experimental?: ExperimentalConfig;
1632 analytics?: AnalyticsConfig;
1633 docs?: SiteIndexingConfig[];
1634 tools: Tool[];
1635 mcpServerStatuses: MCPServerStatus[];
1636 rules: RuleWithSource[];
1637 usePlatform: boolean;
1638 tabAutocompleteOptions?: Partial<TabAutocompleteOptions>;
1639 modelsByRole: Record<ModelRole, ModelDescription[]>;
1640 selectedModelByRole: Record<ModelRole, ModelDescription | null>;
1641}
1642
1643// DOCS SUGGESTIONS AND PACKAGE INFO
1644export interface FilePathAndName {
1645 path: string;
1646 name: string;
1647}
1648
1649export interface PackageFilePathAndName extends FilePathAndName {
1650 packageRegistry: string; // e.g. npm, pypi
1651}
1652
1653export type ParsedPackageInfo = {
1654 name: string;
1655 packageFile: PackageFilePathAndName;
1656 language: string;
1657 version: string;
1658};
1659
1660export type PackageDetails = {
1661 docsLink?: string;
1662 docsLinkWarning?: string;
1663 title?: string;
1664 description?: string;
1665 repo?: string;
1666 license?: string;
1667};
1668
1669export type PackageDetailsSuccess = PackageDetails & {
1670 docsLink: string;
1671};
1672
1673export type PackageDocsResult = {
1674 packageInfo: ParsedPackageInfo;
1675} & (
1676 | { error: string; details?: never }
1677 | { details: PackageDetailsSuccess; error?: never }
1678);
1679
1680export interface TerminalOptions {
1681 reuseTerminal?: boolean;
1682 terminalName?: string;
1683 waitForCompletion?: boolean;
1684}
1685
1686export type RuleSource =
1687 | "default-chat"
1688 | "default-plan"
1689 | "default-agent"
1690 | "model-options-chat"
1691 | "model-options-plan"
1692 | "model-options-agent"
1693 | "rules-block"
1694 | "colocated-markdown"
1695 | "json-systemMessage"
1696 | ".continuerules";
1697
1698export interface RuleWithSource {
1699 name?: string;
1700 slug?: string;
1701 source: RuleSource;
1702 globs?: string | string[];
1703 regex?: string | string[];
1704 rule: string;
1705 description?: string;
1706 ruleFile?: string;
1707 alwaysApply?: boolean;
1708}
1709export interface CompleteOnboardingPayload {
1710 mode: OnboardingModes;
1711 provider?: string;
1712 apiKey?: string;
1713}
1714
1715export interface CompiledMessagesResult {
1716 compiledChatMessages: ChatMessage[];
1717 didPrune: boolean;
1718 contextPercentage: number;
1719}
1720
1721export interface MessageOption {
1722 precompiled: boolean;
1723}