diff options
Diffstat (limited to 'continuedev')
8 files changed, 30 insertions, 10 deletions
diff --git a/continuedev/src/continuedev/models/reference/test.py b/continuedev/src/continuedev/models/reference/test.py index 58cfc3fe..1c7608ec 100644 --- a/continuedev/src/continuedev/models/reference/test.py +++ b/continuedev/src/continuedev/models/reference/test.py @@ -44,7 +44,7 @@ def import_context_provider_module(module_name, module_title): return obj -def docs_from_schema(schema, filename, ignore_properties=[], inherited=[]): +def docs_from_schema(schema, filepath, ignore_properties=[], inherited=[]): # Generate markdown docs properties = "" inherited_properties = "" @@ -78,7 +78,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; {dedent(schema.get("description", ""))} -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/{filename}.py) +[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/{filepath}) ## Properties @@ -91,30 +91,36 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; llm_module = importlib.import_module("continuedev.src.continuedev.libs.llm") -llm_obj = getattr(llm_module, "LLM") -schema = llm_obj.schema() -llm_properties = schema["properties"].keys() +ctx_obj = getattr(llm_module, "LLM") +schema = ctx_obj.schema() +ctx_properties = schema["properties"].keys() for module_name, module_title in LLM_MODULES: obj = import_llm_module(module_name, module_title) schema = obj.schema() - markdown_docs = docs_from_schema(schema, module_name, inherited=llm_properties) + markdown_docs = docs_from_schema( + schema, f"libs/llm/{module_name}.py", inherited=ctx_properties + ) with open(f"docs/docs/reference/Models/{module_name}.md", "w") as f: f.write(markdown_docs) config_module = importlib.import_module("continuedev.src.continuedev.core.config") config_obj = getattr(config_module, "ContinueConfig") schema = config_obj.schema() -markdown_docs = docs_from_schema(schema, "config") +markdown_docs = docs_from_schema(schema, "core/config.py") with open("docs/docs/reference/config.md", "w") as f: f.write(markdown_docs) +ctx_module = importlib.import_module("continuedev.src.continuedev.core.context") +ctx_obj = getattr(ctx_module, "ContextProvider") +schema = ctx_obj.schema() +ctx_properties = schema["properties"].keys() for module_name, module_title in CONTEXT_PROVIDER_MODULES: obj = import_context_provider_module(module_name, module_title) schema = obj.schema() markdown_docs = docs_from_schema( schema, - module_name, + f"plugins/context_providers/{module_name}.py", ignore_properties=[ "sdk", "updated_documents", @@ -122,6 +128,7 @@ for module_name, module_title in CONTEXT_PROVIDER_MODULES: "selected_items", "ignore_patterns", ], + inherited=ctx_properties, ) with open(f"docs/docs/reference/Context Providers/{module_name}.md", "w") as f: f.write(markdown_docs) diff --git a/continuedev/src/continuedev/plugins/context_providers/diff.py b/continuedev/src/continuedev/plugins/context_providers/diff.py index 4c16cabf..97e2a9da 100644 --- a/continuedev/src/continuedev/plugins/context_providers/diff.py +++ b/continuedev/src/continuedev/plugins/context_providers/diff.py @@ -6,6 +6,10 @@ from ...core.main import ContextItem, ContextItemDescription, ContextItemId class DiffContextProvider(ContextProvider): + """ + Type '@diff' to reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. + """ + title = "diff" display_title = "Diff" description = "Output of 'git diff' in current repo" diff --git a/continuedev/src/continuedev/plugins/context_providers/filetree.py b/continuedev/src/continuedev/plugins/context_providers/filetree.py index 968b761d..60838350 100644 --- a/continuedev/src/continuedev/plugins/context_providers/filetree.py +++ b/continuedev/src/continuedev/plugins/context_providers/filetree.py @@ -34,6 +34,8 @@ def split_path(path: str, with_root=None) -> List[str]: class FileTreeContextProvider(ContextProvider): + """Type '@tree' to reference the contents of your current workspace. The LLM will be able to see the nested directory structure of your project.""" + title = "tree" display_title = "File Tree" description = "Add a formatted file tree of this directory to the context" diff --git a/continuedev/src/continuedev/plugins/context_providers/github.py b/continuedev/src/continuedev/plugins/context_providers/github.py index 7a16d3c9..2e54631d 100644 --- a/continuedev/src/continuedev/plugins/context_providers/github.py +++ b/continuedev/src/continuedev/plugins/context_providers/github.py @@ -12,8 +12,7 @@ from ...core.context import ( class GitHubIssuesContextProvider(ContextProvider): """ - The GitHubIssuesContextProvider is a ContextProvider - that allows you to search GitHub issues in a repo. + The GitHubIssuesContextProvider is a ContextProvider that allows you to search GitHub issues in a repo. Type '@issue' to reference the title and contents of an issue. """ title = "issues" diff --git a/continuedev/src/continuedev/plugins/context_providers/google.py b/continuedev/src/continuedev/plugins/context_providers/google.py index 493806cc..ce616d74 100644 --- a/continuedev/src/continuedev/plugins/context_providers/google.py +++ b/continuedev/src/continuedev/plugins/context_providers/google.py @@ -9,6 +9,8 @@ from .util import remove_meilisearch_disallowed_chars class GoogleContextProvider(ContextProvider): + """Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python.""" + title = "google" display_title = "Google" description = "Search Google" diff --git a/continuedev/src/continuedev/plugins/context_providers/search.py b/continuedev/src/continuedev/plugins/context_providers/search.py index 4d9af580..fc09f6b8 100644 --- a/continuedev/src/continuedev/plugins/context_providers/search.py +++ b/continuedev/src/continuedev/plugins/context_providers/search.py @@ -10,6 +10,8 @@ from .util import remove_meilisearch_disallowed_chars class SearchContextProvider(ContextProvider): + """Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search.""" + title = "search" display_title = "Search" description = "Search the workspace for all matches of an exact string (e.g. '@search console.log')" diff --git a/continuedev/src/continuedev/plugins/context_providers/terminal.py b/continuedev/src/continuedev/plugins/context_providers/terminal.py index f63ed676..728e7934 100644 --- a/continuedev/src/continuedev/plugins/context_providers/terminal.py +++ b/continuedev/src/continuedev/plugins/context_providers/terminal.py @@ -5,6 +5,8 @@ from ...core.main import ChatMessage, ContextItem, ContextItemDescription, Conte class TerminalContextProvider(ContextProvider): + """Type '@terminal' to reference the contents of your IDE's terminal.""" + title = "terminal" display_title = "Terminal" description = "Reference the contents of the terminal" diff --git a/continuedev/src/continuedev/plugins/context_providers/url.py b/continuedev/src/continuedev/plugins/context_providers/url.py index c2c19cfb..8b7f137d 100644 --- a/continuedev/src/continuedev/plugins/context_providers/url.py +++ b/continuedev/src/continuedev/plugins/context_providers/url.py @@ -9,6 +9,8 @@ from .util import remove_meilisearch_disallowed_chars class URLContextProvider(ContextProvider): + """Type '@url' to reference the contents of a URL. You can either reference preset URLs, or reference one dynamically by typing '@url https://example.com'. The text contents of the page will be fetched and used as context.""" + title = "url" display_title = "URL" description = "Reference the contents of a webpage" |