forked from continuedev/continue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
60 lines (58 loc) · 2.48 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { ContextProviderName } from "../../index.js";
import { BaseContextProvider } from "../index.js";
import CodeContextProvider from "./CodeContextProvider.js";
import ContinueProxyContextProvider from "./ContinueProxyContextProvider.js";
import CurrentFileContextProvider from "./CurrentFileContextProvider.js";
import DatabaseContextProvider from "./DatabaseContextProvider.js";
import DiffContextProvider from "./DiffContextProvider.js";
import DocsContextProvider from "./DocsContextProvider.js";
import FileTreeContextProvider from "./FileTreeContextProvider.js";
import FolderContextProvider from "./FolderContextProvider.js";
import GitHubIssuesContextProvider from "./GitHubIssuesContextProvider.js";
import GitLabMergeRequestContextProvider from "./GitLabMergeRequestContextProvider.js";
import GoogleContextProvider from "./GoogleContextProvider.js";
import HttpContextProvider from "./HttpContextProvider.js";
import JiraIssuesContextProvider from "./JiraIssuesContextProvider/index.js";
import LocalsProvider from "./LocalsProvider.js";
import OSContextProvider from "./OSContextProvider.js";
import OpenFilesContextProvider from "./OpenFilesContextProvider.js";
import PostgresContextProvider from "./PostgresContextProvider.js";
import ProblemsContextProvider from "./ProblemsContextProvider.js";
import SearchContextProvider from "./SearchContextProvider.js";
import TerminalContextProvider from "./TerminalContextProvider.js";
import URLContextProvider from "./URLContextProvider.js";
/**
* Note: We are currently omitting the following providers due to bugs:
* - `CodeOutlineContextProvider`
* - `CodeHighlightsContextProvider`
*
* See this issue for details: https://github.com/continuedev/continue/issues/1365
*/
const Providers: (typeof BaseContextProvider)[] = [
DiffContextProvider,
FileTreeContextProvider,
GitHubIssuesContextProvider,
GoogleContextProvider,
TerminalContextProvider,
LocalsProvider,
OpenFilesContextProvider,
HttpContextProvider,
SearchContextProvider,
OSContextProvider,
ProblemsContextProvider,
FolderContextProvider,
DocsContextProvider,
GitLabMergeRequestContextProvider,
JiraIssuesContextProvider,
PostgresContextProvider,
DatabaseContextProvider,
CodeContextProvider,
CurrentFileContextProvider,
URLContextProvider,
ContinueProxyContextProvider,
];
export function contextProviderClassFromName(
name: ContextProviderName,
): typeof BaseContextProvider | undefined {
return Providers.find((cls) => cls.description.title === name);
}