summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-05-23 23:45:12 -0400
committerNate Sesti <sestinj@gmail.com>2023-05-23 23:45:12 -0400
commit27ecedb02ef79ce53bf533e016b00462c44541be (patch)
tree402305113b6f04c3e3b3563b68d32de5ff1c69c8 /schema
downloadsncontinue-27ecedb02ef79ce53bf533e016b00462c44541be.tar.gz
sncontinue-27ecedb02ef79ce53bf533e016b00462c44541be.tar.bz2
sncontinue-27ecedb02ef79ce53bf533e016b00462c44541be.zip
copying from old repo
Diffstat (limited to 'schema')
-rw-r--r--schema/README.md3
-rw-r--r--schema/json/FileEdit.json63
-rw-r--r--schema/json/FileEditWithFullContents.json80
-rw-r--r--schema/json/Position.json24
-rw-r--r--schema/json/Range.json41
-rw-r--r--schema/json/RangeInFile.json58
-rw-r--r--schema/json/Traceback.json63
-rw-r--r--schema/json/TracebackFrame.json33
8 files changed, 365 insertions, 0 deletions
diff --git a/schema/README.md b/schema/README.md
new file mode 100644
index 00000000..6816cbb5
--- /dev/null
+++ b/schema/README.md
@@ -0,0 +1,3 @@
+# JSON Schema Definitions
+
+These definitions are generated from the Pydantic models that live in `package/libs/models/main.py`, by entering a `poetry shell` and running from the root of the `continue` repository the command `python3 -m package.libs.models.generate_json_schema.py`. You can then generate matching Typescript types to the `extension/schema` directory using `npm run typegen` from the `extension` directory.
diff --git a/schema/json/FileEdit.json b/schema/json/FileEdit.json
new file mode 100644
index 00000000..1f7dcb64
--- /dev/null
+++ b/schema/json/FileEdit.json
@@ -0,0 +1,63 @@
+{
+ "title": "FileEdit",
+ "$ref": "#/definitions/continuedev__src__continuedev__models__filesystem_edit__FileEdit",
+ "definitions": {
+ "Position": {
+ "title": "Position",
+ "type": "object",
+ "properties": {
+ "line": {
+ "title": "Line",
+ "type": "integer"
+ },
+ "character": {
+ "title": "Character",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line",
+ "character"
+ ]
+ },
+ "Range": {
+ "title": "Range",
+ "description": "A range in a file. 0-indexed.",
+ "type": "object",
+ "properties": {
+ "start": {
+ "$ref": "#/definitions/Position"
+ },
+ "end": {
+ "$ref": "#/definitions/Position"
+ }
+ },
+ "required": [
+ "start",
+ "end"
+ ]
+ },
+ "continuedev__src__continuedev__models__filesystem_edit__FileEdit": {
+ "title": "FileEdit",
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "range": {
+ "$ref": "#/definitions/Range"
+ },
+ "replacement": {
+ "title": "Replacement",
+ "type": "string"
+ }
+ },
+ "required": [
+ "filepath",
+ "range",
+ "replacement"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/schema/json/FileEditWithFullContents.json b/schema/json/FileEditWithFullContents.json
new file mode 100644
index 00000000..571ea1d3
--- /dev/null
+++ b/schema/json/FileEditWithFullContents.json
@@ -0,0 +1,80 @@
+{
+ "title": "FileEditWithFullContents",
+ "$ref": "#/definitions/continuedev__src__continuedev__models__filesystem_edit__FileEditWithFullContents",
+ "definitions": {
+ "Position": {
+ "title": "Position",
+ "type": "object",
+ "properties": {
+ "line": {
+ "title": "Line",
+ "type": "integer"
+ },
+ "character": {
+ "title": "Character",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line",
+ "character"
+ ]
+ },
+ "Range": {
+ "title": "Range",
+ "description": "A range in a file. 0-indexed.",
+ "type": "object",
+ "properties": {
+ "start": {
+ "$ref": "#/definitions/Position"
+ },
+ "end": {
+ "$ref": "#/definitions/Position"
+ }
+ },
+ "required": [
+ "start",
+ "end"
+ ]
+ },
+ "FileEdit": {
+ "title": "FileEdit",
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "range": {
+ "$ref": "#/definitions/Range"
+ },
+ "replacement": {
+ "title": "Replacement",
+ "type": "string"
+ }
+ },
+ "required": [
+ "filepath",
+ "range",
+ "replacement"
+ ]
+ },
+ "continuedev__src__continuedev__models__filesystem_edit__FileEditWithFullContents": {
+ "title": "FileEditWithFullContents",
+ "type": "object",
+ "properties": {
+ "fileEdit": {
+ "$ref": "#/definitions/FileEdit"
+ },
+ "fileContents": {
+ "title": "Filecontents",
+ "type": "string"
+ }
+ },
+ "required": [
+ "fileEdit",
+ "fileContents"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/schema/json/Position.json b/schema/json/Position.json
new file mode 100644
index 00000000..e550572e
--- /dev/null
+++ b/schema/json/Position.json
@@ -0,0 +1,24 @@
+{
+ "title": "Position",
+ "$ref": "#/definitions/continuedev__src__continuedev__models__main__Position",
+ "definitions": {
+ "continuedev__src__continuedev__models__main__Position": {
+ "title": "Position",
+ "type": "object",
+ "properties": {
+ "line": {
+ "title": "Line",
+ "type": "integer"
+ },
+ "character": {
+ "title": "Character",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line",
+ "character"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/schema/json/Range.json b/schema/json/Range.json
new file mode 100644
index 00000000..52953837
--- /dev/null
+++ b/schema/json/Range.json
@@ -0,0 +1,41 @@
+{
+ "title": "Range",
+ "$ref": "#/definitions/continuedev__src__continuedev__models__main__Range",
+ "definitions": {
+ "Position": {
+ "title": "Position",
+ "type": "object",
+ "properties": {
+ "line": {
+ "title": "Line",
+ "type": "integer"
+ },
+ "character": {
+ "title": "Character",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line",
+ "character"
+ ]
+ },
+ "continuedev__src__continuedev__models__main__Range": {
+ "title": "Range",
+ "description": "A range in a file. 0-indexed.",
+ "type": "object",
+ "properties": {
+ "start": {
+ "$ref": "#/definitions/Position"
+ },
+ "end": {
+ "$ref": "#/definitions/Position"
+ }
+ },
+ "required": [
+ "start",
+ "end"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/schema/json/RangeInFile.json b/schema/json/RangeInFile.json
new file mode 100644
index 00000000..022ca1a8
--- /dev/null
+++ b/schema/json/RangeInFile.json
@@ -0,0 +1,58 @@
+{
+ "title": "RangeInFile",
+ "$ref": "#/definitions/continuedev__src__continuedev__models__filesystem__RangeInFile",
+ "definitions": {
+ "Position": {
+ "title": "Position",
+ "type": "object",
+ "properties": {
+ "line": {
+ "title": "Line",
+ "type": "integer"
+ },
+ "character": {
+ "title": "Character",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "line",
+ "character"
+ ]
+ },
+ "Range": {
+ "title": "Range",
+ "description": "A range in a file. 0-indexed.",
+ "type": "object",
+ "properties": {
+ "start": {
+ "$ref": "#/definitions/Position"
+ },
+ "end": {
+ "$ref": "#/definitions/Position"
+ }
+ },
+ "required": [
+ "start",
+ "end"
+ ]
+ },
+ "continuedev__src__continuedev__models__filesystem__RangeInFile": {
+ "title": "RangeInFile",
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "range": {
+ "$ref": "#/definitions/Range"
+ }
+ },
+ "required": [
+ "filepath",
+ "range"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/schema/json/Traceback.json b/schema/json/Traceback.json
new file mode 100644
index 00000000..c3e0e416
--- /dev/null
+++ b/schema/json/Traceback.json
@@ -0,0 +1,63 @@
+{
+ "title": "Traceback",
+ "$ref": "#/definitions/continuedev__src__continuedev__models__main__Traceback",
+ "definitions": {
+ "TracebackFrame": {
+ "title": "TracebackFrame",
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "lineno": {
+ "title": "Lineno",
+ "type": "integer"
+ },
+ "function": {
+ "title": "Function",
+ "type": "string"
+ },
+ "code": {
+ "title": "Code",
+ "type": "string"
+ }
+ },
+ "required": [
+ "filepath",
+ "lineno",
+ "function"
+ ]
+ },
+ "continuedev__src__continuedev__models__main__Traceback": {
+ "title": "Traceback",
+ "type": "object",
+ "properties": {
+ "frames": {
+ "title": "Frames",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/TracebackFrame"
+ }
+ },
+ "message": {
+ "title": "Message",
+ "type": "string"
+ },
+ "error_type": {
+ "title": "Error Type",
+ "type": "string"
+ },
+ "full_traceback": {
+ "title": "Full Traceback",
+ "type": "string"
+ }
+ },
+ "required": [
+ "frames",
+ "message",
+ "error_type"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/schema/json/TracebackFrame.json b/schema/json/TracebackFrame.json
new file mode 100644
index 00000000..6321e08c
--- /dev/null
+++ b/schema/json/TracebackFrame.json
@@ -0,0 +1,33 @@
+{
+ "title": "TracebackFrame",
+ "$ref": "#/definitions/continuedev__src__continuedev__models__main__TracebackFrame",
+ "definitions": {
+ "continuedev__src__continuedev__models__main__TracebackFrame": {
+ "title": "TracebackFrame",
+ "type": "object",
+ "properties": {
+ "filepath": {
+ "title": "Filepath",
+ "type": "string"
+ },
+ "lineno": {
+ "title": "Lineno",
+ "type": "integer"
+ },
+ "function": {
+ "title": "Function",
+ "type": "string"
+ },
+ "code": {
+ "title": "Code",
+ "type": "string"
+ }
+ },
+ "required": [
+ "filepath",
+ "lineno",
+ "function"
+ ]
+ }
+ }
+} \ No newline at end of file