💄 allow tab to select items in the dropdown

This commit is contained in:
Nate Sesti 2024-01-24 09:34:58 -08:00
parent 7cb9bb279d
commit 5cd0c876ef
2 changed files with 76 additions and 6 deletions

View file

@ -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": {

View file

@ -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();