define types
This commit is contained in:
parent
bd666c5730
commit
ebed592220
1 changed files with 45 additions and 0 deletions
45
core/nextEdit/types.ts
Normal file
45
core/nextEdit/types.ts
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { Position, Range, RangeInFile, TabAutocompleteOptions } from "../";
|
||||
import { AutocompleteCodeSnippet } from "../autocomplete/snippets/types";
|
||||
|
||||
export type RecentlyEditedRange = RangeInFile & {
|
||||
timestamp: number;
|
||||
lines: string[];
|
||||
symbols: Set<string>;
|
||||
};
|
||||
|
||||
export interface AutocompleteInput {
|
||||
isUntitledFile: boolean;
|
||||
completionId: string;
|
||||
filepath: string;
|
||||
pos: Position;
|
||||
recentlyVisitedRanges: AutocompleteCodeSnippet[];
|
||||
recentlyEditedRanges: RecentlyEditedRange[];
|
||||
// Used for notebook files
|
||||
manuallyPassFileContents?: string;
|
||||
// Used for VS Code git commit input box
|
||||
manuallyPassPrefix?: string;
|
||||
selectedCompletionInfo?: {
|
||||
text: string;
|
||||
range: Range;
|
||||
};
|
||||
injectDetails?: string;
|
||||
}
|
||||
|
||||
export interface NextEditOutcome extends TabAutocompleteOptions {
|
||||
accepted?: boolean;
|
||||
time: number;
|
||||
prefix: string;
|
||||
suffix: string;
|
||||
prompt: string;
|
||||
completion: string;
|
||||
modelProvider: string;
|
||||
modelName: string;
|
||||
completionOptions: any;
|
||||
cacheHit: boolean;
|
||||
numLines: number;
|
||||
filepath: string;
|
||||
gitRepo?: string;
|
||||
completionId: string;
|
||||
uniqueId: string;
|
||||
timestamp: number;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue