summaryrefslogtreecommitdiff
path: root/extension/schema/FullState.d.ts
diff options
context:
space:
mode:
authorNate Sesti <33237525+sestinj@users.noreply.github.com>2023-07-26 00:56:29 -0700
committerGitHub <noreply@github.com>2023-07-26 00:56:29 -0700
commitdef8e5612cd4c889a2e26d4152fffcf3d694abdf (patch)
treeca423625619b9d628651bcc9a395ba8f47fa03a6 /extension/schema/FullState.d.ts
parentb759e2dbfe36b3e8873527b9736d64866da9b604 (diff)
parentd9a4ed993aad36464776c093333af1a310e5a492 (diff)
downloadsncontinue-def8e5612cd4c889a2e26d4152fffcf3d694abdf.tar.gz
sncontinue-def8e5612cd4c889a2e26d4152fffcf3d694abdf.tar.bz2
sncontinue-def8e5612cd4c889a2e26d4152fffcf3d694abdf.zip
Merge pull request #297 from continuedev/merge-config-py-TO-main
Merge config py to main
Diffstat (limited to 'extension/schema/FullState.d.ts')
-rw-r--r--extension/schema/FullState.d.ts65
1 files changed, 31 insertions, 34 deletions
diff --git a/extension/schema/FullState.d.ts b/extension/schema/FullState.d.ts
index 1b7b1f3b..0095f41b 100644
--- a/extension/schema/FullState.d.ts
+++ b/extension/schema/FullState.d.ts
@@ -27,18 +27,18 @@ export type CurrentIndex = number;
export type Active1 = boolean;
export type UserInputQueue = string[];
export type DefaultModel = string;
-export type Filepath = string;
-export type Line = number;
-export type Character = number;
-export type Contents = string;
-export type Editing = boolean;
-export type Pinned = boolean;
-export type DisplayName = string;
-export type HighlightedRanges = HighlightedRangeContext[];
export type Name3 = string;
export type Description1 = string;
export type SlashCommands = SlashCommandDescription[];
export type AddingHighlightedCode = boolean;
+export type Name4 = string;
+export type Description2 = string;
+export type ProviderTitle = string;
+export type ItemId = string;
+export type Content1 = string;
+export type Editing = boolean;
+export type Editable = boolean;
+export type SelectedContextItems = ContextItem[];
/**
* A full state of the program, including the history
@@ -48,9 +48,9 @@ export interface FullState1 {
active: Active1;
user_input_queue: UserInputQueue;
default_model: DefaultModel;
- highlighted_ranges: HighlightedRanges;
slash_commands: SlashCommands;
adding_highlighted_code: AddingHighlightedCode;
+ selected_context_items: SelectedContextItems;
[k: string]: unknown;
}
/**
@@ -98,40 +98,37 @@ export interface FunctionCall {
export interface Observation {
[k: string]: unknown;
}
-/**
- * Context for a highlighted range
- */
-export interface HighlightedRangeContext {
- range: RangeInFileWithContents;
- editing: Editing;
- pinned: Pinned;
- display_name: DisplayName;
+export interface SlashCommandDescription {
+ name: Name3;
+ description: Description1;
[k: string]: unknown;
}
/**
- * A range in a file with the contents of the range.
+ * A ContextItem is a single item that is stored in the ContextManager.
*/
-export interface RangeInFileWithContents {
- filepath: Filepath;
- range: Range;
- contents: Contents;
+export interface ContextItem {
+ description: ContextItemDescription;
+ content: Content1;
+ editing?: Editing;
+ editable?: Editable;
[k: string]: unknown;
}
/**
- * A range in a file. 0-indexed.
+ * 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 Range {
- start: Position;
- end: Position;
+export interface ContextItemDescription {
+ name: Name4;
+ description: Description2;
+ id: ContextItemId;
[k: string]: unknown;
}
-export interface Position {
- line: Line;
- character: Character;
- [k: string]: unknown;
-}
-export interface SlashCommandDescription {
- name: Name3;
- description: Description1;
+/**
+ * A ContextItemId is a unique identifier for a ContextItem.
+ */
+export interface ContextItemId {
+ provider_title: ProviderTitle;
+ item_id: ItemId;
[k: string]: unknown;
}