summaryrefslogtreecommitdiff
path: root/extension/schema/FullState.d.ts
blob: abb0832d4703498ae3301694efd5df4003ee3f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/* eslint-disable */
/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */

export type FullState = FullState1;
export type Name = string;
export type Hide = boolean;
export type Description = string;
export type SystemMessage = string;
export type Role = "assistant" | "user" | "system" | "function";
export type Content = string;
export type Name1 = string;
export type Summary = string;
export type Name2 = string;
export type Arguments = string;
export type ChatContext = ChatMessage[];
export type ManageOwnChatContext = boolean;
export type Depth = number;
export type Deleted = boolean;
export type Active = boolean;
export type Timeline = HistoryNode[];
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;

/**
 * A full state of the program, including the history
 */
export interface FullState1 {
  history: History;
  active: Active1;
  user_input_queue: UserInputQueue;
  default_model: DefaultModel;
  highlighted_ranges: HighlightedRanges;
  slash_commands: SlashCommands;
  adding_highlighted_code: AddingHighlightedCode;
  [k: string]: unknown;
}
/**
 * A history of steps taken and their results
 */
export interface History {
  timeline: Timeline;
  current_index: CurrentIndex;
  [k: string]: unknown;
}
/**
 * A point in history, a list of which make up History
 */
export interface HistoryNode {
  step: Step;
  observation?: Observation;
  depth: Depth;
  deleted?: Deleted;
  active?: Active;
  [k: string]: unknown;
}
export interface Step {
  name?: Name;
  hide?: Hide;
  description?: Description;
  system_message?: SystemMessage;
  chat_context?: ChatContext;
  manage_own_chat_context?: ManageOwnChatContext;
  [k: string]: unknown;
}
export interface ChatMessage {
  role: Role;
  content?: Content;
  name?: Name1;
  summary: Summary;
  function_call?: FunctionCall;
  [k: string]: unknown;
}
export interface FunctionCall {
  name: Name2;
  arguments: Arguments;
  [k: string]: unknown;
}
export interface Observation {
  [k: string]: unknown;
}
/**
 * Context for a highlighted range
 */
export interface HighlightedRangeContext {
  range: RangeInFileWithContents;
  editing: Editing;
  pinned: Pinned;
  display_name: DisplayName;
  [k: string]: unknown;
}
/**
 * A range in a file with the contents of the range.
 */
export interface RangeInFileWithContents {
  filepath: Filepath;
  range: Range;
  contents: Contents;
  [k: string]: unknown;
}
/**
 * A range in a file. 0-indexed.
 */
export interface Range {
  start: Position;
  end: Position;
  [k: string]: unknown;
}
export interface Position {
  line: Line;
  character: Character;
  [k: string]: unknown;
}
export interface SlashCommandDescription {
  name: Name3;
  description: Description1;
  [k: string]: unknown;
}