summaryrefslogtreecommitdiff
path: root/extension/schema/FullState.d.ts
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-22 22:37:13 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-22 22:37:13 -0700
commit4d7e72970f770eb49627589fb142c93dfb6fd73b (patch)
tree7c85fb17a9e10ac8e387a001f021aa45c8c46582 /extension/schema/FullState.d.ts
parent007780d6d60095d4e0b238358ec26b2ec776b73e (diff)
downloadsncontinue-4d7e72970f770eb49627589fb142c93dfb6fd73b.tar.gz
sncontinue-4d7e72970f770eb49627589fb142c93dfb6fd73b.tar.bz2
sncontinue-4d7e72970f770eb49627589fb142c93dfb6fd73b.zip
@ feature (very large commit)
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;
}