✨ small docs improvements

This commit is contained in:
Nate Sesti 2024-03-08 23:14:43 -08:00
parent 2a17ac0461
commit 402ed819a7
6 changed files with 25133 additions and 30 deletions

View file

@ -13,7 +13,7 @@ class DocsContextProvider extends BaseContextProvider {
static description: ContextProviderDescription = {
title: "docs",
displayTitle: "Docs",
description: "Search documentation",
description: "Type to search docs",
type: "submenu",
};
@ -53,7 +53,7 @@ class DocsContextProvider extends BaseContextProvider {
name: "Instructions",
description: "Instructions",
content:
"Use the above documentation to answer the following question. You should not reference anything outside of what is shown, unless it is a commonly known concept. Reference URLs whenever possible. If there isn't enough information to answer the question, suggest where the user might look to learn more.",
"Use the above documentation to answer the following question. You should not reference anything outside of what is shown, unless it is a commonly known concept. Reference URLs whenever possible using markdown formatting. If there isn't enough information to answer the question, suggest where the user might look to learn more.",
},
];
}

View file

@ -5,10 +5,7 @@ import { getDocsSqlitePath, getLanceDbPath } from "../../util/paths";
import { SqliteDb } from "../refreshIndex";
import { downloadPreIndexedDocs } from "./preIndexed";
import {
default as configs,
default as preIndexedDocs,
} from "./preIndexedDocs";
import { default as configs } from "./preIndexedDocs";
const DOCS_TABLE_NAME = "docs";
@ -60,10 +57,7 @@ export async function retrieveDocs(
};
const tableNames = await lance.tableNames();
if (
!tableNames.includes(DOCS_TABLE_NAME) &&
preIndexedDocs.includes(baseUrl)
) {
if (!tableNames.includes(DOCS_TABLE_NAME)) {
const downloaded = await downloadDocs();
if (downloaded) return downloaded;
}
@ -77,11 +71,7 @@ export async function retrieveDocs(
docs = docs.filter((doc) => doc.baseUrl === baseUrl);
if (
(!docs || docs.length === 0) &&
!nested &&
preIndexedDocs.includes(baseUrl)
) {
if ((!docs || docs.length === 0) && !nested) {
const downloaded = await downloadDocs();
if (downloaded) return downloaded;
}

View file

@ -1392,12 +1392,13 @@
"properties": {
"allowAnonymousTelemetry": {
"title": "Allow Anonymous Telemetry",
"markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data.",
"markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data. Learn more in [the docs](https://continue.dev/docs/telemetry).",
"default": true,
"type": "boolean"
},
"models": {
"title": "Models",
"markdownDescription": "Learn about setting up models in [the documentation](https://continue.dev/docs/model-setup/overview).",
"default": [
{
"title": "GPT-4 (trial)",
@ -1436,7 +1437,7 @@
},
"slashCommands": {
"title": "Slash Commands",
"description": "An array of slash commands that let you map custom Steps to a shortcut.",
"markdownDescription": "An array of slash commands that let you take custom actions from the sidebar. Learn more in the [documentation](https://continue.dev/docs/customization/slash-commands).",
"default": [],
"type": "array",
"items": {
@ -1445,7 +1446,7 @@
},
"customCommands": {
"title": "Custom Commands",
"description": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt.",
"markdownDescription": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt. Learn more in the [documentation](https://continue.dev/docs/customization/slash-commands#custom-commands-use-natural-language).",
"default": [
{
"name": "test",
@ -1460,7 +1461,7 @@
},
"contextProviders": {
"title": "Context Providers",
"description": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.",
"markdownDescription": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in [the documentation](https://continue.dev/docs/customization/context-providers).",
"default": [],
"type": "array",
"items": {
@ -1498,7 +1499,7 @@
},
"embeddingsProvider": {
"title": "Embeddings Provider",
"description": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser.",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options [here](https://continue.dev/docs/walkthroughs/codebase-embeddings#embeddings-providers).",
"type": "object",
"properties": {
"provider": {
@ -1544,6 +1545,7 @@
"tabAutocompleteOptions": {
"title": "TabAutocompleteOptions",
"type": "object",
"markdownDescription": "These options let you customize your tab-autocomplete experience. Read about all options in [the docs](https://continue.dev/docs/walkthroughs/tab-autocomplete#configuration-options).",
"properties": {
"useCopyBuffer": {
"type": "boolean",

View file

@ -1392,12 +1392,13 @@
"properties": {
"allowAnonymousTelemetry": {
"title": "Allow Anonymous Telemetry",
"markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data.",
"markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data. Learn more in [the docs](https://continue.dev/docs/telemetry).",
"default": true,
"type": "boolean"
},
"models": {
"title": "Models",
"markdownDescription": "Learn about setting up models in [the documentation](https://continue.dev/docs/model-setup/overview).",
"default": [
{
"title": "GPT-4 (trial)",
@ -1436,7 +1437,7 @@
},
"slashCommands": {
"title": "Slash Commands",
"description": "An array of slash commands that let you map custom Steps to a shortcut.",
"markdownDescription": "An array of slash commands that let you take custom actions from the sidebar. Learn more in the [documentation](https://continue.dev/docs/customization/slash-commands).",
"default": [],
"type": "array",
"items": {
@ -1445,7 +1446,7 @@
},
"customCommands": {
"title": "Custom Commands",
"description": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt.",
"markdownDescription": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt. Learn more in the [documentation](https://continue.dev/docs/customization/slash-commands#custom-commands-use-natural-language).",
"default": [
{
"name": "test",
@ -1460,7 +1461,7 @@
},
"contextProviders": {
"title": "Context Providers",
"description": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.",
"markdownDescription": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in [the documentation](https://continue.dev/docs/customization/context-providers).",
"default": [],
"type": "array",
"items": {
@ -1498,7 +1499,7 @@
},
"embeddingsProvider": {
"title": "Embeddings Provider",
"description": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser.",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options [here](https://continue.dev/docs/walkthroughs/codebase-embeddings#embeddings-providers).",
"type": "object",
"properties": {
"provider": {
@ -1544,6 +1545,7 @@
"tabAutocompleteOptions": {
"title": "TabAutocompleteOptions",
"type": "object",
"markdownDescription": "These options let you customize your tab-autocomplete experience. Read about all options in [the docs](https://continue.dev/docs/walkthroughs/tab-autocomplete#configuration-options).",
"properties": {
"useCopyBuffer": {
"type": "boolean",

View file

@ -1568,12 +1568,13 @@
"properties": {
"allowAnonymousTelemetry": {
"title": "Allow Anonymous Telemetry",
"markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data.",
"markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data. Learn more in [the docs](https://continue.dev/docs/telemetry).",
"default": true,
"type": "boolean"
},
"models": {
"title": "Models",
"markdownDescription": "Learn about setting up models in [the documentation](https://continue.dev/docs/model-setup/overview).",
"default": [
{
"title": "GPT-4 (trial)",
@ -1612,7 +1613,7 @@
},
"slashCommands": {
"title": "Slash Commands",
"description": "An array of slash commands that let you map custom Steps to a shortcut.",
"markdownDescription": "An array of slash commands that let you take custom actions from the sidebar. Learn more in the [documentation](https://continue.dev/docs/customization/slash-commands).",
"default": [],
"type": "array",
"items": {
@ -1621,7 +1622,7 @@
},
"customCommands": {
"title": "Custom Commands",
"description": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt.",
"markdownDescription": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt. Learn more in the [documentation](https://continue.dev/docs/customization/slash-commands#custom-commands-use-natural-language).",
"default": [
{
"name": "test",
@ -1636,7 +1637,7 @@
},
"contextProviders": {
"title": "Context Providers",
"description": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.",
"markdownDescription": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in [the documentation](https://continue.dev/docs/customization/context-providers).",
"default": [],
"type": "array",
"items": {
@ -1674,7 +1675,7 @@
},
"embeddingsProvider": {
"title": "Embeddings Provider",
"description": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser.",
"markdownDescription": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser. Learn about the other options [here](https://continue.dev/docs/walkthroughs/codebase-embeddings#embeddings-providers).",
"type": "object",
"properties": {
"provider": {
@ -1732,6 +1733,7 @@
"tabAutocompleteOptions": {
"title": "TabAutocompleteOptions",
"type": "object",
"markdownDescription": "These options let you customize your tab-autocomplete experience. Read about all options in [the docs](https://continue.dev/docs/walkthroughs/tab-autocomplete#configuration-options).",
"properties": {
"useCopyBuffer": {
"type": "boolean",

25107
extensions/vscode/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff