diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-08-20 20:02:07 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-08-20 20:02:07 -0700 |
commit | c98f860460767fe14f8fbf139150b1bd1ee2ff12 (patch) | |
tree | 6a88fb4aaa733892d9409324f66505c4263c7c19 | |
parent | 84ec574e182ec441e95d13c3543a934e0a036228 (diff) | |
download | sncontinue-c98f860460767fe14f8fbf139150b1bd1ee2ff12.tar.gz sncontinue-c98f860460767fe14f8fbf139150b1bd1ee2ff12.tar.bz2 sncontinue-c98f860460767fe14f8fbf139150b1bd1ee2ff12.zip |
feat: :sparkles: saved context groups
24 files changed, 1407 insertions, 1141 deletions
diff --git a/continuedev/src/continuedev/core/autopilot.py b/continuedev/src/continuedev/core/autopilot.py index ded120d2..2e255198 100644 --- a/continuedev/src/continuedev/core/autopilot.py +++ b/continuedev/src/continuedev/core/autopilot.py @@ -1,3 +1,5 @@ +import json +import os import time import traceback from functools import cached_property @@ -9,6 +11,7 @@ from pydantic import root_validator from ..libs.util.create_async_task import create_async_task from ..libs.util.logging import logger +from ..libs.util.paths import getSavedContextGroupsPath from ..libs.util.queue import AsyncSubscriptionQueue from ..libs.util.strings import remove_quotes_and_escapes from ..libs.util.telemetry import posthog_logger @@ -30,6 +33,7 @@ from ..server.ide_protocol import AbstractIdeProtocolServer from .context import ContextManager from .main import ( Context, + ContextItem, ContinueCustomException, FullState, History, @@ -111,6 +115,21 @@ class Autopilot(ContinueBaseModel): self.history = full_state.history self.session_info = full_state.session_info + # Load saved context groups + context_groups_file = getSavedContextGroupsPath() + try: + with open(context_groups_file, "r") as f: + json_ob = json.load(f) + for title, context_group in json_ob.items(): + self._saved_context_groups[title] = [ + ContextItem(**item) for item in context_group + ] + except Exception as e: + logger.warning( + f"Failed to load saved_context_groups.json: {e}. Reverting to empty list." + ) + self._saved_context_groups = {} + self.started = True class Config: @@ -139,6 +158,7 @@ class Autopilot(ContinueBaseModel): if self.context_manager is not None else [], session_info=self.session_info, + saved_context_groups=self._saved_context_groups, ) self.full_state = full_state return full_state @@ -521,3 +541,37 @@ class Autopilot(ContinueBaseModel): async def select_context_item(self, id: str, query: str): await self.context_manager.select_context_item(id, query) await self.update_subscribers() + + _saved_context_groups: Dict[str, List[ContextItem]] = {} + + async def save_context_group(self, title: str, context_items: List[ContextItem]): + self._saved_context_groups[title] = context_items + await self.update_subscribers() + + # Update saved context groups + context_groups_file = getSavedContextGroupsPath() + if os.path.exists(context_groups_file): + with open(context_groups_file, "w") as f: + dict_to_save = { + title: [item.dict() for item in context_items] + for title, context_items in self._saved_context_groups.items() + } + json.dump(dict_to_save, f) + + posthog_logger.capture_event( + "save_context_group", {"title": title, "length": len(context_items)} + ) + + async def select_context_group(self, id: str): + if id not in self._saved_context_groups: + logger.warning(f"Context group {id} not found") + return + context_group = self._saved_context_groups[id] + await self.context_manager.clear_context() + for item in context_group: + await self.context_manager.manually_add_context_item(item) + await self.update_subscribers() + + posthog_logger.capture_event( + "select_context_group", {"title": id, "length": len(context_group)} + ) diff --git a/continuedev/src/continuedev/core/context.py b/continuedev/src/continuedev/core/context.py index e5d6e13b..7172883f 100644 --- a/continuedev/src/continuedev/core/context.py +++ b/continuedev/src/continuedev/core/context.py @@ -121,6 +121,13 @@ class ContextProvider(BaseModel): if new_item := await self.get_item(id, query): self.selected_items.append(new_item) + async def manually_add_context_item(self, context_item: ContextItem): + for item in self.selected_items: + if item.description.id.item_id == context_item.description.id.item_id: + return + + self.selected_items.append(context_item) + class ContextManager: """ @@ -278,6 +285,17 @@ class ContextManager: for provider in self.context_providers.values(): await self.context_providers[provider.title].clear_context() + async def manually_add_context_item(self, item: ContextItem): + """ + Adds the given ContextItem to the list of ContextItems. + """ + if item.description.id.provider_title not in self.provider_titles: + return + + await self.context_providers[ + item.description.id.provider_title + ].manually_add_context_item(item) + """ Should define "ArgsTransformer" and "PromptTransformer" classes for the different LLMs. A standard way for them to ingest the diff --git a/continuedev/src/continuedev/core/main.py b/continuedev/src/continuedev/core/main.py index 53440dae..e4ee7668 100644 --- a/continuedev/src/continuedev/core/main.py +++ b/continuedev/src/continuedev/core/main.py @@ -287,6 +287,7 @@ class FullState(ContinueBaseModel): adding_highlighted_code: bool selected_context_items: List[ContextItem] session_info: Optional[SessionInfo] = None + saved_context_groups: Dict[str, List[ContextItem]] = {} class ContinueSDK: diff --git a/continuedev/src/continuedev/libs/util/paths.py b/continuedev/src/continuedev/libs/util/paths.py index 93ab16db..a411c5c3 100644 --- a/continuedev/src/continuedev/libs/util/paths.py +++ b/continuedev/src/continuedev/libs/util/paths.py @@ -75,3 +75,12 @@ def getLogFilePath(): path = os.path.join(getGlobalFolderPath(), "continue.log") os.makedirs(os.path.dirname(path), exist_ok=True) return path + + +def getSavedContextGroupsPath(): + path = os.path.join(getGlobalFolderPath(), "saved_context_groups.json") + os.makedirs(os.path.dirname(path), exist_ok=True) + if not os.path.exists(path): + with open(path, "w") as f: + f.write("\{\}") + return path diff --git a/continuedev/src/continuedev/plugins/context_providers/highlighted_code.py b/continuedev/src/continuedev/plugins/context_providers/highlighted_code.py index ed293124..504764b9 100644 --- a/continuedev/src/continuedev/plugins/context_providers/highlighted_code.py +++ b/continuedev/src/continuedev/plugins/context_providers/highlighted_code.py @@ -11,6 +11,7 @@ from ...core.context import ( ) from ...core.main import ChatMessage from ...models.filesystem import RangeInFileWithContents +from ...models.main import Range class HighlightedRangeContextItem(BaseModel): @@ -257,3 +258,21 @@ class HighlightedCodeContextProvider(ContextProvider): self, id: ContextItemId, query: str, prev: List[ContextItem] = None ) -> List[ContextItem]: raise NotImplementedError() + + async def manually_add_context_item(self, context_item: ContextItem): + full_file_content = await self.ide.readFile( + context_item.description.description + ) + self.highlighted_ranges.append( + HighlightedRangeContextItem( + rif=RangeInFileWithContents( + filepath=context_item.description.description, + range=Range.from_lines_snippet_in_file( + content=full_file_content, + snippet=context_item.content, + ), + contents=context_item.content, + ), + item=context_item, + ) + ) diff --git a/continuedev/src/continuedev/server/gui.py b/continuedev/src/continuedev/server/gui.py index 7497e777..a4c45a06 100644 --- a/continuedev/src/continuedev/server/gui.py +++ b/continuedev/src/continuedev/server/gui.py @@ -8,6 +8,7 @@ from pydantic import BaseModel from starlette.websockets import WebSocketDisconnect, WebSocketState from uvicorn.main import Server +from ..core.main import ContextItem from ..libs.util.create_async_task import create_async_task from ..libs.util.logging import logger from ..libs.util.queue import AsyncSubscriptionQueue @@ -104,6 +105,12 @@ class GUIProtocolServer(AbstractGUIProtocolServer): self.load_session(data.get("session_id", None)) elif message_type == "edit_step_at_index": self.edit_step_at_index(data.get("user_input", ""), data["index"]) + elif message_type == "save_context_group": + self.save_context_group( + data["title"], [ContextItem(**item) for item in data["context_items"]] + ) + elif message_type == "select_context_group": + self.select_context_group(data["id"]) def on_main_input(self, input: str): # Do something with user input @@ -186,6 +193,17 @@ class GUIProtocolServer(AbstractGUIProtocolServer): posthog_logger.capture_event("load_session", {"session_id": session_id}) + def save_context_group(self, title: str, context_items: List[ContextItem]): + create_async_task( + self.session.autopilot.save_context_group(title, context_items), + self.on_error, + ) + + def select_context_group(self, id: str): + create_async_task( + self.session.autopilot.select_context_group(id), self.on_error + ) + @router.websocket("/ws") async def websocket_endpoint( diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 0cf2bc19..c407a779 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -7,6 +7,8 @@ import React, { import { useCombobox } from "downshift"; import styled from "styled-components"; import { + Button, + TextInput, defaultBorderRadius, lightGray, secondaryDark, @@ -15,12 +17,20 @@ import { } from "."; import PillButton from "./PillButton"; import HeaderButtonWithText from "./HeaderButtonWithText"; -import { DocumentPlusIcon } from "@heroicons/react/24/outline"; +import { + BookmarkIcon, + DocumentPlusIcon, + FolderArrowDownIcon, +} from "@heroicons/react/24/outline"; import { ContextItem } from "../../../schema/FullState"; import { postVscMessage } from "../vscode"; import { GUIClientContext } from "../App"; import { MeiliSearch } from "meilisearch"; -import { setBottomMessage } from "../redux/slices/uiStateSlice"; +import { + setBottomMessage, + setDialogMessage, + setShowDialog, +} from "../redux/slices/uiStateSlice"; import { useDispatch, useSelector } from "react-redux"; import { RootStore } from "../redux/store"; @@ -29,6 +39,38 @@ const SEARCH_INDEX_NAME = "continue_context_items"; // #region styled components const mainInputFontSize = 13; +const MiniPillSpan = styled.span` + padding: 3px; + padding-left: 6px; + padding-right: 6px; + border-radius: ${defaultBorderRadius}; + color: ${vscForeground}; + background-color: #fff3; + overflow: hidden; + font-size: 12px; + display: flex; + align-items: center; + text-align: center; + justify-content: center; +`; + +const ContextGroupSelectDiv = styled.div` + display: flex; + align-items: center; + gap: 8px; + padding: 8px; + border-radius: ${defaultBorderRadius}; + background-color: ${secondaryDark}; + color: ${vscForeground}; + margin-top: 8px; + cursor: pointer; + + &:hover { + background-color: ${vscBackground}; + color: ${vscForeground}; + } +`; + const EmptyPillDiv = styled.div` padding: 4px; padding-left: 8px; @@ -137,6 +179,9 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { const workspacePaths = useSelector( (state: RootStore) => state.config.workspacePaths ); + const savedContextGroups = useSelector( + (state: RootStore) => state.serverState.saved_context_groups + ); const [history, setHistory] = React.useState<string[]>([]); // The position of the current command you are typing now, so the one that will be appended to history once you press enter @@ -328,6 +373,87 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { }; }, [inputRef.current]); + const showSelectContextGroupDialog = () => { + dispatch( + setDialogMessage( + <div className="px-4"> + <h2>Saved Context Groups</h2> + + {savedContextGroups && Object.keys(savedContextGroups).length > 0 ? ( + <div className="overflow-scroll"> + {Object.keys(savedContextGroups).map((key: string) => { + const contextGroup = savedContextGroups[key]; + return ( + <ContextGroupSelectDiv + onClick={() => { + dispatch(setDialogMessage(undefined)); + dispatch(setShowDialog(false)); + client?.selectContextGroup(key); + }} + > + <b>{key}: </b> + + {contextGroup.map((contextItem) => { + return ( + <MiniPillSpan> + {contextItem.description.name} + </MiniPillSpan> + ); + })} + </ContextGroupSelectDiv> + ); + })} + </div> + ) : ( + <div>No saved context groups</div> + )} + <Button + className="ml-auto" + onClick={() => { + dispatch(setDialogMessage(undefined)); + dispatch(setShowDialog(false)); + }} + > + Cancel + </Button> + </div> + ) + ); + dispatch(setShowDialog(true)); + }; + + const showDialogToSaveContextGroup = () => { + let inputElement: HTMLInputElement | null = null; + dispatch( + setDialogMessage( + <div> + <TextInput + defaultValue="My Context Group" + type="text" + ref={(input) => { + inputElement = input; + }} + /> + <br /> + <Button + className="ml-auto" + onClick={() => { + dispatch(setDialogMessage(undefined)); + dispatch(setShowDialog(false)); + const title = inputElement + ? inputElement.value + : "My Context Group"; + client?.saveContextGroup(title, props.selectedContextItems); + }} + > + Create + </Button> + </div> + ) + ); + dispatch(setShowDialog(true)); + }; + return ( <> <div @@ -354,32 +480,65 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { /> ); })} - {props.selectedContextItems.length > 0 && - (props.addingHighlightedCode ? ( - <EmptyPillDiv - onClick={() => { - props.onToggleAddContext(); - }} - > - Highlight code section - </EmptyPillDiv> - ) : ( + <HeaderButtonWithText + text="Load bookmarked context" + onClick={() => { + showSelectContextGroupDialog(); + }} + className="pill-button focus:outline-none focus:border-red-600 focus:border focus:border-solid" + onKeyDown={(e: KeyboardEvent) => { + e.preventDefault(); + if (e.key === "Enter") { + showSelectContextGroupDialog(); + } + }} + > + <FolderArrowDownIcon width="1.4em" height="1.4em" /> + </HeaderButtonWithText> + {props.selectedContextItems.length > 0 && ( + <> <HeaderButtonWithText - text="Add more code to context" + text="Bookmark context" onClick={() => { - props.onToggleAddContext(); + showDialogToSaveContextGroup(); }} className="pill-button focus:outline-none focus:border-red-600 focus:border focus:border-solid" onKeyDown={(e: KeyboardEvent) => { e.preventDefault(); if (e.key === "Enter") { - props.onToggleAddContext(); + showDialogToSaveContextGroup(); } }} > - <DocumentPlusIcon width="1.4em" height="1.4em" /> + <BookmarkIcon width="1.4em" height="1.4em" /> </HeaderButtonWithText> - ))} + {props.addingHighlightedCode ? ( + <EmptyPillDiv + onClick={() => { + props.onToggleAddContext(); + }} + > + Highlight code section + </EmptyPillDiv> + ) : ( + <HeaderButtonWithText + text="Add more code to context" + onClick={() => { + props.onToggleAddContext(); + }} + className="pill-button focus:outline-none focus:border-red-600 focus:border focus:border-solid" + onKeyDown={(e: KeyboardEvent) => { + e.preventDefault(); + if (e.key === "Enter") { + props.onToggleAddContext(); + } + }} + > + <DocumentPlusIcon width="1.4em" height="1.4em" /> + </HeaderButtonWithText> + )} + </> + )} </div> <div className="flex px-2" ref={divRef} hidden={!downshiftProps.isOpen}> <MainTextInput @@ -516,7 +675,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { <> <br /> <pre style={{ color: lightGray }}> - {item.content.split('\n').slice(0, 5).join('\n')} + {item.content.split("\n").slice(0, 5).join("\n")} </pre> </> )} diff --git a/extension/react-app/src/components/Layout.tsx b/extension/react-app/src/components/Layout.tsx index 86192afb..eee92ff7 100644 --- a/extension/react-app/src/components/Layout.tsx +++ b/extension/react-app/src/components/Layout.tsx @@ -112,15 +112,13 @@ const Layout = () => { <Onboarding /> <TextDialog showDialog={showDialog} - onEnter={(text) => { - client?.sendMainInput(`/feedback ${text}`); + onEnter={() => { dispatch(setShowDialog(false)); }} onClose={() => { dispatch(setShowDialog(false)); }} message={dialogMessage} - entryOn={dialogEntryOn} /> <Outlet /> diff --git a/extension/react-app/src/components/TextDialog.tsx b/extension/react-app/src/components/TextDialog.tsx index 41f811e8..7fcc41f1 100644 --- a/extension/react-app/src/components/TextDialog.tsx +++ b/extension/react-app/src/components/TextDialog.tsx @@ -54,20 +54,10 @@ const P = styled.p` const TextDialog = (props: { showDialog: boolean; - onEnter: (text: string) => void; + onEnter: () => void; onClose: () => void; message?: string | JSX.Element; - entryOn?: boolean; }) => { - const [text, setText] = useState(""); - const textAreaRef = React.createRef<HTMLTextAreaElement>(); - - useEffect(() => { - if (textAreaRef.current) { - textAreaRef.current.focus(); - } - }, [props.showDialog]); - return ( <ScreenCover onClick={() => { @@ -120,36 +110,6 @@ const TextDialog = (props: { ) : ( props.message )} - {props.entryOn && ( - <> - <TextArea - rows={10} - ref={textAreaRef} - onKeyDown={(e) => { - if ( - e.key === "Enter" && - isMetaEquivalentKeyPressed(e) && - textAreaRef.current - ) { - props.onEnter(textAreaRef.current.value); - setText(""); - } else if (e.key === "Escape") { - props.onClose(); - } - }} - /> - <Button - onClick={() => { - if (textAreaRef.current) { - props.onEnter(textAreaRef.current.value); - setText(""); - } - }} - > - Enter - </Button> - </> - )} </Dialog> </DialogContainer> </ScreenCover> diff --git a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts index 804362aa..2e8aaeef 100644 --- a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts +++ b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts @@ -1,4 +1,4 @@ -import { ContextItemId } from "../../../schema/FullState"; +import { ContextItem, ContextItemId } from "../../../schema/FullState"; abstract class AbstractContinueGUIClientProtocol { abstract sendMainInput(input: string): void; @@ -36,6 +36,10 @@ abstract class AbstractContinueGUIClientProtocol { abstract onReconnectAtSession(session_id: string): void; abstract editStepAtIndex(userInput: string, index: number): void; + + abstract saveContextGroup(title: string, contextItems: ContextItem[]): void; + + abstract selectContextGroup(id: string): void; } export default AbstractContinueGUIClientProtocol; diff --git a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts index 82aeee28..aa558adb 100644 --- a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts +++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts @@ -1,4 +1,4 @@ -import { ContextItemId } from "../../../schema/FullState"; +import { ContextItem, ContextItemId } from "../../../schema/FullState"; import AbstractContinueGUIClientProtocol from "./AbstractContinueGUIClientProtocol"; import { Messenger, WebsocketMessenger } from "./messenger"; import { VscodeMessenger } from "./vscodeMessenger"; @@ -132,6 +132,17 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol { index, }); } + + saveContextGroup(title: string, contextItems: ContextItem[]): void { + this.messenger?.send("save_context_group", { + context_items: contextItems, + title, + }); + } + + selectContextGroup(id: string): void { + this.messenger?.send("select_context_group", { id }); + } } export default ContinueGUIClientProtocol; diff --git a/extension/schema/FullState.d.ts b/extension/schema/FullState.d.ts index 6f9304fe..e3d5389a 100644 --- a/extension/schema/FullState.d.ts +++ b/extension/schema/FullState.d.ts @@ -53,6 +53,7 @@ export interface FullState1 { adding_highlighted_code: AddingHighlightedCode; selected_context_items: SelectedContextItems; session_info?: SessionInfo; + saved_context_groups?: SavedContextGroups; [k: string]: unknown; } /** @@ -140,3 +141,6 @@ export interface SessionInfo { date_created: DateCreated; [k: string]: unknown; } +export interface SavedContextGroups { + [k: string]: ContextItem[]; +} diff --git a/schema/json/ContextItem.json b/schema/json/ContextItem.json index 67dfcadc..32a214d3 100644 --- a/schema/json/ContextItem.json +++ b/schema/json/ContextItem.json @@ -1,76 +1,76 @@ -{
- "title": "ContextItem",
- "$ref": "#/definitions/src__continuedev__core__main__ContextItem",
- "definitions": {
- "ContextItemId": {
- "title": "ContextItemId",
- "description": "A ContextItemId is a unique identifier for a ContextItem.",
- "type": "object",
- "properties": {
- "provider_title": {
- "title": "Provider Title",
- "type": "string"
- },
- "item_id": {
- "title": "Item Id",
- "type": "string"
- }
- },
- "required": [
- "provider_title",
- "item_id"
- ]
- },
- "ContextItemDescription": {
- "title": "ContextItemDescription",
- "description": "A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.\n\nThe id can be used to retrieve the ContextItem from the ContextManager.",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "description": {
- "title": "Description",
- "type": "string"
- },
- "id": {
- "$ref": "#/definitions/ContextItemId"
- }
- },
- "required": [
- "name",
- "description",
- "id"
- ]
- },
- "src__continuedev__core__main__ContextItem": {
- "title": "ContextItem",
- "description": "A ContextItem is a single item that is stored in the ContextManager.",
- "type": "object",
- "properties": {
- "description": {
- "$ref": "#/definitions/ContextItemDescription"
- },
- "content": {
- "title": "Content",
- "type": "string"
- },
- "editing": {
- "title": "Editing",
- "default": false,
- "type": "boolean"
- },
- "editable": {
- "title": "Editable",
- "default": false,
- "type": "boolean"
- }
- },
- "required": [
- "description",
- "content"
- ]
- }
- }
+{ + "title": "ContextItem", + "$ref": "#/definitions/src__continuedev__core__main__ContextItem", + "definitions": { + "ContextItemId": { + "title": "ContextItemId", + "description": "A ContextItemId is a unique identifier for a ContextItem.", + "type": "object", + "properties": { + "provider_title": { + "title": "Provider Title", + "type": "string" + }, + "item_id": { + "title": "Item Id", + "type": "string" + } + }, + "required": [ + "provider_title", + "item_id" + ] + }, + "ContextItemDescription": { + "title": "ContextItemDescription", + "description": "A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.\n\nThe id can be used to retrieve the ContextItem from the ContextManager.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "id": { + "$ref": "#/definitions/ContextItemId" + } + }, + "required": [ + "name", + "description", + "id" + ] + }, + "src__continuedev__core__main__ContextItem": { + "title": "ContextItem", + "description": "A ContextItem is a single item that is stored in the ContextManager.", + "type": "object", + "properties": { + "description": { + "$ref": "#/definitions/ContextItemDescription" + }, + "content": { + "title": "Content", + "type": "string" + }, + "editing": { + "title": "Editing", + "default": false, + "type": "boolean" + }, + "editable": { + "title": "Editable", + "default": false, + "type": "boolean" + } + }, + "required": [ + "description", + "content" + ] + } + } }
\ No newline at end of file diff --git a/schema/json/FileEdit.json b/schema/json/FileEdit.json index 4247c096..011e0462 100644 --- a/schema/json/FileEdit.json +++ b/schema/json/FileEdit.json @@ -1,63 +1,63 @@ -{
- "title": "FileEdit",
- "$ref": "#/definitions/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"
- ]
- },
- "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"
- ]
- }
- }
+{ + "title": "FileEdit", + "$ref": "#/definitions/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" + ] + }, + "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 index 8394af17..2ea75bab 100644 --- a/schema/json/FileEditWithFullContents.json +++ b/schema/json/FileEditWithFullContents.json @@ -1,80 +1,80 @@ -{
- "title": "FileEditWithFullContents",
- "$ref": "#/definitions/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"
- ]
- },
- "src__continuedev__models__filesystem_edit__FileEditWithFullContents": {
- "title": "FileEditWithFullContents",
- "type": "object",
- "properties": {
- "fileEdit": {
- "$ref": "#/definitions/FileEdit"
- },
- "fileContents": {
- "title": "Filecontents",
- "type": "string"
- }
- },
- "required": [
- "fileEdit",
- "fileContents"
- ]
- }
- }
+{ + "title": "FileEditWithFullContents", + "$ref": "#/definitions/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" + ] + }, + "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/FullState.json b/schema/json/FullState.json index 707b03db..99d5128b 100644 --- a/schema/json/FullState.json +++ b/schema/json/FullState.json @@ -1,322 +1,333 @@ -{
- "title": "FullState",
- "$ref": "#/definitions/src__continuedev__core__main__FullState",
- "definitions": {
- "FunctionCall": {
- "title": "FunctionCall",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "arguments": {
- "title": "Arguments",
- "type": "string"
- }
- },
- "required": [
- "name",
- "arguments"
- ]
- },
- "ChatMessage": {
- "title": "ChatMessage",
- "type": "object",
- "properties": {
- "role": {
- "title": "Role",
- "enum": [
- "assistant",
- "user",
- "system",
- "function"
- ],
- "type": "string"
- },
- "content": {
- "title": "Content",
- "type": "string"
- },
- "name": {
- "title": "Name",
- "type": "string"
- },
- "summary": {
- "title": "Summary",
- "type": "string"
- },
- "function_call": {
- "$ref": "#/definitions/FunctionCall"
- }
- },
- "required": [
- "role",
- "summary"
- ]
- },
- "Step": {
- "title": "Step",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "hide": {
- "title": "Hide",
- "default": false,
- "type": "boolean"
- },
- "description": {
- "title": "Description",
- "type": "string"
- },
- "system_message": {
- "title": "System Message",
- "type": "string"
- },
- "chat_context": {
- "title": "Chat Context",
- "default": [],
- "type": "array",
- "items": {
- "$ref": "#/definitions/ChatMessage"
- }
- },
- "manage_own_chat_context": {
- "title": "Manage Own Chat Context",
- "default": false,
- "type": "boolean"
- }
- }
- },
- "Observation": {
- "title": "Observation",
- "type": "object",
- "properties": {}
- },
- "HistoryNode": {
- "title": "HistoryNode",
- "description": "A point in history, a list of which make up History",
- "type": "object",
- "properties": {
- "step": {
- "$ref": "#/definitions/Step"
- },
- "observation": {
- "$ref": "#/definitions/Observation"
- },
- "depth": {
- "title": "Depth",
- "type": "integer"
- },
- "deleted": {
- "title": "Deleted",
- "default": false,
- "type": "boolean"
- },
- "active": {
- "title": "Active",
- "default": true,
- "type": "boolean"
- },
- "logs": {
- "title": "Logs",
- "default": [],
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "step",
- "depth"
- ]
- },
- "History": {
- "title": "History",
- "description": "A history of steps taken and their results",
- "type": "object",
- "properties": {
- "timeline": {
- "title": "Timeline",
- "type": "array",
- "items": {
- "$ref": "#/definitions/HistoryNode"
- }
- },
- "current_index": {
- "title": "Current Index",
- "type": "integer"
- }
- },
- "required": [
- "timeline",
- "current_index"
- ]
- },
- "SlashCommandDescription": {
- "title": "SlashCommandDescription",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "description": {
- "title": "Description",
- "type": "string"
- }
- },
- "required": [
- "name",
- "description"
- ]
- },
- "ContextItemId": {
- "title": "ContextItemId",
- "description": "A ContextItemId is a unique identifier for a ContextItem.",
- "type": "object",
- "properties": {
- "provider_title": {
- "title": "Provider Title",
- "type": "string"
- },
- "item_id": {
- "title": "Item Id",
- "type": "string"
- }
- },
- "required": [
- "provider_title",
- "item_id"
- ]
- },
- "ContextItemDescription": {
- "title": "ContextItemDescription",
- "description": "A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.\n\nThe id can be used to retrieve the ContextItem from the ContextManager.",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "description": {
- "title": "Description",
- "type": "string"
- },
- "id": {
- "$ref": "#/definitions/ContextItemId"
- }
- },
- "required": [
- "name",
- "description",
- "id"
- ]
- },
- "ContextItem": {
- "title": "ContextItem",
- "description": "A ContextItem is a single item that is stored in the ContextManager.",
- "type": "object",
- "properties": {
- "description": {
- "$ref": "#/definitions/ContextItemDescription"
- },
- "content": {
- "title": "Content",
- "type": "string"
- },
- "editing": {
- "title": "Editing",
- "default": false,
- "type": "boolean"
- },
- "editable": {
- "title": "Editable",
- "default": false,
- "type": "boolean"
- }
- },
- "required": [
- "description",
- "content"
- ]
- },
- "SessionInfo": {
- "title": "SessionInfo",
- "type": "object",
- "properties": {
- "session_id": {
- "title": "Session Id",
- "type": "string"
- },
- "title": {
- "title": "Title",
- "type": "string"
- },
- "date_created": {
- "title": "Date Created",
- "type": "string"
- }
- },
- "required": [
- "session_id",
- "title",
- "date_created"
- ]
- },
- "src__continuedev__core__main__FullState": {
- "title": "FullState",
- "description": "A full state of the program, including the history",
- "type": "object",
- "properties": {
- "history": {
- "$ref": "#/definitions/History"
- },
- "active": {
- "title": "Active",
- "type": "boolean"
- },
- "user_input_queue": {
- "title": "User Input Queue",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "slash_commands": {
- "title": "Slash Commands",
- "type": "array",
- "items": {
- "$ref": "#/definitions/SlashCommandDescription"
- }
- },
- "adding_highlighted_code": {
- "title": "Adding Highlighted Code",
- "type": "boolean"
- },
- "selected_context_items": {
- "title": "Selected Context Items",
- "type": "array",
- "items": {
- "$ref": "#/definitions/ContextItem"
- }
- },
- "session_info": {
- "$ref": "#/definitions/SessionInfo"
- }
- },
- "required": [
- "history",
- "active",
- "user_input_queue",
- "slash_commands",
- "adding_highlighted_code",
- "selected_context_items"
- ]
- }
- }
+{ + "title": "FullState", + "$ref": "#/definitions/src__continuedev__core__main__FullState", + "definitions": { + "FunctionCall": { + "title": "FunctionCall", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "arguments": { + "title": "Arguments", + "type": "string" + } + }, + "required": [ + "name", + "arguments" + ] + }, + "ChatMessage": { + "title": "ChatMessage", + "type": "object", + "properties": { + "role": { + "title": "Role", + "enum": [ + "assistant", + "user", + "system", + "function" + ], + "type": "string" + }, + "content": { + "title": "Content", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "summary": { + "title": "Summary", + "type": "string" + }, + "function_call": { + "$ref": "#/definitions/FunctionCall" + } + }, + "required": [ + "role", + "summary" + ] + }, + "Step": { + "title": "Step", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "hide": { + "title": "Hide", + "default": false, + "type": "boolean" + }, + "description": { + "title": "Description", + "type": "string" + }, + "system_message": { + "title": "System Message", + "type": "string" + }, + "chat_context": { + "title": "Chat Context", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ChatMessage" + } + }, + "manage_own_chat_context": { + "title": "Manage Own Chat Context", + "default": false, + "type": "boolean" + } + } + }, + "Observation": { + "title": "Observation", + "type": "object", + "properties": {} + }, + "HistoryNode": { + "title": "HistoryNode", + "description": "A point in history, a list of which make up History", + "type": "object", + "properties": { + "step": { + "$ref": "#/definitions/Step" + }, + "observation": { + "$ref": "#/definitions/Observation" + }, + "depth": { + "title": "Depth", + "type": "integer" + }, + "deleted": { + "title": "Deleted", + "default": false, + "type": "boolean" + }, + "active": { + "title": "Active", + "default": true, + "type": "boolean" + }, + "logs": { + "title": "Logs", + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "step", + "depth" + ] + }, + "History": { + "title": "History", + "description": "A history of steps taken and their results", + "type": "object", + "properties": { + "timeline": { + "title": "Timeline", + "type": "array", + "items": { + "$ref": "#/definitions/HistoryNode" + } + }, + "current_index": { + "title": "Current Index", + "type": "integer" + } + }, + "required": [ + "timeline", + "current_index" + ] + }, + "SlashCommandDescription": { + "title": "SlashCommandDescription", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": [ + "name", + "description" + ] + }, + "ContextItemId": { + "title": "ContextItemId", + "description": "A ContextItemId is a unique identifier for a ContextItem.", + "type": "object", + "properties": { + "provider_title": { + "title": "Provider Title", + "type": "string" + }, + "item_id": { + "title": "Item Id", + "type": "string" + } + }, + "required": [ + "provider_title", + "item_id" + ] + }, + "ContextItemDescription": { + "title": "ContextItemDescription", + "description": "A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'.\n\nThe id can be used to retrieve the ContextItem from the ContextManager.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "id": { + "$ref": "#/definitions/ContextItemId" + } + }, + "required": [ + "name", + "description", + "id" + ] + }, + "ContextItem": { + "title": "ContextItem", + "description": "A ContextItem is a single item that is stored in the ContextManager.", + "type": "object", + "properties": { + "description": { + "$ref": "#/definitions/ContextItemDescription" + }, + "content": { + "title": "Content", + "type": "string" + }, + "editing": { + "title": "Editing", + "default": false, + "type": "boolean" + }, + "editable": { + "title": "Editable", + "default": false, + "type": "boolean" + } + }, + "required": [ + "description", + "content" + ] + }, + "SessionInfo": { + "title": "SessionInfo", + "type": "object", + "properties": { + "session_id": { + "title": "Session Id", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + }, + "date_created": { + "title": "Date Created", + "type": "string" + } + }, + "required": [ + "session_id", + "title", + "date_created" + ] + }, + "src__continuedev__core__main__FullState": { + "title": "FullState", + "description": "A full state of the program, including the history", + "type": "object", + "properties": { + "history": { + "$ref": "#/definitions/History" + }, + "active": { + "title": "Active", + "type": "boolean" + }, + "user_input_queue": { + "title": "User Input Queue", + "type": "array", + "items": { + "type": "string" + } + }, + "slash_commands": { + "title": "Slash Commands", + "type": "array", + "items": { + "$ref": "#/definitions/SlashCommandDescription" + } + }, + "adding_highlighted_code": { + "title": "Adding Highlighted Code", + "type": "boolean" + }, + "selected_context_items": { + "title": "Selected Context Items", + "type": "array", + "items": { + "$ref": "#/definitions/ContextItem" + } + }, + "session_info": { + "$ref": "#/definitions/SessionInfo" + }, + "saved_context_groups": { + "title": "Saved Context Groups", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/ContextItem" + } + } + } + }, + "required": [ + "history", + "active", + "user_input_queue", + "slash_commands", + "adding_highlighted_code", + "selected_context_items" + ] + } + } }
\ No newline at end of file diff --git a/schema/json/History.json b/schema/json/History.json index ea97a2e8..56415520 100644 --- a/schema/json/History.json +++ b/schema/json/History.json @@ -1,161 +1,161 @@ -{
- "title": "History",
- "$ref": "#/definitions/src__continuedev__core__main__History",
- "definitions": {
- "FunctionCall": {
- "title": "FunctionCall",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "arguments": {
- "title": "Arguments",
- "type": "string"
- }
- },
- "required": [
- "name",
- "arguments"
- ]
- },
- "ChatMessage": {
- "title": "ChatMessage",
- "type": "object",
- "properties": {
- "role": {
- "title": "Role",
- "enum": [
- "assistant",
- "user",
- "system",
- "function"
- ],
- "type": "string"
- },
- "content": {
- "title": "Content",
- "type": "string"
- },
- "name": {
- "title": "Name",
- "type": "string"
- },
- "summary": {
- "title": "Summary",
- "type": "string"
- },
- "function_call": {
- "$ref": "#/definitions/FunctionCall"
- }
- },
- "required": [
- "role",
- "summary"
- ]
- },
- "Step": {
- "title": "Step",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "hide": {
- "title": "Hide",
- "default": false,
- "type": "boolean"
- },
- "description": {
- "title": "Description",
- "type": "string"
- },
- "system_message": {
- "title": "System Message",
- "type": "string"
- },
- "chat_context": {
- "title": "Chat Context",
- "default": [],
- "type": "array",
- "items": {
- "$ref": "#/definitions/ChatMessage"
- }
- },
- "manage_own_chat_context": {
- "title": "Manage Own Chat Context",
- "default": false,
- "type": "boolean"
- }
- }
- },
- "Observation": {
- "title": "Observation",
- "type": "object",
- "properties": {}
- },
- "HistoryNode": {
- "title": "HistoryNode",
- "description": "A point in history, a list of which make up History",
- "type": "object",
- "properties": {
- "step": {
- "$ref": "#/definitions/Step"
- },
- "observation": {
- "$ref": "#/definitions/Observation"
- },
- "depth": {
- "title": "Depth",
- "type": "integer"
- },
- "deleted": {
- "title": "Deleted",
- "default": false,
- "type": "boolean"
- },
- "active": {
- "title": "Active",
- "default": true,
- "type": "boolean"
- },
- "logs": {
- "title": "Logs",
- "default": [],
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "step",
- "depth"
- ]
- },
- "src__continuedev__core__main__History": {
- "title": "History",
- "description": "A history of steps taken and their results",
- "type": "object",
- "properties": {
- "timeline": {
- "title": "Timeline",
- "type": "array",
- "items": {
- "$ref": "#/definitions/HistoryNode"
- }
- },
- "current_index": {
- "title": "Current Index",
- "type": "integer"
- }
- },
- "required": [
- "timeline",
- "current_index"
- ]
- }
- }
+{ + "title": "History", + "$ref": "#/definitions/src__continuedev__core__main__History", + "definitions": { + "FunctionCall": { + "title": "FunctionCall", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "arguments": { + "title": "Arguments", + "type": "string" + } + }, + "required": [ + "name", + "arguments" + ] + }, + "ChatMessage": { + "title": "ChatMessage", + "type": "object", + "properties": { + "role": { + "title": "Role", + "enum": [ + "assistant", + "user", + "system", + "function" + ], + "type": "string" + }, + "content": { + "title": "Content", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "summary": { + "title": "Summary", + "type": "string" + }, + "function_call": { + "$ref": "#/definitions/FunctionCall" + } + }, + "required": [ + "role", + "summary" + ] + }, + "Step": { + "title": "Step", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "hide": { + "title": "Hide", + "default": false, + "type": "boolean" + }, + "description": { + "title": "Description", + "type": "string" + }, + "system_message": { + "title": "System Message", + "type": "string" + }, + "chat_context": { + "title": "Chat Context", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ChatMessage" + } + }, + "manage_own_chat_context": { + "title": "Manage Own Chat Context", + "default": false, + "type": "boolean" + } + } + }, + "Observation": { + "title": "Observation", + "type": "object", + "properties": {} + }, + "HistoryNode": { + "title": "HistoryNode", + "description": "A point in history, a list of which make up History", + "type": "object", + "properties": { + "step": { + "$ref": "#/definitions/Step" + }, + "observation": { + "$ref": "#/definitions/Observation" + }, + "depth": { + "title": "Depth", + "type": "integer" + }, + "deleted": { + "title": "Deleted", + "default": false, + "type": "boolean" + }, + "active": { + "title": "Active", + "default": true, + "type": "boolean" + }, + "logs": { + "title": "Logs", + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "step", + "depth" + ] + }, + "src__continuedev__core__main__History": { + "title": "History", + "description": "A history of steps taken and their results", + "type": "object", + "properties": { + "timeline": { + "title": "Timeline", + "type": "array", + "items": { + "$ref": "#/definitions/HistoryNode" + } + }, + "current_index": { + "title": "Current Index", + "type": "integer" + } + }, + "required": [ + "timeline", + "current_index" + ] + } + } }
\ No newline at end of file diff --git a/schema/json/HistoryNode.json b/schema/json/HistoryNode.json index 56ab631a..81e239b3 100644 --- a/schema/json/HistoryNode.json +++ b/schema/json/HistoryNode.json @@ -1,139 +1,139 @@ -{
- "title": "HistoryNode",
- "$ref": "#/definitions/src__continuedev__core__main__HistoryNode",
- "definitions": {
- "FunctionCall": {
- "title": "FunctionCall",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "arguments": {
- "title": "Arguments",
- "type": "string"
- }
- },
- "required": [
- "name",
- "arguments"
- ]
- },
- "ChatMessage": {
- "title": "ChatMessage",
- "type": "object",
- "properties": {
- "role": {
- "title": "Role",
- "enum": [
- "assistant",
- "user",
- "system",
- "function"
- ],
- "type": "string"
- },
- "content": {
- "title": "Content",
- "type": "string"
- },
- "name": {
- "title": "Name",
- "type": "string"
- },
- "summary": {
- "title": "Summary",
- "type": "string"
- },
- "function_call": {
- "$ref": "#/definitions/FunctionCall"
- }
- },
- "required": [
- "role",
- "summary"
- ]
- },
- "Step": {
- "title": "Step",
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string"
- },
- "hide": {
- "title": "Hide",
- "default": false,
- "type": "boolean"
- },
- "description": {
- "title": "Description",
- "type": "string"
- },
- "system_message": {
- "title": "System Message",
- "type": "string"
- },
- "chat_context": {
- "title": "Chat Context",
- "default": [],
- "type": "array",
- "items": {
- "$ref": "#/definitions/ChatMessage"
- }
- },
- "manage_own_chat_context": {
- "title": "Manage Own Chat Context",
- "default": false,
- "type": "boolean"
- }
- }
- },
- "Observation": {
- "title": "Observation",
- "type": "object",
- "properties": {}
- },
- "src__continuedev__core__main__HistoryNode": {
- "title": "HistoryNode",
- "description": "A point in history, a list of which make up History",
- "type": "object",
- "properties": {
- "step": {
- "$ref": "#/definitions/Step"
- },
- "observation": {
- "$ref": "#/definitions/Observation"
- },
- "depth": {
- "title": "Depth",
- "type": "integer"
- },
- "deleted": {
- "title": "Deleted",
- "default": false,
- "type": "boolean"
- },
- "active": {
- "title": "Active",
- "default": true,
- "type": "boolean"
- },
- "logs": {
- "title": "Logs",
- "default": [],
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "step",
- "depth"
- ]
- }
- }
+{ + "title": "HistoryNode", + "$ref": "#/definitions/src__continuedev__core__main__HistoryNode", + "definitions": { + "FunctionCall": { + "title": "FunctionCall", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "arguments": { + "title": "Arguments", + "type": "string" + } + }, + "required": [ + "name", + "arguments" + ] + }, + "ChatMessage": { + "title": "ChatMessage", + "type": "object", + "properties": { + "role": { + "title": "Role", + "enum": [ + "assistant", + "user", + "system", + "function" + ], + "type": "string" + }, + "content": { + "title": "Content", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "summary": { + "title": "Summary", + "type": "string" + }, + "function_call": { + "$ref": "#/definitions/FunctionCall" + } + }, + "required": [ + "role", + "summary" + ] + }, + "Step": { + "title": "Step", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "hide": { + "title": "Hide", + "default": false, + "type": "boolean" + }, + "description": { + "title": "Description", + "type": "string" + }, + "system_message": { + "title": "System Message", + "type": "string" + }, + "chat_context": { + "title": "Chat Context", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ChatMessage" + } + }, + "manage_own_chat_context": { + "title": "Manage Own Chat Context", + "default": false, + "type": "boolean" + } + } + }, + "Observation": { + "title": "Observation", + "type": "object", + "properties": {} + }, + "src__continuedev__core__main__HistoryNode": { + "title": "HistoryNode", + "description": "A point in history, a list of which make up History", + "type": "object", + "properties": { + "step": { + "$ref": "#/definitions/Step" + }, + "observation": { + "$ref": "#/definitions/Observation" + }, + "depth": { + "title": "Depth", + "type": "integer" + }, + "deleted": { + "title": "Deleted", + "default": false, + "type": "boolean" + }, + "active": { + "title": "Active", + "default": true, + "type": "boolean" + }, + "logs": { + "title": "Logs", + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "step", + "depth" + ] + } + } }
\ No newline at end of file diff --git a/schema/json/Position.json b/schema/json/Position.json index 20a8d4e8..6b272ce7 100644 --- a/schema/json/Position.json +++ b/schema/json/Position.json @@ -1,24 +1,24 @@ -{
- "title": "Position",
- "$ref": "#/definitions/src__continuedev__models__main__Position",
- "definitions": {
- "src__continuedev__models__main__Position": {
- "title": "Position",
- "type": "object",
- "properties": {
- "line": {
- "title": "Line",
- "type": "integer"
- },
- "character": {
- "title": "Character",
- "type": "integer"
- }
- },
- "required": [
- "line",
- "character"
- ]
- }
- }
+{ + "title": "Position", + "$ref": "#/definitions/src__continuedev__models__main__Position", + "definitions": { + "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 index b6867932..75675183 100644 --- a/schema/json/Range.json +++ b/schema/json/Range.json @@ -1,41 +1,41 @@ -{
- "title": "Range",
- "$ref": "#/definitions/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"
- ]
- },
- "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"
- ]
- }
- }
+{ + "title": "Range", + "$ref": "#/definitions/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" + ] + }, + "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 index 4f6e030d..1f5afaa3 100644 --- a/schema/json/RangeInFile.json +++ b/schema/json/RangeInFile.json @@ -1,58 +1,58 @@ -{
- "title": "RangeInFile",
- "$ref": "#/definitions/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"
- ]
- },
- "src__continuedev__models__filesystem__RangeInFile": {
- "title": "RangeInFile",
- "type": "object",
- "properties": {
- "filepath": {
- "title": "Filepath",
- "type": "string"
- },
- "range": {
- "$ref": "#/definitions/Range"
- }
- },
- "required": [
- "filepath",
- "range"
- ]
- }
- }
+{ + "title": "RangeInFile", + "$ref": "#/definitions/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" + ] + }, + "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/SessionInfo.json b/schema/json/SessionInfo.json index e8d53fa1..5857a724 100644 --- a/schema/json/SessionInfo.json +++ b/schema/json/SessionInfo.json @@ -1,29 +1,29 @@ -{
- "title": "SessionInfo",
- "$ref": "#/definitions/src__continuedev__core__main__SessionInfo",
- "definitions": {
- "src__continuedev__core__main__SessionInfo": {
- "title": "SessionInfo",
- "type": "object",
- "properties": {
- "session_id": {
- "title": "Session Id",
- "type": "string"
- },
- "title": {
- "title": "Title",
- "type": "string"
- },
- "date_created": {
- "title": "Date Created",
- "type": "string"
- }
- },
- "required": [
- "session_id",
- "title",
- "date_created"
- ]
- }
- }
+{ + "title": "SessionInfo", + "$ref": "#/definitions/src__continuedev__core__main__SessionInfo", + "definitions": { + "src__continuedev__core__main__SessionInfo": { + "title": "SessionInfo", + "type": "object", + "properties": { + "session_id": { + "title": "Session Id", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + }, + "date_created": { + "title": "Date Created", + "type": "string" + } + }, + "required": [ + "session_id", + "title", + "date_created" + ] + } + } }
\ No newline at end of file diff --git a/schema/json/Traceback.json b/schema/json/Traceback.json index b140e104..45606a2b 100644 --- a/schema/json/Traceback.json +++ b/schema/json/Traceback.json @@ -1,63 +1,63 @@ -{
- "title": "Traceback",
- "$ref": "#/definitions/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"
- ]
- },
- "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"
- ]
- }
- }
+{ + "title": "Traceback", + "$ref": "#/definitions/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" + ] + }, + "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 index 2fbd0109..1907430a 100644 --- a/schema/json/TracebackFrame.json +++ b/schema/json/TracebackFrame.json @@ -1,33 +1,33 @@ -{
- "title": "TracebackFrame",
- "$ref": "#/definitions/src__continuedev__models__main__TracebackFrame",
- "definitions": {
- "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"
- ]
- }
- }
+{ + "title": "TracebackFrame", + "$ref": "#/definitions/src__continuedev__models__main__TracebackFrame", + "definitions": { + "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 |