From 5cd0c876ef7f5e6cfd007818cebb97243a0fc9d2 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 24 Jan 2024 09:34:58 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20allow=20tab=20to=20select=20item?= =?UTF-8?q?s=20in=20the=20dropdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/static/schemas/config.json | 80 ++++++++++++++++++-- gui/src/components/mainInput/MentionList.tsx | 2 +- 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 5e6b075dd..d9af7c9fd 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -955,22 +955,24 @@ "open", "google", "search", - "url", "http", "codebase", "problems", - "folder" + "folder", + "issue" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", "Reference the contents of the terminal", - "Reference the contents of all open files.", + "Reference the contents of all open or pinned files.", "Enter a search phrase and include the Google search results as context", - "Enter a URL and use the contents of the webpage as context", + "Reference the results of a ripgrep search in your codebase", "Write a custom context provider at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup.", "Use embeddings to automatically find relevant files from throughout the codebase", "Reference all linting errors and warnings in the currently open file", - "Include important files from a folder in the prompt, as determined by similarity search" + "Include important files from a folder in the prompt, as determined by similarity search", + "Reference GitHub issues from a repository", + "Retrieve important pages from a documentation website, as determined by similarity search" ], "type": "string" }, @@ -1007,6 +1009,74 @@ "required": ["params"] } }, + { + "if": { + "properties": { + "name": { + "enum": ["open"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "onlyPinned": { + "type": "boolean", + "description": "If set to true, only 'pinned' files will be included.", + "default": false + } + } + } + } + } + }, + { + "if": { + "properties": { + "name": { + "enum": ["issue"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "githubToken": { + "type": "string", + "description": "Your GitHub token to access the GitHub API. Required for private repositories." + }, + "repos": { + "type": "array", + "description": "A list of repositories to search for issues", + "items": { + "type": "object", + "properties": { + "owner": { + "type": "string", + "description": "The owner of the repository" + }, + "repo": { + "type": "string", + "description": "The name of the repository" + }, + "type": { + "type": "string", + "description": "The type of issues to search for", + "enum": ["open", "closed", "all"] + } + }, + "required": ["owner", "repo"] + } + } + }, + "required": ["repos"] + } + }, + "required": ["params"] + } + }, { "if": { "properties": { diff --git a/gui/src/components/mainInput/MentionList.tsx b/gui/src/components/mainInput/MentionList.tsx index 45c8d3872..cb80878c3 100644 --- a/gui/src/components/mainInput/MentionList.tsx +++ b/gui/src/components/mainInput/MentionList.tsx @@ -257,7 +257,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => { return true; } - if (event.key === "Enter") { + if (event.key === "Enter" || event.key === "Tab") { enterHandler(); event.stopPropagation(); event.preventDefault();